diff --git a/assets/minecraft/atlases/armor_trims.json b/assets/minecraft/atlases/armor_trims.json index 149d65a8..7e92af33 100644 --- a/assets/minecraft/atlases/armor_trims.json +++ b/assets/minecraft/atlases/armor_trims.json @@ -1,62 +1,63 @@ { - "sources": [ - { - "type": "paletted_permutations", - "textures": [ - "trims/entity/humanoid/coast", - "trims/entity/humanoid_leggings/coast", - "trims/entity/humanoid/sentry", - "trims/entity/humanoid_leggings/sentry", - "trims/entity/humanoid/dune", - "trims/entity/humanoid_leggings/dune", - "trims/entity/humanoid/wild", - "trims/entity/humanoid_leggings/wild", - "trims/entity/humanoid/ward", - "trims/entity/humanoid_leggings/ward", - "trims/entity/humanoid/eye", - "trims/entity/humanoid_leggings/eye", - "trims/entity/humanoid/vex", - "trims/entity/humanoid_leggings/vex", - "trims/entity/humanoid/tide", - "trims/entity/humanoid_leggings/tide", - "trims/entity/humanoid/snout", - "trims/entity/humanoid_leggings/snout", - "trims/entity/humanoid/rib", - "trims/entity/humanoid_leggings/rib", - "trims/entity/humanoid/spire", - "trims/entity/humanoid_leggings/spire", - "trims/entity/humanoid/wayfinder", - "trims/entity/humanoid_leggings/wayfinder", - "trims/entity/humanoid/shaper", - "trims/entity/humanoid_leggings/shaper", - "trims/entity/humanoid/silence", - "trims/entity/humanoid_leggings/silence", - "trims/entity/humanoid/raiser", - "trims/entity/humanoid_leggings/raiser", - "trims/entity/humanoid/host", - "trims/entity/humanoid_leggings/host", - "trims/entity/humanoid/flow", - "trims/entity/humanoid_leggings/flow", - "trims/entity/humanoid/bolt", - "trims/entity/humanoid_leggings/bolt" - ], - "palette_key": "trims/color_palettes/trim_palette", - "permutations": { - "quartz": "trims/color_palettes/quartz", - "iron": "trims/color_palettes/iron", - "gold": "trims/color_palettes/gold", - "diamond": "trims/color_palettes/diamond", - "netherite": "trims/color_palettes/netherite", - "redstone": "trims/color_palettes/redstone", - "copper": "trims/color_palettes/copper", - "emerald": "trims/color_palettes/emerald", - "lapis": "trims/color_palettes/lapis", - "amethyst": "trims/color_palettes/amethyst", - "iron_darker": "trims/color_palettes/iron_darker", - "gold_darker": "trims/color_palettes/gold_darker", - "diamond_darker": "trims/color_palettes/diamond_darker", - "netherite_darker": "trims/color_palettes/netherite_darker" - } - } - ] -} + "sources": [ + { + "type": "minecraft:paletted_permutations", + "palette_key": "minecraft:trims/color_palettes/trim_palette", + "permutations": { + "amethyst": "minecraft:trims/color_palettes/amethyst", + "copper": "minecraft:trims/color_palettes/copper", + "diamond": "minecraft:trims/color_palettes/diamond", + "diamond_darker": "minecraft:trims/color_palettes/diamond_darker", + "emerald": "minecraft:trims/color_palettes/emerald", + "gold": "minecraft:trims/color_palettes/gold", + "gold_darker": "minecraft:trims/color_palettes/gold_darker", + "iron": "minecraft:trims/color_palettes/iron", + "iron_darker": "minecraft:trims/color_palettes/iron_darker", + "lapis": "minecraft:trims/color_palettes/lapis", + "netherite": "minecraft:trims/color_palettes/netherite", + "netherite_darker": "minecraft:trims/color_palettes/netherite_darker", + "quartz": "minecraft:trims/color_palettes/quartz", + "redstone": "minecraft:trims/color_palettes/redstone", + "resin": "minecraft:trims/color_palettes/resin" + }, + "textures": [ + "minecraft:trims/entity/humanoid/sentry", + "minecraft:trims/entity/humanoid_leggings/sentry", + "minecraft:trims/entity/humanoid/dune", + "minecraft:trims/entity/humanoid_leggings/dune", + "minecraft:trims/entity/humanoid/coast", + "minecraft:trims/entity/humanoid_leggings/coast", + "minecraft:trims/entity/humanoid/wild", + "minecraft:trims/entity/humanoid_leggings/wild", + "minecraft:trims/entity/humanoid/ward", + "minecraft:trims/entity/humanoid_leggings/ward", + "minecraft:trims/entity/humanoid/eye", + "minecraft:trims/entity/humanoid_leggings/eye", + "minecraft:trims/entity/humanoid/vex", + "minecraft:trims/entity/humanoid_leggings/vex", + "minecraft:trims/entity/humanoid/tide", + "minecraft:trims/entity/humanoid_leggings/tide", + "minecraft:trims/entity/humanoid/snout", + "minecraft:trims/entity/humanoid_leggings/snout", + "minecraft:trims/entity/humanoid/rib", + "minecraft:trims/entity/humanoid_leggings/rib", + "minecraft:trims/entity/humanoid/spire", + "minecraft:trims/entity/humanoid_leggings/spire", + "minecraft:trims/entity/humanoid/wayfinder", + "minecraft:trims/entity/humanoid_leggings/wayfinder", + "minecraft:trims/entity/humanoid/shaper", + "minecraft:trims/entity/humanoid_leggings/shaper", + "minecraft:trims/entity/humanoid/silence", + "minecraft:trims/entity/humanoid_leggings/silence", + "minecraft:trims/entity/humanoid/raiser", + "minecraft:trims/entity/humanoid_leggings/raiser", + "minecraft:trims/entity/humanoid/host", + "minecraft:trims/entity/humanoid_leggings/host", + "minecraft:trims/entity/humanoid/flow", + "minecraft:trims/entity/humanoid_leggings/flow", + "minecraft:trims/entity/humanoid/bolt", + "minecraft:trims/entity/humanoid_leggings/bolt" + ] + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/atlases/banner_patterns.json b/assets/minecraft/atlases/banner_patterns.json index e9f9dce7..b683a982 100644 --- a/assets/minecraft/atlases/banner_patterns.json +++ b/assets/minecraft/atlases/banner_patterns.json @@ -1,13 +1,13 @@ { - "sources": [ - { - "type": "single", - "resource": "entity/banner_base" - }, - { - "type": "directory", - "source": "entity/banner", - "prefix": "entity/banner/" - } - ] + "sources": [ + { + "type": "minecraft:single", + "resource": "minecraft:entity/banner_base" + }, + { + "type": "minecraft:directory", + "prefix": "entity/banner/", + "source": "entity/banner" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/beds.json b/assets/minecraft/atlases/beds.json index 7d552c51..d2e798a5 100644 --- a/assets/minecraft/atlases/beds.json +++ b/assets/minecraft/atlases/beds.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "entity/bed", - "prefix": "entity/bed/" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "entity/bed/", + "source": "entity/bed" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/blocks.json b/assets/minecraft/atlases/blocks.json index d426b692..d2cf5a79 100644 --- a/assets/minecraft/atlases/blocks.json +++ b/assets/minecraft/atlases/blocks.json @@ -1,57 +1,58 @@ { - "sources": [ - { - "type": "directory", - "source": "block", - "prefix": "block/" - }, - { - "type": "directory", - "source": "item", - "prefix": "item/" - }, - { - "type": "directory", - "source": "entity/conduit", - "prefix": "entity/conduit/" - }, - { - "type": "single", - "resource": "entity/bell/bell_body" - }, - { - "type": "single", - "resource": "entity/decorated_pot/decorated_pot_side" - }, - { - "type": "single", - "resource": "entity/enchanting_table_book" - }, - { - "type": "paletted_permutations", - "textures": [ - "trims/items/leggings_trim", - "trims/items/chestplate_trim", - "trims/items/helmet_trim", - "trims/items/boots_trim" - ], - "palette_key": "trims/color_palettes/trim_palette", - "permutations": { - "quartz": "trims/color_palettes/quartz", - "iron": "trims/color_palettes/iron", - "gold": "trims/color_palettes/gold", - "diamond": "trims/color_palettes/diamond", - "netherite": "trims/color_palettes/netherite", - "redstone": "trims/color_palettes/redstone", - "copper": "trims/color_palettes/copper", - "emerald": "trims/color_palettes/emerald", - "lapis": "trims/color_palettes/lapis", - "amethyst": "trims/color_palettes/amethyst", - "iron_darker": "trims/color_palettes/iron_darker", - "gold_darker": "trims/color_palettes/gold_darker", - "diamond_darker": "trims/color_palettes/diamond_darker", - "netherite_darker": "trims/color_palettes/netherite_darker" - } - } - ] -} + "sources": [ + { + "type": "minecraft:directory", + "prefix": "block/", + "source": "block" + }, + { + "type": "minecraft:directory", + "prefix": "item/", + "source": "item" + }, + { + "type": "minecraft:directory", + "prefix": "entity/conduit/", + "source": "entity/conduit" + }, + { + "type": "minecraft:single", + "resource": "minecraft:entity/bell/bell_body" + }, + { + "type": "minecraft:single", + "resource": "minecraft:entity/decorated_pot/decorated_pot_side" + }, + { + "type": "minecraft:single", + "resource": "minecraft:entity/enchanting_table_book" + }, + { + "type": "minecraft:paletted_permutations", + "palette_key": "minecraft:trims/color_palettes/trim_palette", + "permutations": { + "amethyst": "minecraft:trims/color_palettes/amethyst", + "copper": "minecraft:trims/color_palettes/copper", + "diamond": "minecraft:trims/color_palettes/diamond", + "diamond_darker": "minecraft:trims/color_palettes/diamond_darker", + "emerald": "minecraft:trims/color_palettes/emerald", + "gold": "minecraft:trims/color_palettes/gold", + "gold_darker": "minecraft:trims/color_palettes/gold_darker", + "iron": "minecraft:trims/color_palettes/iron", + "iron_darker": "minecraft:trims/color_palettes/iron_darker", + "lapis": "minecraft:trims/color_palettes/lapis", + "netherite": "minecraft:trims/color_palettes/netherite", + "netherite_darker": "minecraft:trims/color_palettes/netherite_darker", + "quartz": "minecraft:trims/color_palettes/quartz", + "redstone": "minecraft:trims/color_palettes/redstone", + "resin": "minecraft:trims/color_palettes/resin" + }, + "textures": [ + "minecraft:trims/items/helmet_trim", + "minecraft:trims/items/chestplate_trim", + "minecraft:trims/items/leggings_trim", + "minecraft:trims/items/boots_trim" + ] + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/atlases/chests.json b/assets/minecraft/atlases/chests.json index 963ff39c..81a68b1c 100644 --- a/assets/minecraft/atlases/chests.json +++ b/assets/minecraft/atlases/chests.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "entity/chest", - "prefix": "entity/chest/" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "entity/chest/", + "source": "entity/chest" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/decorated_pot.json b/assets/minecraft/atlases/decorated_pot.json index 0eb56e55..57356d98 100644 --- a/assets/minecraft/atlases/decorated_pot.json +++ b/assets/minecraft/atlases/decorated_pot.json @@ -1,9 +1,9 @@ { "sources": [ { - "type": "directory", - "source": "entity/decorated_pot", - "prefix": "entity/decorated_pot/" + "type": "minecraft:directory", + "prefix": "entity/decorated_pot/", + "source": "entity/decorated_pot" } ] -} +} \ No newline at end of file diff --git a/assets/minecraft/atlases/gui.json b/assets/minecraft/atlases/gui.json index b76173f0..fd2c246a 100644 --- a/assets/minecraft/atlases/gui.json +++ b/assets/minecraft/atlases/gui.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "gui/sprites", - "prefix": "" - } - ] -} + "sources": [ + { + "type": "minecraft:directory", + "prefix": "", + "source": "gui/sprites" + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/atlases/map_decorations.json b/assets/minecraft/atlases/map_decorations.json index 2bd4ced9..f5cf7910 100644 --- a/assets/minecraft/atlases/map_decorations.json +++ b/assets/minecraft/atlases/map_decorations.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "map/decorations", - "prefix": "" - } - ] -} + "sources": [ + { + "type": "minecraft:directory", + "prefix": "", + "source": "map/decorations" + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/atlases/mob_effects.json b/assets/minecraft/atlases/mob_effects.json index cb14804c..d159398c 100644 --- a/assets/minecraft/atlases/mob_effects.json +++ b/assets/minecraft/atlases/mob_effects.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "mob_effect", - "prefix": "" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "", + "source": "mob_effect" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/paintings.json b/assets/minecraft/atlases/paintings.json index 4153b347..1345d6d1 100644 --- a/assets/minecraft/atlases/paintings.json +++ b/assets/minecraft/atlases/paintings.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "painting", - "prefix": "" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "", + "source": "painting" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/particles.json b/assets/minecraft/atlases/particles.json index 896f5af1..18229aff 100644 --- a/assets/minecraft/atlases/particles.json +++ b/assets/minecraft/atlases/particles.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "particle", - "prefix": "" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "", + "source": "particle" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/shield_patterns.json b/assets/minecraft/atlases/shield_patterns.json index 94486579..77793ed1 100644 --- a/assets/minecraft/atlases/shield_patterns.json +++ b/assets/minecraft/atlases/shield_patterns.json @@ -1,17 +1,17 @@ { - "sources": [ - { - "type": "single", - "resource": "entity/shield_base" - }, - { - "type": "single", - "resource": "entity/shield_base_nopattern" - }, - { - "type": "directory", - "source": "entity/shield", - "prefix": "entity/shield/" - } - ] + "sources": [ + { + "type": "minecraft:single", + "resource": "minecraft:entity/shield_base" + }, + { + "type": "minecraft:single", + "resource": "minecraft:entity/shield_base_nopattern" + }, + { + "type": "minecraft:directory", + "prefix": "entity/shield/", + "source": "entity/shield" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/shulker_boxes.json b/assets/minecraft/atlases/shulker_boxes.json index 2e519094..d4ecef71 100644 --- a/assets/minecraft/atlases/shulker_boxes.json +++ b/assets/minecraft/atlases/shulker_boxes.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "entity/shulker", - "prefix": "entity/shulker/" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "entity/shulker/", + "source": "entity/shulker" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/atlases/signs.json b/assets/minecraft/atlases/signs.json index dc198756..1f34aaa1 100644 --- a/assets/minecraft/atlases/signs.json +++ b/assets/minecraft/atlases/signs.json @@ -1,9 +1,9 @@ { - "sources": [ - { - "type": "directory", - "source": "entity/signs", - "prefix": "entity/signs/" - } - ] + "sources": [ + { + "type": "minecraft:directory", + "prefix": "entity/signs/", + "source": "entity/signs" + } + ] } \ No newline at end of file diff --git a/assets/minecraft/blockstates/acacia_trapdoor.json b/assets/minecraft/blockstates/acacia_trapdoor.json index b91b2fc0..3518fc7a 100644 --- a/assets/minecraft/blockstates/acacia_trapdoor.json +++ b/assets/minecraft/blockstates/acacia_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/acacia_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/acacia_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/bamboo_fence.json b/assets/minecraft/blockstates/bamboo_fence.json index 8160db97..fe47ca8f 100644 --- a/assets/minecraft/blockstates/bamboo_fence.json +++ b/assets/minecraft/blockstates/bamboo_fence.json @@ -7,8 +7,7 @@ }, { "apply": { - "model": "minecraft:block/bamboo_fence_side_north", - "uvlock": false + "model": "minecraft:block/bamboo_fence_side_north" }, "when": { "north": "true" @@ -16,8 +15,7 @@ }, { "apply": { - "model": "minecraft:block/bamboo_fence_side_east", - "uvlock": false + "model": "minecraft:block/bamboo_fence_side_east" }, "when": { "east": "true" @@ -25,8 +23,7 @@ }, { "apply": { - "model": "minecraft:block/bamboo_fence_side_south", - "uvlock": false + "model": "minecraft:block/bamboo_fence_side_south" }, "when": { "south": "true" @@ -34,8 +31,7 @@ }, { "apply": { - "model": "minecraft:block/bamboo_fence_side_west", - "uvlock": false + "model": "minecraft:block/bamboo_fence_side_west" }, "when": { "west": "true" diff --git a/assets/minecraft/blockstates/bamboo_fence_gate.json b/assets/minecraft/blockstates/bamboo_fence_gate.json index 12111baf..f989df6c 100644 --- a/assets/minecraft/blockstates/bamboo_fence_gate.json +++ b/assets/minecraft/blockstates/bamboo_fence_gate.json @@ -2,78 +2,62 @@ "variants": { "facing=east,in_wall=false,open=false": { "model": "minecraft:block/bamboo_fence_gate", - "uvlock": false, "y": 270 }, "facing=east,in_wall=false,open=true": { "model": "minecraft:block/bamboo_fence_gate_open", - "uvlock": false, "y": 270 }, "facing=east,in_wall=true,open=false": { "model": "minecraft:block/bamboo_fence_gate_wall", - "uvlock": false, "y": 270 }, "facing=east,in_wall=true,open=true": { "model": "minecraft:block/bamboo_fence_gate_wall_open", - "uvlock": false, "y": 270 }, "facing=north,in_wall=false,open=false": { "model": "minecraft:block/bamboo_fence_gate", - "uvlock": false, "y": 180 }, "facing=north,in_wall=false,open=true": { "model": "minecraft:block/bamboo_fence_gate_open", - "uvlock": false, "y": 180 }, "facing=north,in_wall=true,open=false": { "model": "minecraft:block/bamboo_fence_gate_wall", - "uvlock": false, "y": 180 }, "facing=north,in_wall=true,open=true": { "model": "minecraft:block/bamboo_fence_gate_wall_open", - "uvlock": false, "y": 180 }, "facing=south,in_wall=false,open=false": { - "model": "minecraft:block/bamboo_fence_gate", - "uvlock": false + "model": "minecraft:block/bamboo_fence_gate" }, "facing=south,in_wall=false,open=true": { - "model": "minecraft:block/bamboo_fence_gate_open", - "uvlock": false + "model": "minecraft:block/bamboo_fence_gate_open" }, "facing=south,in_wall=true,open=false": { - "model": "minecraft:block/bamboo_fence_gate_wall", - "uvlock": false + "model": "minecraft:block/bamboo_fence_gate_wall" }, "facing=south,in_wall=true,open=true": { - "model": "minecraft:block/bamboo_fence_gate_wall_open", - "uvlock": false + "model": "minecraft:block/bamboo_fence_gate_wall_open" }, "facing=west,in_wall=false,open=false": { "model": "minecraft:block/bamboo_fence_gate", - "uvlock": false, "y": 90 }, "facing=west,in_wall=false,open=true": { "model": "minecraft:block/bamboo_fence_gate_open", - "uvlock": false, "y": 90 }, "facing=west,in_wall=true,open=false": { "model": "minecraft:block/bamboo_fence_gate_wall", - "uvlock": false, "y": 90 }, "facing=west,in_wall=true,open=true": { "model": "minecraft:block/bamboo_fence_gate_wall_open", - "uvlock": false, "y": 90 } } diff --git a/assets/minecraft/blockstates/bamboo_trapdoor.json b/assets/minecraft/blockstates/bamboo_trapdoor.json index 6b5d03b5..e1b5bd14 100644 --- a/assets/minecraft/blockstates/bamboo_trapdoor.json +++ b/assets/minecraft/blockstates/bamboo_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/bamboo_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/bamboo_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/birch_trapdoor.json b/assets/minecraft/blockstates/birch_trapdoor.json index 47b471d6..a8bb88c0 100644 --- a/assets/minecraft/blockstates/birch_trapdoor.json +++ b/assets/minecraft/blockstates/birch_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/birch_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/birch_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/brown_mushroom_block.json b/assets/minecraft/blockstates/brown_mushroom_block.json index be4820b4..9edb9370 100644 --- a/assets/minecraft/blockstates/brown_mushroom_block.json +++ b/assets/minecraft/blockstates/brown_mushroom_block.json @@ -69,7 +69,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 90 }, "when": { @@ -79,7 +78,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 180 }, "when": { @@ -89,7 +87,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 270 }, "when": { @@ -99,7 +96,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 270 }, "when": { @@ -109,7 +105,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 90 }, "when": { diff --git a/assets/minecraft/blockstates/bush.json b/assets/minecraft/blockstates/bush.json new file mode 100644 index 00000000..55d8078c --- /dev/null +++ b/assets/minecraft/blockstates/bush.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/bush" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/cactus_flower.json b/assets/minecraft/blockstates/cactus_flower.json new file mode 100644 index 00000000..24f6f69b --- /dev/null +++ b/assets/minecraft/blockstates/cactus_flower.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/cactus_flower" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/cherry_trapdoor.json b/assets/minecraft/blockstates/cherry_trapdoor.json index aa843d3f..90aac961 100644 --- a/assets/minecraft/blockstates/cherry_trapdoor.json +++ b/assets/minecraft/blockstates/cherry_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/cherry_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/cherry_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/chiseled_bookshelf.json b/assets/minecraft/blockstates/chiseled_bookshelf.json index 85ec035a..0c9b22b9 100644 --- a/assets/minecraft/blockstates/chiseled_bookshelf.json +++ b/assets/minecraft/blockstates/chiseled_bookshelf.json @@ -3,8 +3,7 @@ { "apply": { "model": "minecraft:block/chiseled_bookshelf", - "uvlock": true, - "y": 0 + "uvlock": true }, "when": { "facing": "north" @@ -12,8 +11,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_left", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_left" }, "when": { "AND": [ @@ -28,8 +26,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_left", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_left" }, "when": { "AND": [ @@ -44,8 +41,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_mid", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_mid" }, "when": { "AND": [ @@ -60,8 +56,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_mid", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_mid" }, "when": { "AND": [ @@ -76,8 +71,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_right", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_top_right" }, "when": { "AND": [ @@ -92,8 +86,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_right", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_top_right" }, "when": { "AND": [ @@ -108,8 +101,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_left", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_left" }, "when": { "AND": [ @@ -124,8 +116,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_left", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_left" }, "when": { "AND": [ @@ -140,8 +131,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_mid", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_mid" }, "when": { "AND": [ @@ -156,8 +146,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_mid", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_mid" }, "when": { "AND": [ @@ -172,8 +161,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_right", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_occupied_slot_bottom_right" }, "when": { "AND": [ @@ -188,8 +176,7 @@ }, { "apply": { - "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_right", - "y": 0 + "model": "minecraft:block/chiseled_bookshelf_empty_slot_bottom_right" }, "when": { "AND": [ diff --git a/assets/minecraft/blockstates/chiseled_resin_bricks.json b/assets/minecraft/blockstates/chiseled_resin_bricks.json new file mode 100644 index 00000000..fd9c6454 --- /dev/null +++ b/assets/minecraft/blockstates/chiseled_resin_bricks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/chiseled_resin_bricks" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/closed_eyeblossom.json b/assets/minecraft/blockstates/closed_eyeblossom.json new file mode 100644 index 00000000..7a39dcf3 --- /dev/null +++ b/assets/minecraft/blockstates/closed_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/closed_eyeblossom" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/creaking_heart.json b/assets/minecraft/blockstates/creaking_heart.json index 5eb05dda..116f6e50 100644 --- a/assets/minecraft/blockstates/creaking_heart.json +++ b/assets/minecraft/blockstates/creaking_heart.json @@ -1,40 +1,40 @@ { "variants": { - "axis=x,creaking=active": { - "model": "minecraft:block/creaking_heart_active_horizontal", + "axis=x,creaking_heart_state=awake": { + "model": "minecraft:block/creaking_heart_awake_horizontal", "x": 90, "y": 90 }, - "axis=x,creaking=disabled": { + "axis=x,creaking_heart_state=dormant": { + "model": "minecraft:block/creaking_heart_dormant_horizontal", + "x": 90, + "y": 90 + }, + "axis=x,creaking_heart_state=uprooted": { "model": "minecraft:block/creaking_heart_horizontal", "x": 90, "y": 90 }, - "axis=x,creaking=dormant": { - "model": "minecraft:block/creaking_heart_active_horizontal", - "x": 90, - "y": 90 + "axis=y,creaking_heart_state=awake": { + "model": "minecraft:block/creaking_heart_awake" }, - "axis=y,creaking=active": { - "model": "minecraft:block/creaking_heart_active" + "axis=y,creaking_heart_state=dormant": { + "model": "minecraft:block/creaking_heart_dormant" }, - "axis=y,creaking=disabled": { + "axis=y,creaking_heart_state=uprooted": { "model": "minecraft:block/creaking_heart" }, - "axis=y,creaking=dormant": { - "model": "minecraft:block/creaking_heart_active" - }, - "axis=z,creaking=active": { - "model": "minecraft:block/creaking_heart_active_horizontal", + "axis=z,creaking_heart_state=awake": { + "model": "minecraft:block/creaking_heart_awake_horizontal", "x": 90 }, - "axis=z,creaking=disabled": { + "axis=z,creaking_heart_state=dormant": { + "model": "minecraft:block/creaking_heart_dormant_horizontal", + "x": 90 + }, + "axis=z,creaking_heart_state=uprooted": { "model": "minecraft:block/creaking_heart_horizontal", "x": 90 - }, - "axis=z,creaking=dormant": { - "model": "minecraft:block/creaking_heart_active_horizontal", - "x": 90 } } } \ No newline at end of file diff --git a/assets/minecraft/blockstates/crimson_trapdoor.json b/assets/minecraft/blockstates/crimson_trapdoor.json index a3be29c0..50f81360 100644 --- a/assets/minecraft/blockstates/crimson_trapdoor.json +++ b/assets/minecraft/blockstates/crimson_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/crimson_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/crimson_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/end_gateway.json b/assets/minecraft/blockstates/end_gateway.json index 2b5f683e..cc89ed7c 100644 --- a/assets/minecraft/blockstates/end_gateway.json +++ b/assets/minecraft/blockstates/end_gateway.json @@ -1,7 +1,7 @@ { "variants": { "": { - "model": "minecraft:block/end_portal" + "model": "minecraft:block/end_gateway" } } } \ No newline at end of file diff --git a/assets/minecraft/blockstates/firefly_bush.json b/assets/minecraft/blockstates/firefly_bush.json new file mode 100644 index 00000000..37303453 --- /dev/null +++ b/assets/minecraft/blockstates/firefly_bush.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/firefly_bush" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/jungle_trapdoor.json b/assets/minecraft/blockstates/jungle_trapdoor.json index 23178033..c858f773 100644 --- a/assets/minecraft/blockstates/jungle_trapdoor.json +++ b/assets/minecraft/blockstates/jungle_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/jungle_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/jungle_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/leaf_litter.json b/assets/minecraft/blockstates/leaf_litter.json new file mode 100644 index 00000000..165771c1 --- /dev/null +++ b/assets/minecraft/blockstates/leaf_litter.json @@ -0,0 +1,160 @@ +{ + "multipart": [ + { + "apply": { + "model": "minecraft:block/leaf_litter_1" + }, + "when": { + "facing": "north", + "segment_amount": "1" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_1", + "y": 90 + }, + "when": { + "facing": "east", + "segment_amount": "1" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_1", + "y": 180 + }, + "when": { + "facing": "south", + "segment_amount": "1" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_1", + "y": 270 + }, + "when": { + "facing": "west", + "segment_amount": "1" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_2" + }, + "when": { + "facing": "north", + "segment_amount": "2|3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_2", + "y": 90 + }, + "when": { + "facing": "east", + "segment_amount": "2|3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_2", + "y": 180 + }, + "when": { + "facing": "south", + "segment_amount": "2|3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_2", + "y": 270 + }, + "when": { + "facing": "west", + "segment_amount": "2|3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_3" + }, + "when": { + "facing": "north", + "segment_amount": "3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_3", + "y": 90 + }, + "when": { + "facing": "east", + "segment_amount": "3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_3", + "y": 180 + }, + "when": { + "facing": "south", + "segment_amount": "3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_3", + "y": 270 + }, + "when": { + "facing": "west", + "segment_amount": "3" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_4" + }, + "when": { + "facing": "north", + "segment_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_4", + "y": 90 + }, + "when": { + "facing": "east", + "segment_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_4", + "y": 180 + }, + "when": { + "facing": "south", + "segment_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/leaf_litter_4", + "y": 270 + }, + "when": { + "facing": "west", + "segment_amount": "4" + } + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/mangrove_trapdoor.json b/assets/minecraft/blockstates/mangrove_trapdoor.json index cab73e2e..17c336a6 100644 --- a/assets/minecraft/blockstates/mangrove_trapdoor.json +++ b/assets/minecraft/blockstates/mangrove_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/mangrove_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/mangrove_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/mushroom_stem.json b/assets/minecraft/blockstates/mushroom_stem.json index 7bcbe438..f343a9b9 100644 --- a/assets/minecraft/blockstates/mushroom_stem.json +++ b/assets/minecraft/blockstates/mushroom_stem.json @@ -69,7 +69,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 90 }, "when": { @@ -79,7 +78,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 180 }, "when": { @@ -89,7 +87,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 270 }, "when": { @@ -99,7 +96,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 270 }, "when": { @@ -109,7 +105,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 90 }, "when": { diff --git a/assets/minecraft/blockstates/open_eyeblossom.json b/assets/minecraft/blockstates/open_eyeblossom.json new file mode 100644 index 00000000..17dc8f75 --- /dev/null +++ b/assets/minecraft/blockstates/open_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/open_eyeblossom" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/pale_oak_trapdoor.json b/assets/minecraft/blockstates/pale_oak_trapdoor.json index 52e57594..41deeb52 100644 --- a/assets/minecraft/blockstates/pale_oak_trapdoor.json +++ b/assets/minecraft/blockstates/pale_oak_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/pale_oak_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/pale_oak_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/pink_petals.json b/assets/minecraft/blockstates/pink_petals.json index 990e576e..8784501e 100644 --- a/assets/minecraft/blockstates/pink_petals.json +++ b/assets/minecraft/blockstates/pink_petals.json @@ -5,8 +5,7 @@ "model": "minecraft:block/pink_petals_1" }, "when": { - "facing": "north", - "flower_amount": "1|2|3|4" + "facing": "north" } }, { @@ -15,8 +14,7 @@ "y": 90 }, "when": { - "facing": "east", - "flower_amount": "1|2|3|4" + "facing": "east" } }, { @@ -25,8 +23,7 @@ "y": 180 }, "when": { - "facing": "south", - "flower_amount": "1|2|3|4" + "facing": "south" } }, { @@ -35,8 +32,7 @@ "y": 270 }, "when": { - "facing": "west", - "flower_amount": "1|2|3|4" + "facing": "west" } }, { diff --git a/assets/minecraft/blockstates/potted_closed_eyeblossom.json b/assets/minecraft/blockstates/potted_closed_eyeblossom.json new file mode 100644 index 00000000..6f55d460 --- /dev/null +++ b/assets/minecraft/blockstates/potted_closed_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/potted_closed_eyeblossom" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/potted_open_eyeblossom.json b/assets/minecraft/blockstates/potted_open_eyeblossom.json new file mode 100644 index 00000000..e5b6b9b7 --- /dev/null +++ b/assets/minecraft/blockstates/potted_open_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/potted_open_eyeblossom" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/red_mushroom_block.json b/assets/minecraft/blockstates/red_mushroom_block.json index 6e61afde..2312116f 100644 --- a/assets/minecraft/blockstates/red_mushroom_block.json +++ b/assets/minecraft/blockstates/red_mushroom_block.json @@ -69,7 +69,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 90 }, "when": { @@ -79,7 +78,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 180 }, "when": { @@ -89,7 +87,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "y": 270 }, "when": { @@ -99,7 +96,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 270 }, "when": { @@ -109,7 +105,6 @@ { "apply": { "model": "minecraft:block/mushroom_block_inside", - "uvlock": false, "x": 90 }, "when": { diff --git a/assets/minecraft/blockstates/resin_block.json b/assets/minecraft/blockstates/resin_block.json new file mode 100644 index 00000000..58a8cbab --- /dev/null +++ b/assets/minecraft/blockstates/resin_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/resin_block" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/resin_brick_slab.json b/assets/minecraft/blockstates/resin_brick_slab.json new file mode 100644 index 00000000..432eaa28 --- /dev/null +++ b/assets/minecraft/blockstates/resin_brick_slab.json @@ -0,0 +1,13 @@ +{ + "variants": { + "type=bottom": { + "model": "minecraft:block/resin_brick_slab" + }, + "type=double": { + "model": "minecraft:block/resin_bricks" + }, + "type=top": { + "model": "minecraft:block/resin_brick_slab_top" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/resin_brick_stairs.json b/assets/minecraft/blockstates/resin_brick_stairs.json new file mode 100644 index 00000000..638f42ee --- /dev/null +++ b/assets/minecraft/blockstates/resin_brick_stairs.json @@ -0,0 +1,209 @@ +{ + "variants": { + "facing=east,half=bottom,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 270 + }, + "facing=east,half=bottom,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner" + }, + "facing=east,half=bottom,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 270 + }, + "facing=east,half=bottom,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer" + }, + "facing=east,half=bottom,shape=straight": { + "model": "minecraft:block/resin_brick_stairs" + }, + "facing=east,half=top,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 90 + }, + "facing=east,half=top,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 90 + }, + "facing=south,half=bottom,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer" + }, + "facing=south,half=bottom,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 90 + }, + "facing=south,half=bottom,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "y": 90 + }, + "facing=south,half=top,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 90 + }, + "facing=south,half=top,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "x": 180, + "y": 90 + }, + "facing=west,half=bottom,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 90 + }, + "facing=west,half=bottom,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "y": 180 + }, + "facing=west,half=bottom,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 90 + }, + "facing=west,half=bottom,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "y": 180 + }, + "facing=west,half=bottom,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "minecraft:block/resin_brick_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "minecraft:block/resin_brick_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "minecraft:block/resin_brick_stairs", + "uvlock": true, + "x": 180, + "y": 180 + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/resin_brick_wall.json b/assets/minecraft/blockstates/resin_brick_wall.json new file mode 100644 index 00000000..6c057686 --- /dev/null +++ b/assets/minecraft/blockstates/resin_brick_wall.json @@ -0,0 +1,90 @@ +{ + "multipart": [ + { + "apply": { + "model": "minecraft:block/resin_brick_wall_post" + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side", + "uvlock": true + }, + "when": { + "north": "low" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side", + "uvlock": true, + "y": 90 + }, + "when": { + "east": "low" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side", + "uvlock": true, + "y": 180 + }, + "when": { + "south": "low" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side", + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side_tall", + "uvlock": true + }, + "when": { + "north": "tall" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side_tall", + "uvlock": true, + "y": 90 + }, + "when": { + "east": "tall" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side_tall", + "uvlock": true, + "y": 180 + }, + "when": { + "south": "tall" + } + }, + { + "apply": { + "model": "minecraft:block/resin_brick_wall_side_tall", + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" + } + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/resin_bricks.json b/assets/minecraft/blockstates/resin_bricks.json new file mode 100644 index 00000000..b09851a8 --- /dev/null +++ b/assets/minecraft/blockstates/resin_bricks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/resin_bricks" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/resin_clump.json b/assets/minecraft/blockstates/resin_clump.json new file mode 100644 index 00000000..5e9fe569 --- /dev/null +++ b/assets/minecraft/blockstates/resin_clump.json @@ -0,0 +1,150 @@ +{ + "multipart": [ + { + "apply": { + "model": "minecraft:block/resin_clump" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump" + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 90 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 180 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "y": 270 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "x": 270 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "minecraft:block/resin_clump", + "uvlock": true, + "x": 90 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/short_dry_grass.json b/assets/minecraft/blockstates/short_dry_grass.json new file mode 100644 index 00000000..e13569e8 --- /dev/null +++ b/assets/minecraft/blockstates/short_dry_grass.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/short_dry_grass" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/spruce_trapdoor.json b/assets/minecraft/blockstates/spruce_trapdoor.json index 8aa277c2..4b494ff1 100644 --- a/assets/minecraft/blockstates/spruce_trapdoor.json +++ b/assets/minecraft/blockstates/spruce_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/spruce_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/spruce_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/tall_dry_grass.json b/assets/minecraft/blockstates/tall_dry_grass.json new file mode 100644 index 00000000..3fa49983 --- /dev/null +++ b/assets/minecraft/blockstates/tall_dry_grass.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/tall_dry_grass" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/test_block.json b/assets/minecraft/blockstates/test_block.json new file mode 100644 index 00000000..45bed9fc --- /dev/null +++ b/assets/minecraft/blockstates/test_block.json @@ -0,0 +1,16 @@ +{ + "variants": { + "mode=accept": { + "model": "minecraft:block/test_block_accept" + }, + "mode=fail": { + "model": "minecraft:block/test_block_fail" + }, + "mode=log": { + "model": "minecraft:block/test_block_log" + }, + "mode=start": { + "model": "minecraft:block/test_block_start" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/test_instance_block.json b/assets/minecraft/blockstates/test_instance_block.json new file mode 100644 index 00000000..213ba079 --- /dev/null +++ b/assets/minecraft/blockstates/test_instance_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "minecraft:block/test_instance_block" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/blockstates/trapped_chest.json b/assets/minecraft/blockstates/trapped_chest.json index f78fa579..fd8d40b1 100644 --- a/assets/minecraft/blockstates/trapped_chest.json +++ b/assets/minecraft/blockstates/trapped_chest.json @@ -1,7 +1,7 @@ { "variants": { "": { - "model": "minecraft:block/chest" + "model": "minecraft:block/trapped_chest" } } } \ No newline at end of file diff --git a/assets/minecraft/blockstates/warped_trapdoor.json b/assets/minecraft/blockstates/warped_trapdoor.json index b4d8b33b..16d8a5ee 100644 --- a/assets/minecraft/blockstates/warped_trapdoor.json +++ b/assets/minecraft/blockstates/warped_trapdoor.json @@ -45,8 +45,7 @@ }, "facing=south,half=top,open=true": { "model": "minecraft:block/warped_trapdoor_open", - "x": 180, - "y": 0 + "x": 180 }, "facing=west,half=bottom,open=false": { "model": "minecraft:block/warped_trapdoor_bottom", diff --git a/assets/minecraft/blockstates/wildflowers.json b/assets/minecraft/blockstates/wildflowers.json new file mode 100644 index 00000000..3a2829ef --- /dev/null +++ b/assets/minecraft/blockstates/wildflowers.json @@ -0,0 +1,156 @@ +{ + "multipart": [ + { + "apply": { + "model": "minecraft:block/wildflowers_1" + }, + "when": { + "facing": "north" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_1", + "y": 90 + }, + "when": { + "facing": "east" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_1", + "y": 180 + }, + "when": { + "facing": "south" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_1", + "y": 270 + }, + "when": { + "facing": "west" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_2" + }, + "when": { + "facing": "north", + "flower_amount": "2|3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_2", + "y": 90 + }, + "when": { + "facing": "east", + "flower_amount": "2|3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_2", + "y": 180 + }, + "when": { + "facing": "south", + "flower_amount": "2|3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_2", + "y": 270 + }, + "when": { + "facing": "west", + "flower_amount": "2|3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_3" + }, + "when": { + "facing": "north", + "flower_amount": "3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_3", + "y": 90 + }, + "when": { + "facing": "east", + "flower_amount": "3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_3", + "y": 180 + }, + "when": { + "facing": "south", + "flower_amount": "3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_3", + "y": 270 + }, + "when": { + "facing": "west", + "flower_amount": "3|4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_4" + }, + "when": { + "facing": "north", + "flower_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_4", + "y": 90 + }, + "when": { + "facing": "east", + "flower_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_4", + "y": 180 + }, + "when": { + "facing": "south", + "flower_amount": "4" + } + }, + { + "apply": { + "model": "minecraft:block/wildflowers_4", + "y": 270 + }, + "when": { + "facing": "west", + "flower_amount": "4" + } + } + ] +} \ No newline at end of file diff --git a/assets/minecraft/models/equipment/armadillo_scute.json b/assets/minecraft/equipment/armadillo_scute.json similarity index 100% rename from assets/minecraft/models/equipment/armadillo_scute.json rename to assets/minecraft/equipment/armadillo_scute.json diff --git a/assets/minecraft/models/equipment/black_carpet.json b/assets/minecraft/equipment/black_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/black_carpet.json rename to assets/minecraft/equipment/black_carpet.json diff --git a/assets/minecraft/models/equipment/blue_carpet.json b/assets/minecraft/equipment/blue_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/blue_carpet.json rename to assets/minecraft/equipment/blue_carpet.json diff --git a/assets/minecraft/models/equipment/brown_carpet.json b/assets/minecraft/equipment/brown_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/brown_carpet.json rename to assets/minecraft/equipment/brown_carpet.json diff --git a/assets/minecraft/models/equipment/chainmail.json b/assets/minecraft/equipment/chainmail.json similarity index 100% rename from assets/minecraft/models/equipment/chainmail.json rename to assets/minecraft/equipment/chainmail.json diff --git a/assets/minecraft/models/equipment/cyan_carpet.json b/assets/minecraft/equipment/cyan_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/cyan_carpet.json rename to assets/minecraft/equipment/cyan_carpet.json diff --git a/assets/minecraft/models/equipment/diamond.json b/assets/minecraft/equipment/diamond.json similarity index 100% rename from assets/minecraft/models/equipment/diamond.json rename to assets/minecraft/equipment/diamond.json diff --git a/assets/minecraft/models/equipment/elytra.json b/assets/minecraft/equipment/elytra.json similarity index 100% rename from assets/minecraft/models/equipment/elytra.json rename to assets/minecraft/equipment/elytra.json diff --git a/assets/minecraft/models/equipment/gold.json b/assets/minecraft/equipment/gold.json similarity index 100% rename from assets/minecraft/models/equipment/gold.json rename to assets/minecraft/equipment/gold.json diff --git a/assets/minecraft/models/equipment/gray_carpet.json b/assets/minecraft/equipment/gray_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/gray_carpet.json rename to assets/minecraft/equipment/gray_carpet.json diff --git a/assets/minecraft/models/equipment/green_carpet.json b/assets/minecraft/equipment/green_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/green_carpet.json rename to assets/minecraft/equipment/green_carpet.json diff --git a/assets/minecraft/models/equipment/iron.json b/assets/minecraft/equipment/iron.json similarity index 100% rename from assets/minecraft/models/equipment/iron.json rename to assets/minecraft/equipment/iron.json diff --git a/assets/minecraft/models/equipment/leather.json b/assets/minecraft/equipment/leather.json similarity index 100% rename from assets/minecraft/models/equipment/leather.json rename to assets/minecraft/equipment/leather.json diff --git a/assets/minecraft/models/equipment/light_blue_carpet.json b/assets/minecraft/equipment/light_blue_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/light_blue_carpet.json rename to assets/minecraft/equipment/light_blue_carpet.json diff --git a/assets/minecraft/models/equipment/light_gray_carpet.json b/assets/minecraft/equipment/light_gray_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/light_gray_carpet.json rename to assets/minecraft/equipment/light_gray_carpet.json diff --git a/assets/minecraft/models/equipment/lime_carpet.json b/assets/minecraft/equipment/lime_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/lime_carpet.json rename to assets/minecraft/equipment/lime_carpet.json diff --git a/assets/minecraft/models/equipment/magenta_carpet.json b/assets/minecraft/equipment/magenta_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/magenta_carpet.json rename to assets/minecraft/equipment/magenta_carpet.json diff --git a/assets/minecraft/models/equipment/netherite.json b/assets/minecraft/equipment/netherite.json similarity index 100% rename from assets/minecraft/models/equipment/netherite.json rename to assets/minecraft/equipment/netherite.json diff --git a/assets/minecraft/models/equipment/orange_carpet.json b/assets/minecraft/equipment/orange_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/orange_carpet.json rename to assets/minecraft/equipment/orange_carpet.json diff --git a/assets/minecraft/models/equipment/pink_carpet.json b/assets/minecraft/equipment/pink_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/pink_carpet.json rename to assets/minecraft/equipment/pink_carpet.json diff --git a/assets/minecraft/models/equipment/purple_carpet.json b/assets/minecraft/equipment/purple_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/purple_carpet.json rename to assets/minecraft/equipment/purple_carpet.json diff --git a/assets/minecraft/models/equipment/red_carpet.json b/assets/minecraft/equipment/red_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/red_carpet.json rename to assets/minecraft/equipment/red_carpet.json diff --git a/assets/minecraft/equipment/saddle.json b/assets/minecraft/equipment/saddle.json new file mode 100644 index 00000000..ef229b4c --- /dev/null +++ b/assets/minecraft/equipment/saddle.json @@ -0,0 +1,44 @@ +{ + "layers": { + "camel_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "donkey_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "horse_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "mule_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "pig_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "skeleton_horse_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "strider_saddle": [ + { + "texture": "minecraft:saddle" + } + ], + "zombie_horse_saddle": [ + { + "texture": "minecraft:saddle" + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/models/equipment/trader_llama.json b/assets/minecraft/equipment/trader_llama.json similarity index 100% rename from assets/minecraft/models/equipment/trader_llama.json rename to assets/minecraft/equipment/trader_llama.json diff --git a/assets/minecraft/models/equipment/turtle_scute.json b/assets/minecraft/equipment/turtle_scute.json similarity index 100% rename from assets/minecraft/models/equipment/turtle_scute.json rename to assets/minecraft/equipment/turtle_scute.json diff --git a/assets/minecraft/models/equipment/white_carpet.json b/assets/minecraft/equipment/white_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/white_carpet.json rename to assets/minecraft/equipment/white_carpet.json diff --git a/assets/minecraft/models/equipment/yellow_carpet.json b/assets/minecraft/equipment/yellow_carpet.json similarity index 100% rename from assets/minecraft/models/equipment/yellow_carpet.json rename to assets/minecraft/equipment/yellow_carpet.json diff --git a/assets/minecraft/items/acacia_boat.json b/assets/minecraft/items/acacia_boat.json new file mode 100644 index 00000000..40c386d3 --- /dev/null +++ b/assets/minecraft/items/acacia_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_button.json b/assets/minecraft/items/acacia_button.json new file mode 100644 index 00000000..a3dcd423 --- /dev/null +++ b/assets/minecraft/items/acacia_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_chest_boat.json b/assets/minecraft/items/acacia_chest_boat.json new file mode 100644 index 00000000..671be37c --- /dev/null +++ b/assets/minecraft/items/acacia_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_door.json b/assets/minecraft/items/acacia_door.json new file mode 100644 index 00000000..43b8d7c6 --- /dev/null +++ b/assets/minecraft/items/acacia_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_fence.json b/assets/minecraft/items/acacia_fence.json new file mode 100644 index 00000000..c9d21e60 --- /dev/null +++ b/assets/minecraft/items/acacia_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_fence_gate.json b/assets/minecraft/items/acacia_fence_gate.json new file mode 100644 index 00000000..59094a4a --- /dev/null +++ b/assets/minecraft/items/acacia_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_hanging_sign.json b/assets/minecraft/items/acacia_hanging_sign.json new file mode 100644 index 00000000..1c4ec4e6 --- /dev/null +++ b/assets/minecraft/items/acacia_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_leaves.json b/assets/minecraft/items/acacia_leaves.json new file mode 100644 index 00000000..bbbab39c --- /dev/null +++ b/assets/minecraft/items/acacia_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -12012264 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_log.json b/assets/minecraft/items/acacia_log.json new file mode 100644 index 00000000..d377ce70 --- /dev/null +++ b/assets/minecraft/items/acacia_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_planks.json b/assets/minecraft/items/acacia_planks.json new file mode 100644 index 00000000..017452be --- /dev/null +++ b/assets/minecraft/items/acacia_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_pressure_plate.json b/assets/minecraft/items/acacia_pressure_plate.json new file mode 100644 index 00000000..bf4e9fdc --- /dev/null +++ b/assets/minecraft/items/acacia_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_sapling.json b/assets/minecraft/items/acacia_sapling.json new file mode 100644 index 00000000..ec95e0f5 --- /dev/null +++ b/assets/minecraft/items/acacia_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_sign.json b/assets/minecraft/items/acacia_sign.json new file mode 100644 index 00000000..6b572ed3 --- /dev/null +++ b/assets/minecraft/items/acacia_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/acacia_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_slab.json b/assets/minecraft/items/acacia_slab.json new file mode 100644 index 00000000..05c1a0ba --- /dev/null +++ b/assets/minecraft/items/acacia_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_stairs.json b/assets/minecraft/items/acacia_stairs.json new file mode 100644 index 00000000..69e95274 --- /dev/null +++ b/assets/minecraft/items/acacia_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_trapdoor.json b/assets/minecraft/items/acacia_trapdoor.json new file mode 100644 index 00000000..29314826 --- /dev/null +++ b/assets/minecraft/items/acacia_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/acacia_wood.json b/assets/minecraft/items/acacia_wood.json new file mode 100644 index 00000000..8368b4ce --- /dev/null +++ b/assets/minecraft/items/acacia_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/acacia_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/activator_rail.json b/assets/minecraft/items/activator_rail.json new file mode 100644 index 00000000..855d961a --- /dev/null +++ b/assets/minecraft/items/activator_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/activator_rail" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/air.json b/assets/minecraft/items/air.json new file mode 100644 index 00000000..f0727913 --- /dev/null +++ b/assets/minecraft/items/air.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/air" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/allay_spawn_egg.json b/assets/minecraft/items/allay_spawn_egg.json new file mode 100644 index 00000000..6d668733 --- /dev/null +++ b/assets/minecraft/items/allay_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/allay_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/allium.json b/assets/minecraft/items/allium.json new file mode 100644 index 00000000..3ba9a1a7 --- /dev/null +++ b/assets/minecraft/items/allium.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/allium" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/amethyst_block.json b/assets/minecraft/items/amethyst_block.json new file mode 100644 index 00000000..5a655def --- /dev/null +++ b/assets/minecraft/items/amethyst_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/amethyst_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/amethyst_cluster.json b/assets/minecraft/items/amethyst_cluster.json new file mode 100644 index 00000000..c8bb8bea --- /dev/null +++ b/assets/minecraft/items/amethyst_cluster.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/amethyst_cluster" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/amethyst_shard.json b/assets/minecraft/items/amethyst_shard.json new file mode 100644 index 00000000..47232b2b --- /dev/null +++ b/assets/minecraft/items/amethyst_shard.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/amethyst_shard" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ancient_debris.json b/assets/minecraft/items/ancient_debris.json new file mode 100644 index 00000000..f3e19650 --- /dev/null +++ b/assets/minecraft/items/ancient_debris.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/ancient_debris" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/andesite.json b/assets/minecraft/items/andesite.json new file mode 100644 index 00000000..3f68917a --- /dev/null +++ b/assets/minecraft/items/andesite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/andesite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/andesite_slab.json b/assets/minecraft/items/andesite_slab.json new file mode 100644 index 00000000..66a9a022 --- /dev/null +++ b/assets/minecraft/items/andesite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/andesite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/andesite_stairs.json b/assets/minecraft/items/andesite_stairs.json new file mode 100644 index 00000000..fb742015 --- /dev/null +++ b/assets/minecraft/items/andesite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/andesite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/andesite_wall.json b/assets/minecraft/items/andesite_wall.json new file mode 100644 index 00000000..c9536464 --- /dev/null +++ b/assets/minecraft/items/andesite_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/andesite_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/angler_pottery_sherd.json b/assets/minecraft/items/angler_pottery_sherd.json new file mode 100644 index 00000000..61083360 --- /dev/null +++ b/assets/minecraft/items/angler_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/angler_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/anvil.json b/assets/minecraft/items/anvil.json new file mode 100644 index 00000000..8dcd36b0 --- /dev/null +++ b/assets/minecraft/items/anvil.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/anvil" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/apple.json b/assets/minecraft/items/apple.json new file mode 100644 index 00000000..775daabb --- /dev/null +++ b/assets/minecraft/items/apple.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/apple" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/archer_pottery_sherd.json b/assets/minecraft/items/archer_pottery_sherd.json new file mode 100644 index 00000000..575adb29 --- /dev/null +++ b/assets/minecraft/items/archer_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/archer_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/armadillo_scute.json b/assets/minecraft/items/armadillo_scute.json new file mode 100644 index 00000000..90f7a530 --- /dev/null +++ b/assets/minecraft/items/armadillo_scute.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/armadillo_scute" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/armadillo_spawn_egg.json b/assets/minecraft/items/armadillo_spawn_egg.json new file mode 100644 index 00000000..cd895181 --- /dev/null +++ b/assets/minecraft/items/armadillo_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/armadillo_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/armor_stand.json b/assets/minecraft/items/armor_stand.json new file mode 100644 index 00000000..43398b3e --- /dev/null +++ b/assets/minecraft/items/armor_stand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/armor_stand" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/arms_up_pottery_sherd.json b/assets/minecraft/items/arms_up_pottery_sherd.json new file mode 100644 index 00000000..45ae4d92 --- /dev/null +++ b/assets/minecraft/items/arms_up_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/arms_up_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/arrow.json b/assets/minecraft/items/arrow.json new file mode 100644 index 00000000..5915e01e --- /dev/null +++ b/assets/minecraft/items/arrow.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/arrow" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/axolotl_bucket.json b/assets/minecraft/items/axolotl_bucket.json new file mode 100644 index 00000000..1fe9963c --- /dev/null +++ b/assets/minecraft/items/axolotl_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/axolotl_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/axolotl_spawn_egg.json b/assets/minecraft/items/axolotl_spawn_egg.json new file mode 100644 index 00000000..7f2bd75f --- /dev/null +++ b/assets/minecraft/items/axolotl_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/axolotl_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/azalea.json b/assets/minecraft/items/azalea.json new file mode 100644 index 00000000..5c538e74 --- /dev/null +++ b/assets/minecraft/items/azalea.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/azalea" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/azalea_leaves.json b/assets/minecraft/items/azalea_leaves.json new file mode 100644 index 00000000..107c301f --- /dev/null +++ b/assets/minecraft/items/azalea_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/azalea_leaves" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/azure_bluet.json b/assets/minecraft/items/azure_bluet.json new file mode 100644 index 00000000..11b192af --- /dev/null +++ b/assets/minecraft/items/azure_bluet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/azure_bluet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/baked_potato.json b/assets/minecraft/items/baked_potato.json new file mode 100644 index 00000000..3553c526 --- /dev/null +++ b/assets/minecraft/items/baked_potato.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/baked_potato" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo.json b/assets/minecraft/items/bamboo.json new file mode 100644 index 00000000..30d6b559 --- /dev/null +++ b/assets/minecraft/items/bamboo.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_block.json b/assets/minecraft/items/bamboo_block.json new file mode 100644 index 00000000..8dc88463 --- /dev/null +++ b/assets/minecraft/items/bamboo_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_button.json b/assets/minecraft/items/bamboo_button.json new file mode 100644 index 00000000..57d5c812 --- /dev/null +++ b/assets/minecraft/items/bamboo_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_chest_raft.json b/assets/minecraft/items/bamboo_chest_raft.json new file mode 100644 index 00000000..a7b219b2 --- /dev/null +++ b/assets/minecraft/items/bamboo_chest_raft.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo_chest_raft" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_door.json b/assets/minecraft/items/bamboo_door.json new file mode 100644 index 00000000..8728a4db --- /dev/null +++ b/assets/minecraft/items/bamboo_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_fence.json b/assets/minecraft/items/bamboo_fence.json new file mode 100644 index 00000000..9e8424db --- /dev/null +++ b/assets/minecraft/items/bamboo_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_fence_gate.json b/assets/minecraft/items/bamboo_fence_gate.json new file mode 100644 index 00000000..8db16932 --- /dev/null +++ b/assets/minecraft/items/bamboo_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_hanging_sign.json b/assets/minecraft/items/bamboo_hanging_sign.json new file mode 100644 index 00000000..7e6b5d51 --- /dev/null +++ b/assets/minecraft/items/bamboo_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_mosaic.json b/assets/minecraft/items/bamboo_mosaic.json new file mode 100644 index 00000000..49b0ddae --- /dev/null +++ b/assets/minecraft/items/bamboo_mosaic.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_mosaic" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_mosaic_slab.json b/assets/minecraft/items/bamboo_mosaic_slab.json new file mode 100644 index 00000000..d475b36a --- /dev/null +++ b/assets/minecraft/items/bamboo_mosaic_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_mosaic_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_mosaic_stairs.json b/assets/minecraft/items/bamboo_mosaic_stairs.json new file mode 100644 index 00000000..e59cde5c --- /dev/null +++ b/assets/minecraft/items/bamboo_mosaic_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_mosaic_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_planks.json b/assets/minecraft/items/bamboo_planks.json new file mode 100644 index 00000000..a73c8d15 --- /dev/null +++ b/assets/minecraft/items/bamboo_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_pressure_plate.json b/assets/minecraft/items/bamboo_pressure_plate.json new file mode 100644 index 00000000..490046fd --- /dev/null +++ b/assets/minecraft/items/bamboo_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_raft.json b/assets/minecraft/items/bamboo_raft.json new file mode 100644 index 00000000..9e224bca --- /dev/null +++ b/assets/minecraft/items/bamboo_raft.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo_raft" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_sign.json b/assets/minecraft/items/bamboo_sign.json new file mode 100644 index 00000000..c916c6a7 --- /dev/null +++ b/assets/minecraft/items/bamboo_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bamboo_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_slab.json b/assets/minecraft/items/bamboo_slab.json new file mode 100644 index 00000000..496f820b --- /dev/null +++ b/assets/minecraft/items/bamboo_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_stairs.json b/assets/minecraft/items/bamboo_stairs.json new file mode 100644 index 00000000..65326e0e --- /dev/null +++ b/assets/minecraft/items/bamboo_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bamboo_trapdoor.json b/assets/minecraft/items/bamboo_trapdoor.json new file mode 100644 index 00000000..0855c71f --- /dev/null +++ b/assets/minecraft/items/bamboo_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bamboo_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/barrel.json b/assets/minecraft/items/barrel.json new file mode 100644 index 00000000..8f362a2f --- /dev/null +++ b/assets/minecraft/items/barrel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/barrel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/barrier.json b/assets/minecraft/items/barrier.json new file mode 100644 index 00000000..75cc3b33 --- /dev/null +++ b/assets/minecraft/items/barrier.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/barrier" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/basalt.json b/assets/minecraft/items/basalt.json new file mode 100644 index 00000000..33a70621 --- /dev/null +++ b/assets/minecraft/items/basalt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/basalt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bat_spawn_egg.json b/assets/minecraft/items/bat_spawn_egg.json new file mode 100644 index 00000000..d475496b --- /dev/null +++ b/assets/minecraft/items/bat_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bat_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beacon.json b/assets/minecraft/items/beacon.json new file mode 100644 index 00000000..814878e5 --- /dev/null +++ b/assets/minecraft/items/beacon.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/beacon" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bedrock.json b/assets/minecraft/items/bedrock.json new file mode 100644 index 00000000..89f068fe --- /dev/null +++ b/assets/minecraft/items/bedrock.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bedrock" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bee_nest.json b/assets/minecraft/items/bee_nest.json new file mode 100644 index 00000000..cb918fe0 --- /dev/null +++ b/assets/minecraft/items/bee_nest.json @@ -0,0 +1,20 @@ +{ + "model": { + "type": "minecraft:select", + "block_state_property": "honey_level", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bee_nest_honey" + }, + "when": "5" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:block/bee_nest_empty" + }, + "property": "minecraft:block_state" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bee_spawn_egg.json b/assets/minecraft/items/bee_spawn_egg.json new file mode 100644 index 00000000..a0a8cb0e --- /dev/null +++ b/assets/minecraft/items/bee_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bee_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beef.json b/assets/minecraft/items/beef.json new file mode 100644 index 00000000..d1bf5b04 --- /dev/null +++ b/assets/minecraft/items/beef.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/beef" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beehive.json b/assets/minecraft/items/beehive.json new file mode 100644 index 00000000..279dc4b8 --- /dev/null +++ b/assets/minecraft/items/beehive.json @@ -0,0 +1,20 @@ +{ + "model": { + "type": "minecraft:select", + "block_state_property": "honey_level", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:block/beehive_honey" + }, + "when": "5" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:block/beehive_empty" + }, + "property": "minecraft:block_state" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beetroot.json b/assets/minecraft/items/beetroot.json new file mode 100644 index 00000000..fc794994 --- /dev/null +++ b/assets/minecraft/items/beetroot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/beetroot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beetroot_seeds.json b/assets/minecraft/items/beetroot_seeds.json new file mode 100644 index 00000000..e2742c16 --- /dev/null +++ b/assets/minecraft/items/beetroot_seeds.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/beetroot_seeds" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/beetroot_soup.json b/assets/minecraft/items/beetroot_soup.json new file mode 100644 index 00000000..ebbea11d --- /dev/null +++ b/assets/minecraft/items/beetroot_soup.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/beetroot_soup" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bell.json b/assets/minecraft/items/bell.json new file mode 100644 index 00000000..15fece84 --- /dev/null +++ b/assets/minecraft/items/bell.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bell" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/big_dripleaf.json b/assets/minecraft/items/big_dripleaf.json new file mode 100644 index 00000000..aa47d619 --- /dev/null +++ b/assets/minecraft/items/big_dripleaf.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/big_dripleaf" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_boat.json b/assets/minecraft/items/birch_boat.json new file mode 100644 index 00000000..261a254d --- /dev/null +++ b/assets/minecraft/items/birch_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_button.json b/assets/minecraft/items/birch_button.json new file mode 100644 index 00000000..3eaece39 --- /dev/null +++ b/assets/minecraft/items/birch_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_chest_boat.json b/assets/minecraft/items/birch_chest_boat.json new file mode 100644 index 00000000..37eaf2fe --- /dev/null +++ b/assets/minecraft/items/birch_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_door.json b/assets/minecraft/items/birch_door.json new file mode 100644 index 00000000..bfc2721b --- /dev/null +++ b/assets/minecraft/items/birch_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_fence.json b/assets/minecraft/items/birch_fence.json new file mode 100644 index 00000000..8963c9d2 --- /dev/null +++ b/assets/minecraft/items/birch_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_fence_gate.json b/assets/minecraft/items/birch_fence_gate.json new file mode 100644 index 00000000..923244ff --- /dev/null +++ b/assets/minecraft/items/birch_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_hanging_sign.json b/assets/minecraft/items/birch_hanging_sign.json new file mode 100644 index 00000000..fd062e23 --- /dev/null +++ b/assets/minecraft/items/birch_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_leaves.json b/assets/minecraft/items/birch_leaves.json new file mode 100644 index 00000000..f06b0a4a --- /dev/null +++ b/assets/minecraft/items/birch_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -8345771 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_log.json b/assets/minecraft/items/birch_log.json new file mode 100644 index 00000000..f4bf6883 --- /dev/null +++ b/assets/minecraft/items/birch_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_planks.json b/assets/minecraft/items/birch_planks.json new file mode 100644 index 00000000..7dab521e --- /dev/null +++ b/assets/minecraft/items/birch_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_pressure_plate.json b/assets/minecraft/items/birch_pressure_plate.json new file mode 100644 index 00000000..708ec1bc --- /dev/null +++ b/assets/minecraft/items/birch_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_sapling.json b/assets/minecraft/items/birch_sapling.json new file mode 100644 index 00000000..b4cfced3 --- /dev/null +++ b/assets/minecraft/items/birch_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_sign.json b/assets/minecraft/items/birch_sign.json new file mode 100644 index 00000000..a160ed64 --- /dev/null +++ b/assets/minecraft/items/birch_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/birch_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_slab.json b/assets/minecraft/items/birch_slab.json new file mode 100644 index 00000000..b4cb850a --- /dev/null +++ b/assets/minecraft/items/birch_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_stairs.json b/assets/minecraft/items/birch_stairs.json new file mode 100644 index 00000000..c5e8e442 --- /dev/null +++ b/assets/minecraft/items/birch_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_trapdoor.json b/assets/minecraft/items/birch_trapdoor.json new file mode 100644 index 00000000..db2d3a91 --- /dev/null +++ b/assets/minecraft/items/birch_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/birch_wood.json b/assets/minecraft/items/birch_wood.json new file mode 100644 index 00000000..f1f5d1ea --- /dev/null +++ b/assets/minecraft/items/birch_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/birch_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_banner.json b/assets/minecraft/items/black_banner.json new file mode 100644 index 00000000..62bbb531 --- /dev/null +++ b/assets/minecraft/items/black_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "black" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_bed.json b/assets/minecraft/items/black_bed.json new file mode 100644 index 00000000..04d7e356 --- /dev/null +++ b/assets/minecraft/items/black_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/black_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:black" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_bundle.json b/assets/minecraft/items/black_bundle.json new file mode 100644 index 00000000..066707b5 --- /dev/null +++ b/assets/minecraft/items/black_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/black_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/black_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/black_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/black_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_candle.json b/assets/minecraft/items/black_candle.json new file mode 100644 index 00000000..9c28b444 --- /dev/null +++ b/assets/minecraft/items/black_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/black_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_carpet.json b/assets/minecraft/items/black_carpet.json new file mode 100644 index 00000000..c80c9be5 --- /dev/null +++ b/assets/minecraft/items/black_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_concrete.json b/assets/minecraft/items/black_concrete.json new file mode 100644 index 00000000..88adfa33 --- /dev/null +++ b/assets/minecraft/items/black_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_concrete_powder.json b/assets/minecraft/items/black_concrete_powder.json new file mode 100644 index 00000000..0af5716a --- /dev/null +++ b/assets/minecraft/items/black_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_dye.json b/assets/minecraft/items/black_dye.json new file mode 100644 index 00000000..a5851c21 --- /dev/null +++ b/assets/minecraft/items/black_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/black_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_glazed_terracotta.json b/assets/minecraft/items/black_glazed_terracotta.json new file mode 100644 index 00000000..02d6d5e5 --- /dev/null +++ b/assets/minecraft/items/black_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_shulker_box.json b/assets/minecraft/items/black_shulker_box.json new file mode 100644 index 00000000..46fa3e1f --- /dev/null +++ b/assets/minecraft/items/black_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/black_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_black" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_stained_glass.json b/assets/minecraft/items/black_stained_glass.json new file mode 100644 index 00000000..a87c5fea --- /dev/null +++ b/assets/minecraft/items/black_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_stained_glass_pane.json b/assets/minecraft/items/black_stained_glass_pane.json new file mode 100644 index 00000000..f37e6800 --- /dev/null +++ b/assets/minecraft/items/black_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/black_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_terracotta.json b/assets/minecraft/items/black_terracotta.json new file mode 100644 index 00000000..0b8b26b7 --- /dev/null +++ b/assets/minecraft/items/black_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/black_wool.json b/assets/minecraft/items/black_wool.json new file mode 100644 index 00000000..178340d4 --- /dev/null +++ b/assets/minecraft/items/black_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/black_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blackstone.json b/assets/minecraft/items/blackstone.json new file mode 100644 index 00000000..142bcb05 --- /dev/null +++ b/assets/minecraft/items/blackstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blackstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blackstone_slab.json b/assets/minecraft/items/blackstone_slab.json new file mode 100644 index 00000000..130a8905 --- /dev/null +++ b/assets/minecraft/items/blackstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blackstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blackstone_stairs.json b/assets/minecraft/items/blackstone_stairs.json new file mode 100644 index 00000000..85d2c1aa --- /dev/null +++ b/assets/minecraft/items/blackstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blackstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blackstone_wall.json b/assets/minecraft/items/blackstone_wall.json new file mode 100644 index 00000000..9d569e06 --- /dev/null +++ b/assets/minecraft/items/blackstone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blackstone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blade_pottery_sherd.json b/assets/minecraft/items/blade_pottery_sherd.json new file mode 100644 index 00000000..4d193384 --- /dev/null +++ b/assets/minecraft/items/blade_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blade_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blast_furnace.json b/assets/minecraft/items/blast_furnace.json new file mode 100644 index 00000000..b2860635 --- /dev/null +++ b/assets/minecraft/items/blast_furnace.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blast_furnace" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blaze_powder.json b/assets/minecraft/items/blaze_powder.json new file mode 100644 index 00000000..812d76c0 --- /dev/null +++ b/assets/minecraft/items/blaze_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blaze_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blaze_rod.json b/assets/minecraft/items/blaze_rod.json new file mode 100644 index 00000000..b2db009a --- /dev/null +++ b/assets/minecraft/items/blaze_rod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blaze_rod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blaze_spawn_egg.json b/assets/minecraft/items/blaze_spawn_egg.json new file mode 100644 index 00000000..db15e772 --- /dev/null +++ b/assets/minecraft/items/blaze_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blaze_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_banner.json b/assets/minecraft/items/blue_banner.json new file mode 100644 index 00000000..d985ba59 --- /dev/null +++ b/assets/minecraft/items/blue_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_bed.json b/assets/minecraft/items/blue_bed.json new file mode 100644 index 00000000..73a9afb5 --- /dev/null +++ b/assets/minecraft/items/blue_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/blue_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_bundle.json b/assets/minecraft/items/blue_bundle.json new file mode 100644 index 00000000..57437107 --- /dev/null +++ b/assets/minecraft/items/blue_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/blue_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/blue_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/blue_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/blue_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_candle.json b/assets/minecraft/items/blue_candle.json new file mode 100644 index 00000000..5cfe77a5 --- /dev/null +++ b/assets/minecraft/items/blue_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blue_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_carpet.json b/assets/minecraft/items/blue_carpet.json new file mode 100644 index 00000000..1a620a57 --- /dev/null +++ b/assets/minecraft/items/blue_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_concrete.json b/assets/minecraft/items/blue_concrete.json new file mode 100644 index 00000000..cc0b5b9d --- /dev/null +++ b/assets/minecraft/items/blue_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_concrete_powder.json b/assets/minecraft/items/blue_concrete_powder.json new file mode 100644 index 00000000..3b981e85 --- /dev/null +++ b/assets/minecraft/items/blue_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_dye.json b/assets/minecraft/items/blue_dye.json new file mode 100644 index 00000000..381b71e9 --- /dev/null +++ b/assets/minecraft/items/blue_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blue_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_egg.json b/assets/minecraft/items/blue_egg.json new file mode 100644 index 00000000..80876a26 --- /dev/null +++ b/assets/minecraft/items/blue_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blue_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_glazed_terracotta.json b/assets/minecraft/items/blue_glazed_terracotta.json new file mode 100644 index 00000000..5cf3c1c9 --- /dev/null +++ b/assets/minecraft/items/blue_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_ice.json b/assets/minecraft/items/blue_ice.json new file mode 100644 index 00000000..7f2160de --- /dev/null +++ b/assets/minecraft/items/blue_ice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_ice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_orchid.json b/assets/minecraft/items/blue_orchid.json new file mode 100644 index 00000000..f76d0963 --- /dev/null +++ b/assets/minecraft/items/blue_orchid.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blue_orchid" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_shulker_box.json b/assets/minecraft/items/blue_shulker_box.json new file mode 100644 index 00000000..299c7725 --- /dev/null +++ b/assets/minecraft/items/blue_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/blue_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_stained_glass.json b/assets/minecraft/items/blue_stained_glass.json new file mode 100644 index 00000000..c343d93a --- /dev/null +++ b/assets/minecraft/items/blue_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_stained_glass_pane.json b/assets/minecraft/items/blue_stained_glass_pane.json new file mode 100644 index 00000000..941daad6 --- /dev/null +++ b/assets/minecraft/items/blue_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/blue_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_terracotta.json b/assets/minecraft/items/blue_terracotta.json new file mode 100644 index 00000000..db5cdb28 --- /dev/null +++ b/assets/minecraft/items/blue_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/blue_wool.json b/assets/minecraft/items/blue_wool.json new file mode 100644 index 00000000..171f1db0 --- /dev/null +++ b/assets/minecraft/items/blue_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/blue_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bogged_spawn_egg.json b/assets/minecraft/items/bogged_spawn_egg.json new file mode 100644 index 00000000..d9807d44 --- /dev/null +++ b/assets/minecraft/items/bogged_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bogged_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bolt_armor_trim_smithing_template.json b/assets/minecraft/items/bolt_armor_trim_smithing_template.json new file mode 100644 index 00000000..9745ca12 --- /dev/null +++ b/assets/minecraft/items/bolt_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bolt_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bone.json b/assets/minecraft/items/bone.json new file mode 100644 index 00000000..fea2360c --- /dev/null +++ b/assets/minecraft/items/bone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bone_block.json b/assets/minecraft/items/bone_block.json new file mode 100644 index 00000000..b949a94e --- /dev/null +++ b/assets/minecraft/items/bone_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bone_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bone_meal.json b/assets/minecraft/items/bone_meal.json new file mode 100644 index 00000000..7b1eb064 --- /dev/null +++ b/assets/minecraft/items/bone_meal.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bone_meal" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/book.json b/assets/minecraft/items/book.json new file mode 100644 index 00000000..c3670713 --- /dev/null +++ b/assets/minecraft/items/book.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/book" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bookshelf.json b/assets/minecraft/items/bookshelf.json new file mode 100644 index 00000000..18c77821 --- /dev/null +++ b/assets/minecraft/items/bookshelf.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bookshelf" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bordure_indented_banner_pattern.json b/assets/minecraft/items/bordure_indented_banner_pattern.json new file mode 100644 index 00000000..fb2684f6 --- /dev/null +++ b/assets/minecraft/items/bordure_indented_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bordure_indented_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bow.json b/assets/minecraft/items/bow.json new file mode 100644 index 00000000..fa7071ce --- /dev/null +++ b/assets/minecraft/items/bow.json @@ -0,0 +1,35 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/bow" + }, + "on_true": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bow_pulling_1" + }, + "threshold": 0.65 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bow_pulling_2" + }, + "threshold": 0.9 + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/bow_pulling_0" + }, + "property": "minecraft:use_duration", + "scale": 0.05 + }, + "property": "minecraft:using_item" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bowl.json b/assets/minecraft/items/bowl.json new file mode 100644 index 00000000..99459cf6 --- /dev/null +++ b/assets/minecraft/items/bowl.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bowl" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brain_coral.json b/assets/minecraft/items/brain_coral.json new file mode 100644 index 00000000..fa8e2eb6 --- /dev/null +++ b/assets/minecraft/items/brain_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brain_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brain_coral_block.json b/assets/minecraft/items/brain_coral_block.json new file mode 100644 index 00000000..ab2ce212 --- /dev/null +++ b/assets/minecraft/items/brain_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brain_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brain_coral_fan.json b/assets/minecraft/items/brain_coral_fan.json new file mode 100644 index 00000000..2851549f --- /dev/null +++ b/assets/minecraft/items/brain_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brain_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bread.json b/assets/minecraft/items/bread.json new file mode 100644 index 00000000..a90e33b5 --- /dev/null +++ b/assets/minecraft/items/bread.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bread" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/breeze_rod.json b/assets/minecraft/items/breeze_rod.json new file mode 100644 index 00000000..ef08b38a --- /dev/null +++ b/assets/minecraft/items/breeze_rod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/breeze_rod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/breeze_spawn_egg.json b/assets/minecraft/items/breeze_spawn_egg.json new file mode 100644 index 00000000..26ef8484 --- /dev/null +++ b/assets/minecraft/items/breeze_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/breeze_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brewer_pottery_sherd.json b/assets/minecraft/items/brewer_pottery_sherd.json new file mode 100644 index 00000000..0bd69ad4 --- /dev/null +++ b/assets/minecraft/items/brewer_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brewer_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brewing_stand.json b/assets/minecraft/items/brewing_stand.json new file mode 100644 index 00000000..823cf558 --- /dev/null +++ b/assets/minecraft/items/brewing_stand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brewing_stand" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brick.json b/assets/minecraft/items/brick.json new file mode 100644 index 00000000..7e6be515 --- /dev/null +++ b/assets/minecraft/items/brick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brick_slab.json b/assets/minecraft/items/brick_slab.json new file mode 100644 index 00000000..6afe9425 --- /dev/null +++ b/assets/minecraft/items/brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brick_stairs.json b/assets/minecraft/items/brick_stairs.json new file mode 100644 index 00000000..782ee48d --- /dev/null +++ b/assets/minecraft/items/brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brick_wall.json b/assets/minecraft/items/brick_wall.json new file mode 100644 index 00000000..7acc8f3e --- /dev/null +++ b/assets/minecraft/items/brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bricks.json b/assets/minecraft/items/bricks.json new file mode 100644 index 00000000..45bb895c --- /dev/null +++ b/assets/minecraft/items/bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_banner.json b/assets/minecraft/items/brown_banner.json new file mode 100644 index 00000000..21b2d0bf --- /dev/null +++ b/assets/minecraft/items/brown_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "brown" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_bed.json b/assets/minecraft/items/brown_bed.json new file mode 100644 index 00000000..42492f51 --- /dev/null +++ b/assets/minecraft/items/brown_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/brown_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:brown" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_bundle.json b/assets/minecraft/items/brown_bundle.json new file mode 100644 index 00000000..deb8d4eb --- /dev/null +++ b/assets/minecraft/items/brown_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/brown_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/brown_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/brown_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/brown_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_candle.json b/assets/minecraft/items/brown_candle.json new file mode 100644 index 00000000..d7d46148 --- /dev/null +++ b/assets/minecraft/items/brown_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brown_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_carpet.json b/assets/minecraft/items/brown_carpet.json new file mode 100644 index 00000000..d32721af --- /dev/null +++ b/assets/minecraft/items/brown_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_concrete.json b/assets/minecraft/items/brown_concrete.json new file mode 100644 index 00000000..9e045cf4 --- /dev/null +++ b/assets/minecraft/items/brown_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_concrete_powder.json b/assets/minecraft/items/brown_concrete_powder.json new file mode 100644 index 00000000..90f37957 --- /dev/null +++ b/assets/minecraft/items/brown_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_dye.json b/assets/minecraft/items/brown_dye.json new file mode 100644 index 00000000..4d6d0618 --- /dev/null +++ b/assets/minecraft/items/brown_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brown_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_egg.json b/assets/minecraft/items/brown_egg.json new file mode 100644 index 00000000..b1f82ae3 --- /dev/null +++ b/assets/minecraft/items/brown_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brown_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_glazed_terracotta.json b/assets/minecraft/items/brown_glazed_terracotta.json new file mode 100644 index 00000000..cca7ba04 --- /dev/null +++ b/assets/minecraft/items/brown_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_mushroom.json b/assets/minecraft/items/brown_mushroom.json new file mode 100644 index 00000000..6a960e06 --- /dev/null +++ b/assets/minecraft/items/brown_mushroom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brown_mushroom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_mushroom_block.json b/assets/minecraft/items/brown_mushroom_block.json new file mode 100644 index 00000000..7c2d92c6 --- /dev/null +++ b/assets/minecraft/items/brown_mushroom_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_mushroom_block_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_shulker_box.json b/assets/minecraft/items/brown_shulker_box.json new file mode 100644 index 00000000..a2be2cc4 --- /dev/null +++ b/assets/minecraft/items/brown_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/brown_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_brown" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_stained_glass.json b/assets/minecraft/items/brown_stained_glass.json new file mode 100644 index 00000000..f59814e6 --- /dev/null +++ b/assets/minecraft/items/brown_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_stained_glass_pane.json b/assets/minecraft/items/brown_stained_glass_pane.json new file mode 100644 index 00000000..43c1d708 --- /dev/null +++ b/assets/minecraft/items/brown_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brown_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_terracotta.json b/assets/minecraft/items/brown_terracotta.json new file mode 100644 index 00000000..fee80a48 --- /dev/null +++ b/assets/minecraft/items/brown_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brown_wool.json b/assets/minecraft/items/brown_wool.json new file mode 100644 index 00000000..5e4b51ac --- /dev/null +++ b/assets/minecraft/items/brown_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/brown_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/brush.json b/assets/minecraft/items/brush.json new file mode 100644 index 00000000..a4abc74a --- /dev/null +++ b/assets/minecraft/items/brush.json @@ -0,0 +1,35 @@ +{ + "model": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brush_brushing_0" + }, + "threshold": 0.25 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brush_brushing_1" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/brush_brushing_2" + }, + "threshold": 0.75 + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/brush" + }, + "period": 10.0, + "property": "minecraft:use_cycle", + "scale": 0.1 + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bubble_coral.json b/assets/minecraft/items/bubble_coral.json new file mode 100644 index 00000000..49349d69 --- /dev/null +++ b/assets/minecraft/items/bubble_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bubble_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bubble_coral_block.json b/assets/minecraft/items/bubble_coral_block.json new file mode 100644 index 00000000..c400e05f --- /dev/null +++ b/assets/minecraft/items/bubble_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/bubble_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bubble_coral_fan.json b/assets/minecraft/items/bubble_coral_fan.json new file mode 100644 index 00000000..893c6efe --- /dev/null +++ b/assets/minecraft/items/bubble_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bubble_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bucket.json b/assets/minecraft/items/bucket.json new file mode 100644 index 00000000..f8209d33 --- /dev/null +++ b/assets/minecraft/items/bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/budding_amethyst.json b/assets/minecraft/items/budding_amethyst.json new file mode 100644 index 00000000..407a4799 --- /dev/null +++ b/assets/minecraft/items/budding_amethyst.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/budding_amethyst" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bundle.json b/assets/minecraft/items/bundle.json new file mode 100644 index 00000000..dfeec3e9 --- /dev/null +++ b/assets/minecraft/items/bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/burn_pottery_sherd.json b/assets/minecraft/items/burn_pottery_sherd.json new file mode 100644 index 00000000..3c39cfc7 --- /dev/null +++ b/assets/minecraft/items/burn_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/burn_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/bush.json b/assets/minecraft/items/bush.json new file mode 100644 index 00000000..9188c7be --- /dev/null +++ b/assets/minecraft/items/bush.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/bush", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cactus.json b/assets/minecraft/items/cactus.json new file mode 100644 index 00000000..2b48cc4f --- /dev/null +++ b/assets/minecraft/items/cactus.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cactus" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cactus_flower.json b/assets/minecraft/items/cactus_flower.json new file mode 100644 index 00000000..1eebbc51 --- /dev/null +++ b/assets/minecraft/items/cactus_flower.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cactus_flower" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cake.json b/assets/minecraft/items/cake.json new file mode 100644 index 00000000..9488638c --- /dev/null +++ b/assets/minecraft/items/cake.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cake" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/calcite.json b/assets/minecraft/items/calcite.json new file mode 100644 index 00000000..ac9e7ea2 --- /dev/null +++ b/assets/minecraft/items/calcite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/calcite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/calibrated_sculk_sensor.json b/assets/minecraft/items/calibrated_sculk_sensor.json new file mode 100644 index 00000000..dfe5e99b --- /dev/null +++ b/assets/minecraft/items/calibrated_sculk_sensor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/calibrated_sculk_sensor_inactive" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/camel_spawn_egg.json b/assets/minecraft/items/camel_spawn_egg.json new file mode 100644 index 00000000..f91efe25 --- /dev/null +++ b/assets/minecraft/items/camel_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/camel_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/campfire.json b/assets/minecraft/items/campfire.json new file mode 100644 index 00000000..9732767e --- /dev/null +++ b/assets/minecraft/items/campfire.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/campfire" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/candle.json b/assets/minecraft/items/candle.json new file mode 100644 index 00000000..5fc19d0f --- /dev/null +++ b/assets/minecraft/items/candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/carrot.json b/assets/minecraft/items/carrot.json new file mode 100644 index 00000000..dc451807 --- /dev/null +++ b/assets/minecraft/items/carrot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/carrot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/carrot_on_a_stick.json b/assets/minecraft/items/carrot_on_a_stick.json new file mode 100644 index 00000000..a4105477 --- /dev/null +++ b/assets/minecraft/items/carrot_on_a_stick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/carrot_on_a_stick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cartography_table.json b/assets/minecraft/items/cartography_table.json new file mode 100644 index 00000000..7b67cc84 --- /dev/null +++ b/assets/minecraft/items/cartography_table.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cartography_table" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/carved_pumpkin.json b/assets/minecraft/items/carved_pumpkin.json new file mode 100644 index 00000000..433ef242 --- /dev/null +++ b/assets/minecraft/items/carved_pumpkin.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/carved_pumpkin" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cat_spawn_egg.json b/assets/minecraft/items/cat_spawn_egg.json new file mode 100644 index 00000000..04f30f13 --- /dev/null +++ b/assets/minecraft/items/cat_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cat_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cauldron.json b/assets/minecraft/items/cauldron.json new file mode 100644 index 00000000..2d4a84c9 --- /dev/null +++ b/assets/minecraft/items/cauldron.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cauldron" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cave_spider_spawn_egg.json b/assets/minecraft/items/cave_spider_spawn_egg.json new file mode 100644 index 00000000..203d04b4 --- /dev/null +++ b/assets/minecraft/items/cave_spider_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cave_spider_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chain.json b/assets/minecraft/items/chain.json new file mode 100644 index 00000000..a8abebe6 --- /dev/null +++ b/assets/minecraft/items/chain.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chain" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chain_command_block.json b/assets/minecraft/items/chain_command_block.json new file mode 100644 index 00000000..068829ed --- /dev/null +++ b/assets/minecraft/items/chain_command_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chain_command_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chainmail_boots.json b/assets/minecraft/items/chainmail_boots.json new file mode 100644 index 00000000..991ffb60 --- /dev/null +++ b/assets/minecraft/items/chainmail_boots.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_boots" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chainmail_chestplate.json b/assets/minecraft/items/chainmail_chestplate.json new file mode 100644 index 00000000..6f901986 --- /dev/null +++ b/assets/minecraft/items/chainmail_chestplate.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_chestplate" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chainmail_helmet.json b/assets/minecraft/items/chainmail_helmet.json new file mode 100644 index 00000000..7f88b1a3 --- /dev/null +++ b/assets/minecraft/items/chainmail_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chainmail_leggings.json b/assets/minecraft/items/chainmail_leggings.json new file mode 100644 index 00000000..7baa0849 --- /dev/null +++ b/assets/minecraft/items/chainmail_leggings.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/chainmail_leggings" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/charcoal.json b/assets/minecraft/items/charcoal.json new file mode 100644 index 00000000..7e2650ad --- /dev/null +++ b/assets/minecraft/items/charcoal.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/charcoal" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_boat.json b/assets/minecraft/items/cherry_boat.json new file mode 100644 index 00000000..97018953 --- /dev/null +++ b/assets/minecraft/items/cherry_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_button.json b/assets/minecraft/items/cherry_button.json new file mode 100644 index 00000000..51ac6149 --- /dev/null +++ b/assets/minecraft/items/cherry_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_chest_boat.json b/assets/minecraft/items/cherry_chest_boat.json new file mode 100644 index 00000000..b40831e0 --- /dev/null +++ b/assets/minecraft/items/cherry_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_door.json b/assets/minecraft/items/cherry_door.json new file mode 100644 index 00000000..214c05e6 --- /dev/null +++ b/assets/minecraft/items/cherry_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_fence.json b/assets/minecraft/items/cherry_fence.json new file mode 100644 index 00000000..d96d0654 --- /dev/null +++ b/assets/minecraft/items/cherry_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_fence_gate.json b/assets/minecraft/items/cherry_fence_gate.json new file mode 100644 index 00000000..90201f4a --- /dev/null +++ b/assets/minecraft/items/cherry_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_hanging_sign.json b/assets/minecraft/items/cherry_hanging_sign.json new file mode 100644 index 00000000..5088fec8 --- /dev/null +++ b/assets/minecraft/items/cherry_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_leaves.json b/assets/minecraft/items/cherry_leaves.json new file mode 100644 index 00000000..dac17a9c --- /dev/null +++ b/assets/minecraft/items/cherry_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_leaves" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_log.json b/assets/minecraft/items/cherry_log.json new file mode 100644 index 00000000..a0a2dfb8 --- /dev/null +++ b/assets/minecraft/items/cherry_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_planks.json b/assets/minecraft/items/cherry_planks.json new file mode 100644 index 00000000..e1b9f364 --- /dev/null +++ b/assets/minecraft/items/cherry_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_pressure_plate.json b/assets/minecraft/items/cherry_pressure_plate.json new file mode 100644 index 00000000..de6054bf --- /dev/null +++ b/assets/minecraft/items/cherry_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_sapling.json b/assets/minecraft/items/cherry_sapling.json new file mode 100644 index 00000000..7943de2b --- /dev/null +++ b/assets/minecraft/items/cherry_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_sign.json b/assets/minecraft/items/cherry_sign.json new file mode 100644 index 00000000..a43d71ad --- /dev/null +++ b/assets/minecraft/items/cherry_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cherry_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_slab.json b/assets/minecraft/items/cherry_slab.json new file mode 100644 index 00000000..91dcbb80 --- /dev/null +++ b/assets/minecraft/items/cherry_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_stairs.json b/assets/minecraft/items/cherry_stairs.json new file mode 100644 index 00000000..e7f74ae1 --- /dev/null +++ b/assets/minecraft/items/cherry_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_trapdoor.json b/assets/minecraft/items/cherry_trapdoor.json new file mode 100644 index 00000000..4b09f105 --- /dev/null +++ b/assets/minecraft/items/cherry_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cherry_wood.json b/assets/minecraft/items/cherry_wood.json new file mode 100644 index 00000000..f23d6a62 --- /dev/null +++ b/assets/minecraft/items/cherry_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cherry_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chest.json b/assets/minecraft/items/chest.json new file mode 100644 index 00000000..5e4ef78c --- /dev/null +++ b/assets/minecraft/items/chest.json @@ -0,0 +1,32 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:special", + "base": "minecraft:item/chest", + "model": { + "type": "minecraft:chest", + "texture": "minecraft:christmas" + } + }, + "when": [ + "12-24", + "12-25", + "12-26" + ] + } + ], + "fallback": { + "type": "minecraft:special", + "base": "minecraft:item/chest", + "model": { + "type": "minecraft:chest", + "texture": "minecraft:normal" + } + }, + "pattern": "MM-dd", + "property": "minecraft:local_time" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chest_minecart.json b/assets/minecraft/items/chest_minecart.json new file mode 100644 index 00000000..3711836a --- /dev/null +++ b/assets/minecraft/items/chest_minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chest_minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chicken.json b/assets/minecraft/items/chicken.json new file mode 100644 index 00000000..908f6d53 --- /dev/null +++ b/assets/minecraft/items/chicken.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chicken" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chicken_spawn_egg.json b/assets/minecraft/items/chicken_spawn_egg.json new file mode 100644 index 00000000..170a6400 --- /dev/null +++ b/assets/minecraft/items/chicken_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chicken_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chipped_anvil.json b/assets/minecraft/items/chipped_anvil.json new file mode 100644 index 00000000..86845568 --- /dev/null +++ b/assets/minecraft/items/chipped_anvil.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chipped_anvil" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_bookshelf.json b/assets/minecraft/items/chiseled_bookshelf.json new file mode 100644 index 00000000..9ba95e03 --- /dev/null +++ b/assets/minecraft/items/chiseled_bookshelf.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_bookshelf_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_copper.json b/assets/minecraft/items/chiseled_copper.json new file mode 100644 index 00000000..99d4996d --- /dev/null +++ b/assets/minecraft/items/chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_deepslate.json b/assets/minecraft/items/chiseled_deepslate.json new file mode 100644 index 00000000..116f921f --- /dev/null +++ b/assets/minecraft/items/chiseled_deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_nether_bricks.json b/assets/minecraft/items/chiseled_nether_bricks.json new file mode 100644 index 00000000..95709a06 --- /dev/null +++ b/assets/minecraft/items/chiseled_nether_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_nether_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_polished_blackstone.json b/assets/minecraft/items/chiseled_polished_blackstone.json new file mode 100644 index 00000000..1d9b8c73 --- /dev/null +++ b/assets/minecraft/items/chiseled_polished_blackstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_polished_blackstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_quartz_block.json b/assets/minecraft/items/chiseled_quartz_block.json new file mode 100644 index 00000000..508004a5 --- /dev/null +++ b/assets/minecraft/items/chiseled_quartz_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_quartz_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_red_sandstone.json b/assets/minecraft/items/chiseled_red_sandstone.json new file mode 100644 index 00000000..cb5409ac --- /dev/null +++ b/assets/minecraft/items/chiseled_red_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_red_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_resin_bricks.json b/assets/minecraft/items/chiseled_resin_bricks.json new file mode 100644 index 00000000..26416f11 --- /dev/null +++ b/assets/minecraft/items/chiseled_resin_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_sandstone.json b/assets/minecraft/items/chiseled_sandstone.json new file mode 100644 index 00000000..c893eed6 --- /dev/null +++ b/assets/minecraft/items/chiseled_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_stone_bricks.json b/assets/minecraft/items/chiseled_stone_bricks.json new file mode 100644 index 00000000..0001e670 --- /dev/null +++ b/assets/minecraft/items/chiseled_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_tuff.json b/assets/minecraft/items/chiseled_tuff.json new file mode 100644 index 00000000..85401994 --- /dev/null +++ b/assets/minecraft/items/chiseled_tuff.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_tuff" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chiseled_tuff_bricks.json b/assets/minecraft/items/chiseled_tuff_bricks.json new file mode 100644 index 00000000..94632a0f --- /dev/null +++ b/assets/minecraft/items/chiseled_tuff_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_tuff_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chorus_flower.json b/assets/minecraft/items/chorus_flower.json new file mode 100644 index 00000000..a33bde47 --- /dev/null +++ b/assets/minecraft/items/chorus_flower.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chorus_flower" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chorus_fruit.json b/assets/minecraft/items/chorus_fruit.json new file mode 100644 index 00000000..65ad83c5 --- /dev/null +++ b/assets/minecraft/items/chorus_fruit.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/chorus_fruit" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/chorus_plant.json b/assets/minecraft/items/chorus_plant.json new file mode 100644 index 00000000..21a15f44 --- /dev/null +++ b/assets/minecraft/items/chorus_plant.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chorus_plant" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/clay.json b/assets/minecraft/items/clay.json new file mode 100644 index 00000000..bacfc937 --- /dev/null +++ b/assets/minecraft/items/clay.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/clay" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/clay_ball.json b/assets/minecraft/items/clay_ball.json new file mode 100644 index 00000000..e8f64c09 --- /dev/null +++ b/assets/minecraft/items/clay_ball.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clay_ball" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/clock.json b/assets/minecraft/items/clock.json new file mode 100644 index 00000000..0d6f44d8 --- /dev/null +++ b/assets/minecraft/items/clock.json @@ -0,0 +1,937 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_00" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_01" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_02" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_03" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_04" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_05" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_06" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_07" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_08" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_09" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_10" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_11" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_12" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_13" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_14" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_15" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_16" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_17" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_18" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_19" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_20" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_21" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_22" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_23" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_24" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_25" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_26" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_27" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_28" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_29" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_30" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_31" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_32" + }, + "threshold": 31.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_33" + }, + "threshold": 32.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_34" + }, + "threshold": 33.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_35" + }, + "threshold": 34.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_36" + }, + "threshold": 35.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_37" + }, + "threshold": 36.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_38" + }, + "threshold": 37.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_39" + }, + "threshold": 38.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_40" + }, + "threshold": 39.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_41" + }, + "threshold": 40.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_42" + }, + "threshold": 41.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_43" + }, + "threshold": 42.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_44" + }, + "threshold": 43.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_45" + }, + "threshold": 44.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_46" + }, + "threshold": 45.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_47" + }, + "threshold": 46.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_48" + }, + "threshold": 47.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_49" + }, + "threshold": 48.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_50" + }, + "threshold": 49.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_51" + }, + "threshold": 50.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_52" + }, + "threshold": 51.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_53" + }, + "threshold": 52.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_54" + }, + "threshold": 53.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_55" + }, + "threshold": 54.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_56" + }, + "threshold": 55.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_57" + }, + "threshold": 56.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_58" + }, + "threshold": 57.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_59" + }, + "threshold": 58.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_60" + }, + "threshold": 59.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_61" + }, + "threshold": 60.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_62" + }, + "threshold": 61.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_63" + }, + "threshold": 62.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_00" + }, + "threshold": 63.5 + } + ], + "property": "minecraft:time", + "scale": 64.0, + "source": "daytime" + }, + "when": "minecraft:overworld" + } + ], + "fallback": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_00" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_01" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_02" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_03" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_04" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_05" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_06" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_07" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_08" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_09" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_10" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_11" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_12" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_13" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_14" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_15" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_16" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_17" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_18" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_19" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_20" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_21" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_22" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_23" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_24" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_25" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_26" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_27" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_28" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_29" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_30" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_31" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_32" + }, + "threshold": 31.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_33" + }, + "threshold": 32.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_34" + }, + "threshold": 33.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_35" + }, + "threshold": 34.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_36" + }, + "threshold": 35.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_37" + }, + "threshold": 36.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_38" + }, + "threshold": 37.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_39" + }, + "threshold": 38.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_40" + }, + "threshold": 39.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_41" + }, + "threshold": 40.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_42" + }, + "threshold": 41.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_43" + }, + "threshold": 42.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_44" + }, + "threshold": 43.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_45" + }, + "threshold": 44.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_46" + }, + "threshold": 45.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_47" + }, + "threshold": 46.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_48" + }, + "threshold": 47.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_49" + }, + "threshold": 48.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_50" + }, + "threshold": 49.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_51" + }, + "threshold": 50.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_52" + }, + "threshold": 51.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_53" + }, + "threshold": 52.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_54" + }, + "threshold": 53.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_55" + }, + "threshold": 54.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_56" + }, + "threshold": 55.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_57" + }, + "threshold": 56.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_58" + }, + "threshold": 57.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_59" + }, + "threshold": 58.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_60" + }, + "threshold": 59.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_61" + }, + "threshold": 60.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_62" + }, + "threshold": 61.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_63" + }, + "threshold": 62.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/clock_00" + }, + "threshold": 63.5 + } + ], + "property": "minecraft:time", + "scale": 64.0, + "source": "random" + }, + "property": "minecraft:context_dimension" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/closed_eyeblossom.json b/assets/minecraft/items/closed_eyeblossom.json new file mode 100644 index 00000000..136145b5 --- /dev/null +++ b/assets/minecraft/items/closed_eyeblossom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/closed_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/coal.json b/assets/minecraft/items/coal.json new file mode 100644 index 00000000..0566981f --- /dev/null +++ b/assets/minecraft/items/coal.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/coal" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/coal_block.json b/assets/minecraft/items/coal_block.json new file mode 100644 index 00000000..f970b5e8 --- /dev/null +++ b/assets/minecraft/items/coal_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/coal_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/coal_ore.json b/assets/minecraft/items/coal_ore.json new file mode 100644 index 00000000..fe51726e --- /dev/null +++ b/assets/minecraft/items/coal_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/coal_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/coarse_dirt.json b/assets/minecraft/items/coarse_dirt.json new file mode 100644 index 00000000..03a9d984 --- /dev/null +++ b/assets/minecraft/items/coarse_dirt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/coarse_dirt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/coast_armor_trim_smithing_template.json b/assets/minecraft/items/coast_armor_trim_smithing_template.json new file mode 100644 index 00000000..9e34212c --- /dev/null +++ b/assets/minecraft/items/coast_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/coast_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobbled_deepslate.json b/assets/minecraft/items/cobbled_deepslate.json new file mode 100644 index 00000000..ff830637 --- /dev/null +++ b/assets/minecraft/items/cobbled_deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobbled_deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobbled_deepslate_slab.json b/assets/minecraft/items/cobbled_deepslate_slab.json new file mode 100644 index 00000000..c3ac1ae1 --- /dev/null +++ b/assets/minecraft/items/cobbled_deepslate_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobbled_deepslate_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobbled_deepslate_stairs.json b/assets/minecraft/items/cobbled_deepslate_stairs.json new file mode 100644 index 00000000..3ee9e6fd --- /dev/null +++ b/assets/minecraft/items/cobbled_deepslate_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobbled_deepslate_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobbled_deepslate_wall.json b/assets/minecraft/items/cobbled_deepslate_wall.json new file mode 100644 index 00000000..97c02a34 --- /dev/null +++ b/assets/minecraft/items/cobbled_deepslate_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobbled_deepslate_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobblestone.json b/assets/minecraft/items/cobblestone.json new file mode 100644 index 00000000..3bee3d36 --- /dev/null +++ b/assets/minecraft/items/cobblestone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobblestone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobblestone_slab.json b/assets/minecraft/items/cobblestone_slab.json new file mode 100644 index 00000000..36c47e67 --- /dev/null +++ b/assets/minecraft/items/cobblestone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobblestone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobblestone_stairs.json b/assets/minecraft/items/cobblestone_stairs.json new file mode 100644 index 00000000..44b02561 --- /dev/null +++ b/assets/minecraft/items/cobblestone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobblestone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobblestone_wall.json b/assets/minecraft/items/cobblestone_wall.json new file mode 100644 index 00000000..edc14d44 --- /dev/null +++ b/assets/minecraft/items/cobblestone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobblestone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cobweb.json b/assets/minecraft/items/cobweb.json new file mode 100644 index 00000000..ce2319b7 --- /dev/null +++ b/assets/minecraft/items/cobweb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cobweb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cocoa_beans.json b/assets/minecraft/items/cocoa_beans.json new file mode 100644 index 00000000..a3c054a4 --- /dev/null +++ b/assets/minecraft/items/cocoa_beans.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cocoa_beans" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cod.json b/assets/minecraft/items/cod.json new file mode 100644 index 00000000..3f0aac7a --- /dev/null +++ b/assets/minecraft/items/cod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cod_bucket.json b/assets/minecraft/items/cod_bucket.json new file mode 100644 index 00000000..967b87f1 --- /dev/null +++ b/assets/minecraft/items/cod_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cod_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cod_spawn_egg.json b/assets/minecraft/items/cod_spawn_egg.json new file mode 100644 index 00000000..7acc524f --- /dev/null +++ b/assets/minecraft/items/cod_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cod_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/command_block.json b/assets/minecraft/items/command_block.json new file mode 100644 index 00000000..7e5c23d2 --- /dev/null +++ b/assets/minecraft/items/command_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/command_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/command_block_minecart.json b/assets/minecraft/items/command_block_minecart.json new file mode 100644 index 00000000..2ce1c002 --- /dev/null +++ b/assets/minecraft/items/command_block_minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/command_block_minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/comparator.json b/assets/minecraft/items/comparator.json new file mode 100644 index 00000000..cc2d4f1f --- /dev/null +++ b/assets/minecraft/items/comparator.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/comparator" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/compass.json b/assets/minecraft/items/compass.json new file mode 100644 index 00000000..96043c80 --- /dev/null +++ b/assets/minecraft/items/compass.json @@ -0,0 +1,733 @@ +{ + "model": { + "type": "minecraft:condition", + "component": "minecraft:lodestone_tracker", + "on_false": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_17" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_18" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_19" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_20" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_21" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_22" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_23" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_24" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_25" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_26" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_27" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_28" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_29" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_30" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_31" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_00" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_01" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_02" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_03" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_04" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_05" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_06" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_07" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_08" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_09" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_10" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_11" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_12" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_13" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_14" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_15" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 31.5 + } + ], + "property": "minecraft:compass", + "scale": 32.0, + "target": "spawn" + }, + "when": "minecraft:overworld" + } + ], + "fallback": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_17" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_18" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_19" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_20" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_21" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_22" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_23" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_24" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_25" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_26" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_27" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_28" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_29" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_30" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_31" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_00" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_01" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_02" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_03" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_04" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_05" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_06" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_07" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_08" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_09" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_10" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_11" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_12" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_13" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_14" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_15" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 31.5 + } + ], + "property": "minecraft:compass", + "scale": 32.0, + "target": "none" + }, + "property": "minecraft:context_dimension" + }, + "on_true": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_17" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_18" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_19" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_20" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_21" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_22" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_23" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_24" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_25" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_26" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_27" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_28" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_29" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_30" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_31" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_00" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_01" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_02" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_03" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_04" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_05" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_06" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_07" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_08" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_09" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_10" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_11" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_12" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_13" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_14" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_15" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/compass_16" + }, + "threshold": 31.5 + } + ], + "property": "minecraft:compass", + "scale": 32.0, + "target": "lodestone" + }, + "property": "minecraft:has_component" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/composter.json b/assets/minecraft/items/composter.json new file mode 100644 index 00000000..875bef79 --- /dev/null +++ b/assets/minecraft/items/composter.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/composter" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/conduit.json b/assets/minecraft/items/conduit.json new file mode 100644 index 00000000..d5c87e90 --- /dev/null +++ b/assets/minecraft/items/conduit.json @@ -0,0 +1,9 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/conduit", + "model": { + "type": "minecraft:conduit" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_beef.json b/assets/minecraft/items/cooked_beef.json new file mode 100644 index 00000000..cc5cb021 --- /dev/null +++ b/assets/minecraft/items/cooked_beef.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_beef" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_chicken.json b/assets/minecraft/items/cooked_chicken.json new file mode 100644 index 00000000..3020db99 --- /dev/null +++ b/assets/minecraft/items/cooked_chicken.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_chicken" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_cod.json b/assets/minecraft/items/cooked_cod.json new file mode 100644 index 00000000..4797e578 --- /dev/null +++ b/assets/minecraft/items/cooked_cod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_cod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_mutton.json b/assets/minecraft/items/cooked_mutton.json new file mode 100644 index 00000000..3171e1c2 --- /dev/null +++ b/assets/minecraft/items/cooked_mutton.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_mutton" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_porkchop.json b/assets/minecraft/items/cooked_porkchop.json new file mode 100644 index 00000000..57146f2e --- /dev/null +++ b/assets/minecraft/items/cooked_porkchop.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_porkchop" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_rabbit.json b/assets/minecraft/items/cooked_rabbit.json new file mode 100644 index 00000000..1284ba18 --- /dev/null +++ b/assets/minecraft/items/cooked_rabbit.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_rabbit" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cooked_salmon.json b/assets/minecraft/items/cooked_salmon.json new file mode 100644 index 00000000..7a6c0105 --- /dev/null +++ b/assets/minecraft/items/cooked_salmon.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cooked_salmon" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cookie.json b/assets/minecraft/items/cookie.json new file mode 100644 index 00000000..de14c9c8 --- /dev/null +++ b/assets/minecraft/items/cookie.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cookie" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_block.json b/assets/minecraft/items/copper_block.json new file mode 100644 index 00000000..5060ed21 --- /dev/null +++ b/assets/minecraft/items/copper_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_bulb.json b/assets/minecraft/items/copper_bulb.json new file mode 100644 index 00000000..feafbf2c --- /dev/null +++ b/assets/minecraft/items/copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_door.json b/assets/minecraft/items/copper_door.json new file mode 100644 index 00000000..6bc75ee4 --- /dev/null +++ b/assets/minecraft/items/copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_grate.json b/assets/minecraft/items/copper_grate.json new file mode 100644 index 00000000..7d9789bc --- /dev/null +++ b/assets/minecraft/items/copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_ingot.json b/assets/minecraft/items/copper_ingot.json new file mode 100644 index 00000000..e9600478 --- /dev/null +++ b/assets/minecraft/items/copper_ingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/copper_ingot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_ore.json b/assets/minecraft/items/copper_ore.json new file mode 100644 index 00000000..1e6e607a --- /dev/null +++ b/assets/minecraft/items/copper_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/copper_trapdoor.json b/assets/minecraft/items/copper_trapdoor.json new file mode 100644 index 00000000..03981dc9 --- /dev/null +++ b/assets/minecraft/items/copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cornflower.json b/assets/minecraft/items/cornflower.json new file mode 100644 index 00000000..d2574a75 --- /dev/null +++ b/assets/minecraft/items/cornflower.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cornflower" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cow_spawn_egg.json b/assets/minecraft/items/cow_spawn_egg.json new file mode 100644 index 00000000..6b96bbc4 --- /dev/null +++ b/assets/minecraft/items/cow_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cow_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cracked_deepslate_bricks.json b/assets/minecraft/items/cracked_deepslate_bricks.json new file mode 100644 index 00000000..65f9968c --- /dev/null +++ b/assets/minecraft/items/cracked_deepslate_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_deepslate_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cracked_deepslate_tiles.json b/assets/minecraft/items/cracked_deepslate_tiles.json new file mode 100644 index 00000000..6776f026 --- /dev/null +++ b/assets/minecraft/items/cracked_deepslate_tiles.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_deepslate_tiles" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cracked_nether_bricks.json b/assets/minecraft/items/cracked_nether_bricks.json new file mode 100644 index 00000000..17b2f4a2 --- /dev/null +++ b/assets/minecraft/items/cracked_nether_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_nether_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cracked_polished_blackstone_bricks.json b/assets/minecraft/items/cracked_polished_blackstone_bricks.json new file mode 100644 index 00000000..c62bb99c --- /dev/null +++ b/assets/minecraft/items/cracked_polished_blackstone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_polished_blackstone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cracked_stone_bricks.json b/assets/minecraft/items/cracked_stone_bricks.json new file mode 100644 index 00000000..0d27cdde --- /dev/null +++ b/assets/minecraft/items/cracked_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crafter.json b/assets/minecraft/items/crafter.json new file mode 100644 index 00000000..94664591 --- /dev/null +++ b/assets/minecraft/items/crafter.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crafter" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crafting_table.json b/assets/minecraft/items/crafting_table.json new file mode 100644 index 00000000..4b344010 --- /dev/null +++ b/assets/minecraft/items/crafting_table.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crafting_table" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/creaking_heart.json b/assets/minecraft/items/creaking_heart.json new file mode 100644 index 00000000..9948ea1c --- /dev/null +++ b/assets/minecraft/items/creaking_heart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/creaking_heart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/creaking_spawn_egg.json b/assets/minecraft/items/creaking_spawn_egg.json new file mode 100644 index 00000000..28d9c05f --- /dev/null +++ b/assets/minecraft/items/creaking_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/creaking_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/creeper_banner_pattern.json b/assets/minecraft/items/creeper_banner_pattern.json new file mode 100644 index 00000000..27a4d07e --- /dev/null +++ b/assets/minecraft/items/creeper_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/creeper_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/creeper_head.json b/assets/minecraft/items/creeper_head.json new file mode 100644 index 00000000..f6f75172 --- /dev/null +++ b/assets/minecraft/items/creeper_head.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "creeper" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/creeper_spawn_egg.json b/assets/minecraft/items/creeper_spawn_egg.json new file mode 100644 index 00000000..902e2a5d --- /dev/null +++ b/assets/minecraft/items/creeper_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/creeper_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_button.json b/assets/minecraft/items/crimson_button.json new file mode 100644 index 00000000..2cdecbd0 --- /dev/null +++ b/assets/minecraft/items/crimson_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_door.json b/assets/minecraft/items/crimson_door.json new file mode 100644 index 00000000..1240cf33 --- /dev/null +++ b/assets/minecraft/items/crimson_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crimson_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_fence.json b/assets/minecraft/items/crimson_fence.json new file mode 100644 index 00000000..812852a2 --- /dev/null +++ b/assets/minecraft/items/crimson_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_fence_gate.json b/assets/minecraft/items/crimson_fence_gate.json new file mode 100644 index 00000000..88baf908 --- /dev/null +++ b/assets/minecraft/items/crimson_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_fungus.json b/assets/minecraft/items/crimson_fungus.json new file mode 100644 index 00000000..b6a089cc --- /dev/null +++ b/assets/minecraft/items/crimson_fungus.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crimson_fungus" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_hanging_sign.json b/assets/minecraft/items/crimson_hanging_sign.json new file mode 100644 index 00000000..04e82b76 --- /dev/null +++ b/assets/minecraft/items/crimson_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crimson_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_hyphae.json b/assets/minecraft/items/crimson_hyphae.json new file mode 100644 index 00000000..7f024ebf --- /dev/null +++ b/assets/minecraft/items/crimson_hyphae.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_hyphae" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_nylium.json b/assets/minecraft/items/crimson_nylium.json new file mode 100644 index 00000000..75856f32 --- /dev/null +++ b/assets/minecraft/items/crimson_nylium.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_nylium" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_planks.json b/assets/minecraft/items/crimson_planks.json new file mode 100644 index 00000000..e56ca28b --- /dev/null +++ b/assets/minecraft/items/crimson_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_pressure_plate.json b/assets/minecraft/items/crimson_pressure_plate.json new file mode 100644 index 00000000..ca86d595 --- /dev/null +++ b/assets/minecraft/items/crimson_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_roots.json b/assets/minecraft/items/crimson_roots.json new file mode 100644 index 00000000..80a592a7 --- /dev/null +++ b/assets/minecraft/items/crimson_roots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crimson_roots" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_sign.json b/assets/minecraft/items/crimson_sign.json new file mode 100644 index 00000000..3d72a481 --- /dev/null +++ b/assets/minecraft/items/crimson_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crimson_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_slab.json b/assets/minecraft/items/crimson_slab.json new file mode 100644 index 00000000..816e9385 --- /dev/null +++ b/assets/minecraft/items/crimson_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_stairs.json b/assets/minecraft/items/crimson_stairs.json new file mode 100644 index 00000000..205a62f9 --- /dev/null +++ b/assets/minecraft/items/crimson_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_stem.json b/assets/minecraft/items/crimson_stem.json new file mode 100644 index 00000000..4658241c --- /dev/null +++ b/assets/minecraft/items/crimson_stem.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crimson_trapdoor.json b/assets/minecraft/items/crimson_trapdoor.json new file mode 100644 index 00000000..c11a4fd8 --- /dev/null +++ b/assets/minecraft/items/crimson_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crimson_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crossbow.json b/assets/minecraft/items/crossbow.json new file mode 100644 index 00000000..f5ca3152 --- /dev/null +++ b/assets/minecraft/items/crossbow.json @@ -0,0 +1,54 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow_arrow" + }, + "when": "arrow" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow_firework" + }, + "when": "rocket" + } + ], + "fallback": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow" + }, + "on_true": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow_pulling_1" + }, + "threshold": 0.58 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow_pulling_2" + }, + "threshold": 1.0 + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/crossbow_pulling_0" + }, + "property": "minecraft:crossbow/pull" + }, + "property": "minecraft:using_item" + }, + "property": "minecraft:charge_type" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/crying_obsidian.json b/assets/minecraft/items/crying_obsidian.json new file mode 100644 index 00000000..146f8de5 --- /dev/null +++ b/assets/minecraft/items/crying_obsidian.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/crying_obsidian" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_copper.json b/assets/minecraft/items/cut_copper.json new file mode 100644 index 00000000..69a734c6 --- /dev/null +++ b/assets/minecraft/items/cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_copper_slab.json b/assets/minecraft/items/cut_copper_slab.json new file mode 100644 index 00000000..1f8c6197 --- /dev/null +++ b/assets/minecraft/items/cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_copper_stairs.json b/assets/minecraft/items/cut_copper_stairs.json new file mode 100644 index 00000000..d63128c1 --- /dev/null +++ b/assets/minecraft/items/cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_red_sandstone.json b/assets/minecraft/items/cut_red_sandstone.json new file mode 100644 index 00000000..ea4701a3 --- /dev/null +++ b/assets/minecraft/items/cut_red_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_red_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_red_sandstone_slab.json b/assets/minecraft/items/cut_red_sandstone_slab.json new file mode 100644 index 00000000..fc25924e --- /dev/null +++ b/assets/minecraft/items/cut_red_sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_red_sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_sandstone.json b/assets/minecraft/items/cut_sandstone.json new file mode 100644 index 00000000..2f1fe0ca --- /dev/null +++ b/assets/minecraft/items/cut_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cut_sandstone_slab.json b/assets/minecraft/items/cut_sandstone_slab.json new file mode 100644 index 00000000..bcfef093 --- /dev/null +++ b/assets/minecraft/items/cut_sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_banner.json b/assets/minecraft/items/cyan_banner.json new file mode 100644 index 00000000..d7c7b2ce --- /dev/null +++ b/assets/minecraft/items/cyan_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "cyan" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_bed.json b/assets/minecraft/items/cyan_bed.json new file mode 100644 index 00000000..cde65b26 --- /dev/null +++ b/assets/minecraft/items/cyan_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/cyan_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:cyan" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_bundle.json b/assets/minecraft/items/cyan_bundle.json new file mode 100644 index 00000000..47e02745 --- /dev/null +++ b/assets/minecraft/items/cyan_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/cyan_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/cyan_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/cyan_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/cyan_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_candle.json b/assets/minecraft/items/cyan_candle.json new file mode 100644 index 00000000..129135ed --- /dev/null +++ b/assets/minecraft/items/cyan_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cyan_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_carpet.json b/assets/minecraft/items/cyan_carpet.json new file mode 100644 index 00000000..3bf293b8 --- /dev/null +++ b/assets/minecraft/items/cyan_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_concrete.json b/assets/minecraft/items/cyan_concrete.json new file mode 100644 index 00000000..61b934e0 --- /dev/null +++ b/assets/minecraft/items/cyan_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_concrete_powder.json b/assets/minecraft/items/cyan_concrete_powder.json new file mode 100644 index 00000000..884f433c --- /dev/null +++ b/assets/minecraft/items/cyan_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_dye.json b/assets/minecraft/items/cyan_dye.json new file mode 100644 index 00000000..d7e89cb5 --- /dev/null +++ b/assets/minecraft/items/cyan_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cyan_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_glazed_terracotta.json b/assets/minecraft/items/cyan_glazed_terracotta.json new file mode 100644 index 00000000..a748751d --- /dev/null +++ b/assets/minecraft/items/cyan_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_shulker_box.json b/assets/minecraft/items/cyan_shulker_box.json new file mode 100644 index 00000000..7f58255e --- /dev/null +++ b/assets/minecraft/items/cyan_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/cyan_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_cyan" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_stained_glass.json b/assets/minecraft/items/cyan_stained_glass.json new file mode 100644 index 00000000..c9ef053a --- /dev/null +++ b/assets/minecraft/items/cyan_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_stained_glass_pane.json b/assets/minecraft/items/cyan_stained_glass_pane.json new file mode 100644 index 00000000..b1ea0bd4 --- /dev/null +++ b/assets/minecraft/items/cyan_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cyan_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_terracotta.json b/assets/minecraft/items/cyan_terracotta.json new file mode 100644 index 00000000..f93b202d --- /dev/null +++ b/assets/minecraft/items/cyan_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/cyan_wool.json b/assets/minecraft/items/cyan_wool.json new file mode 100644 index 00000000..f9ef9a36 --- /dev/null +++ b/assets/minecraft/items/cyan_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cyan_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/damaged_anvil.json b/assets/minecraft/items/damaged_anvil.json new file mode 100644 index 00000000..afd397f7 --- /dev/null +++ b/assets/minecraft/items/damaged_anvil.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/damaged_anvil" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dandelion.json b/assets/minecraft/items/dandelion.json new file mode 100644 index 00000000..382f6e83 --- /dev/null +++ b/assets/minecraft/items/dandelion.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dandelion" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/danger_pottery_sherd.json b/assets/minecraft/items/danger_pottery_sherd.json new file mode 100644 index 00000000..b18e7728 --- /dev/null +++ b/assets/minecraft/items/danger_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/danger_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_boat.json b/assets/minecraft/items/dark_oak_boat.json new file mode 100644 index 00000000..1952ebc3 --- /dev/null +++ b/assets/minecraft/items/dark_oak_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_button.json b/assets/minecraft/items/dark_oak_button.json new file mode 100644 index 00000000..3164e1b1 --- /dev/null +++ b/assets/minecraft/items/dark_oak_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_chest_boat.json b/assets/minecraft/items/dark_oak_chest_boat.json new file mode 100644 index 00000000..36fe0c08 --- /dev/null +++ b/assets/minecraft/items/dark_oak_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_door.json b/assets/minecraft/items/dark_oak_door.json new file mode 100644 index 00000000..91274e3e --- /dev/null +++ b/assets/minecraft/items/dark_oak_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_fence.json b/assets/minecraft/items/dark_oak_fence.json new file mode 100644 index 00000000..b84fa938 --- /dev/null +++ b/assets/minecraft/items/dark_oak_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_fence_gate.json b/assets/minecraft/items/dark_oak_fence_gate.json new file mode 100644 index 00000000..890a14c3 --- /dev/null +++ b/assets/minecraft/items/dark_oak_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_hanging_sign.json b/assets/minecraft/items/dark_oak_hanging_sign.json new file mode 100644 index 00000000..d0ec9e72 --- /dev/null +++ b/assets/minecraft/items/dark_oak_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_leaves.json b/assets/minecraft/items/dark_oak_leaves.json new file mode 100644 index 00000000..361a25da --- /dev/null +++ b/assets/minecraft/items/dark_oak_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -12012264 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_log.json b/assets/minecraft/items/dark_oak_log.json new file mode 100644 index 00000000..3cbf4ecd --- /dev/null +++ b/assets/minecraft/items/dark_oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_planks.json b/assets/minecraft/items/dark_oak_planks.json new file mode 100644 index 00000000..acd7c754 --- /dev/null +++ b/assets/minecraft/items/dark_oak_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_pressure_plate.json b/assets/minecraft/items/dark_oak_pressure_plate.json new file mode 100644 index 00000000..1deb4485 --- /dev/null +++ b/assets/minecraft/items/dark_oak_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_sapling.json b/assets/minecraft/items/dark_oak_sapling.json new file mode 100644 index 00000000..3e9a5699 --- /dev/null +++ b/assets/minecraft/items/dark_oak_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_sign.json b/assets/minecraft/items/dark_oak_sign.json new file mode 100644 index 00000000..5f48fb97 --- /dev/null +++ b/assets/minecraft/items/dark_oak_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dark_oak_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_slab.json b/assets/minecraft/items/dark_oak_slab.json new file mode 100644 index 00000000..f1ecf632 --- /dev/null +++ b/assets/minecraft/items/dark_oak_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_stairs.json b/assets/minecraft/items/dark_oak_stairs.json new file mode 100644 index 00000000..97fd5d60 --- /dev/null +++ b/assets/minecraft/items/dark_oak_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_trapdoor.json b/assets/minecraft/items/dark_oak_trapdoor.json new file mode 100644 index 00000000..0c69766d --- /dev/null +++ b/assets/minecraft/items/dark_oak_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_oak_wood.json b/assets/minecraft/items/dark_oak_wood.json new file mode 100644 index 00000000..7d4be143 --- /dev/null +++ b/assets/minecraft/items/dark_oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_prismarine.json b/assets/minecraft/items/dark_prismarine.json new file mode 100644 index 00000000..dbba4719 --- /dev/null +++ b/assets/minecraft/items/dark_prismarine.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_prismarine" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_prismarine_slab.json b/assets/minecraft/items/dark_prismarine_slab.json new file mode 100644 index 00000000..ee4f6a9e --- /dev/null +++ b/assets/minecraft/items/dark_prismarine_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_prismarine_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dark_prismarine_stairs.json b/assets/minecraft/items/dark_prismarine_stairs.json new file mode 100644 index 00000000..1812a3a1 --- /dev/null +++ b/assets/minecraft/items/dark_prismarine_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dark_prismarine_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/daylight_detector.json b/assets/minecraft/items/daylight_detector.json new file mode 100644 index 00000000..fc5cdd09 --- /dev/null +++ b/assets/minecraft/items/daylight_detector.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/daylight_detector" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_brain_coral.json b/assets/minecraft/items/dead_brain_coral.json new file mode 100644 index 00000000..b1993918 --- /dev/null +++ b/assets/minecraft/items/dead_brain_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_brain_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_brain_coral_block.json b/assets/minecraft/items/dead_brain_coral_block.json new file mode 100644 index 00000000..18a18322 --- /dev/null +++ b/assets/minecraft/items/dead_brain_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dead_brain_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_brain_coral_fan.json b/assets/minecraft/items/dead_brain_coral_fan.json new file mode 100644 index 00000000..797dee12 --- /dev/null +++ b/assets/minecraft/items/dead_brain_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_brain_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_bubble_coral.json b/assets/minecraft/items/dead_bubble_coral.json new file mode 100644 index 00000000..1bed424d --- /dev/null +++ b/assets/minecraft/items/dead_bubble_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_bubble_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_bubble_coral_block.json b/assets/minecraft/items/dead_bubble_coral_block.json new file mode 100644 index 00000000..df88e21c --- /dev/null +++ b/assets/minecraft/items/dead_bubble_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dead_bubble_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_bubble_coral_fan.json b/assets/minecraft/items/dead_bubble_coral_fan.json new file mode 100644 index 00000000..ce5bb921 --- /dev/null +++ b/assets/minecraft/items/dead_bubble_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_bubble_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_bush.json b/assets/minecraft/items/dead_bush.json new file mode 100644 index 00000000..32b706c4 --- /dev/null +++ b/assets/minecraft/items/dead_bush.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_fire_coral.json b/assets/minecraft/items/dead_fire_coral.json new file mode 100644 index 00000000..97d7a23d --- /dev/null +++ b/assets/minecraft/items/dead_fire_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_fire_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_fire_coral_block.json b/assets/minecraft/items/dead_fire_coral_block.json new file mode 100644 index 00000000..6a4dc6c8 --- /dev/null +++ b/assets/minecraft/items/dead_fire_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dead_fire_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_fire_coral_fan.json b/assets/minecraft/items/dead_fire_coral_fan.json new file mode 100644 index 00000000..3fccaf45 --- /dev/null +++ b/assets/minecraft/items/dead_fire_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_fire_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_horn_coral.json b/assets/minecraft/items/dead_horn_coral.json new file mode 100644 index 00000000..cbd3d5b4 --- /dev/null +++ b/assets/minecraft/items/dead_horn_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_horn_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_horn_coral_block.json b/assets/minecraft/items/dead_horn_coral_block.json new file mode 100644 index 00000000..b3ddffcf --- /dev/null +++ b/assets/minecraft/items/dead_horn_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dead_horn_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_horn_coral_fan.json b/assets/minecraft/items/dead_horn_coral_fan.json new file mode 100644 index 00000000..9a918b17 --- /dev/null +++ b/assets/minecraft/items/dead_horn_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_horn_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_tube_coral.json b/assets/minecraft/items/dead_tube_coral.json new file mode 100644 index 00000000..22b39b2c --- /dev/null +++ b/assets/minecraft/items/dead_tube_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_tube_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_tube_coral_block.json b/assets/minecraft/items/dead_tube_coral_block.json new file mode 100644 index 00000000..07d1be18 --- /dev/null +++ b/assets/minecraft/items/dead_tube_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dead_tube_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dead_tube_coral_fan.json b/assets/minecraft/items/dead_tube_coral_fan.json new file mode 100644 index 00000000..a5e9f8ef --- /dev/null +++ b/assets/minecraft/items/dead_tube_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dead_tube_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/debug_stick.json b/assets/minecraft/items/debug_stick.json new file mode 100644 index 00000000..de806ded --- /dev/null +++ b/assets/minecraft/items/debug_stick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/debug_stick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/decorated_pot.json b/assets/minecraft/items/decorated_pot.json new file mode 100644 index 00000000..24c90d56 --- /dev/null +++ b/assets/minecraft/items/decorated_pot.json @@ -0,0 +1,9 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/decorated_pot", + "model": { + "type": "minecraft:decorated_pot" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate.json b/assets/minecraft/items/deepslate.json new file mode 100644 index 00000000..77255c70 --- /dev/null +++ b/assets/minecraft/items/deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_brick_slab.json b/assets/minecraft/items/deepslate_brick_slab.json new file mode 100644 index 00000000..bbc99bad --- /dev/null +++ b/assets/minecraft/items/deepslate_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_brick_stairs.json b/assets/minecraft/items/deepslate_brick_stairs.json new file mode 100644 index 00000000..96502eaf --- /dev/null +++ b/assets/minecraft/items/deepslate_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_brick_wall.json b/assets/minecraft/items/deepslate_brick_wall.json new file mode 100644 index 00000000..738c6fe1 --- /dev/null +++ b/assets/minecraft/items/deepslate_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_bricks.json b/assets/minecraft/items/deepslate_bricks.json new file mode 100644 index 00000000..fbd9457a --- /dev/null +++ b/assets/minecraft/items/deepslate_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_coal_ore.json b/assets/minecraft/items/deepslate_coal_ore.json new file mode 100644 index 00000000..1f90c254 --- /dev/null +++ b/assets/minecraft/items/deepslate_coal_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_coal_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_copper_ore.json b/assets/minecraft/items/deepslate_copper_ore.json new file mode 100644 index 00000000..3f26206e --- /dev/null +++ b/assets/minecraft/items/deepslate_copper_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_copper_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_diamond_ore.json b/assets/minecraft/items/deepslate_diamond_ore.json new file mode 100644 index 00000000..848916bf --- /dev/null +++ b/assets/minecraft/items/deepslate_diamond_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_diamond_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_emerald_ore.json b/assets/minecraft/items/deepslate_emerald_ore.json new file mode 100644 index 00000000..aea0b297 --- /dev/null +++ b/assets/minecraft/items/deepslate_emerald_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_emerald_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_gold_ore.json b/assets/minecraft/items/deepslate_gold_ore.json new file mode 100644 index 00000000..c9f3f73b --- /dev/null +++ b/assets/minecraft/items/deepslate_gold_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_gold_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_iron_ore.json b/assets/minecraft/items/deepslate_iron_ore.json new file mode 100644 index 00000000..0a9817be --- /dev/null +++ b/assets/minecraft/items/deepslate_iron_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_iron_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_lapis_ore.json b/assets/minecraft/items/deepslate_lapis_ore.json new file mode 100644 index 00000000..d70b9660 --- /dev/null +++ b/assets/minecraft/items/deepslate_lapis_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_lapis_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_redstone_ore.json b/assets/minecraft/items/deepslate_redstone_ore.json new file mode 100644 index 00000000..630e4e93 --- /dev/null +++ b/assets/minecraft/items/deepslate_redstone_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_redstone_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_tile_slab.json b/assets/minecraft/items/deepslate_tile_slab.json new file mode 100644 index 00000000..8a247980 --- /dev/null +++ b/assets/minecraft/items/deepslate_tile_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_tile_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_tile_stairs.json b/assets/minecraft/items/deepslate_tile_stairs.json new file mode 100644 index 00000000..dbd7c39f --- /dev/null +++ b/assets/minecraft/items/deepslate_tile_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_tile_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_tile_wall.json b/assets/minecraft/items/deepslate_tile_wall.json new file mode 100644 index 00000000..e1b44152 --- /dev/null +++ b/assets/minecraft/items/deepslate_tile_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_tile_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/deepslate_tiles.json b/assets/minecraft/items/deepslate_tiles.json new file mode 100644 index 00000000..b2bd01fa --- /dev/null +++ b/assets/minecraft/items/deepslate_tiles.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate_tiles" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/detector_rail.json b/assets/minecraft/items/detector_rail.json new file mode 100644 index 00000000..0f427f97 --- /dev/null +++ b/assets/minecraft/items/detector_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/detector_rail" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond.json b/assets/minecraft/items/diamond.json new file mode 100644 index 00000000..02943ce1 --- /dev/null +++ b/assets/minecraft/items/diamond.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_axe.json b/assets/minecraft/items/diamond_axe.json new file mode 100644 index 00000000..97785181 --- /dev/null +++ b/assets/minecraft/items/diamond_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_block.json b/assets/minecraft/items/diamond_block.json new file mode 100644 index 00000000..05528085 --- /dev/null +++ b/assets/minecraft/items/diamond_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diamond_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_boots.json b/assets/minecraft/items/diamond_boots.json new file mode 100644 index 00000000..6e9f7f19 --- /dev/null +++ b/assets/minecraft/items/diamond_boots.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_boots" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_chestplate.json b/assets/minecraft/items/diamond_chestplate.json new file mode 100644 index 00000000..792fcdc8 --- /dev/null +++ b/assets/minecraft/items/diamond_chestplate.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_chestplate" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_helmet.json b/assets/minecraft/items/diamond_helmet.json new file mode 100644 index 00000000..e972bdca --- /dev/null +++ b/assets/minecraft/items/diamond_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_hoe.json b/assets/minecraft/items/diamond_hoe.json new file mode 100644 index 00000000..e870e023 --- /dev/null +++ b/assets/minecraft/items/diamond_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_horse_armor.json b/assets/minecraft/items/diamond_horse_armor.json new file mode 100644 index 00000000..0cb3d2ef --- /dev/null +++ b/assets/minecraft/items/diamond_horse_armor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_horse_armor" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_leggings.json b/assets/minecraft/items/diamond_leggings.json new file mode 100644 index 00000000..b56966d3 --- /dev/null +++ b/assets/minecraft/items/diamond_leggings.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_leggings" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_ore.json b/assets/minecraft/items/diamond_ore.json new file mode 100644 index 00000000..21cfe182 --- /dev/null +++ b/assets/minecraft/items/diamond_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diamond_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_pickaxe.json b/assets/minecraft/items/diamond_pickaxe.json new file mode 100644 index 00000000..bb25d0e6 --- /dev/null +++ b/assets/minecraft/items/diamond_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_shovel.json b/assets/minecraft/items/diamond_shovel.json new file mode 100644 index 00000000..8a66cef5 --- /dev/null +++ b/assets/minecraft/items/diamond_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diamond_sword.json b/assets/minecraft/items/diamond_sword.json new file mode 100644 index 00000000..feaff175 --- /dev/null +++ b/assets/minecraft/items/diamond_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/diamond_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diorite.json b/assets/minecraft/items/diorite.json new file mode 100644 index 00000000..c46df5c3 --- /dev/null +++ b/assets/minecraft/items/diorite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diorite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diorite_slab.json b/assets/minecraft/items/diorite_slab.json new file mode 100644 index 00000000..2970c9d8 --- /dev/null +++ b/assets/minecraft/items/diorite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diorite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diorite_stairs.json b/assets/minecraft/items/diorite_stairs.json new file mode 100644 index 00000000..35afcd78 --- /dev/null +++ b/assets/minecraft/items/diorite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diorite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/diorite_wall.json b/assets/minecraft/items/diorite_wall.json new file mode 100644 index 00000000..e6f625f8 --- /dev/null +++ b/assets/minecraft/items/diorite_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/diorite_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dirt.json b/assets/minecraft/items/dirt.json new file mode 100644 index 00000000..2a743f35 --- /dev/null +++ b/assets/minecraft/items/dirt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dirt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dirt_path.json b/assets/minecraft/items/dirt_path.json new file mode 100644 index 00000000..5acab891 --- /dev/null +++ b/assets/minecraft/items/dirt_path.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dirt_path" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/disc_fragment_5.json b/assets/minecraft/items/disc_fragment_5.json new file mode 100644 index 00000000..bd88e9b0 --- /dev/null +++ b/assets/minecraft/items/disc_fragment_5.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/disc_fragment_5" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dispenser.json b/assets/minecraft/items/dispenser.json new file mode 100644 index 00000000..3976f346 --- /dev/null +++ b/assets/minecraft/items/dispenser.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dispenser" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dolphin_spawn_egg.json b/assets/minecraft/items/dolphin_spawn_egg.json new file mode 100644 index 00000000..d62c7743 --- /dev/null +++ b/assets/minecraft/items/dolphin_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dolphin_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/donkey_spawn_egg.json b/assets/minecraft/items/donkey_spawn_egg.json new file mode 100644 index 00000000..08084f19 --- /dev/null +++ b/assets/minecraft/items/donkey_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/donkey_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dragon_breath.json b/assets/minecraft/items/dragon_breath.json new file mode 100644 index 00000000..78192904 --- /dev/null +++ b/assets/minecraft/items/dragon_breath.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dragon_breath" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dragon_egg.json b/assets/minecraft/items/dragon_egg.json new file mode 100644 index 00000000..694567c0 --- /dev/null +++ b/assets/minecraft/items/dragon_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dragon_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dragon_head.json b/assets/minecraft/items/dragon_head.json new file mode 100644 index 00000000..71017923 --- /dev/null +++ b/assets/minecraft/items/dragon_head.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/dragon_head", + "model": { + "type": "minecraft:head", + "kind": "dragon" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dried_kelp.json b/assets/minecraft/items/dried_kelp.json new file mode 100644 index 00000000..497ffaac --- /dev/null +++ b/assets/minecraft/items/dried_kelp.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dried_kelp" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dried_kelp_block.json b/assets/minecraft/items/dried_kelp_block.json new file mode 100644 index 00000000..6f9f27b8 --- /dev/null +++ b/assets/minecraft/items/dried_kelp_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dried_kelp_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dripstone_block.json b/assets/minecraft/items/dripstone_block.json new file mode 100644 index 00000000..de199ada --- /dev/null +++ b/assets/minecraft/items/dripstone_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dripstone_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dropper.json b/assets/minecraft/items/dropper.json new file mode 100644 index 00000000..0e5ba841 --- /dev/null +++ b/assets/minecraft/items/dropper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/dropper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/drowned_spawn_egg.json b/assets/minecraft/items/drowned_spawn_egg.json new file mode 100644 index 00000000..f5a68e33 --- /dev/null +++ b/assets/minecraft/items/drowned_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/drowned_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/dune_armor_trim_smithing_template.json b/assets/minecraft/items/dune_armor_trim_smithing_template.json new file mode 100644 index 00000000..b59a172b --- /dev/null +++ b/assets/minecraft/items/dune_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/dune_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/echo_shard.json b/assets/minecraft/items/echo_shard.json new file mode 100644 index 00000000..c1f986f2 --- /dev/null +++ b/assets/minecraft/items/echo_shard.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/echo_shard" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/egg.json b/assets/minecraft/items/egg.json new file mode 100644 index 00000000..39c58827 --- /dev/null +++ b/assets/minecraft/items/egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/elder_guardian_spawn_egg.json b/assets/minecraft/items/elder_guardian_spawn_egg.json new file mode 100644 index 00000000..c8fb7e15 --- /dev/null +++ b/assets/minecraft/items/elder_guardian_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/elder_guardian_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/elytra.json b/assets/minecraft/items/elytra.json new file mode 100644 index 00000000..2ec75b20 --- /dev/null +++ b/assets/minecraft/items/elytra.json @@ -0,0 +1,14 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/elytra" + }, + "on_true": { + "type": "minecraft:model", + "model": "minecraft:item/elytra_broken" + }, + "property": "minecraft:broken" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/emerald.json b/assets/minecraft/items/emerald.json new file mode 100644 index 00000000..1bb68643 --- /dev/null +++ b/assets/minecraft/items/emerald.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/emerald" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/emerald_block.json b/assets/minecraft/items/emerald_block.json new file mode 100644 index 00000000..1cdd248a --- /dev/null +++ b/assets/minecraft/items/emerald_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/emerald_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/emerald_ore.json b/assets/minecraft/items/emerald_ore.json new file mode 100644 index 00000000..fee596cc --- /dev/null +++ b/assets/minecraft/items/emerald_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/emerald_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/enchanted_book.json b/assets/minecraft/items/enchanted_book.json new file mode 100644 index 00000000..d040f8bb --- /dev/null +++ b/assets/minecraft/items/enchanted_book.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/enchanted_book" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/enchanted_golden_apple.json b/assets/minecraft/items/enchanted_golden_apple.json new file mode 100644 index 00000000..824327a4 --- /dev/null +++ b/assets/minecraft/items/enchanted_golden_apple.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/enchanted_golden_apple" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/enchanting_table.json b/assets/minecraft/items/enchanting_table.json new file mode 100644 index 00000000..6cfff24f --- /dev/null +++ b/assets/minecraft/items/enchanting_table.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/enchanting_table" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_crystal.json b/assets/minecraft/items/end_crystal.json new file mode 100644 index 00000000..871b593c --- /dev/null +++ b/assets/minecraft/items/end_crystal.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/end_crystal" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_portal_frame.json b/assets/minecraft/items/end_portal_frame.json new file mode 100644 index 00000000..764c8d35 --- /dev/null +++ b/assets/minecraft/items/end_portal_frame.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_portal_frame" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_rod.json b/assets/minecraft/items/end_rod.json new file mode 100644 index 00000000..f7d7c634 --- /dev/null +++ b/assets/minecraft/items/end_rod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_rod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_stone.json b/assets/minecraft/items/end_stone.json new file mode 100644 index 00000000..86ea9e80 --- /dev/null +++ b/assets/minecraft/items/end_stone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_stone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_stone_brick_slab.json b/assets/minecraft/items/end_stone_brick_slab.json new file mode 100644 index 00000000..5e7dc44b --- /dev/null +++ b/assets/minecraft/items/end_stone_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_stone_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_stone_brick_stairs.json b/assets/minecraft/items/end_stone_brick_stairs.json new file mode 100644 index 00000000..4de71c7c --- /dev/null +++ b/assets/minecraft/items/end_stone_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_stone_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_stone_brick_wall.json b/assets/minecraft/items/end_stone_brick_wall.json new file mode 100644 index 00000000..479e3011 --- /dev/null +++ b/assets/minecraft/items/end_stone_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_stone_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/end_stone_bricks.json b/assets/minecraft/items/end_stone_bricks.json new file mode 100644 index 00000000..d6698853 --- /dev/null +++ b/assets/minecraft/items/end_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/end_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ender_chest.json b/assets/minecraft/items/ender_chest.json new file mode 100644 index 00000000..54793a77 --- /dev/null +++ b/assets/minecraft/items/ender_chest.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/ender_chest", + "model": { + "type": "minecraft:chest", + "texture": "minecraft:ender" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ender_dragon_spawn_egg.json b/assets/minecraft/items/ender_dragon_spawn_egg.json new file mode 100644 index 00000000..7d82e220 --- /dev/null +++ b/assets/minecraft/items/ender_dragon_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ender_dragon_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ender_eye.json b/assets/minecraft/items/ender_eye.json new file mode 100644 index 00000000..cfa768b7 --- /dev/null +++ b/assets/minecraft/items/ender_eye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ender_eye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ender_pearl.json b/assets/minecraft/items/ender_pearl.json new file mode 100644 index 00000000..b7bfc150 --- /dev/null +++ b/assets/minecraft/items/ender_pearl.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ender_pearl" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/enderman_spawn_egg.json b/assets/minecraft/items/enderman_spawn_egg.json new file mode 100644 index 00000000..475b4684 --- /dev/null +++ b/assets/minecraft/items/enderman_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/enderman_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/endermite_spawn_egg.json b/assets/minecraft/items/endermite_spawn_egg.json new file mode 100644 index 00000000..cc26c7cc --- /dev/null +++ b/assets/minecraft/items/endermite_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/endermite_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/evoker_spawn_egg.json b/assets/minecraft/items/evoker_spawn_egg.json new file mode 100644 index 00000000..e1eff996 --- /dev/null +++ b/assets/minecraft/items/evoker_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/evoker_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/experience_bottle.json b/assets/minecraft/items/experience_bottle.json new file mode 100644 index 00000000..08f831b3 --- /dev/null +++ b/assets/minecraft/items/experience_bottle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/experience_bottle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/explorer_pottery_sherd.json b/assets/minecraft/items/explorer_pottery_sherd.json new file mode 100644 index 00000000..fdae3532 --- /dev/null +++ b/assets/minecraft/items/explorer_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/explorer_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_chiseled_copper.json b/assets/minecraft/items/exposed_chiseled_copper.json new file mode 100644 index 00000000..22657b6a --- /dev/null +++ b/assets/minecraft/items/exposed_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_copper.json b/assets/minecraft/items/exposed_copper.json new file mode 100644 index 00000000..632da674 --- /dev/null +++ b/assets/minecraft/items/exposed_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_copper_bulb.json b/assets/minecraft/items/exposed_copper_bulb.json new file mode 100644 index 00000000..d54e6306 --- /dev/null +++ b/assets/minecraft/items/exposed_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_copper_door.json b/assets/minecraft/items/exposed_copper_door.json new file mode 100644 index 00000000..0ca6e2ca --- /dev/null +++ b/assets/minecraft/items/exposed_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/exposed_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_copper_grate.json b/assets/minecraft/items/exposed_copper_grate.json new file mode 100644 index 00000000..07c561b4 --- /dev/null +++ b/assets/minecraft/items/exposed_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_copper_trapdoor.json b/assets/minecraft/items/exposed_copper_trapdoor.json new file mode 100644 index 00000000..260b680e --- /dev/null +++ b/assets/minecraft/items/exposed_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_cut_copper.json b/assets/minecraft/items/exposed_cut_copper.json new file mode 100644 index 00000000..35932366 --- /dev/null +++ b/assets/minecraft/items/exposed_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_cut_copper_slab.json b/assets/minecraft/items/exposed_cut_copper_slab.json new file mode 100644 index 00000000..818f8860 --- /dev/null +++ b/assets/minecraft/items/exposed_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/exposed_cut_copper_stairs.json b/assets/minecraft/items/exposed_cut_copper_stairs.json new file mode 100644 index 00000000..54f5c1f0 --- /dev/null +++ b/assets/minecraft/items/exposed_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/eye_armor_trim_smithing_template.json b/assets/minecraft/items/eye_armor_trim_smithing_template.json new file mode 100644 index 00000000..1c5d86ea --- /dev/null +++ b/assets/minecraft/items/eye_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/eye_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/farmland.json b/assets/minecraft/items/farmland.json new file mode 100644 index 00000000..394f6a5a --- /dev/null +++ b/assets/minecraft/items/farmland.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/farmland" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/feather.json b/assets/minecraft/items/feather.json new file mode 100644 index 00000000..809e75b9 --- /dev/null +++ b/assets/minecraft/items/feather.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/feather" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fermented_spider_eye.json b/assets/minecraft/items/fermented_spider_eye.json new file mode 100644 index 00000000..5bce62ff --- /dev/null +++ b/assets/minecraft/items/fermented_spider_eye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fermented_spider_eye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fern.json b/assets/minecraft/items/fern.json new file mode 100644 index 00000000..fc6e7516 --- /dev/null +++ b/assets/minecraft/items/fern.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fern", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/field_masoned_banner_pattern.json b/assets/minecraft/items/field_masoned_banner_pattern.json new file mode 100644 index 00000000..c6fd6ad8 --- /dev/null +++ b/assets/minecraft/items/field_masoned_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/field_masoned_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/filled_map.json b/assets/minecraft/items/filled_map.json new file mode 100644 index 00000000..9152f37c --- /dev/null +++ b/assets/minecraft/items/filled_map.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/filled_map", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:map_color", + "default": 4603950 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fire_charge.json b/assets/minecraft/items/fire_charge.json new file mode 100644 index 00000000..8326bf8d --- /dev/null +++ b/assets/minecraft/items/fire_charge.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fire_charge" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fire_coral.json b/assets/minecraft/items/fire_coral.json new file mode 100644 index 00000000..835c481f --- /dev/null +++ b/assets/minecraft/items/fire_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fire_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fire_coral_block.json b/assets/minecraft/items/fire_coral_block.json new file mode 100644 index 00000000..027c9f9c --- /dev/null +++ b/assets/minecraft/items/fire_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/fire_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fire_coral_fan.json b/assets/minecraft/items/fire_coral_fan.json new file mode 100644 index 00000000..5746686f --- /dev/null +++ b/assets/minecraft/items/fire_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fire_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/firefly_bush.json b/assets/minecraft/items/firefly_bush.json new file mode 100644 index 00000000..a60a20fe --- /dev/null +++ b/assets/minecraft/items/firefly_bush.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/firefly_bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/firework_rocket.json b/assets/minecraft/items/firework_rocket.json new file mode 100644 index 00000000..98341aa0 --- /dev/null +++ b/assets/minecraft/items/firework_rocket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/firework_rocket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/firework_star.json b/assets/minecraft/items/firework_star.json new file mode 100644 index 00000000..deec259f --- /dev/null +++ b/assets/minecraft/items/firework_star.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/firework_star", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:firework", + "default": -7697782 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fishing_rod.json b/assets/minecraft/items/fishing_rod.json new file mode 100644 index 00000000..e2296888 --- /dev/null +++ b/assets/minecraft/items/fishing_rod.json @@ -0,0 +1,14 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/fishing_rod" + }, + "on_true": { + "type": "minecraft:model", + "model": "minecraft:item/fishing_rod_cast" + }, + "property": "minecraft:fishing_rod/cast" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fletching_table.json b/assets/minecraft/items/fletching_table.json new file mode 100644 index 00000000..f92820f7 --- /dev/null +++ b/assets/minecraft/items/fletching_table.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/fletching_table" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flint.json b/assets/minecraft/items/flint.json new file mode 100644 index 00000000..a1741a1f --- /dev/null +++ b/assets/minecraft/items/flint.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flint" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flint_and_steel.json b/assets/minecraft/items/flint_and_steel.json new file mode 100644 index 00000000..279808b9 --- /dev/null +++ b/assets/minecraft/items/flint_and_steel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flint_and_steel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flow_armor_trim_smithing_template.json b/assets/minecraft/items/flow_armor_trim_smithing_template.json new file mode 100644 index 00000000..cf915b31 --- /dev/null +++ b/assets/minecraft/items/flow_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flow_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flow_banner_pattern.json b/assets/minecraft/items/flow_banner_pattern.json new file mode 100644 index 00000000..bd51343a --- /dev/null +++ b/assets/minecraft/items/flow_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flow_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flow_pottery_sherd.json b/assets/minecraft/items/flow_pottery_sherd.json new file mode 100644 index 00000000..2c4cd810 --- /dev/null +++ b/assets/minecraft/items/flow_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flow_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flower_banner_pattern.json b/assets/minecraft/items/flower_banner_pattern.json new file mode 100644 index 00000000..000a7be8 --- /dev/null +++ b/assets/minecraft/items/flower_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flower_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flower_pot.json b/assets/minecraft/items/flower_pot.json new file mode 100644 index 00000000..619a80d3 --- /dev/null +++ b/assets/minecraft/items/flower_pot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/flower_pot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flowering_azalea.json b/assets/minecraft/items/flowering_azalea.json new file mode 100644 index 00000000..778616a9 --- /dev/null +++ b/assets/minecraft/items/flowering_azalea.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/flowering_azalea" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/flowering_azalea_leaves.json b/assets/minecraft/items/flowering_azalea_leaves.json new file mode 100644 index 00000000..35fe16d9 --- /dev/null +++ b/assets/minecraft/items/flowering_azalea_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/flowering_azalea_leaves" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/fox_spawn_egg.json b/assets/minecraft/items/fox_spawn_egg.json new file mode 100644 index 00000000..36a8475c --- /dev/null +++ b/assets/minecraft/items/fox_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/fox_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/friend_pottery_sherd.json b/assets/minecraft/items/friend_pottery_sherd.json new file mode 100644 index 00000000..a5aef4bd --- /dev/null +++ b/assets/minecraft/items/friend_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/friend_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/frog_spawn_egg.json b/assets/minecraft/items/frog_spawn_egg.json new file mode 100644 index 00000000..0f6f0d48 --- /dev/null +++ b/assets/minecraft/items/frog_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/frog_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/frogspawn.json b/assets/minecraft/items/frogspawn.json new file mode 100644 index 00000000..c78393f5 --- /dev/null +++ b/assets/minecraft/items/frogspawn.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/frogspawn" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/furnace.json b/assets/minecraft/items/furnace.json new file mode 100644 index 00000000..6449afc3 --- /dev/null +++ b/assets/minecraft/items/furnace.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/furnace" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/furnace_minecart.json b/assets/minecraft/items/furnace_minecart.json new file mode 100644 index 00000000..26139fe1 --- /dev/null +++ b/assets/minecraft/items/furnace_minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/furnace_minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ghast_spawn_egg.json b/assets/minecraft/items/ghast_spawn_egg.json new file mode 100644 index 00000000..6884ad42 --- /dev/null +++ b/assets/minecraft/items/ghast_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ghast_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ghast_tear.json b/assets/minecraft/items/ghast_tear.json new file mode 100644 index 00000000..fabdd2d8 --- /dev/null +++ b/assets/minecraft/items/ghast_tear.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ghast_tear" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gilded_blackstone.json b/assets/minecraft/items/gilded_blackstone.json new file mode 100644 index 00000000..0ccb924d --- /dev/null +++ b/assets/minecraft/items/gilded_blackstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gilded_blackstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glass.json b/assets/minecraft/items/glass.json new file mode 100644 index 00000000..85664175 --- /dev/null +++ b/assets/minecraft/items/glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glass_bottle.json b/assets/minecraft/items/glass_bottle.json new file mode 100644 index 00000000..04f3032e --- /dev/null +++ b/assets/minecraft/items/glass_bottle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glass_bottle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glass_pane.json b/assets/minecraft/items/glass_pane.json new file mode 100644 index 00000000..9639bbc6 --- /dev/null +++ b/assets/minecraft/items/glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glistering_melon_slice.json b/assets/minecraft/items/glistering_melon_slice.json new file mode 100644 index 00000000..84375832 --- /dev/null +++ b/assets/minecraft/items/glistering_melon_slice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glistering_melon_slice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/globe_banner_pattern.json b/assets/minecraft/items/globe_banner_pattern.json new file mode 100644 index 00000000..48bb79db --- /dev/null +++ b/assets/minecraft/items/globe_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/globe_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glow_berries.json b/assets/minecraft/items/glow_berries.json new file mode 100644 index 00000000..01214a8b --- /dev/null +++ b/assets/minecraft/items/glow_berries.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glow_berries" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glow_ink_sac.json b/assets/minecraft/items/glow_ink_sac.json new file mode 100644 index 00000000..f4b136c7 --- /dev/null +++ b/assets/minecraft/items/glow_ink_sac.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glow_ink_sac" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glow_item_frame.json b/assets/minecraft/items/glow_item_frame.json new file mode 100644 index 00000000..1f30da64 --- /dev/null +++ b/assets/minecraft/items/glow_item_frame.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glow_item_frame" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glow_lichen.json b/assets/minecraft/items/glow_lichen.json new file mode 100644 index 00000000..d89ad87b --- /dev/null +++ b/assets/minecraft/items/glow_lichen.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glow_lichen" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glow_squid_spawn_egg.json b/assets/minecraft/items/glow_squid_spawn_egg.json new file mode 100644 index 00000000..00c1f03c --- /dev/null +++ b/assets/minecraft/items/glow_squid_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glow_squid_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glowstone.json b/assets/minecraft/items/glowstone.json new file mode 100644 index 00000000..5fde9521 --- /dev/null +++ b/assets/minecraft/items/glowstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/glowstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/glowstone_dust.json b/assets/minecraft/items/glowstone_dust.json new file mode 100644 index 00000000..41e72771 --- /dev/null +++ b/assets/minecraft/items/glowstone_dust.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/glowstone_dust" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/goat_horn.json b/assets/minecraft/items/goat_horn.json new file mode 100644 index 00000000..d2db8382 --- /dev/null +++ b/assets/minecraft/items/goat_horn.json @@ -0,0 +1,14 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/goat_horn" + }, + "on_true": { + "type": "minecraft:model", + "model": "minecraft:item/tooting_goat_horn" + }, + "property": "minecraft:using_item" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/goat_spawn_egg.json b/assets/minecraft/items/goat_spawn_egg.json new file mode 100644 index 00000000..b1f39c6b --- /dev/null +++ b/assets/minecraft/items/goat_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/goat_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gold_block.json b/assets/minecraft/items/gold_block.json new file mode 100644 index 00000000..a03cc364 --- /dev/null +++ b/assets/minecraft/items/gold_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gold_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gold_ingot.json b/assets/minecraft/items/gold_ingot.json new file mode 100644 index 00000000..b9d3fdd7 --- /dev/null +++ b/assets/minecraft/items/gold_ingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gold_ingot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gold_nugget.json b/assets/minecraft/items/gold_nugget.json new file mode 100644 index 00000000..f88f872e --- /dev/null +++ b/assets/minecraft/items/gold_nugget.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gold_nugget" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gold_ore.json b/assets/minecraft/items/gold_ore.json new file mode 100644 index 00000000..d2c6805b --- /dev/null +++ b/assets/minecraft/items/gold_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gold_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_apple.json b/assets/minecraft/items/golden_apple.json new file mode 100644 index 00000000..1cab81ed --- /dev/null +++ b/assets/minecraft/items/golden_apple.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_apple" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_axe.json b/assets/minecraft/items/golden_axe.json new file mode 100644 index 00000000..899c0e74 --- /dev/null +++ b/assets/minecraft/items/golden_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_boots.json b/assets/minecraft/items/golden_boots.json new file mode 100644 index 00000000..245b3420 --- /dev/null +++ b/assets/minecraft/items/golden_boots.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/golden_boots" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_carrot.json b/assets/minecraft/items/golden_carrot.json new file mode 100644 index 00000000..b6f04287 --- /dev/null +++ b/assets/minecraft/items/golden_carrot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_carrot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_chestplate.json b/assets/minecraft/items/golden_chestplate.json new file mode 100644 index 00000000..7478fd9a --- /dev/null +++ b/assets/minecraft/items/golden_chestplate.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/golden_chestplate" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_helmet.json b/assets/minecraft/items/golden_helmet.json new file mode 100644 index 00000000..2c999700 --- /dev/null +++ b/assets/minecraft/items/golden_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/golden_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_hoe.json b/assets/minecraft/items/golden_hoe.json new file mode 100644 index 00000000..9efc7f14 --- /dev/null +++ b/assets/minecraft/items/golden_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_horse_armor.json b/assets/minecraft/items/golden_horse_armor.json new file mode 100644 index 00000000..31f2e458 --- /dev/null +++ b/assets/minecraft/items/golden_horse_armor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_horse_armor" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_leggings.json b/assets/minecraft/items/golden_leggings.json new file mode 100644 index 00000000..59eba297 --- /dev/null +++ b/assets/minecraft/items/golden_leggings.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/golden_leggings" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_pickaxe.json b/assets/minecraft/items/golden_pickaxe.json new file mode 100644 index 00000000..87fcc70c --- /dev/null +++ b/assets/minecraft/items/golden_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_shovel.json b/assets/minecraft/items/golden_shovel.json new file mode 100644 index 00000000..88425bcd --- /dev/null +++ b/assets/minecraft/items/golden_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/golden_sword.json b/assets/minecraft/items/golden_sword.json new file mode 100644 index 00000000..2f2de3b6 --- /dev/null +++ b/assets/minecraft/items/golden_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/golden_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/granite.json b/assets/minecraft/items/granite.json new file mode 100644 index 00000000..2ca226eb --- /dev/null +++ b/assets/minecraft/items/granite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/granite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/granite_slab.json b/assets/minecraft/items/granite_slab.json new file mode 100644 index 00000000..fe961ead --- /dev/null +++ b/assets/minecraft/items/granite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/granite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/granite_stairs.json b/assets/minecraft/items/granite_stairs.json new file mode 100644 index 00000000..0ce2b72e --- /dev/null +++ b/assets/minecraft/items/granite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/granite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/granite_wall.json b/assets/minecraft/items/granite_wall.json new file mode 100644 index 00000000..e6c7d512 --- /dev/null +++ b/assets/minecraft/items/granite_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/granite_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/grass_block.json b/assets/minecraft/items/grass_block.json new file mode 100644 index 00000000..78f1969c --- /dev/null +++ b/assets/minecraft/items/grass_block.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/grass_block", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gravel.json b/assets/minecraft/items/gravel.json new file mode 100644 index 00000000..2026e544 --- /dev/null +++ b/assets/minecraft/items/gravel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gravel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_banner.json b/assets/minecraft/items/gray_banner.json new file mode 100644 index 00000000..8949b04f --- /dev/null +++ b/assets/minecraft/items/gray_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_bed.json b/assets/minecraft/items/gray_bed.json new file mode 100644 index 00000000..79e93817 --- /dev/null +++ b/assets/minecraft/items/gray_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/gray_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_bundle.json b/assets/minecraft/items/gray_bundle.json new file mode 100644 index 00000000..631b3663 --- /dev/null +++ b/assets/minecraft/items/gray_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/gray_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/gray_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/gray_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/gray_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_candle.json b/assets/minecraft/items/gray_candle.json new file mode 100644 index 00000000..343de6d5 --- /dev/null +++ b/assets/minecraft/items/gray_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gray_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_carpet.json b/assets/minecraft/items/gray_carpet.json new file mode 100644 index 00000000..640d832b --- /dev/null +++ b/assets/minecraft/items/gray_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_concrete.json b/assets/minecraft/items/gray_concrete.json new file mode 100644 index 00000000..5c85b853 --- /dev/null +++ b/assets/minecraft/items/gray_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_concrete_powder.json b/assets/minecraft/items/gray_concrete_powder.json new file mode 100644 index 00000000..2db1dc07 --- /dev/null +++ b/assets/minecraft/items/gray_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_dye.json b/assets/minecraft/items/gray_dye.json new file mode 100644 index 00000000..979ccdb5 --- /dev/null +++ b/assets/minecraft/items/gray_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gray_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_glazed_terracotta.json b/assets/minecraft/items/gray_glazed_terracotta.json new file mode 100644 index 00000000..30de14b8 --- /dev/null +++ b/assets/minecraft/items/gray_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_shulker_box.json b/assets/minecraft/items/gray_shulker_box.json new file mode 100644 index 00000000..50b2e1f6 --- /dev/null +++ b/assets/minecraft/items/gray_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/gray_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_stained_glass.json b/assets/minecraft/items/gray_stained_glass.json new file mode 100644 index 00000000..a96dd88e --- /dev/null +++ b/assets/minecraft/items/gray_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_stained_glass_pane.json b/assets/minecraft/items/gray_stained_glass_pane.json new file mode 100644 index 00000000..6443b917 --- /dev/null +++ b/assets/minecraft/items/gray_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gray_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_terracotta.json b/assets/minecraft/items/gray_terracotta.json new file mode 100644 index 00000000..b0e977fb --- /dev/null +++ b/assets/minecraft/items/gray_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gray_wool.json b/assets/minecraft/items/gray_wool.json new file mode 100644 index 00000000..34a97462 --- /dev/null +++ b/assets/minecraft/items/gray_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/gray_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_banner.json b/assets/minecraft/items/green_banner.json new file mode 100644 index 00000000..22e57d53 --- /dev/null +++ b/assets/minecraft/items/green_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "green" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_bed.json b/assets/minecraft/items/green_bed.json new file mode 100644 index 00000000..7658b76c --- /dev/null +++ b/assets/minecraft/items/green_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/green_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:green" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_bundle.json b/assets/minecraft/items/green_bundle.json new file mode 100644 index 00000000..59bf89dc --- /dev/null +++ b/assets/minecraft/items/green_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/green_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/green_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/green_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/green_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_candle.json b/assets/minecraft/items/green_candle.json new file mode 100644 index 00000000..6a9b8254 --- /dev/null +++ b/assets/minecraft/items/green_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/green_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_carpet.json b/assets/minecraft/items/green_carpet.json new file mode 100644 index 00000000..c1483ea3 --- /dev/null +++ b/assets/minecraft/items/green_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_concrete.json b/assets/minecraft/items/green_concrete.json new file mode 100644 index 00000000..c8a3f219 --- /dev/null +++ b/assets/minecraft/items/green_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_concrete_powder.json b/assets/minecraft/items/green_concrete_powder.json new file mode 100644 index 00000000..28a51e62 --- /dev/null +++ b/assets/minecraft/items/green_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_dye.json b/assets/minecraft/items/green_dye.json new file mode 100644 index 00000000..54496b26 --- /dev/null +++ b/assets/minecraft/items/green_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/green_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_glazed_terracotta.json b/assets/minecraft/items/green_glazed_terracotta.json new file mode 100644 index 00000000..fe562296 --- /dev/null +++ b/assets/minecraft/items/green_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_shulker_box.json b/assets/minecraft/items/green_shulker_box.json new file mode 100644 index 00000000..96edd07a --- /dev/null +++ b/assets/minecraft/items/green_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/green_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_green" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_stained_glass.json b/assets/minecraft/items/green_stained_glass.json new file mode 100644 index 00000000..dfe0c272 --- /dev/null +++ b/assets/minecraft/items/green_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_stained_glass_pane.json b/assets/minecraft/items/green_stained_glass_pane.json new file mode 100644 index 00000000..c1fe5ba1 --- /dev/null +++ b/assets/minecraft/items/green_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/green_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_terracotta.json b/assets/minecraft/items/green_terracotta.json new file mode 100644 index 00000000..b86f8106 --- /dev/null +++ b/assets/minecraft/items/green_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/green_wool.json b/assets/minecraft/items/green_wool.json new file mode 100644 index 00000000..b4ce7e98 --- /dev/null +++ b/assets/minecraft/items/green_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/green_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/grindstone.json b/assets/minecraft/items/grindstone.json new file mode 100644 index 00000000..4c5f45b6 --- /dev/null +++ b/assets/minecraft/items/grindstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/grindstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/guardian_spawn_egg.json b/assets/minecraft/items/guardian_spawn_egg.json new file mode 100644 index 00000000..6d0d8efe --- /dev/null +++ b/assets/minecraft/items/guardian_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/guardian_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/gunpowder.json b/assets/minecraft/items/gunpowder.json new file mode 100644 index 00000000..5db05cef --- /dev/null +++ b/assets/minecraft/items/gunpowder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/gunpowder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/guster_banner_pattern.json b/assets/minecraft/items/guster_banner_pattern.json new file mode 100644 index 00000000..d4e3fe1e --- /dev/null +++ b/assets/minecraft/items/guster_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/guster_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/guster_pottery_sherd.json b/assets/minecraft/items/guster_pottery_sherd.json new file mode 100644 index 00000000..8de8ad0f --- /dev/null +++ b/assets/minecraft/items/guster_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/guster_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/hanging_roots.json b/assets/minecraft/items/hanging_roots.json new file mode 100644 index 00000000..0c5ef0eb --- /dev/null +++ b/assets/minecraft/items/hanging_roots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/hanging_roots" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/hay_block.json b/assets/minecraft/items/hay_block.json new file mode 100644 index 00000000..da9a175d --- /dev/null +++ b/assets/minecraft/items/hay_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/hay_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/heart_of_the_sea.json b/assets/minecraft/items/heart_of_the_sea.json new file mode 100644 index 00000000..37bab6c8 --- /dev/null +++ b/assets/minecraft/items/heart_of_the_sea.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/heart_of_the_sea" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/heart_pottery_sherd.json b/assets/minecraft/items/heart_pottery_sherd.json new file mode 100644 index 00000000..9c0dc00d --- /dev/null +++ b/assets/minecraft/items/heart_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/heart_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/heartbreak_pottery_sherd.json b/assets/minecraft/items/heartbreak_pottery_sherd.json new file mode 100644 index 00000000..14b4f629 --- /dev/null +++ b/assets/minecraft/items/heartbreak_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/heartbreak_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/heavy_core.json b/assets/minecraft/items/heavy_core.json new file mode 100644 index 00000000..ea03fa09 --- /dev/null +++ b/assets/minecraft/items/heavy_core.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/heavy_core" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/heavy_weighted_pressure_plate.json b/assets/minecraft/items/heavy_weighted_pressure_plate.json new file mode 100644 index 00000000..0cc82a64 --- /dev/null +++ b/assets/minecraft/items/heavy_weighted_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/heavy_weighted_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/hoglin_spawn_egg.json b/assets/minecraft/items/hoglin_spawn_egg.json new file mode 100644 index 00000000..770687ae --- /dev/null +++ b/assets/minecraft/items/hoglin_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/hoglin_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/honey_block.json b/assets/minecraft/items/honey_block.json new file mode 100644 index 00000000..1e6e3c2f --- /dev/null +++ b/assets/minecraft/items/honey_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/honey_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/honey_bottle.json b/assets/minecraft/items/honey_bottle.json new file mode 100644 index 00000000..20f6301c --- /dev/null +++ b/assets/minecraft/items/honey_bottle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/honey_bottle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/honeycomb.json b/assets/minecraft/items/honeycomb.json new file mode 100644 index 00000000..35526a0a --- /dev/null +++ b/assets/minecraft/items/honeycomb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/honeycomb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/honeycomb_block.json b/assets/minecraft/items/honeycomb_block.json new file mode 100644 index 00000000..e082e65a --- /dev/null +++ b/assets/minecraft/items/honeycomb_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/honeycomb_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/hopper.json b/assets/minecraft/items/hopper.json new file mode 100644 index 00000000..ff8ebdf9 --- /dev/null +++ b/assets/minecraft/items/hopper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/hopper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/hopper_minecart.json b/assets/minecraft/items/hopper_minecart.json new file mode 100644 index 00000000..b88edb12 --- /dev/null +++ b/assets/minecraft/items/hopper_minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/hopper_minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/horn_coral.json b/assets/minecraft/items/horn_coral.json new file mode 100644 index 00000000..715b359f --- /dev/null +++ b/assets/minecraft/items/horn_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/horn_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/horn_coral_block.json b/assets/minecraft/items/horn_coral_block.json new file mode 100644 index 00000000..6b986f24 --- /dev/null +++ b/assets/minecraft/items/horn_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/horn_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/horn_coral_fan.json b/assets/minecraft/items/horn_coral_fan.json new file mode 100644 index 00000000..121898de --- /dev/null +++ b/assets/minecraft/items/horn_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/horn_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/horse_spawn_egg.json b/assets/minecraft/items/horse_spawn_egg.json new file mode 100644 index 00000000..402399e8 --- /dev/null +++ b/assets/minecraft/items/horse_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/horse_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/host_armor_trim_smithing_template.json b/assets/minecraft/items/host_armor_trim_smithing_template.json new file mode 100644 index 00000000..ab6fb59f --- /dev/null +++ b/assets/minecraft/items/host_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/host_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/howl_pottery_sherd.json b/assets/minecraft/items/howl_pottery_sherd.json new file mode 100644 index 00000000..9f6bba7e --- /dev/null +++ b/assets/minecraft/items/howl_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/howl_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/husk_spawn_egg.json b/assets/minecraft/items/husk_spawn_egg.json new file mode 100644 index 00000000..fd0ab914 --- /dev/null +++ b/assets/minecraft/items/husk_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/husk_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ice.json b/assets/minecraft/items/ice.json new file mode 100644 index 00000000..b8991e78 --- /dev/null +++ b/assets/minecraft/items/ice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/ice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_chiseled_stone_bricks.json b/assets/minecraft/items/infested_chiseled_stone_bricks.json new file mode 100644 index 00000000..0001e670 --- /dev/null +++ b/assets/minecraft/items/infested_chiseled_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_cobblestone.json b/assets/minecraft/items/infested_cobblestone.json new file mode 100644 index 00000000..3bee3d36 --- /dev/null +++ b/assets/minecraft/items/infested_cobblestone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cobblestone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_cracked_stone_bricks.json b/assets/minecraft/items/infested_cracked_stone_bricks.json new file mode 100644 index 00000000..0d27cdde --- /dev/null +++ b/assets/minecraft/items/infested_cracked_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cracked_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_deepslate.json b/assets/minecraft/items/infested_deepslate.json new file mode 100644 index 00000000..77255c70 --- /dev/null +++ b/assets/minecraft/items/infested_deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_mossy_stone_bricks.json b/assets/minecraft/items/infested_mossy_stone_bricks.json new file mode 100644 index 00000000..431c6631 --- /dev/null +++ b/assets/minecraft/items/infested_mossy_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_stone.json b/assets/minecraft/items/infested_stone.json new file mode 100644 index 00000000..f5c9f2a0 --- /dev/null +++ b/assets/minecraft/items/infested_stone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/infested_stone_bricks.json b/assets/minecraft/items/infested_stone_bricks.json new file mode 100644 index 00000000..a61dd731 --- /dev/null +++ b/assets/minecraft/items/infested_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ink_sac.json b/assets/minecraft/items/ink_sac.json new file mode 100644 index 00000000..2cfcafe9 --- /dev/null +++ b/assets/minecraft/items/ink_sac.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ink_sac" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_axe.json b/assets/minecraft/items/iron_axe.json new file mode 100644 index 00000000..3cd80d73 --- /dev/null +++ b/assets/minecraft/items/iron_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_bars.json b/assets/minecraft/items/iron_bars.json new file mode 100644 index 00000000..9a06cea9 --- /dev/null +++ b/assets/minecraft/items/iron_bars.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_bars" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_block.json b/assets/minecraft/items/iron_block.json new file mode 100644 index 00000000..36d73e91 --- /dev/null +++ b/assets/minecraft/items/iron_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/iron_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_boots.json b/assets/minecraft/items/iron_boots.json new file mode 100644 index 00000000..feb3a456 --- /dev/null +++ b/assets/minecraft/items/iron_boots.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/iron_boots" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_chestplate.json b/assets/minecraft/items/iron_chestplate.json new file mode 100644 index 00000000..98230f97 --- /dev/null +++ b/assets/minecraft/items/iron_chestplate.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/iron_chestplate" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_door.json b/assets/minecraft/items/iron_door.json new file mode 100644 index 00000000..39748231 --- /dev/null +++ b/assets/minecraft/items/iron_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_golem_spawn_egg.json b/assets/minecraft/items/iron_golem_spawn_egg.json new file mode 100644 index 00000000..a9a9a4bf --- /dev/null +++ b/assets/minecraft/items/iron_golem_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_golem_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_helmet.json b/assets/minecraft/items/iron_helmet.json new file mode 100644 index 00000000..719098af --- /dev/null +++ b/assets/minecraft/items/iron_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/iron_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_hoe.json b/assets/minecraft/items/iron_hoe.json new file mode 100644 index 00000000..fdc1b460 --- /dev/null +++ b/assets/minecraft/items/iron_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_horse_armor.json b/assets/minecraft/items/iron_horse_armor.json new file mode 100644 index 00000000..051f1602 --- /dev/null +++ b/assets/minecraft/items/iron_horse_armor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_horse_armor" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_ingot.json b/assets/minecraft/items/iron_ingot.json new file mode 100644 index 00000000..bb2f3925 --- /dev/null +++ b/assets/minecraft/items/iron_ingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_ingot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_leggings.json b/assets/minecraft/items/iron_leggings.json new file mode 100644 index 00000000..83b7369c --- /dev/null +++ b/assets/minecraft/items/iron_leggings.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/iron_leggings" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_nugget.json b/assets/minecraft/items/iron_nugget.json new file mode 100644 index 00000000..4ec573ee --- /dev/null +++ b/assets/minecraft/items/iron_nugget.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_nugget" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_ore.json b/assets/minecraft/items/iron_ore.json new file mode 100644 index 00000000..44d467e3 --- /dev/null +++ b/assets/minecraft/items/iron_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/iron_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_pickaxe.json b/assets/minecraft/items/iron_pickaxe.json new file mode 100644 index 00000000..5a3f0d1b --- /dev/null +++ b/assets/minecraft/items/iron_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_shovel.json b/assets/minecraft/items/iron_shovel.json new file mode 100644 index 00000000..3ff9689a --- /dev/null +++ b/assets/minecraft/items/iron_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_sword.json b/assets/minecraft/items/iron_sword.json new file mode 100644 index 00000000..1bf4bb7d --- /dev/null +++ b/assets/minecraft/items/iron_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/iron_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/iron_trapdoor.json b/assets/minecraft/items/iron_trapdoor.json new file mode 100644 index 00000000..b3de8ef5 --- /dev/null +++ b/assets/minecraft/items/iron_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/iron_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/item_frame.json b/assets/minecraft/items/item_frame.json new file mode 100644 index 00000000..b115f49f --- /dev/null +++ b/assets/minecraft/items/item_frame.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/item_frame" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jack_o_lantern.json b/assets/minecraft/items/jack_o_lantern.json new file mode 100644 index 00000000..0a1e97b4 --- /dev/null +++ b/assets/minecraft/items/jack_o_lantern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jack_o_lantern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jigsaw.json b/assets/minecraft/items/jigsaw.json new file mode 100644 index 00000000..29fc7059 --- /dev/null +++ b/assets/minecraft/items/jigsaw.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jigsaw" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jukebox.json b/assets/minecraft/items/jukebox.json new file mode 100644 index 00000000..1e9a265b --- /dev/null +++ b/assets/minecraft/items/jukebox.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jukebox" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_boat.json b/assets/minecraft/items/jungle_boat.json new file mode 100644 index 00000000..2c6c1771 --- /dev/null +++ b/assets/minecraft/items/jungle_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_button.json b/assets/minecraft/items/jungle_button.json new file mode 100644 index 00000000..2085f50f --- /dev/null +++ b/assets/minecraft/items/jungle_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_chest_boat.json b/assets/minecraft/items/jungle_chest_boat.json new file mode 100644 index 00000000..8dec2a7a --- /dev/null +++ b/assets/minecraft/items/jungle_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_door.json b/assets/minecraft/items/jungle_door.json new file mode 100644 index 00000000..28f69bb9 --- /dev/null +++ b/assets/minecraft/items/jungle_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_fence.json b/assets/minecraft/items/jungle_fence.json new file mode 100644 index 00000000..91b461cf --- /dev/null +++ b/assets/minecraft/items/jungle_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_fence_gate.json b/assets/minecraft/items/jungle_fence_gate.json new file mode 100644 index 00000000..a6a07e9e --- /dev/null +++ b/assets/minecraft/items/jungle_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_hanging_sign.json b/assets/minecraft/items/jungle_hanging_sign.json new file mode 100644 index 00000000..bffa44c2 --- /dev/null +++ b/assets/minecraft/items/jungle_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_leaves.json b/assets/minecraft/items/jungle_leaves.json new file mode 100644 index 00000000..8454101d --- /dev/null +++ b/assets/minecraft/items/jungle_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -12012264 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_log.json b/assets/minecraft/items/jungle_log.json new file mode 100644 index 00000000..8298b45b --- /dev/null +++ b/assets/minecraft/items/jungle_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_planks.json b/assets/minecraft/items/jungle_planks.json new file mode 100644 index 00000000..3b34aeba --- /dev/null +++ b/assets/minecraft/items/jungle_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_pressure_plate.json b/assets/minecraft/items/jungle_pressure_plate.json new file mode 100644 index 00000000..11452341 --- /dev/null +++ b/assets/minecraft/items/jungle_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_sapling.json b/assets/minecraft/items/jungle_sapling.json new file mode 100644 index 00000000..1daef334 --- /dev/null +++ b/assets/minecraft/items/jungle_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_sign.json b/assets/minecraft/items/jungle_sign.json new file mode 100644 index 00000000..8821883c --- /dev/null +++ b/assets/minecraft/items/jungle_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/jungle_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_slab.json b/assets/minecraft/items/jungle_slab.json new file mode 100644 index 00000000..4bc7cfa3 --- /dev/null +++ b/assets/minecraft/items/jungle_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_stairs.json b/assets/minecraft/items/jungle_stairs.json new file mode 100644 index 00000000..b12a606a --- /dev/null +++ b/assets/minecraft/items/jungle_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_trapdoor.json b/assets/minecraft/items/jungle_trapdoor.json new file mode 100644 index 00000000..20a14ec7 --- /dev/null +++ b/assets/minecraft/items/jungle_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/jungle_wood.json b/assets/minecraft/items/jungle_wood.json new file mode 100644 index 00000000..4d79d4eb --- /dev/null +++ b/assets/minecraft/items/jungle_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/jungle_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/kelp.json b/assets/minecraft/items/kelp.json new file mode 100644 index 00000000..f7a11c1b --- /dev/null +++ b/assets/minecraft/items/kelp.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/kelp" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/knowledge_book.json b/assets/minecraft/items/knowledge_book.json new file mode 100644 index 00000000..87e46889 --- /dev/null +++ b/assets/minecraft/items/knowledge_book.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/knowledge_book" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ladder.json b/assets/minecraft/items/ladder.json new file mode 100644 index 00000000..d65cb1d3 --- /dev/null +++ b/assets/minecraft/items/ladder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ladder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lantern.json b/assets/minecraft/items/lantern.json new file mode 100644 index 00000000..05c3c271 --- /dev/null +++ b/assets/minecraft/items/lantern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lantern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lapis_block.json b/assets/minecraft/items/lapis_block.json new file mode 100644 index 00000000..a7e9736b --- /dev/null +++ b/assets/minecraft/items/lapis_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lapis_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lapis_lazuli.json b/assets/minecraft/items/lapis_lazuli.json new file mode 100644 index 00000000..06707433 --- /dev/null +++ b/assets/minecraft/items/lapis_lazuli.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lapis_lazuli" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lapis_ore.json b/assets/minecraft/items/lapis_ore.json new file mode 100644 index 00000000..4bff6f79 --- /dev/null +++ b/assets/minecraft/items/lapis_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lapis_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/large_amethyst_bud.json b/assets/minecraft/items/large_amethyst_bud.json new file mode 100644 index 00000000..6e205924 --- /dev/null +++ b/assets/minecraft/items/large_amethyst_bud.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/large_amethyst_bud" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/large_fern.json b/assets/minecraft/items/large_fern.json new file mode 100644 index 00000000..6f600341 --- /dev/null +++ b/assets/minecraft/items/large_fern.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/large_fern", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lava_bucket.json b/assets/minecraft/items/lava_bucket.json new file mode 100644 index 00000000..5d7f2ff5 --- /dev/null +++ b/assets/minecraft/items/lava_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lava_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lead.json b/assets/minecraft/items/lead.json new file mode 100644 index 00000000..92105d2c --- /dev/null +++ b/assets/minecraft/items/lead.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lead" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leaf_litter.json b/assets/minecraft/items/leaf_litter.json new file mode 100644 index 00000000..d2edcf4e --- /dev/null +++ b/assets/minecraft/items/leaf_litter.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather.json b/assets/minecraft/items/leather.json new file mode 100644 index 00000000..7e0715b6 --- /dev/null +++ b/assets/minecraft/items/leather.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather_boots.json b/assets/minecraft/items/leather_boots.json new file mode 100644 index 00000000..856efcaf --- /dev/null +++ b/assets/minecraft/items/leather_boots.json @@ -0,0 +1,161 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_quartz_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_iron_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_netherite_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_redstone_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_copper_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_gold_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_emerald_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_diamond_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_lapis_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_amethyst_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots_resin_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/leather_boots", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather_chestplate.json b/assets/minecraft/items/leather_chestplate.json new file mode 100644 index 00000000..17879477 --- /dev/null +++ b/assets/minecraft/items/leather_chestplate.json @@ -0,0 +1,161 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_quartz_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_iron_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_netherite_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_redstone_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_copper_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_gold_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_emerald_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_diamond_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_lapis_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_amethyst_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate_resin_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/leather_chestplate", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather_helmet.json b/assets/minecraft/items/leather_helmet.json new file mode 100644 index 00000000..feecbc7e --- /dev/null +++ b/assets/minecraft/items/leather_helmet.json @@ -0,0 +1,161 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_quartz_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_iron_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_netherite_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_redstone_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_copper_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_gold_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_emerald_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_diamond_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_lapis_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_amethyst_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet_resin_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/leather_helmet", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather_horse_armor.json b/assets/minecraft/items/leather_horse_armor.json new file mode 100644 index 00000000..fff10050 --- /dev/null +++ b/assets/minecraft/items/leather_horse_armor.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_horse_armor", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/leather_leggings.json b/assets/minecraft/items/leather_leggings.json new file mode 100644 index 00000000..aea8bce8 --- /dev/null +++ b/assets/minecraft/items/leather_leggings.json @@ -0,0 +1,161 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_quartz_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_iron_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_netherite_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_redstone_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_copper_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_gold_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_emerald_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_diamond_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_lapis_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_amethyst_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings_resin_trim", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/leather_leggings", + "tints": [ + { + "type": "minecraft:dye", + "default": -6265536 + } + ] + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lectern.json b/assets/minecraft/items/lectern.json new file mode 100644 index 00000000..12099c3c --- /dev/null +++ b/assets/minecraft/items/lectern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lectern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lever.json b/assets/minecraft/items/lever.json new file mode 100644 index 00000000..10207120 --- /dev/null +++ b/assets/minecraft/items/lever.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lever" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light.json b/assets/minecraft/items/light.json new file mode 100644 index 00000000..01c6f206 --- /dev/null +++ b/assets/minecraft/items/light.json @@ -0,0 +1,125 @@ +{ + "model": { + "type": "minecraft:select", + "block_state_property": "level", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_00" + }, + "when": "0" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_01" + }, + "when": "1" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_02" + }, + "when": "2" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_03" + }, + "when": "3" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_04" + }, + "when": "4" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_05" + }, + "when": "5" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_06" + }, + "when": "6" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_07" + }, + "when": "7" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_08" + }, + "when": "8" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_09" + }, + "when": "9" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_10" + }, + "when": "10" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_11" + }, + "when": "11" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_12" + }, + "when": "12" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_13" + }, + "when": "13" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_14" + }, + "when": "14" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_15" + }, + "when": "15" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/light" + }, + "property": "minecraft:block_state" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_banner.json b/assets/minecraft/items/light_blue_banner.json new file mode 100644 index 00000000..6b64861d --- /dev/null +++ b/assets/minecraft/items/light_blue_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "light_blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_bed.json b/assets/minecraft/items/light_blue_bed.json new file mode 100644 index 00000000..f899f0f6 --- /dev/null +++ b/assets/minecraft/items/light_blue_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/light_blue_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:light_blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_bundle.json b/assets/minecraft/items/light_blue_bundle.json new file mode 100644 index 00000000..a0c87bd5 --- /dev/null +++ b/assets/minecraft/items/light_blue_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_candle.json b/assets/minecraft/items/light_blue_candle.json new file mode 100644 index 00000000..4e8cf64c --- /dev/null +++ b/assets/minecraft/items/light_blue_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_carpet.json b/assets/minecraft/items/light_blue_carpet.json new file mode 100644 index 00000000..0027a2fe --- /dev/null +++ b/assets/minecraft/items/light_blue_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_concrete.json b/assets/minecraft/items/light_blue_concrete.json new file mode 100644 index 00000000..96f58785 --- /dev/null +++ b/assets/minecraft/items/light_blue_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_concrete_powder.json b/assets/minecraft/items/light_blue_concrete_powder.json new file mode 100644 index 00000000..2ac541e7 --- /dev/null +++ b/assets/minecraft/items/light_blue_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_dye.json b/assets/minecraft/items/light_blue_dye.json new file mode 100644 index 00000000..527ad68a --- /dev/null +++ b/assets/minecraft/items/light_blue_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_glazed_terracotta.json b/assets/minecraft/items/light_blue_glazed_terracotta.json new file mode 100644 index 00000000..1e34edfb --- /dev/null +++ b/assets/minecraft/items/light_blue_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_shulker_box.json b/assets/minecraft/items/light_blue_shulker_box.json new file mode 100644 index 00000000..13e5b120 --- /dev/null +++ b/assets/minecraft/items/light_blue_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/light_blue_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_light_blue" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_stained_glass.json b/assets/minecraft/items/light_blue_stained_glass.json new file mode 100644 index 00000000..84a8a87c --- /dev/null +++ b/assets/minecraft/items/light_blue_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_stained_glass_pane.json b/assets/minecraft/items/light_blue_stained_glass_pane.json new file mode 100644 index 00000000..4d8f4917 --- /dev/null +++ b/assets/minecraft/items/light_blue_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_blue_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_terracotta.json b/assets/minecraft/items/light_blue_terracotta.json new file mode 100644 index 00000000..cf18f080 --- /dev/null +++ b/assets/minecraft/items/light_blue_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_blue_wool.json b/assets/minecraft/items/light_blue_wool.json new file mode 100644 index 00000000..d4dc15c7 --- /dev/null +++ b/assets/minecraft/items/light_blue_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_blue_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_banner.json b/assets/minecraft/items/light_gray_banner.json new file mode 100644 index 00000000..cec38b00 --- /dev/null +++ b/assets/minecraft/items/light_gray_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "light_gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_bed.json b/assets/minecraft/items/light_gray_bed.json new file mode 100644 index 00000000..1b2b5fb1 --- /dev/null +++ b/assets/minecraft/items/light_gray_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/light_gray_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:light_gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_bundle.json b/assets/minecraft/items/light_gray_bundle.json new file mode 100644 index 00000000..3377fe60 --- /dev/null +++ b/assets/minecraft/items/light_gray_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_candle.json b/assets/minecraft/items/light_gray_candle.json new file mode 100644 index 00000000..324e9b03 --- /dev/null +++ b/assets/minecraft/items/light_gray_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_carpet.json b/assets/minecraft/items/light_gray_carpet.json new file mode 100644 index 00000000..a905889d --- /dev/null +++ b/assets/minecraft/items/light_gray_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_concrete.json b/assets/minecraft/items/light_gray_concrete.json new file mode 100644 index 00000000..52b4e682 --- /dev/null +++ b/assets/minecraft/items/light_gray_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_concrete_powder.json b/assets/minecraft/items/light_gray_concrete_powder.json new file mode 100644 index 00000000..45a334cf --- /dev/null +++ b/assets/minecraft/items/light_gray_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_dye.json b/assets/minecraft/items/light_gray_dye.json new file mode 100644 index 00000000..3d85aebd --- /dev/null +++ b/assets/minecraft/items/light_gray_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_glazed_terracotta.json b/assets/minecraft/items/light_gray_glazed_terracotta.json new file mode 100644 index 00000000..24cd3e3f --- /dev/null +++ b/assets/minecraft/items/light_gray_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_shulker_box.json b/assets/minecraft/items/light_gray_shulker_box.json new file mode 100644 index 00000000..7b2890e7 --- /dev/null +++ b/assets/minecraft/items/light_gray_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/light_gray_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_light_gray" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_stained_glass.json b/assets/minecraft/items/light_gray_stained_glass.json new file mode 100644 index 00000000..f89b0d6c --- /dev/null +++ b/assets/minecraft/items/light_gray_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_stained_glass_pane.json b/assets/minecraft/items/light_gray_stained_glass_pane.json new file mode 100644 index 00000000..7ffb8319 --- /dev/null +++ b/assets/minecraft/items/light_gray_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/light_gray_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_terracotta.json b/assets/minecraft/items/light_gray_terracotta.json new file mode 100644 index 00000000..302d50ee --- /dev/null +++ b/assets/minecraft/items/light_gray_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_gray_wool.json b/assets/minecraft/items/light_gray_wool.json new file mode 100644 index 00000000..ce28c352 --- /dev/null +++ b/assets/minecraft/items/light_gray_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_gray_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/light_weighted_pressure_plate.json b/assets/minecraft/items/light_weighted_pressure_plate.json new file mode 100644 index 00000000..f9fc0130 --- /dev/null +++ b/assets/minecraft/items/light_weighted_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/light_weighted_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lightning_rod.json b/assets/minecraft/items/lightning_rod.json new file mode 100644 index 00000000..318d6e16 --- /dev/null +++ b/assets/minecraft/items/lightning_rod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lightning_rod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lilac.json b/assets/minecraft/items/lilac.json new file mode 100644 index 00000000..9dba13cd --- /dev/null +++ b/assets/minecraft/items/lilac.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lilac" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lily_of_the_valley.json b/assets/minecraft/items/lily_of_the_valley.json new file mode 100644 index 00000000..11152cac --- /dev/null +++ b/assets/minecraft/items/lily_of_the_valley.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lily_of_the_valley" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lily_pad.json b/assets/minecraft/items/lily_pad.json new file mode 100644 index 00000000..0952ad29 --- /dev/null +++ b/assets/minecraft/items/lily_pad.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lily_pad", + "tints": [ + { + "type": "minecraft:constant", + "value": -9321636 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_banner.json b/assets/minecraft/items/lime_banner.json new file mode 100644 index 00000000..7a370b2f --- /dev/null +++ b/assets/minecraft/items/lime_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "lime" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_bed.json b/assets/minecraft/items/lime_bed.json new file mode 100644 index 00000000..b81ee17b --- /dev/null +++ b/assets/minecraft/items/lime_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/lime_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:lime" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_bundle.json b/assets/minecraft/items/lime_bundle.json new file mode 100644 index 00000000..3789b99d --- /dev/null +++ b/assets/minecraft/items/lime_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/lime_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/lime_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/lime_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/lime_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_candle.json b/assets/minecraft/items/lime_candle.json new file mode 100644 index 00000000..edd5748e --- /dev/null +++ b/assets/minecraft/items/lime_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lime_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_carpet.json b/assets/minecraft/items/lime_carpet.json new file mode 100644 index 00000000..3dc877eb --- /dev/null +++ b/assets/minecraft/items/lime_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_concrete.json b/assets/minecraft/items/lime_concrete.json new file mode 100644 index 00000000..832edacb --- /dev/null +++ b/assets/minecraft/items/lime_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_concrete_powder.json b/assets/minecraft/items/lime_concrete_powder.json new file mode 100644 index 00000000..f6e39ed5 --- /dev/null +++ b/assets/minecraft/items/lime_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_dye.json b/assets/minecraft/items/lime_dye.json new file mode 100644 index 00000000..cda6a902 --- /dev/null +++ b/assets/minecraft/items/lime_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lime_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_glazed_terracotta.json b/assets/minecraft/items/lime_glazed_terracotta.json new file mode 100644 index 00000000..897348b8 --- /dev/null +++ b/assets/minecraft/items/lime_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_shulker_box.json b/assets/minecraft/items/lime_shulker_box.json new file mode 100644 index 00000000..2849f5e8 --- /dev/null +++ b/assets/minecraft/items/lime_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/lime_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_lime" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_stained_glass.json b/assets/minecraft/items/lime_stained_glass.json new file mode 100644 index 00000000..c9d1ae30 --- /dev/null +++ b/assets/minecraft/items/lime_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_stained_glass_pane.json b/assets/minecraft/items/lime_stained_glass_pane.json new file mode 100644 index 00000000..24fb9e2b --- /dev/null +++ b/assets/minecraft/items/lime_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lime_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_terracotta.json b/assets/minecraft/items/lime_terracotta.json new file mode 100644 index 00000000..d08631ac --- /dev/null +++ b/assets/minecraft/items/lime_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lime_wool.json b/assets/minecraft/items/lime_wool.json new file mode 100644 index 00000000..8e491844 --- /dev/null +++ b/assets/minecraft/items/lime_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lime_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lingering_potion.json b/assets/minecraft/items/lingering_potion.json new file mode 100644 index 00000000..ec825730 --- /dev/null +++ b/assets/minecraft/items/lingering_potion.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/lingering_potion", + "tints": [ + { + "type": "minecraft:potion", + "default": -13083194 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/llama_spawn_egg.json b/assets/minecraft/items/llama_spawn_egg.json new file mode 100644 index 00000000..0eed2d50 --- /dev/null +++ b/assets/minecraft/items/llama_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/llama_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/lodestone.json b/assets/minecraft/items/lodestone.json new file mode 100644 index 00000000..2ac84d41 --- /dev/null +++ b/assets/minecraft/items/lodestone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/lodestone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/loom.json b/assets/minecraft/items/loom.json new file mode 100644 index 00000000..a83efb19 --- /dev/null +++ b/assets/minecraft/items/loom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/loom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mace.json b/assets/minecraft/items/mace.json new file mode 100644 index 00000000..85d3c0ff --- /dev/null +++ b/assets/minecraft/items/mace.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mace" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_banner.json b/assets/minecraft/items/magenta_banner.json new file mode 100644 index 00000000..102dce88 --- /dev/null +++ b/assets/minecraft/items/magenta_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "magenta" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_bed.json b/assets/minecraft/items/magenta_bed.json new file mode 100644 index 00000000..1110f779 --- /dev/null +++ b/assets/minecraft/items/magenta_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/magenta_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:magenta" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_bundle.json b/assets/minecraft/items/magenta_bundle.json new file mode 100644 index 00000000..bb122f28 --- /dev/null +++ b/assets/minecraft/items/magenta_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/magenta_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/magenta_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/magenta_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/magenta_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_candle.json b/assets/minecraft/items/magenta_candle.json new file mode 100644 index 00000000..a21f1835 --- /dev/null +++ b/assets/minecraft/items/magenta_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/magenta_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_carpet.json b/assets/minecraft/items/magenta_carpet.json new file mode 100644 index 00000000..a4a5a70c --- /dev/null +++ b/assets/minecraft/items/magenta_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_concrete.json b/assets/minecraft/items/magenta_concrete.json new file mode 100644 index 00000000..af52449f --- /dev/null +++ b/assets/minecraft/items/magenta_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_concrete_powder.json b/assets/minecraft/items/magenta_concrete_powder.json new file mode 100644 index 00000000..c1e31d1c --- /dev/null +++ b/assets/minecraft/items/magenta_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_dye.json b/assets/minecraft/items/magenta_dye.json new file mode 100644 index 00000000..452fe73e --- /dev/null +++ b/assets/minecraft/items/magenta_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/magenta_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_glazed_terracotta.json b/assets/minecraft/items/magenta_glazed_terracotta.json new file mode 100644 index 00000000..b6bbeda4 --- /dev/null +++ b/assets/minecraft/items/magenta_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_shulker_box.json b/assets/minecraft/items/magenta_shulker_box.json new file mode 100644 index 00000000..32adfdd9 --- /dev/null +++ b/assets/minecraft/items/magenta_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/magenta_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_magenta" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_stained_glass.json b/assets/minecraft/items/magenta_stained_glass.json new file mode 100644 index 00000000..99403a70 --- /dev/null +++ b/assets/minecraft/items/magenta_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_stained_glass_pane.json b/assets/minecraft/items/magenta_stained_glass_pane.json new file mode 100644 index 00000000..a75bc227 --- /dev/null +++ b/assets/minecraft/items/magenta_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/magenta_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_terracotta.json b/assets/minecraft/items/magenta_terracotta.json new file mode 100644 index 00000000..c81a0ac3 --- /dev/null +++ b/assets/minecraft/items/magenta_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magenta_wool.json b/assets/minecraft/items/magenta_wool.json new file mode 100644 index 00000000..e6069e30 --- /dev/null +++ b/assets/minecraft/items/magenta_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magenta_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magma_block.json b/assets/minecraft/items/magma_block.json new file mode 100644 index 00000000..5f1fffb1 --- /dev/null +++ b/assets/minecraft/items/magma_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/magma_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magma_cream.json b/assets/minecraft/items/magma_cream.json new file mode 100644 index 00000000..9cd205e6 --- /dev/null +++ b/assets/minecraft/items/magma_cream.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/magma_cream" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/magma_cube_spawn_egg.json b/assets/minecraft/items/magma_cube_spawn_egg.json new file mode 100644 index 00000000..51420eb1 --- /dev/null +++ b/assets/minecraft/items/magma_cube_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/magma_cube_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_boat.json b/assets/minecraft/items/mangrove_boat.json new file mode 100644 index 00000000..5a7e4ec0 --- /dev/null +++ b/assets/minecraft/items/mangrove_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_button.json b/assets/minecraft/items/mangrove_button.json new file mode 100644 index 00000000..e94f4437 --- /dev/null +++ b/assets/minecraft/items/mangrove_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_chest_boat.json b/assets/minecraft/items/mangrove_chest_boat.json new file mode 100644 index 00000000..d4dfef22 --- /dev/null +++ b/assets/minecraft/items/mangrove_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_door.json b/assets/minecraft/items/mangrove_door.json new file mode 100644 index 00000000..17a08b7b --- /dev/null +++ b/assets/minecraft/items/mangrove_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_fence.json b/assets/minecraft/items/mangrove_fence.json new file mode 100644 index 00000000..6ae1e870 --- /dev/null +++ b/assets/minecraft/items/mangrove_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_fence_gate.json b/assets/minecraft/items/mangrove_fence_gate.json new file mode 100644 index 00000000..8ddd8108 --- /dev/null +++ b/assets/minecraft/items/mangrove_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_hanging_sign.json b/assets/minecraft/items/mangrove_hanging_sign.json new file mode 100644 index 00000000..5d142a0c --- /dev/null +++ b/assets/minecraft/items/mangrove_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_leaves.json b/assets/minecraft/items/mangrove_leaves.json new file mode 100644 index 00000000..3314939b --- /dev/null +++ b/assets/minecraft/items/mangrove_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -7158200 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_log.json b/assets/minecraft/items/mangrove_log.json new file mode 100644 index 00000000..1c472d67 --- /dev/null +++ b/assets/minecraft/items/mangrove_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_planks.json b/assets/minecraft/items/mangrove_planks.json new file mode 100644 index 00000000..32ac80c9 --- /dev/null +++ b/assets/minecraft/items/mangrove_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_pressure_plate.json b/assets/minecraft/items/mangrove_pressure_plate.json new file mode 100644 index 00000000..df4bef88 --- /dev/null +++ b/assets/minecraft/items/mangrove_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_propagule.json b/assets/minecraft/items/mangrove_propagule.json new file mode 100644 index 00000000..3e671460 --- /dev/null +++ b/assets/minecraft/items/mangrove_propagule.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_propagule" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_roots.json b/assets/minecraft/items/mangrove_roots.json new file mode 100644 index 00000000..c36991de --- /dev/null +++ b/assets/minecraft/items/mangrove_roots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_roots" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_sign.json b/assets/minecraft/items/mangrove_sign.json new file mode 100644 index 00000000..4a0b0dab --- /dev/null +++ b/assets/minecraft/items/mangrove_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mangrove_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_slab.json b/assets/minecraft/items/mangrove_slab.json new file mode 100644 index 00000000..41bd6259 --- /dev/null +++ b/assets/minecraft/items/mangrove_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_stairs.json b/assets/minecraft/items/mangrove_stairs.json new file mode 100644 index 00000000..568063fb --- /dev/null +++ b/assets/minecraft/items/mangrove_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_trapdoor.json b/assets/minecraft/items/mangrove_trapdoor.json new file mode 100644 index 00000000..d771ef8f --- /dev/null +++ b/assets/minecraft/items/mangrove_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mangrove_wood.json b/assets/minecraft/items/mangrove_wood.json new file mode 100644 index 00000000..34fa8bd8 --- /dev/null +++ b/assets/minecraft/items/mangrove_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mangrove_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/map.json b/assets/minecraft/items/map.json new file mode 100644 index 00000000..c10f8ae9 --- /dev/null +++ b/assets/minecraft/items/map.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/map" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/medium_amethyst_bud.json b/assets/minecraft/items/medium_amethyst_bud.json new file mode 100644 index 00000000..c5b27895 --- /dev/null +++ b/assets/minecraft/items/medium_amethyst_bud.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/medium_amethyst_bud" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/melon.json b/assets/minecraft/items/melon.json new file mode 100644 index 00000000..b3d5859e --- /dev/null +++ b/assets/minecraft/items/melon.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/melon" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/melon_seeds.json b/assets/minecraft/items/melon_seeds.json new file mode 100644 index 00000000..b9c5cac8 --- /dev/null +++ b/assets/minecraft/items/melon_seeds.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/melon_seeds" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/melon_slice.json b/assets/minecraft/items/melon_slice.json new file mode 100644 index 00000000..4753610a --- /dev/null +++ b/assets/minecraft/items/melon_slice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/melon_slice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/milk_bucket.json b/assets/minecraft/items/milk_bucket.json new file mode 100644 index 00000000..36d245a7 --- /dev/null +++ b/assets/minecraft/items/milk_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/milk_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/minecart.json b/assets/minecraft/items/minecart.json new file mode 100644 index 00000000..20ea7d59 --- /dev/null +++ b/assets/minecraft/items/minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/miner_pottery_sherd.json b/assets/minecraft/items/miner_pottery_sherd.json new file mode 100644 index 00000000..fcf06d74 --- /dev/null +++ b/assets/minecraft/items/miner_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/miner_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mojang_banner_pattern.json b/assets/minecraft/items/mojang_banner_pattern.json new file mode 100644 index 00000000..9ad39b72 --- /dev/null +++ b/assets/minecraft/items/mojang_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mojang_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mooshroom_spawn_egg.json b/assets/minecraft/items/mooshroom_spawn_egg.json new file mode 100644 index 00000000..fa68ef21 --- /dev/null +++ b/assets/minecraft/items/mooshroom_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mooshroom_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/moss_block.json b/assets/minecraft/items/moss_block.json new file mode 100644 index 00000000..f9be9776 --- /dev/null +++ b/assets/minecraft/items/moss_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/moss_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/moss_carpet.json b/assets/minecraft/items/moss_carpet.json new file mode 100644 index 00000000..85b60707 --- /dev/null +++ b/assets/minecraft/items/moss_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/moss_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_cobblestone.json b/assets/minecraft/items/mossy_cobblestone.json new file mode 100644 index 00000000..5aa1d87e --- /dev/null +++ b/assets/minecraft/items/mossy_cobblestone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_cobblestone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_cobblestone_slab.json b/assets/minecraft/items/mossy_cobblestone_slab.json new file mode 100644 index 00000000..88f15952 --- /dev/null +++ b/assets/minecraft/items/mossy_cobblestone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_cobblestone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_cobblestone_stairs.json b/assets/minecraft/items/mossy_cobblestone_stairs.json new file mode 100644 index 00000000..3d2ef3c7 --- /dev/null +++ b/assets/minecraft/items/mossy_cobblestone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_cobblestone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_cobblestone_wall.json b/assets/minecraft/items/mossy_cobblestone_wall.json new file mode 100644 index 00000000..7bfeb08f --- /dev/null +++ b/assets/minecraft/items/mossy_cobblestone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_cobblestone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_stone_brick_slab.json b/assets/minecraft/items/mossy_stone_brick_slab.json new file mode 100644 index 00000000..f6112427 --- /dev/null +++ b/assets/minecraft/items/mossy_stone_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_stone_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_stone_brick_stairs.json b/assets/minecraft/items/mossy_stone_brick_stairs.json new file mode 100644 index 00000000..9096a3cf --- /dev/null +++ b/assets/minecraft/items/mossy_stone_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_stone_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_stone_brick_wall.json b/assets/minecraft/items/mossy_stone_brick_wall.json new file mode 100644 index 00000000..130e597d --- /dev/null +++ b/assets/minecraft/items/mossy_stone_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_stone_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mossy_stone_bricks.json b/assets/minecraft/items/mossy_stone_bricks.json new file mode 100644 index 00000000..431c6631 --- /dev/null +++ b/assets/minecraft/items/mossy_stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mossy_stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mourner_pottery_sherd.json b/assets/minecraft/items/mourner_pottery_sherd.json new file mode 100644 index 00000000..e576fdb7 --- /dev/null +++ b/assets/minecraft/items/mourner_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mourner_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mud.json b/assets/minecraft/items/mud.json new file mode 100644 index 00000000..2ae0c692 --- /dev/null +++ b/assets/minecraft/items/mud.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mud" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mud_brick_slab.json b/assets/minecraft/items/mud_brick_slab.json new file mode 100644 index 00000000..bdd56fd6 --- /dev/null +++ b/assets/minecraft/items/mud_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mud_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mud_brick_stairs.json b/assets/minecraft/items/mud_brick_stairs.json new file mode 100644 index 00000000..09bb42cb --- /dev/null +++ b/assets/minecraft/items/mud_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mud_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mud_brick_wall.json b/assets/minecraft/items/mud_brick_wall.json new file mode 100644 index 00000000..9ec3a54e --- /dev/null +++ b/assets/minecraft/items/mud_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mud_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mud_bricks.json b/assets/minecraft/items/mud_bricks.json new file mode 100644 index 00000000..47c0ec67 --- /dev/null +++ b/assets/minecraft/items/mud_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mud_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/muddy_mangrove_roots.json b/assets/minecraft/items/muddy_mangrove_roots.json new file mode 100644 index 00000000..72ee9ad2 --- /dev/null +++ b/assets/minecraft/items/muddy_mangrove_roots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/muddy_mangrove_roots" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mule_spawn_egg.json b/assets/minecraft/items/mule_spawn_egg.json new file mode 100644 index 00000000..5f4292ea --- /dev/null +++ b/assets/minecraft/items/mule_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mule_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mushroom_stem.json b/assets/minecraft/items/mushroom_stem.json new file mode 100644 index 00000000..14ee4df0 --- /dev/null +++ b/assets/minecraft/items/mushroom_stem.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mushroom_stem_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mushroom_stew.json b/assets/minecraft/items/mushroom_stew.json new file mode 100644 index 00000000..7d6fd975 --- /dev/null +++ b/assets/minecraft/items/mushroom_stew.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mushroom_stew" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_11.json b/assets/minecraft/items/music_disc_11.json new file mode 100644 index 00000000..8bf248c7 --- /dev/null +++ b/assets/minecraft/items/music_disc_11.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_11" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_13.json b/assets/minecraft/items/music_disc_13.json new file mode 100644 index 00000000..36859fea --- /dev/null +++ b/assets/minecraft/items/music_disc_13.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_13" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_5.json b/assets/minecraft/items/music_disc_5.json new file mode 100644 index 00000000..2d31f595 --- /dev/null +++ b/assets/minecraft/items/music_disc_5.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_5" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_blocks.json b/assets/minecraft/items/music_disc_blocks.json new file mode 100644 index 00000000..1a8def79 --- /dev/null +++ b/assets/minecraft/items/music_disc_blocks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_blocks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_cat.json b/assets/minecraft/items/music_disc_cat.json new file mode 100644 index 00000000..a4b3d52a --- /dev/null +++ b/assets/minecraft/items/music_disc_cat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_cat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_chirp.json b/assets/minecraft/items/music_disc_chirp.json new file mode 100644 index 00000000..2b5f4c05 --- /dev/null +++ b/assets/minecraft/items/music_disc_chirp.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_chirp" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_creator.json b/assets/minecraft/items/music_disc_creator.json new file mode 100644 index 00000000..de47392e --- /dev/null +++ b/assets/minecraft/items/music_disc_creator.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_creator" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_creator_music_box.json b/assets/minecraft/items/music_disc_creator_music_box.json new file mode 100644 index 00000000..e754f5e6 --- /dev/null +++ b/assets/minecraft/items/music_disc_creator_music_box.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_creator_music_box" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_far.json b/assets/minecraft/items/music_disc_far.json new file mode 100644 index 00000000..e5048148 --- /dev/null +++ b/assets/minecraft/items/music_disc_far.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_far" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_mall.json b/assets/minecraft/items/music_disc_mall.json new file mode 100644 index 00000000..7958c0e5 --- /dev/null +++ b/assets/minecraft/items/music_disc_mall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_mall" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_mellohi.json b/assets/minecraft/items/music_disc_mellohi.json new file mode 100644 index 00000000..bfa88756 --- /dev/null +++ b/assets/minecraft/items/music_disc_mellohi.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_mellohi" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_otherside.json b/assets/minecraft/items/music_disc_otherside.json new file mode 100644 index 00000000..3f07b4a5 --- /dev/null +++ b/assets/minecraft/items/music_disc_otherside.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_otherside" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_pigstep.json b/assets/minecraft/items/music_disc_pigstep.json new file mode 100644 index 00000000..9610fb68 --- /dev/null +++ b/assets/minecraft/items/music_disc_pigstep.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_pigstep" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_precipice.json b/assets/minecraft/items/music_disc_precipice.json new file mode 100644 index 00000000..ce782eda --- /dev/null +++ b/assets/minecraft/items/music_disc_precipice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_precipice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_relic.json b/assets/minecraft/items/music_disc_relic.json new file mode 100644 index 00000000..8d951d72 --- /dev/null +++ b/assets/minecraft/items/music_disc_relic.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_relic" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_stal.json b/assets/minecraft/items/music_disc_stal.json new file mode 100644 index 00000000..a8fe9b01 --- /dev/null +++ b/assets/minecraft/items/music_disc_stal.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_stal" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_strad.json b/assets/minecraft/items/music_disc_strad.json new file mode 100644 index 00000000..f33b7491 --- /dev/null +++ b/assets/minecraft/items/music_disc_strad.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_strad" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_wait.json b/assets/minecraft/items/music_disc_wait.json new file mode 100644 index 00000000..b50eb8e8 --- /dev/null +++ b/assets/minecraft/items/music_disc_wait.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_wait" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/music_disc_ward.json b/assets/minecraft/items/music_disc_ward.json new file mode 100644 index 00000000..166692f4 --- /dev/null +++ b/assets/minecraft/items/music_disc_ward.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/music_disc_ward" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mutton.json b/assets/minecraft/items/mutton.json new file mode 100644 index 00000000..5977fce0 --- /dev/null +++ b/assets/minecraft/items/mutton.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/mutton" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/mycelium.json b/assets/minecraft/items/mycelium.json new file mode 100644 index 00000000..02add88a --- /dev/null +++ b/assets/minecraft/items/mycelium.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/mycelium" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/name_tag.json b/assets/minecraft/items/name_tag.json new file mode 100644 index 00000000..2f2e54ab --- /dev/null +++ b/assets/minecraft/items/name_tag.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/name_tag" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nautilus_shell.json b/assets/minecraft/items/nautilus_shell.json new file mode 100644 index 00000000..9fd2b333 --- /dev/null +++ b/assets/minecraft/items/nautilus_shell.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/nautilus_shell" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_brick.json b/assets/minecraft/items/nether_brick.json new file mode 100644 index 00000000..84e311d4 --- /dev/null +++ b/assets/minecraft/items/nether_brick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/nether_brick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_brick_fence.json b/assets/minecraft/items/nether_brick_fence.json new file mode 100644 index 00000000..11d21cf9 --- /dev/null +++ b/assets/minecraft/items/nether_brick_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_brick_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_brick_slab.json b/assets/minecraft/items/nether_brick_slab.json new file mode 100644 index 00000000..def834b6 --- /dev/null +++ b/assets/minecraft/items/nether_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_brick_stairs.json b/assets/minecraft/items/nether_brick_stairs.json new file mode 100644 index 00000000..0fcd602c --- /dev/null +++ b/assets/minecraft/items/nether_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_brick_wall.json b/assets/minecraft/items/nether_brick_wall.json new file mode 100644 index 00000000..0ca47fc6 --- /dev/null +++ b/assets/minecraft/items/nether_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_bricks.json b/assets/minecraft/items/nether_bricks.json new file mode 100644 index 00000000..04d911a9 --- /dev/null +++ b/assets/minecraft/items/nether_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_gold_ore.json b/assets/minecraft/items/nether_gold_ore.json new file mode 100644 index 00000000..30857376 --- /dev/null +++ b/assets/minecraft/items/nether_gold_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_gold_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_quartz_ore.json b/assets/minecraft/items/nether_quartz_ore.json new file mode 100644 index 00000000..d7d0101d --- /dev/null +++ b/assets/minecraft/items/nether_quartz_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_quartz_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_sprouts.json b/assets/minecraft/items/nether_sprouts.json new file mode 100644 index 00000000..ce1ff8ef --- /dev/null +++ b/assets/minecraft/items/nether_sprouts.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/nether_sprouts" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_star.json b/assets/minecraft/items/nether_star.json new file mode 100644 index 00000000..4539152f --- /dev/null +++ b/assets/minecraft/items/nether_star.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/nether_star" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_wart.json b/assets/minecraft/items/nether_wart.json new file mode 100644 index 00000000..b33c624d --- /dev/null +++ b/assets/minecraft/items/nether_wart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/nether_wart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/nether_wart_block.json b/assets/minecraft/items/nether_wart_block.json new file mode 100644 index 00000000..a5662063 --- /dev/null +++ b/assets/minecraft/items/nether_wart_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/nether_wart_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_axe.json b/assets/minecraft/items/netherite_axe.json new file mode 100644 index 00000000..02f45565 --- /dev/null +++ b/assets/minecraft/items/netherite_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_block.json b/assets/minecraft/items/netherite_block.json new file mode 100644 index 00000000..e7e8de37 --- /dev/null +++ b/assets/minecraft/items/netherite_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/netherite_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_boots.json b/assets/minecraft/items/netherite_boots.json new file mode 100644 index 00000000..8a7a7adc --- /dev/null +++ b/assets/minecraft/items/netherite_boots.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_boots" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_chestplate.json b/assets/minecraft/items/netherite_chestplate.json new file mode 100644 index 00000000..b338ed22 --- /dev/null +++ b/assets/minecraft/items/netherite_chestplate.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_chestplate" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_helmet.json b/assets/minecraft/items/netherite_helmet.json new file mode 100644 index 00000000..317699f2 --- /dev/null +++ b/assets/minecraft/items/netherite_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_hoe.json b/assets/minecraft/items/netherite_hoe.json new file mode 100644 index 00000000..67625e1a --- /dev/null +++ b/assets/minecraft/items/netherite_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_ingot.json b/assets/minecraft/items/netherite_ingot.json new file mode 100644 index 00000000..3fa2583b --- /dev/null +++ b/assets/minecraft/items/netherite_ingot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_ingot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_leggings.json b/assets/minecraft/items/netherite_leggings.json new file mode 100644 index 00000000..61de5f89 --- /dev/null +++ b/assets/minecraft/items/netherite_leggings.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_leggings" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_pickaxe.json b/assets/minecraft/items/netherite_pickaxe.json new file mode 100644 index 00000000..a5fc75c0 --- /dev/null +++ b/assets/minecraft/items/netherite_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_scrap.json b/assets/minecraft/items/netherite_scrap.json new file mode 100644 index 00000000..0f0b6410 --- /dev/null +++ b/assets/minecraft/items/netherite_scrap.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_scrap" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_shovel.json b/assets/minecraft/items/netherite_shovel.json new file mode 100644 index 00000000..9fd5ed4c --- /dev/null +++ b/assets/minecraft/items/netherite_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_sword.json b/assets/minecraft/items/netherite_sword.json new file mode 100644 index 00000000..2cf94a27 --- /dev/null +++ b/assets/minecraft/items/netherite_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherite_upgrade_smithing_template.json b/assets/minecraft/items/netherite_upgrade_smithing_template.json new file mode 100644 index 00000000..62915512 --- /dev/null +++ b/assets/minecraft/items/netherite_upgrade_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/netherite_upgrade_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/netherrack.json b/assets/minecraft/items/netherrack.json new file mode 100644 index 00000000..b2062681 --- /dev/null +++ b/assets/minecraft/items/netherrack.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/netherrack" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/note_block.json b/assets/minecraft/items/note_block.json new file mode 100644 index 00000000..4b539c04 --- /dev/null +++ b/assets/minecraft/items/note_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/note_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_boat.json b/assets/minecraft/items/oak_boat.json new file mode 100644 index 00000000..f43e94b1 --- /dev/null +++ b/assets/minecraft/items/oak_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_button.json b/assets/minecraft/items/oak_button.json new file mode 100644 index 00000000..d4598590 --- /dev/null +++ b/assets/minecraft/items/oak_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_chest_boat.json b/assets/minecraft/items/oak_chest_boat.json new file mode 100644 index 00000000..26b1d7f8 --- /dev/null +++ b/assets/minecraft/items/oak_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_door.json b/assets/minecraft/items/oak_door.json new file mode 100644 index 00000000..0e80b32d --- /dev/null +++ b/assets/minecraft/items/oak_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_fence.json b/assets/minecraft/items/oak_fence.json new file mode 100644 index 00000000..4f5d32e2 --- /dev/null +++ b/assets/minecraft/items/oak_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_fence_gate.json b/assets/minecraft/items/oak_fence_gate.json new file mode 100644 index 00000000..dc6c743d --- /dev/null +++ b/assets/minecraft/items/oak_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_hanging_sign.json b/assets/minecraft/items/oak_hanging_sign.json new file mode 100644 index 00000000..a19906d1 --- /dev/null +++ b/assets/minecraft/items/oak_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_leaves.json b/assets/minecraft/items/oak_leaves.json new file mode 100644 index 00000000..dde03296 --- /dev/null +++ b/assets/minecraft/items/oak_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -12012264 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_log.json b/assets/minecraft/items/oak_log.json new file mode 100644 index 00000000..81bfdf5c --- /dev/null +++ b/assets/minecraft/items/oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_planks.json b/assets/minecraft/items/oak_planks.json new file mode 100644 index 00000000..d04c2f60 --- /dev/null +++ b/assets/minecraft/items/oak_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_pressure_plate.json b/assets/minecraft/items/oak_pressure_plate.json new file mode 100644 index 00000000..c7b3844a --- /dev/null +++ b/assets/minecraft/items/oak_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_sapling.json b/assets/minecraft/items/oak_sapling.json new file mode 100644 index 00000000..5362761a --- /dev/null +++ b/assets/minecraft/items/oak_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_sign.json b/assets/minecraft/items/oak_sign.json new file mode 100644 index 00000000..85ed9a5a --- /dev/null +++ b/assets/minecraft/items/oak_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oak_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_slab.json b/assets/minecraft/items/oak_slab.json new file mode 100644 index 00000000..86d648fc --- /dev/null +++ b/assets/minecraft/items/oak_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_stairs.json b/assets/minecraft/items/oak_stairs.json new file mode 100644 index 00000000..4246d24d --- /dev/null +++ b/assets/minecraft/items/oak_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_trapdoor.json b/assets/minecraft/items/oak_trapdoor.json new file mode 100644 index 00000000..f6d7d787 --- /dev/null +++ b/assets/minecraft/items/oak_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oak_wood.json b/assets/minecraft/items/oak_wood.json new file mode 100644 index 00000000..973108be --- /dev/null +++ b/assets/minecraft/items/oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/observer.json b/assets/minecraft/items/observer.json new file mode 100644 index 00000000..3d0d4076 --- /dev/null +++ b/assets/minecraft/items/observer.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/observer" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/obsidian.json b/assets/minecraft/items/obsidian.json new file mode 100644 index 00000000..e51b6722 --- /dev/null +++ b/assets/minecraft/items/obsidian.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/obsidian" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ocelot_spawn_egg.json b/assets/minecraft/items/ocelot_spawn_egg.json new file mode 100644 index 00000000..c6c7a202 --- /dev/null +++ b/assets/minecraft/items/ocelot_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ocelot_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ochre_froglight.json b/assets/minecraft/items/ochre_froglight.json new file mode 100644 index 00000000..5bec1c6d --- /dev/null +++ b/assets/minecraft/items/ochre_froglight.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/ochre_froglight" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ominous_bottle.json b/assets/minecraft/items/ominous_bottle.json new file mode 100644 index 00000000..1d68412d --- /dev/null +++ b/assets/minecraft/items/ominous_bottle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ominous_bottle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ominous_trial_key.json b/assets/minecraft/items/ominous_trial_key.json new file mode 100644 index 00000000..fe0ceb49 --- /dev/null +++ b/assets/minecraft/items/ominous_trial_key.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ominous_trial_key" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/open_eyeblossom.json b/assets/minecraft/items/open_eyeblossom.json new file mode 100644 index 00000000..17bad692 --- /dev/null +++ b/assets/minecraft/items/open_eyeblossom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/open_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_banner.json b/assets/minecraft/items/orange_banner.json new file mode 100644 index 00000000..6e7f7e63 --- /dev/null +++ b/assets/minecraft/items/orange_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "orange" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_bed.json b/assets/minecraft/items/orange_bed.json new file mode 100644 index 00000000..a1891083 --- /dev/null +++ b/assets/minecraft/items/orange_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/orange_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:orange" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_bundle.json b/assets/minecraft/items/orange_bundle.json new file mode 100644 index 00000000..5aaf68bf --- /dev/null +++ b/assets/minecraft/items/orange_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/orange_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/orange_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/orange_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/orange_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_candle.json b/assets/minecraft/items/orange_candle.json new file mode 100644 index 00000000..adbc212e --- /dev/null +++ b/assets/minecraft/items/orange_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/orange_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_carpet.json b/assets/minecraft/items/orange_carpet.json new file mode 100644 index 00000000..50aefc69 --- /dev/null +++ b/assets/minecraft/items/orange_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_concrete.json b/assets/minecraft/items/orange_concrete.json new file mode 100644 index 00000000..1fb70fdb --- /dev/null +++ b/assets/minecraft/items/orange_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_concrete_powder.json b/assets/minecraft/items/orange_concrete_powder.json new file mode 100644 index 00000000..7e6c2804 --- /dev/null +++ b/assets/minecraft/items/orange_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_dye.json b/assets/minecraft/items/orange_dye.json new file mode 100644 index 00000000..1e86b016 --- /dev/null +++ b/assets/minecraft/items/orange_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/orange_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_glazed_terracotta.json b/assets/minecraft/items/orange_glazed_terracotta.json new file mode 100644 index 00000000..4bd4509a --- /dev/null +++ b/assets/minecraft/items/orange_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_shulker_box.json b/assets/minecraft/items/orange_shulker_box.json new file mode 100644 index 00000000..1a0b6939 --- /dev/null +++ b/assets/minecraft/items/orange_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/orange_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_orange" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_stained_glass.json b/assets/minecraft/items/orange_stained_glass.json new file mode 100644 index 00000000..12e8dabb --- /dev/null +++ b/assets/minecraft/items/orange_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_stained_glass_pane.json b/assets/minecraft/items/orange_stained_glass_pane.json new file mode 100644 index 00000000..9764dfcd --- /dev/null +++ b/assets/minecraft/items/orange_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/orange_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_terracotta.json b/assets/minecraft/items/orange_terracotta.json new file mode 100644 index 00000000..5d3bdc71 --- /dev/null +++ b/assets/minecraft/items/orange_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_tulip.json b/assets/minecraft/items/orange_tulip.json new file mode 100644 index 00000000..eef0a796 --- /dev/null +++ b/assets/minecraft/items/orange_tulip.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/orange_tulip" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/orange_wool.json b/assets/minecraft/items/orange_wool.json new file mode 100644 index 00000000..46ad8f66 --- /dev/null +++ b/assets/minecraft/items/orange_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/orange_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxeye_daisy.json b/assets/minecraft/items/oxeye_daisy.json new file mode 100644 index 00000000..f0d52842 --- /dev/null +++ b/assets/minecraft/items/oxeye_daisy.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oxeye_daisy" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_chiseled_copper.json b/assets/minecraft/items/oxidized_chiseled_copper.json new file mode 100644 index 00000000..78b7eae0 --- /dev/null +++ b/assets/minecraft/items/oxidized_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_copper.json b/assets/minecraft/items/oxidized_copper.json new file mode 100644 index 00000000..c58b7f62 --- /dev/null +++ b/assets/minecraft/items/oxidized_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_copper_bulb.json b/assets/minecraft/items/oxidized_copper_bulb.json new file mode 100644 index 00000000..aeab2c8c --- /dev/null +++ b/assets/minecraft/items/oxidized_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_copper_door.json b/assets/minecraft/items/oxidized_copper_door.json new file mode 100644 index 00000000..b5cc84d3 --- /dev/null +++ b/assets/minecraft/items/oxidized_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oxidized_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_copper_grate.json b/assets/minecraft/items/oxidized_copper_grate.json new file mode 100644 index 00000000..90d2a483 --- /dev/null +++ b/assets/minecraft/items/oxidized_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_copper_trapdoor.json b/assets/minecraft/items/oxidized_copper_trapdoor.json new file mode 100644 index 00000000..245f08ef --- /dev/null +++ b/assets/minecraft/items/oxidized_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_cut_copper.json b/assets/minecraft/items/oxidized_cut_copper.json new file mode 100644 index 00000000..ec0748d3 --- /dev/null +++ b/assets/minecraft/items/oxidized_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_cut_copper_slab.json b/assets/minecraft/items/oxidized_cut_copper_slab.json new file mode 100644 index 00000000..3e15eec7 --- /dev/null +++ b/assets/minecraft/items/oxidized_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/oxidized_cut_copper_stairs.json b/assets/minecraft/items/oxidized_cut_copper_stairs.json new file mode 100644 index 00000000..7fd0b7f0 --- /dev/null +++ b/assets/minecraft/items/oxidized_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/packed_ice.json b/assets/minecraft/items/packed_ice.json new file mode 100644 index 00000000..46c3748d --- /dev/null +++ b/assets/minecraft/items/packed_ice.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/packed_ice" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/packed_mud.json b/assets/minecraft/items/packed_mud.json new file mode 100644 index 00000000..a54ca54d --- /dev/null +++ b/assets/minecraft/items/packed_mud.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/packed_mud" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/painting.json b/assets/minecraft/items/painting.json new file mode 100644 index 00000000..dd9e2a15 --- /dev/null +++ b/assets/minecraft/items/painting.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/painting" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_hanging_moss.json b/assets/minecraft/items/pale_hanging_moss.json new file mode 100644 index 00000000..265249e0 --- /dev/null +++ b/assets/minecraft/items/pale_hanging_moss.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_hanging_moss" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_moss_block.json b/assets/minecraft/items/pale_moss_block.json new file mode 100644 index 00000000..75217292 --- /dev/null +++ b/assets/minecraft/items/pale_moss_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_moss_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_moss_carpet.json b/assets/minecraft/items/pale_moss_carpet.json new file mode 100644 index 00000000..bfa7af73 --- /dev/null +++ b/assets/minecraft/items/pale_moss_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_moss_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_boat.json b/assets/minecraft/items/pale_oak_boat.json new file mode 100644 index 00000000..0d44dbde --- /dev/null +++ b/assets/minecraft/items/pale_oak_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_button.json b/assets/minecraft/items/pale_oak_button.json new file mode 100644 index 00000000..e72d3568 --- /dev/null +++ b/assets/minecraft/items/pale_oak_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_chest_boat.json b/assets/minecraft/items/pale_oak_chest_boat.json new file mode 100644 index 00000000..66d0994f --- /dev/null +++ b/assets/minecraft/items/pale_oak_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_door.json b/assets/minecraft/items/pale_oak_door.json new file mode 100644 index 00000000..4d15f541 --- /dev/null +++ b/assets/minecraft/items/pale_oak_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_fence.json b/assets/minecraft/items/pale_oak_fence.json new file mode 100644 index 00000000..43eede12 --- /dev/null +++ b/assets/minecraft/items/pale_oak_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_fence_gate.json b/assets/minecraft/items/pale_oak_fence_gate.json new file mode 100644 index 00000000..0747be1f --- /dev/null +++ b/assets/minecraft/items/pale_oak_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_hanging_sign.json b/assets/minecraft/items/pale_oak_hanging_sign.json new file mode 100644 index 00000000..73fc0441 --- /dev/null +++ b/assets/minecraft/items/pale_oak_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_leaves.json b/assets/minecraft/items/pale_oak_leaves.json new file mode 100644 index 00000000..af0326dc --- /dev/null +++ b/assets/minecraft/items/pale_oak_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_leaves" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_log.json b/assets/minecraft/items/pale_oak_log.json new file mode 100644 index 00000000..41dcbcd0 --- /dev/null +++ b/assets/minecraft/items/pale_oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_planks.json b/assets/minecraft/items/pale_oak_planks.json new file mode 100644 index 00000000..d1312cd9 --- /dev/null +++ b/assets/minecraft/items/pale_oak_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_pressure_plate.json b/assets/minecraft/items/pale_oak_pressure_plate.json new file mode 100644 index 00000000..091b2c66 --- /dev/null +++ b/assets/minecraft/items/pale_oak_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_sapling.json b/assets/minecraft/items/pale_oak_sapling.json new file mode 100644 index 00000000..5005f057 --- /dev/null +++ b/assets/minecraft/items/pale_oak_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_sign.json b/assets/minecraft/items/pale_oak_sign.json new file mode 100644 index 00000000..25efa70d --- /dev/null +++ b/assets/minecraft/items/pale_oak_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pale_oak_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_slab.json b/assets/minecraft/items/pale_oak_slab.json new file mode 100644 index 00000000..99c908d1 --- /dev/null +++ b/assets/minecraft/items/pale_oak_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_stairs.json b/assets/minecraft/items/pale_oak_stairs.json new file mode 100644 index 00000000..b35ebc85 --- /dev/null +++ b/assets/minecraft/items/pale_oak_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_trapdoor.json b/assets/minecraft/items/pale_oak_trapdoor.json new file mode 100644 index 00000000..8a0e5436 --- /dev/null +++ b/assets/minecraft/items/pale_oak_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pale_oak_wood.json b/assets/minecraft/items/pale_oak_wood.json new file mode 100644 index 00000000..a9ec9c6a --- /dev/null +++ b/assets/minecraft/items/pale_oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pale_oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/panda_spawn_egg.json b/assets/minecraft/items/panda_spawn_egg.json new file mode 100644 index 00000000..257bf91f --- /dev/null +++ b/assets/minecraft/items/panda_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/panda_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/paper.json b/assets/minecraft/items/paper.json new file mode 100644 index 00000000..981714c0 --- /dev/null +++ b/assets/minecraft/items/paper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/paper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/parrot_spawn_egg.json b/assets/minecraft/items/parrot_spawn_egg.json new file mode 100644 index 00000000..e06fce4c --- /dev/null +++ b/assets/minecraft/items/parrot_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/parrot_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pearlescent_froglight.json b/assets/minecraft/items/pearlescent_froglight.json new file mode 100644 index 00000000..679130d8 --- /dev/null +++ b/assets/minecraft/items/pearlescent_froglight.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pearlescent_froglight" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/peony.json b/assets/minecraft/items/peony.json new file mode 100644 index 00000000..12cab690 --- /dev/null +++ b/assets/minecraft/items/peony.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/peony" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/petrified_oak_slab.json b/assets/minecraft/items/petrified_oak_slab.json new file mode 100644 index 00000000..40d99661 --- /dev/null +++ b/assets/minecraft/items/petrified_oak_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/petrified_oak_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/phantom_membrane.json b/assets/minecraft/items/phantom_membrane.json new file mode 100644 index 00000000..ff4a666f --- /dev/null +++ b/assets/minecraft/items/phantom_membrane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/phantom_membrane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/phantom_spawn_egg.json b/assets/minecraft/items/phantom_spawn_egg.json new file mode 100644 index 00000000..df9b3d66 --- /dev/null +++ b/assets/minecraft/items/phantom_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/phantom_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pig_spawn_egg.json b/assets/minecraft/items/pig_spawn_egg.json new file mode 100644 index 00000000..a1757032 --- /dev/null +++ b/assets/minecraft/items/pig_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pig_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/piglin_banner_pattern.json b/assets/minecraft/items/piglin_banner_pattern.json new file mode 100644 index 00000000..b532de2e --- /dev/null +++ b/assets/minecraft/items/piglin_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/piglin_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/piglin_brute_spawn_egg.json b/assets/minecraft/items/piglin_brute_spawn_egg.json new file mode 100644 index 00000000..b0038728 --- /dev/null +++ b/assets/minecraft/items/piglin_brute_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/piglin_brute_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/piglin_head.json b/assets/minecraft/items/piglin_head.json new file mode 100644 index 00000000..e0f69892 --- /dev/null +++ b/assets/minecraft/items/piglin_head.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "piglin" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/piglin_spawn_egg.json b/assets/minecraft/items/piglin_spawn_egg.json new file mode 100644 index 00000000..1c5e1453 --- /dev/null +++ b/assets/minecraft/items/piglin_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/piglin_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pillager_spawn_egg.json b/assets/minecraft/items/pillager_spawn_egg.json new file mode 100644 index 00000000..e8b1b4ec --- /dev/null +++ b/assets/minecraft/items/pillager_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pillager_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_banner.json b/assets/minecraft/items/pink_banner.json new file mode 100644 index 00000000..a86bb332 --- /dev/null +++ b/assets/minecraft/items/pink_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "pink" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_bed.json b/assets/minecraft/items/pink_bed.json new file mode 100644 index 00000000..2e686eb6 --- /dev/null +++ b/assets/minecraft/items/pink_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/pink_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:pink" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_bundle.json b/assets/minecraft/items/pink_bundle.json new file mode 100644 index 00000000..327eb44c --- /dev/null +++ b/assets/minecraft/items/pink_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/pink_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/pink_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/pink_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/pink_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_candle.json b/assets/minecraft/items/pink_candle.json new file mode 100644 index 00000000..d94ae462 --- /dev/null +++ b/assets/minecraft/items/pink_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pink_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_carpet.json b/assets/minecraft/items/pink_carpet.json new file mode 100644 index 00000000..5080cbf2 --- /dev/null +++ b/assets/minecraft/items/pink_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_concrete.json b/assets/minecraft/items/pink_concrete.json new file mode 100644 index 00000000..8d09e8db --- /dev/null +++ b/assets/minecraft/items/pink_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_concrete_powder.json b/assets/minecraft/items/pink_concrete_powder.json new file mode 100644 index 00000000..2b473081 --- /dev/null +++ b/assets/minecraft/items/pink_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_dye.json b/assets/minecraft/items/pink_dye.json new file mode 100644 index 00000000..5c5bb43d --- /dev/null +++ b/assets/minecraft/items/pink_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pink_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_glazed_terracotta.json b/assets/minecraft/items/pink_glazed_terracotta.json new file mode 100644 index 00000000..435ed0aa --- /dev/null +++ b/assets/minecraft/items/pink_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_petals.json b/assets/minecraft/items/pink_petals.json new file mode 100644 index 00000000..3eb460ea --- /dev/null +++ b/assets/minecraft/items/pink_petals.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pink_petals" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_shulker_box.json b/assets/minecraft/items/pink_shulker_box.json new file mode 100644 index 00000000..a1d38042 --- /dev/null +++ b/assets/minecraft/items/pink_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/pink_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_pink" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_stained_glass.json b/assets/minecraft/items/pink_stained_glass.json new file mode 100644 index 00000000..2c8db80f --- /dev/null +++ b/assets/minecraft/items/pink_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_stained_glass_pane.json b/assets/minecraft/items/pink_stained_glass_pane.json new file mode 100644 index 00000000..34b3082e --- /dev/null +++ b/assets/minecraft/items/pink_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pink_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_terracotta.json b/assets/minecraft/items/pink_terracotta.json new file mode 100644 index 00000000..23d6a9fd --- /dev/null +++ b/assets/minecraft/items/pink_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_tulip.json b/assets/minecraft/items/pink_tulip.json new file mode 100644 index 00000000..ebea48cf --- /dev/null +++ b/assets/minecraft/items/pink_tulip.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pink_tulip" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pink_wool.json b/assets/minecraft/items/pink_wool.json new file mode 100644 index 00000000..32027ca6 --- /dev/null +++ b/assets/minecraft/items/pink_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pink_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/piston.json b/assets/minecraft/items/piston.json new file mode 100644 index 00000000..b52126f9 --- /dev/null +++ b/assets/minecraft/items/piston.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/piston_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pitcher_plant.json b/assets/minecraft/items/pitcher_plant.json new file mode 100644 index 00000000..2fc0921f --- /dev/null +++ b/assets/minecraft/items/pitcher_plant.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pitcher_plant" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pitcher_pod.json b/assets/minecraft/items/pitcher_pod.json new file mode 100644 index 00000000..01c2af4b --- /dev/null +++ b/assets/minecraft/items/pitcher_pod.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pitcher_pod" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/player_head.json b/assets/minecraft/items/player_head.json new file mode 100644 index 00000000..2d522d2f --- /dev/null +++ b/assets/minecraft/items/player_head.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "player" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/plenty_pottery_sherd.json b/assets/minecraft/items/plenty_pottery_sherd.json new file mode 100644 index 00000000..8517799f --- /dev/null +++ b/assets/minecraft/items/plenty_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/plenty_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/podzol.json b/assets/minecraft/items/podzol.json new file mode 100644 index 00000000..8055b1ee --- /dev/null +++ b/assets/minecraft/items/podzol.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/podzol" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pointed_dripstone.json b/assets/minecraft/items/pointed_dripstone.json new file mode 100644 index 00000000..3570a999 --- /dev/null +++ b/assets/minecraft/items/pointed_dripstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pointed_dripstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/poisonous_potato.json b/assets/minecraft/items/poisonous_potato.json new file mode 100644 index 00000000..8132ca0c --- /dev/null +++ b/assets/minecraft/items/poisonous_potato.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/poisonous_potato" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polar_bear_spawn_egg.json b/assets/minecraft/items/polar_bear_spawn_egg.json new file mode 100644 index 00000000..12c76be1 --- /dev/null +++ b/assets/minecraft/items/polar_bear_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/polar_bear_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_andesite.json b/assets/minecraft/items/polished_andesite.json new file mode 100644 index 00000000..a1cafdbb --- /dev/null +++ b/assets/minecraft/items/polished_andesite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_andesite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_andesite_slab.json b/assets/minecraft/items/polished_andesite_slab.json new file mode 100644 index 00000000..cf1fc384 --- /dev/null +++ b/assets/minecraft/items/polished_andesite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_andesite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_andesite_stairs.json b/assets/minecraft/items/polished_andesite_stairs.json new file mode 100644 index 00000000..af67153b --- /dev/null +++ b/assets/minecraft/items/polished_andesite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_andesite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_basalt.json b/assets/minecraft/items/polished_basalt.json new file mode 100644 index 00000000..2640ce6c --- /dev/null +++ b/assets/minecraft/items/polished_basalt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_basalt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone.json b/assets/minecraft/items/polished_blackstone.json new file mode 100644 index 00000000..181c2944 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_brick_slab.json b/assets/minecraft/items/polished_blackstone_brick_slab.json new file mode 100644 index 00000000..98d72120 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_brick_stairs.json b/assets/minecraft/items/polished_blackstone_brick_stairs.json new file mode 100644 index 00000000..0d2a1ae3 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_brick_wall.json b/assets/minecraft/items/polished_blackstone_brick_wall.json new file mode 100644 index 00000000..d37c3291 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_bricks.json b/assets/minecraft/items/polished_blackstone_bricks.json new file mode 100644 index 00000000..6eb6188b --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_button.json b/assets/minecraft/items/polished_blackstone_button.json new file mode 100644 index 00000000..c9aefed7 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_pressure_plate.json b/assets/minecraft/items/polished_blackstone_pressure_plate.json new file mode 100644 index 00000000..a74aded7 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_slab.json b/assets/minecraft/items/polished_blackstone_slab.json new file mode 100644 index 00000000..2c0d2c3f --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_stairs.json b/assets/minecraft/items/polished_blackstone_stairs.json new file mode 100644 index 00000000..710e5602 --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_blackstone_wall.json b/assets/minecraft/items/polished_blackstone_wall.json new file mode 100644 index 00000000..73a08c4a --- /dev/null +++ b/assets/minecraft/items/polished_blackstone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_blackstone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_deepslate.json b/assets/minecraft/items/polished_deepslate.json new file mode 100644 index 00000000..3568e7e3 --- /dev/null +++ b/assets/minecraft/items/polished_deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_deepslate_slab.json b/assets/minecraft/items/polished_deepslate_slab.json new file mode 100644 index 00000000..9ea8f6a8 --- /dev/null +++ b/assets/minecraft/items/polished_deepslate_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_deepslate_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_deepslate_stairs.json b/assets/minecraft/items/polished_deepslate_stairs.json new file mode 100644 index 00000000..15406e1e --- /dev/null +++ b/assets/minecraft/items/polished_deepslate_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_deepslate_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_deepslate_wall.json b/assets/minecraft/items/polished_deepslate_wall.json new file mode 100644 index 00000000..db3a3db6 --- /dev/null +++ b/assets/minecraft/items/polished_deepslate_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_deepslate_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_diorite.json b/assets/minecraft/items/polished_diorite.json new file mode 100644 index 00000000..4e551060 --- /dev/null +++ b/assets/minecraft/items/polished_diorite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_diorite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_diorite_slab.json b/assets/minecraft/items/polished_diorite_slab.json new file mode 100644 index 00000000..165571e5 --- /dev/null +++ b/assets/minecraft/items/polished_diorite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_diorite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_diorite_stairs.json b/assets/minecraft/items/polished_diorite_stairs.json new file mode 100644 index 00000000..d01da001 --- /dev/null +++ b/assets/minecraft/items/polished_diorite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_diorite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_granite.json b/assets/minecraft/items/polished_granite.json new file mode 100644 index 00000000..f563a581 --- /dev/null +++ b/assets/minecraft/items/polished_granite.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_granite" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_granite_slab.json b/assets/minecraft/items/polished_granite_slab.json new file mode 100644 index 00000000..cf284e3c --- /dev/null +++ b/assets/minecraft/items/polished_granite_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_granite_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_granite_stairs.json b/assets/minecraft/items/polished_granite_stairs.json new file mode 100644 index 00000000..faf07419 --- /dev/null +++ b/assets/minecraft/items/polished_granite_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_granite_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_tuff.json b/assets/minecraft/items/polished_tuff.json new file mode 100644 index 00000000..3561f965 --- /dev/null +++ b/assets/minecraft/items/polished_tuff.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_tuff" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_tuff_slab.json b/assets/minecraft/items/polished_tuff_slab.json new file mode 100644 index 00000000..777eb8f3 --- /dev/null +++ b/assets/minecraft/items/polished_tuff_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_tuff_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_tuff_stairs.json b/assets/minecraft/items/polished_tuff_stairs.json new file mode 100644 index 00000000..ed2f5ef8 --- /dev/null +++ b/assets/minecraft/items/polished_tuff_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_tuff_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/polished_tuff_wall.json b/assets/minecraft/items/polished_tuff_wall.json new file mode 100644 index 00000000..b0ea8fe2 --- /dev/null +++ b/assets/minecraft/items/polished_tuff_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/polished_tuff_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/popped_chorus_fruit.json b/assets/minecraft/items/popped_chorus_fruit.json new file mode 100644 index 00000000..d8b0732f --- /dev/null +++ b/assets/minecraft/items/popped_chorus_fruit.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/popped_chorus_fruit" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/poppy.json b/assets/minecraft/items/poppy.json new file mode 100644 index 00000000..19cc1bc5 --- /dev/null +++ b/assets/minecraft/items/poppy.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/poppy" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/porkchop.json b/assets/minecraft/items/porkchop.json new file mode 100644 index 00000000..f820d9ec --- /dev/null +++ b/assets/minecraft/items/porkchop.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/porkchop" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/potato.json b/assets/minecraft/items/potato.json new file mode 100644 index 00000000..6926e16b --- /dev/null +++ b/assets/minecraft/items/potato.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/potato" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/potion.json b/assets/minecraft/items/potion.json new file mode 100644 index 00000000..3f0b2e34 --- /dev/null +++ b/assets/minecraft/items/potion.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/potion", + "tints": [ + { + "type": "minecraft:potion", + "default": -13083194 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/powder_snow_bucket.json b/assets/minecraft/items/powder_snow_bucket.json new file mode 100644 index 00000000..c7560238 --- /dev/null +++ b/assets/minecraft/items/powder_snow_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/powder_snow_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/powered_rail.json b/assets/minecraft/items/powered_rail.json new file mode 100644 index 00000000..ae1ae8a3 --- /dev/null +++ b/assets/minecraft/items/powered_rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/powered_rail" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine.json b/assets/minecraft/items/prismarine.json new file mode 100644 index 00000000..8b8df628 --- /dev/null +++ b/assets/minecraft/items/prismarine.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_brick_slab.json b/assets/minecraft/items/prismarine_brick_slab.json new file mode 100644 index 00000000..4cfe1b8c --- /dev/null +++ b/assets/minecraft/items/prismarine_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_brick_stairs.json b/assets/minecraft/items/prismarine_brick_stairs.json new file mode 100644 index 00000000..cc00e618 --- /dev/null +++ b/assets/minecraft/items/prismarine_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_bricks.json b/assets/minecraft/items/prismarine_bricks.json new file mode 100644 index 00000000..ea827dc7 --- /dev/null +++ b/assets/minecraft/items/prismarine_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_crystals.json b/assets/minecraft/items/prismarine_crystals.json new file mode 100644 index 00000000..65b82683 --- /dev/null +++ b/assets/minecraft/items/prismarine_crystals.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/prismarine_crystals" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_shard.json b/assets/minecraft/items/prismarine_shard.json new file mode 100644 index 00000000..62e7ca53 --- /dev/null +++ b/assets/minecraft/items/prismarine_shard.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/prismarine_shard" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_slab.json b/assets/minecraft/items/prismarine_slab.json new file mode 100644 index 00000000..43acaf5a --- /dev/null +++ b/assets/minecraft/items/prismarine_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_stairs.json b/assets/minecraft/items/prismarine_stairs.json new file mode 100644 index 00000000..251ebd31 --- /dev/null +++ b/assets/minecraft/items/prismarine_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prismarine_wall.json b/assets/minecraft/items/prismarine_wall.json new file mode 100644 index 00000000..2a8e95ec --- /dev/null +++ b/assets/minecraft/items/prismarine_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/prismarine_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/prize_pottery_sherd.json b/assets/minecraft/items/prize_pottery_sherd.json new file mode 100644 index 00000000..8caaa558 --- /dev/null +++ b/assets/minecraft/items/prize_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/prize_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pufferfish.json b/assets/minecraft/items/pufferfish.json new file mode 100644 index 00000000..c509473e --- /dev/null +++ b/assets/minecraft/items/pufferfish.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pufferfish" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pufferfish_bucket.json b/assets/minecraft/items/pufferfish_bucket.json new file mode 100644 index 00000000..a347a027 --- /dev/null +++ b/assets/minecraft/items/pufferfish_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pufferfish_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pufferfish_spawn_egg.json b/assets/minecraft/items/pufferfish_spawn_egg.json new file mode 100644 index 00000000..5a1b9bbe --- /dev/null +++ b/assets/minecraft/items/pufferfish_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pufferfish_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pumpkin.json b/assets/minecraft/items/pumpkin.json new file mode 100644 index 00000000..0faeffcb --- /dev/null +++ b/assets/minecraft/items/pumpkin.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/pumpkin" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pumpkin_pie.json b/assets/minecraft/items/pumpkin_pie.json new file mode 100644 index 00000000..82d1d8d4 --- /dev/null +++ b/assets/minecraft/items/pumpkin_pie.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pumpkin_pie" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/pumpkin_seeds.json b/assets/minecraft/items/pumpkin_seeds.json new file mode 100644 index 00000000..27eb2b18 --- /dev/null +++ b/assets/minecraft/items/pumpkin_seeds.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pumpkin_seeds" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_banner.json b/assets/minecraft/items/purple_banner.json new file mode 100644 index 00000000..a632445d --- /dev/null +++ b/assets/minecraft/items/purple_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "purple" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_bed.json b/assets/minecraft/items/purple_bed.json new file mode 100644 index 00000000..ce125e53 --- /dev/null +++ b/assets/minecraft/items/purple_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/purple_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:purple" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_bundle.json b/assets/minecraft/items/purple_bundle.json new file mode 100644 index 00000000..f7f9d18e --- /dev/null +++ b/assets/minecraft/items/purple_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/purple_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/purple_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/purple_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/purple_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_candle.json b/assets/minecraft/items/purple_candle.json new file mode 100644 index 00000000..c7e507f7 --- /dev/null +++ b/assets/minecraft/items/purple_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/purple_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_carpet.json b/assets/minecraft/items/purple_carpet.json new file mode 100644 index 00000000..3f09aedc --- /dev/null +++ b/assets/minecraft/items/purple_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_concrete.json b/assets/minecraft/items/purple_concrete.json new file mode 100644 index 00000000..09e02e78 --- /dev/null +++ b/assets/minecraft/items/purple_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_concrete_powder.json b/assets/minecraft/items/purple_concrete_powder.json new file mode 100644 index 00000000..ba610873 --- /dev/null +++ b/assets/minecraft/items/purple_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_dye.json b/assets/minecraft/items/purple_dye.json new file mode 100644 index 00000000..4e714a5d --- /dev/null +++ b/assets/minecraft/items/purple_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/purple_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_glazed_terracotta.json b/assets/minecraft/items/purple_glazed_terracotta.json new file mode 100644 index 00000000..8d4c892a --- /dev/null +++ b/assets/minecraft/items/purple_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_shulker_box.json b/assets/minecraft/items/purple_shulker_box.json new file mode 100644 index 00000000..3123f271 --- /dev/null +++ b/assets/minecraft/items/purple_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/purple_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_purple" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_stained_glass.json b/assets/minecraft/items/purple_stained_glass.json new file mode 100644 index 00000000..9ee1a1a8 --- /dev/null +++ b/assets/minecraft/items/purple_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_stained_glass_pane.json b/assets/minecraft/items/purple_stained_glass_pane.json new file mode 100644 index 00000000..8c0ca721 --- /dev/null +++ b/assets/minecraft/items/purple_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/purple_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_terracotta.json b/assets/minecraft/items/purple_terracotta.json new file mode 100644 index 00000000..b8f12da0 --- /dev/null +++ b/assets/minecraft/items/purple_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purple_wool.json b/assets/minecraft/items/purple_wool.json new file mode 100644 index 00000000..10a06042 --- /dev/null +++ b/assets/minecraft/items/purple_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purple_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purpur_block.json b/assets/minecraft/items/purpur_block.json new file mode 100644 index 00000000..869e90fd --- /dev/null +++ b/assets/minecraft/items/purpur_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purpur_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purpur_pillar.json b/assets/minecraft/items/purpur_pillar.json new file mode 100644 index 00000000..1403ba77 --- /dev/null +++ b/assets/minecraft/items/purpur_pillar.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purpur_pillar" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purpur_slab.json b/assets/minecraft/items/purpur_slab.json new file mode 100644 index 00000000..d8cfeb97 --- /dev/null +++ b/assets/minecraft/items/purpur_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purpur_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/purpur_stairs.json b/assets/minecraft/items/purpur_stairs.json new file mode 100644 index 00000000..4e408c25 --- /dev/null +++ b/assets/minecraft/items/purpur_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/purpur_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz.json b/assets/minecraft/items/quartz.json new file mode 100644 index 00000000..bb72ef57 --- /dev/null +++ b/assets/minecraft/items/quartz.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/quartz" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz_block.json b/assets/minecraft/items/quartz_block.json new file mode 100644 index 00000000..f14834d0 --- /dev/null +++ b/assets/minecraft/items/quartz_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/quartz_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz_bricks.json b/assets/minecraft/items/quartz_bricks.json new file mode 100644 index 00000000..5b00e170 --- /dev/null +++ b/assets/minecraft/items/quartz_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/quartz_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz_pillar.json b/assets/minecraft/items/quartz_pillar.json new file mode 100644 index 00000000..7c760921 --- /dev/null +++ b/assets/minecraft/items/quartz_pillar.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/quartz_pillar" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz_slab.json b/assets/minecraft/items/quartz_slab.json new file mode 100644 index 00000000..5d889db0 --- /dev/null +++ b/assets/minecraft/items/quartz_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/quartz_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/quartz_stairs.json b/assets/minecraft/items/quartz_stairs.json new file mode 100644 index 00000000..355f101e --- /dev/null +++ b/assets/minecraft/items/quartz_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/quartz_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rabbit.json b/assets/minecraft/items/rabbit.json new file mode 100644 index 00000000..a65a3583 --- /dev/null +++ b/assets/minecraft/items/rabbit.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rabbit" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rabbit_foot.json b/assets/minecraft/items/rabbit_foot.json new file mode 100644 index 00000000..65a4362e --- /dev/null +++ b/assets/minecraft/items/rabbit_foot.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rabbit_foot" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rabbit_hide.json b/assets/minecraft/items/rabbit_hide.json new file mode 100644 index 00000000..b125735a --- /dev/null +++ b/assets/minecraft/items/rabbit_hide.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rabbit_hide" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rabbit_spawn_egg.json b/assets/minecraft/items/rabbit_spawn_egg.json new file mode 100644 index 00000000..0f2747c4 --- /dev/null +++ b/assets/minecraft/items/rabbit_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rabbit_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rabbit_stew.json b/assets/minecraft/items/rabbit_stew.json new file mode 100644 index 00000000..3d01e38e --- /dev/null +++ b/assets/minecraft/items/rabbit_stew.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rabbit_stew" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rail.json b/assets/minecraft/items/rail.json new file mode 100644 index 00000000..79de80b3 --- /dev/null +++ b/assets/minecraft/items/rail.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rail" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raiser_armor_trim_smithing_template.json b/assets/minecraft/items/raiser_armor_trim_smithing_template.json new file mode 100644 index 00000000..9b78cc73 --- /dev/null +++ b/assets/minecraft/items/raiser_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/raiser_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ravager_spawn_egg.json b/assets/minecraft/items/ravager_spawn_egg.json new file mode 100644 index 00000000..303bba05 --- /dev/null +++ b/assets/minecraft/items/ravager_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ravager_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_copper.json b/assets/minecraft/items/raw_copper.json new file mode 100644 index 00000000..1acac00a --- /dev/null +++ b/assets/minecraft/items/raw_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/raw_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_copper_block.json b/assets/minecraft/items/raw_copper_block.json new file mode 100644 index 00000000..74e4268c --- /dev/null +++ b/assets/minecraft/items/raw_copper_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/raw_copper_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_gold.json b/assets/minecraft/items/raw_gold.json new file mode 100644 index 00000000..c409fb4b --- /dev/null +++ b/assets/minecraft/items/raw_gold.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/raw_gold" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_gold_block.json b/assets/minecraft/items/raw_gold_block.json new file mode 100644 index 00000000..8636565f --- /dev/null +++ b/assets/minecraft/items/raw_gold_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/raw_gold_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_iron.json b/assets/minecraft/items/raw_iron.json new file mode 100644 index 00000000..0b5b2178 --- /dev/null +++ b/assets/minecraft/items/raw_iron.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/raw_iron" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/raw_iron_block.json b/assets/minecraft/items/raw_iron_block.json new file mode 100644 index 00000000..368a35a7 --- /dev/null +++ b/assets/minecraft/items/raw_iron_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/raw_iron_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/recovery_compass.json b/assets/minecraft/items/recovery_compass.json new file mode 100644 index 00000000..676d0366 --- /dev/null +++ b/assets/minecraft/items/recovery_compass.json @@ -0,0 +1,241 @@ +{ + "model": { + "type": "minecraft:range_dispatch", + "entries": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_16" + }, + "threshold": 0.0 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_17" + }, + "threshold": 0.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_18" + }, + "threshold": 1.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_19" + }, + "threshold": 2.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_20" + }, + "threshold": 3.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_21" + }, + "threshold": 4.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_22" + }, + "threshold": 5.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_23" + }, + "threshold": 6.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_24" + }, + "threshold": 7.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_25" + }, + "threshold": 8.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_26" + }, + "threshold": 9.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_27" + }, + "threshold": 10.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_28" + }, + "threshold": 11.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_29" + }, + "threshold": 12.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_30" + }, + "threshold": 13.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_31" + }, + "threshold": 14.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_00" + }, + "threshold": 15.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_01" + }, + "threshold": 16.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_02" + }, + "threshold": 17.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_03" + }, + "threshold": 18.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_04" + }, + "threshold": 19.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_05" + }, + "threshold": 20.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_06" + }, + "threshold": 21.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_07" + }, + "threshold": 22.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_08" + }, + "threshold": 23.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_09" + }, + "threshold": 24.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_10" + }, + "threshold": 25.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_11" + }, + "threshold": 26.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_12" + }, + "threshold": 27.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_13" + }, + "threshold": 28.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_14" + }, + "threshold": 29.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_15" + }, + "threshold": 30.5 + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/recovery_compass_16" + }, + "threshold": 31.5 + } + ], + "property": "minecraft:compass", + "scale": 32.0, + "target": "recovery" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_banner.json b/assets/minecraft/items/red_banner.json new file mode 100644 index 00000000..80cdff09 --- /dev/null +++ b/assets/minecraft/items/red_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "red" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_bed.json b/assets/minecraft/items/red_bed.json new file mode 100644 index 00000000..9b772b37 --- /dev/null +++ b/assets/minecraft/items/red_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/red_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:red" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_bundle.json b/assets/minecraft/items/red_bundle.json new file mode 100644 index 00000000..811afd56 --- /dev/null +++ b/assets/minecraft/items/red_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/red_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/red_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/red_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/red_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_candle.json b/assets/minecraft/items/red_candle.json new file mode 100644 index 00000000..31e3952b --- /dev/null +++ b/assets/minecraft/items/red_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/red_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_carpet.json b/assets/minecraft/items/red_carpet.json new file mode 100644 index 00000000..c58019db --- /dev/null +++ b/assets/minecraft/items/red_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_concrete.json b/assets/minecraft/items/red_concrete.json new file mode 100644 index 00000000..756a4cea --- /dev/null +++ b/assets/minecraft/items/red_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_concrete_powder.json b/assets/minecraft/items/red_concrete_powder.json new file mode 100644 index 00000000..2f2b4885 --- /dev/null +++ b/assets/minecraft/items/red_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_dye.json b/assets/minecraft/items/red_dye.json new file mode 100644 index 00000000..2acc2762 --- /dev/null +++ b/assets/minecraft/items/red_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/red_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_glazed_terracotta.json b/assets/minecraft/items/red_glazed_terracotta.json new file mode 100644 index 00000000..b2ca9220 --- /dev/null +++ b/assets/minecraft/items/red_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_mushroom.json b/assets/minecraft/items/red_mushroom.json new file mode 100644 index 00000000..ede14929 --- /dev/null +++ b/assets/minecraft/items/red_mushroom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/red_mushroom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_mushroom_block.json b/assets/minecraft/items/red_mushroom_block.json new file mode 100644 index 00000000..d7b80456 --- /dev/null +++ b/assets/minecraft/items/red_mushroom_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_mushroom_block_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_nether_brick_slab.json b/assets/minecraft/items/red_nether_brick_slab.json new file mode 100644 index 00000000..084cc145 --- /dev/null +++ b/assets/minecraft/items/red_nether_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_nether_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_nether_brick_stairs.json b/assets/minecraft/items/red_nether_brick_stairs.json new file mode 100644 index 00000000..4d655dbf --- /dev/null +++ b/assets/minecraft/items/red_nether_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_nether_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_nether_brick_wall.json b/assets/minecraft/items/red_nether_brick_wall.json new file mode 100644 index 00000000..d5a4313a --- /dev/null +++ b/assets/minecraft/items/red_nether_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_nether_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_nether_bricks.json b/assets/minecraft/items/red_nether_bricks.json new file mode 100644 index 00000000..4bc5ad7d --- /dev/null +++ b/assets/minecraft/items/red_nether_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_nether_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_sand.json b/assets/minecraft/items/red_sand.json new file mode 100644 index 00000000..18a6982d --- /dev/null +++ b/assets/minecraft/items/red_sand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_sand" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_sandstone.json b/assets/minecraft/items/red_sandstone.json new file mode 100644 index 00000000..99efe2f3 --- /dev/null +++ b/assets/minecraft/items/red_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_sandstone_slab.json b/assets/minecraft/items/red_sandstone_slab.json new file mode 100644 index 00000000..3ab55118 --- /dev/null +++ b/assets/minecraft/items/red_sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_sandstone_stairs.json b/assets/minecraft/items/red_sandstone_stairs.json new file mode 100644 index 00000000..f26d3ed8 --- /dev/null +++ b/assets/minecraft/items/red_sandstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_sandstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_sandstone_wall.json b/assets/minecraft/items/red_sandstone_wall.json new file mode 100644 index 00000000..52cb9c27 --- /dev/null +++ b/assets/minecraft/items/red_sandstone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_sandstone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_shulker_box.json b/assets/minecraft/items/red_shulker_box.json new file mode 100644 index 00000000..41278f48 --- /dev/null +++ b/assets/minecraft/items/red_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/red_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_red" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_stained_glass.json b/assets/minecraft/items/red_stained_glass.json new file mode 100644 index 00000000..8b567b7a --- /dev/null +++ b/assets/minecraft/items/red_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_stained_glass_pane.json b/assets/minecraft/items/red_stained_glass_pane.json new file mode 100644 index 00000000..d65611ec --- /dev/null +++ b/assets/minecraft/items/red_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/red_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_terracotta.json b/assets/minecraft/items/red_terracotta.json new file mode 100644 index 00000000..4b994092 --- /dev/null +++ b/assets/minecraft/items/red_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_tulip.json b/assets/minecraft/items/red_tulip.json new file mode 100644 index 00000000..dc62d0b8 --- /dev/null +++ b/assets/minecraft/items/red_tulip.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/red_tulip" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/red_wool.json b/assets/minecraft/items/red_wool.json new file mode 100644 index 00000000..310df92d --- /dev/null +++ b/assets/minecraft/items/red_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/red_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/redstone.json b/assets/minecraft/items/redstone.json new file mode 100644 index 00000000..d09f3de6 --- /dev/null +++ b/assets/minecraft/items/redstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/redstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/redstone_block.json b/assets/minecraft/items/redstone_block.json new file mode 100644 index 00000000..20d75a80 --- /dev/null +++ b/assets/minecraft/items/redstone_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/redstone_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/redstone_lamp.json b/assets/minecraft/items/redstone_lamp.json new file mode 100644 index 00000000..4edf1ab0 --- /dev/null +++ b/assets/minecraft/items/redstone_lamp.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/redstone_lamp" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/redstone_ore.json b/assets/minecraft/items/redstone_ore.json new file mode 100644 index 00000000..a6a5f3e3 --- /dev/null +++ b/assets/minecraft/items/redstone_ore.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/redstone_ore" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/redstone_torch.json b/assets/minecraft/items/redstone_torch.json new file mode 100644 index 00000000..45deab45 --- /dev/null +++ b/assets/minecraft/items/redstone_torch.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/redstone_torch" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/reinforced_deepslate.json b/assets/minecraft/items/reinforced_deepslate.json new file mode 100644 index 00000000..7e8fd3ec --- /dev/null +++ b/assets/minecraft/items/reinforced_deepslate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/reinforced_deepslate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/repeater.json b/assets/minecraft/items/repeater.json new file mode 100644 index 00000000..b0446ebe --- /dev/null +++ b/assets/minecraft/items/repeater.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/repeater" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/repeating_command_block.json b/assets/minecraft/items/repeating_command_block.json new file mode 100644 index 00000000..40457941 --- /dev/null +++ b/assets/minecraft/items/repeating_command_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/repeating_command_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_block.json b/assets/minecraft/items/resin_block.json new file mode 100644 index 00000000..d50dedec --- /dev/null +++ b/assets/minecraft/items/resin_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/resin_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_brick.json b/assets/minecraft/items/resin_brick.json new file mode 100644 index 00000000..3443227b --- /dev/null +++ b/assets/minecraft/items/resin_brick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/resin_brick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_brick_slab.json b/assets/minecraft/items/resin_brick_slab.json new file mode 100644 index 00000000..e45cebb3 --- /dev/null +++ b/assets/minecraft/items/resin_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/resin_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_brick_stairs.json b/assets/minecraft/items/resin_brick_stairs.json new file mode 100644 index 00000000..2ea91f79 --- /dev/null +++ b/assets/minecraft/items/resin_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/resin_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_brick_wall.json b/assets/minecraft/items/resin_brick_wall.json new file mode 100644 index 00000000..36d28477 --- /dev/null +++ b/assets/minecraft/items/resin_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/resin_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_bricks.json b/assets/minecraft/items/resin_bricks.json new file mode 100644 index 00000000..659164ae --- /dev/null +++ b/assets/minecraft/items/resin_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/resin_clump.json b/assets/minecraft/items/resin_clump.json new file mode 100644 index 00000000..566ea523 --- /dev/null +++ b/assets/minecraft/items/resin_clump.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/resin_clump" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/respawn_anchor.json b/assets/minecraft/items/respawn_anchor.json new file mode 100644 index 00000000..4d9f0c72 --- /dev/null +++ b/assets/minecraft/items/respawn_anchor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/respawn_anchor_0" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rib_armor_trim_smithing_template.json b/assets/minecraft/items/rib_armor_trim_smithing_template.json new file mode 100644 index 00000000..94267177 --- /dev/null +++ b/assets/minecraft/items/rib_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rib_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rooted_dirt.json b/assets/minecraft/items/rooted_dirt.json new file mode 100644 index 00000000..c881387e --- /dev/null +++ b/assets/minecraft/items/rooted_dirt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/rooted_dirt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rose_bush.json b/assets/minecraft/items/rose_bush.json new file mode 100644 index 00000000..2f7fcbb6 --- /dev/null +++ b/assets/minecraft/items/rose_bush.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rose_bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/rotten_flesh.json b/assets/minecraft/items/rotten_flesh.json new file mode 100644 index 00000000..a589c2af --- /dev/null +++ b/assets/minecraft/items/rotten_flesh.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/rotten_flesh" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/saddle.json b/assets/minecraft/items/saddle.json new file mode 100644 index 00000000..7fd03e7a --- /dev/null +++ b/assets/minecraft/items/saddle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/saddle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/salmon.json b/assets/minecraft/items/salmon.json new file mode 100644 index 00000000..ad1ff962 --- /dev/null +++ b/assets/minecraft/items/salmon.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/salmon" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/salmon_bucket.json b/assets/minecraft/items/salmon_bucket.json new file mode 100644 index 00000000..b5c3af3d --- /dev/null +++ b/assets/minecraft/items/salmon_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/salmon_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/salmon_spawn_egg.json b/assets/minecraft/items/salmon_spawn_egg.json new file mode 100644 index 00000000..a369b33d --- /dev/null +++ b/assets/minecraft/items/salmon_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/salmon_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sand.json b/assets/minecraft/items/sand.json new file mode 100644 index 00000000..0d053d91 --- /dev/null +++ b/assets/minecraft/items/sand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sand" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sandstone.json b/assets/minecraft/items/sandstone.json new file mode 100644 index 00000000..a8071c3d --- /dev/null +++ b/assets/minecraft/items/sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sandstone_slab.json b/assets/minecraft/items/sandstone_slab.json new file mode 100644 index 00000000..63249734 --- /dev/null +++ b/assets/minecraft/items/sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sandstone_stairs.json b/assets/minecraft/items/sandstone_stairs.json new file mode 100644 index 00000000..d3bd4df7 --- /dev/null +++ b/assets/minecraft/items/sandstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sandstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sandstone_wall.json b/assets/minecraft/items/sandstone_wall.json new file mode 100644 index 00000000..4c63f461 --- /dev/null +++ b/assets/minecraft/items/sandstone_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sandstone_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/scaffolding.json b/assets/minecraft/items/scaffolding.json new file mode 100644 index 00000000..c3692b7e --- /dev/null +++ b/assets/minecraft/items/scaffolding.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/scaffolding_stable" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/scrape_pottery_sherd.json b/assets/minecraft/items/scrape_pottery_sherd.json new file mode 100644 index 00000000..020a80ec --- /dev/null +++ b/assets/minecraft/items/scrape_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/scrape_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sculk.json b/assets/minecraft/items/sculk.json new file mode 100644 index 00000000..73211e5f --- /dev/null +++ b/assets/minecraft/items/sculk.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sculk" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sculk_catalyst.json b/assets/minecraft/items/sculk_catalyst.json new file mode 100644 index 00000000..fd27d784 --- /dev/null +++ b/assets/minecraft/items/sculk_catalyst.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sculk_catalyst" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sculk_sensor.json b/assets/minecraft/items/sculk_sensor.json new file mode 100644 index 00000000..7ffe1c99 --- /dev/null +++ b/assets/minecraft/items/sculk_sensor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sculk_sensor_inactive" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sculk_shrieker.json b/assets/minecraft/items/sculk_shrieker.json new file mode 100644 index 00000000..5c4166a2 --- /dev/null +++ b/assets/minecraft/items/sculk_shrieker.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sculk_shrieker" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sculk_vein.json b/assets/minecraft/items/sculk_vein.json new file mode 100644 index 00000000..468d5a93 --- /dev/null +++ b/assets/minecraft/items/sculk_vein.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sculk_vein" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sea_lantern.json b/assets/minecraft/items/sea_lantern.json new file mode 100644 index 00000000..33663f59 --- /dev/null +++ b/assets/minecraft/items/sea_lantern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sea_lantern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sea_pickle.json b/assets/minecraft/items/sea_pickle.json new file mode 100644 index 00000000..46e93249 --- /dev/null +++ b/assets/minecraft/items/sea_pickle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sea_pickle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/seagrass.json b/assets/minecraft/items/seagrass.json new file mode 100644 index 00000000..39d338bc --- /dev/null +++ b/assets/minecraft/items/seagrass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/seagrass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sentry_armor_trim_smithing_template.json b/assets/minecraft/items/sentry_armor_trim_smithing_template.json new file mode 100644 index 00000000..1c3fd115 --- /dev/null +++ b/assets/minecraft/items/sentry_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sentry_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shaper_armor_trim_smithing_template.json b/assets/minecraft/items/shaper_armor_trim_smithing_template.json new file mode 100644 index 00000000..1d7a2122 --- /dev/null +++ b/assets/minecraft/items/shaper_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/shaper_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sheaf_pottery_sherd.json b/assets/minecraft/items/sheaf_pottery_sherd.json new file mode 100644 index 00000000..25308a86 --- /dev/null +++ b/assets/minecraft/items/sheaf_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sheaf_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shears.json b/assets/minecraft/items/shears.json new file mode 100644 index 00000000..10f58ec8 --- /dev/null +++ b/assets/minecraft/items/shears.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/shears" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sheep_spawn_egg.json b/assets/minecraft/items/sheep_spawn_egg.json new file mode 100644 index 00000000..254bc4ec --- /dev/null +++ b/assets/minecraft/items/sheep_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sheep_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shelter_pottery_sherd.json b/assets/minecraft/items/shelter_pottery_sherd.json new file mode 100644 index 00000000..392707eb --- /dev/null +++ b/assets/minecraft/items/shelter_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/shelter_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shield.json b/assets/minecraft/items/shield.json new file mode 100644 index 00000000..f6bc4b3e --- /dev/null +++ b/assets/minecraft/items/shield.json @@ -0,0 +1,20 @@ +{ + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:special", + "base": "minecraft:item/shield", + "model": { + "type": "minecraft:shield" + } + }, + "on_true": { + "type": "minecraft:special", + "base": "minecraft:item/shield_blocking", + "model": { + "type": "minecraft:shield" + } + }, + "property": "minecraft:using_item" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/short_dry_grass.json b/assets/minecraft/items/short_dry_grass.json new file mode 100644 index 00000000..ac3d2783 --- /dev/null +++ b/assets/minecraft/items/short_dry_grass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/short_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/short_grass.json b/assets/minecraft/items/short_grass.json new file mode 100644 index 00000000..d218bc01 --- /dev/null +++ b/assets/minecraft/items/short_grass.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/short_grass", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shroomlight.json b/assets/minecraft/items/shroomlight.json new file mode 100644 index 00000000..2cbf73b0 --- /dev/null +++ b/assets/minecraft/items/shroomlight.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/shroomlight" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shulker_box.json b/assets/minecraft/items/shulker_box.json new file mode 100644 index 00000000..b688cdb3 --- /dev/null +++ b/assets/minecraft/items/shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shulker_shell.json b/assets/minecraft/items/shulker_shell.json new file mode 100644 index 00000000..fbb0597f --- /dev/null +++ b/assets/minecraft/items/shulker_shell.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/shulker_shell" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/shulker_spawn_egg.json b/assets/minecraft/items/shulker_spawn_egg.json new file mode 100644 index 00000000..aa1422dc --- /dev/null +++ b/assets/minecraft/items/shulker_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/shulker_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/silence_armor_trim_smithing_template.json b/assets/minecraft/items/silence_armor_trim_smithing_template.json new file mode 100644 index 00000000..c19819d9 --- /dev/null +++ b/assets/minecraft/items/silence_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/silence_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/silverfish_spawn_egg.json b/assets/minecraft/items/silverfish_spawn_egg.json new file mode 100644 index 00000000..fd5ff757 --- /dev/null +++ b/assets/minecraft/items/silverfish_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/silverfish_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/skeleton_horse_spawn_egg.json b/assets/minecraft/items/skeleton_horse_spawn_egg.json new file mode 100644 index 00000000..5b281280 --- /dev/null +++ b/assets/minecraft/items/skeleton_horse_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/skeleton_horse_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/skeleton_skull.json b/assets/minecraft/items/skeleton_skull.json new file mode 100644 index 00000000..68cf144e --- /dev/null +++ b/assets/minecraft/items/skeleton_skull.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "skeleton" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/skeleton_spawn_egg.json b/assets/minecraft/items/skeleton_spawn_egg.json new file mode 100644 index 00000000..5118e265 --- /dev/null +++ b/assets/minecraft/items/skeleton_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/skeleton_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/skull_banner_pattern.json b/assets/minecraft/items/skull_banner_pattern.json new file mode 100644 index 00000000..9bee46be --- /dev/null +++ b/assets/minecraft/items/skull_banner_pattern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/skull_banner_pattern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/skull_pottery_sherd.json b/assets/minecraft/items/skull_pottery_sherd.json new file mode 100644 index 00000000..22a43641 --- /dev/null +++ b/assets/minecraft/items/skull_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/skull_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/slime_ball.json b/assets/minecraft/items/slime_ball.json new file mode 100644 index 00000000..799ca93a --- /dev/null +++ b/assets/minecraft/items/slime_ball.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/slime_ball" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/slime_block.json b/assets/minecraft/items/slime_block.json new file mode 100644 index 00000000..b066f9fa --- /dev/null +++ b/assets/minecraft/items/slime_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/slime_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/slime_spawn_egg.json b/assets/minecraft/items/slime_spawn_egg.json new file mode 100644 index 00000000..fc8c5998 --- /dev/null +++ b/assets/minecraft/items/slime_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/slime_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/small_amethyst_bud.json b/assets/minecraft/items/small_amethyst_bud.json new file mode 100644 index 00000000..8d8a72b9 --- /dev/null +++ b/assets/minecraft/items/small_amethyst_bud.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/small_amethyst_bud" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/small_dripleaf.json b/assets/minecraft/items/small_dripleaf.json new file mode 100644 index 00000000..e95125a1 --- /dev/null +++ b/assets/minecraft/items/small_dripleaf.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/small_dripleaf" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smithing_table.json b/assets/minecraft/items/smithing_table.json new file mode 100644 index 00000000..4e3e7f1f --- /dev/null +++ b/assets/minecraft/items/smithing_table.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smithing_table" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smoker.json b/assets/minecraft/items/smoker.json new file mode 100644 index 00000000..2d0f5cdc --- /dev/null +++ b/assets/minecraft/items/smoker.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smoker" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_basalt.json b/assets/minecraft/items/smooth_basalt.json new file mode 100644 index 00000000..7700ef6e --- /dev/null +++ b/assets/minecraft/items/smooth_basalt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_basalt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_quartz.json b/assets/minecraft/items/smooth_quartz.json new file mode 100644 index 00000000..cac9ae92 --- /dev/null +++ b/assets/minecraft/items/smooth_quartz.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_quartz" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_quartz_slab.json b/assets/minecraft/items/smooth_quartz_slab.json new file mode 100644 index 00000000..ec964501 --- /dev/null +++ b/assets/minecraft/items/smooth_quartz_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_quartz_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_quartz_stairs.json b/assets/minecraft/items/smooth_quartz_stairs.json new file mode 100644 index 00000000..ab1bf730 --- /dev/null +++ b/assets/minecraft/items/smooth_quartz_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_quartz_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_red_sandstone.json b/assets/minecraft/items/smooth_red_sandstone.json new file mode 100644 index 00000000..7f06dab4 --- /dev/null +++ b/assets/minecraft/items/smooth_red_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_red_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_red_sandstone_slab.json b/assets/minecraft/items/smooth_red_sandstone_slab.json new file mode 100644 index 00000000..292247fa --- /dev/null +++ b/assets/minecraft/items/smooth_red_sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_red_sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_red_sandstone_stairs.json b/assets/minecraft/items/smooth_red_sandstone_stairs.json new file mode 100644 index 00000000..048905e0 --- /dev/null +++ b/assets/minecraft/items/smooth_red_sandstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_red_sandstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_sandstone.json b/assets/minecraft/items/smooth_sandstone.json new file mode 100644 index 00000000..8fca1362 --- /dev/null +++ b/assets/minecraft/items/smooth_sandstone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_sandstone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_sandstone_slab.json b/assets/minecraft/items/smooth_sandstone_slab.json new file mode 100644 index 00000000..23348d0d --- /dev/null +++ b/assets/minecraft/items/smooth_sandstone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_sandstone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_sandstone_stairs.json b/assets/minecraft/items/smooth_sandstone_stairs.json new file mode 100644 index 00000000..9222c154 --- /dev/null +++ b/assets/minecraft/items/smooth_sandstone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_sandstone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_stone.json b/assets/minecraft/items/smooth_stone.json new file mode 100644 index 00000000..5b3ef2dd --- /dev/null +++ b/assets/minecraft/items/smooth_stone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_stone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/smooth_stone_slab.json b/assets/minecraft/items/smooth_stone_slab.json new file mode 100644 index 00000000..fd1c9d9c --- /dev/null +++ b/assets/minecraft/items/smooth_stone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/smooth_stone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sniffer_egg.json b/assets/minecraft/items/sniffer_egg.json new file mode 100644 index 00000000..675288c0 --- /dev/null +++ b/assets/minecraft/items/sniffer_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sniffer_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sniffer_spawn_egg.json b/assets/minecraft/items/sniffer_spawn_egg.json new file mode 100644 index 00000000..3461789d --- /dev/null +++ b/assets/minecraft/items/sniffer_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sniffer_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snort_pottery_sherd.json b/assets/minecraft/items/snort_pottery_sherd.json new file mode 100644 index 00000000..91e2e548 --- /dev/null +++ b/assets/minecraft/items/snort_pottery_sherd.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/snort_pottery_sherd" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snout_armor_trim_smithing_template.json b/assets/minecraft/items/snout_armor_trim_smithing_template.json new file mode 100644 index 00000000..37b25e53 --- /dev/null +++ b/assets/minecraft/items/snout_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/snout_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snow.json b/assets/minecraft/items/snow.json new file mode 100644 index 00000000..532c7444 --- /dev/null +++ b/assets/minecraft/items/snow.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/snow_height2" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snow_block.json b/assets/minecraft/items/snow_block.json new file mode 100644 index 00000000..b2bb073b --- /dev/null +++ b/assets/minecraft/items/snow_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/snow_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snow_golem_spawn_egg.json b/assets/minecraft/items/snow_golem_spawn_egg.json new file mode 100644 index 00000000..04f90e75 --- /dev/null +++ b/assets/minecraft/items/snow_golem_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/snow_golem_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/snowball.json b/assets/minecraft/items/snowball.json new file mode 100644 index 00000000..d33a77a4 --- /dev/null +++ b/assets/minecraft/items/snowball.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/snowball" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/soul_campfire.json b/assets/minecraft/items/soul_campfire.json new file mode 100644 index 00000000..e6bc3042 --- /dev/null +++ b/assets/minecraft/items/soul_campfire.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/soul_campfire" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/soul_lantern.json b/assets/minecraft/items/soul_lantern.json new file mode 100644 index 00000000..5798a9a9 --- /dev/null +++ b/assets/minecraft/items/soul_lantern.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/soul_lantern" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/soul_sand.json b/assets/minecraft/items/soul_sand.json new file mode 100644 index 00000000..8101cb3c --- /dev/null +++ b/assets/minecraft/items/soul_sand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/soul_sand" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/soul_soil.json b/assets/minecraft/items/soul_soil.json new file mode 100644 index 00000000..2345c55e --- /dev/null +++ b/assets/minecraft/items/soul_soil.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/soul_soil" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/soul_torch.json b/assets/minecraft/items/soul_torch.json new file mode 100644 index 00000000..530bfc4f --- /dev/null +++ b/assets/minecraft/items/soul_torch.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/soul_torch" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spawner.json b/assets/minecraft/items/spawner.json new file mode 100644 index 00000000..6064177a --- /dev/null +++ b/assets/minecraft/items/spawner.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spawner" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spectral_arrow.json b/assets/minecraft/items/spectral_arrow.json new file mode 100644 index 00000000..92b39e7e --- /dev/null +++ b/assets/minecraft/items/spectral_arrow.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spectral_arrow" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spider_eye.json b/assets/minecraft/items/spider_eye.json new file mode 100644 index 00000000..2e5832c2 --- /dev/null +++ b/assets/minecraft/items/spider_eye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spider_eye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spider_spawn_egg.json b/assets/minecraft/items/spider_spawn_egg.json new file mode 100644 index 00000000..7aa50988 --- /dev/null +++ b/assets/minecraft/items/spider_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spider_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spire_armor_trim_smithing_template.json b/assets/minecraft/items/spire_armor_trim_smithing_template.json new file mode 100644 index 00000000..c0ced75d --- /dev/null +++ b/assets/minecraft/items/spire_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spire_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/splash_potion.json b/assets/minecraft/items/splash_potion.json new file mode 100644 index 00000000..7fa6e714 --- /dev/null +++ b/assets/minecraft/items/splash_potion.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/splash_potion", + "tints": [ + { + "type": "minecraft:potion", + "default": -13083194 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sponge.json b/assets/minecraft/items/sponge.json new file mode 100644 index 00000000..c60720ee --- /dev/null +++ b/assets/minecraft/items/sponge.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sponge" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spore_blossom.json b/assets/minecraft/items/spore_blossom.json new file mode 100644 index 00000000..7e9cc6e7 --- /dev/null +++ b/assets/minecraft/items/spore_blossom.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spore_blossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_boat.json b/assets/minecraft/items/spruce_boat.json new file mode 100644 index 00000000..59d05726 --- /dev/null +++ b/assets/minecraft/items/spruce_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_button.json b/assets/minecraft/items/spruce_button.json new file mode 100644 index 00000000..dd3c78eb --- /dev/null +++ b/assets/minecraft/items/spruce_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_chest_boat.json b/assets/minecraft/items/spruce_chest_boat.json new file mode 100644 index 00000000..89dbfdeb --- /dev/null +++ b/assets/minecraft/items/spruce_chest_boat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_chest_boat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_door.json b/assets/minecraft/items/spruce_door.json new file mode 100644 index 00000000..dda164c2 --- /dev/null +++ b/assets/minecraft/items/spruce_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_fence.json b/assets/minecraft/items/spruce_fence.json new file mode 100644 index 00000000..22837ca4 --- /dev/null +++ b/assets/minecraft/items/spruce_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_fence_gate.json b/assets/minecraft/items/spruce_fence_gate.json new file mode 100644 index 00000000..539e3b6b --- /dev/null +++ b/assets/minecraft/items/spruce_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_hanging_sign.json b/assets/minecraft/items/spruce_hanging_sign.json new file mode 100644 index 00000000..a2ccee41 --- /dev/null +++ b/assets/minecraft/items/spruce_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_leaves.json b/assets/minecraft/items/spruce_leaves.json new file mode 100644 index 00000000..48be842c --- /dev/null +++ b/assets/minecraft/items/spruce_leaves.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_leaves", + "tints": [ + { + "type": "minecraft:constant", + "value": -10380959 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_log.json b/assets/minecraft/items/spruce_log.json new file mode 100644 index 00000000..f106ea3c --- /dev/null +++ b/assets/minecraft/items/spruce_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_planks.json b/assets/minecraft/items/spruce_planks.json new file mode 100644 index 00000000..bda83bc8 --- /dev/null +++ b/assets/minecraft/items/spruce_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_pressure_plate.json b/assets/minecraft/items/spruce_pressure_plate.json new file mode 100644 index 00000000..2a85b4fe --- /dev/null +++ b/assets/minecraft/items/spruce_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_sapling.json b/assets/minecraft/items/spruce_sapling.json new file mode 100644 index 00000000..ad926af2 --- /dev/null +++ b/assets/minecraft/items/spruce_sapling.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_sapling" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_sign.json b/assets/minecraft/items/spruce_sign.json new file mode 100644 index 00000000..e4c5355c --- /dev/null +++ b/assets/minecraft/items/spruce_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spruce_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_slab.json b/assets/minecraft/items/spruce_slab.json new file mode 100644 index 00000000..1f398c16 --- /dev/null +++ b/assets/minecraft/items/spruce_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_stairs.json b/assets/minecraft/items/spruce_stairs.json new file mode 100644 index 00000000..7282b434 --- /dev/null +++ b/assets/minecraft/items/spruce_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_trapdoor.json b/assets/minecraft/items/spruce_trapdoor.json new file mode 100644 index 00000000..1aed9773 --- /dev/null +++ b/assets/minecraft/items/spruce_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spruce_wood.json b/assets/minecraft/items/spruce_wood.json new file mode 100644 index 00000000..c7f5f46f --- /dev/null +++ b/assets/minecraft/items/spruce_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/spruce_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/spyglass.json b/assets/minecraft/items/spyglass.json new file mode 100644 index 00000000..91bbd848 --- /dev/null +++ b/assets/minecraft/items/spyglass.json @@ -0,0 +1,23 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/spyglass" + }, + "when": [ + "gui", + "ground", + "fixed" + ] + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/spyglass_in_hand" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/squid_spawn_egg.json b/assets/minecraft/items/squid_spawn_egg.json new file mode 100644 index 00000000..95204ecb --- /dev/null +++ b/assets/minecraft/items/squid_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/squid_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stick.json b/assets/minecraft/items/stick.json new file mode 100644 index 00000000..d2e5fd07 --- /dev/null +++ b/assets/minecraft/items/stick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sticky_piston.json b/assets/minecraft/items/sticky_piston.json new file mode 100644 index 00000000..7d62c70d --- /dev/null +++ b/assets/minecraft/items/sticky_piston.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/sticky_piston_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone.json b/assets/minecraft/items/stone.json new file mode 100644 index 00000000..f5c9f2a0 --- /dev/null +++ b/assets/minecraft/items/stone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_axe.json b/assets/minecraft/items/stone_axe.json new file mode 100644 index 00000000..439896b1 --- /dev/null +++ b/assets/minecraft/items/stone_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stone_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_brick_slab.json b/assets/minecraft/items/stone_brick_slab.json new file mode 100644 index 00000000..470cba9e --- /dev/null +++ b/assets/minecraft/items/stone_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_brick_stairs.json b/assets/minecraft/items/stone_brick_stairs.json new file mode 100644 index 00000000..a80ee964 --- /dev/null +++ b/assets/minecraft/items/stone_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_brick_wall.json b/assets/minecraft/items/stone_brick_wall.json new file mode 100644 index 00000000..1690e1d7 --- /dev/null +++ b/assets/minecraft/items/stone_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_bricks.json b/assets/minecraft/items/stone_bricks.json new file mode 100644 index 00000000..a61dd731 --- /dev/null +++ b/assets/minecraft/items/stone_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_button.json b/assets/minecraft/items/stone_button.json new file mode 100644 index 00000000..fe492729 --- /dev/null +++ b/assets/minecraft/items/stone_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_hoe.json b/assets/minecraft/items/stone_hoe.json new file mode 100644 index 00000000..c9aa4f30 --- /dev/null +++ b/assets/minecraft/items/stone_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stone_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_pickaxe.json b/assets/minecraft/items/stone_pickaxe.json new file mode 100644 index 00000000..43c46496 --- /dev/null +++ b/assets/minecraft/items/stone_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stone_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_pressure_plate.json b/assets/minecraft/items/stone_pressure_plate.json new file mode 100644 index 00000000..eed8e4d5 --- /dev/null +++ b/assets/minecraft/items/stone_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_shovel.json b/assets/minecraft/items/stone_shovel.json new file mode 100644 index 00000000..83c3f305 --- /dev/null +++ b/assets/minecraft/items/stone_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stone_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_slab.json b/assets/minecraft/items/stone_slab.json new file mode 100644 index 00000000..277a5928 --- /dev/null +++ b/assets/minecraft/items/stone_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_stairs.json b/assets/minecraft/items/stone_stairs.json new file mode 100644 index 00000000..16adbff0 --- /dev/null +++ b/assets/minecraft/items/stone_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stone_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stone_sword.json b/assets/minecraft/items/stone_sword.json new file mode 100644 index 00000000..7213642e --- /dev/null +++ b/assets/minecraft/items/stone_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stone_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stonecutter.json b/assets/minecraft/items/stonecutter.json new file mode 100644 index 00000000..cd72ad0e --- /dev/null +++ b/assets/minecraft/items/stonecutter.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stonecutter" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stray_spawn_egg.json b/assets/minecraft/items/stray_spawn_egg.json new file mode 100644 index 00000000..b73412c0 --- /dev/null +++ b/assets/minecraft/items/stray_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/stray_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/strider_spawn_egg.json b/assets/minecraft/items/strider_spawn_egg.json new file mode 100644 index 00000000..347d47a3 --- /dev/null +++ b/assets/minecraft/items/strider_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/strider_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/string.json b/assets/minecraft/items/string.json new file mode 100644 index 00000000..8f748c80 --- /dev/null +++ b/assets/minecraft/items/string.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/string" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_acacia_log.json b/assets/minecraft/items/stripped_acacia_log.json new file mode 100644 index 00000000..6c34eef1 --- /dev/null +++ b/assets/minecraft/items/stripped_acacia_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_acacia_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_acacia_wood.json b/assets/minecraft/items/stripped_acacia_wood.json new file mode 100644 index 00000000..34e2ee6d --- /dev/null +++ b/assets/minecraft/items/stripped_acacia_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_acacia_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_bamboo_block.json b/assets/minecraft/items/stripped_bamboo_block.json new file mode 100644 index 00000000..4cabea36 --- /dev/null +++ b/assets/minecraft/items/stripped_bamboo_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_bamboo_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_birch_log.json b/assets/minecraft/items/stripped_birch_log.json new file mode 100644 index 00000000..c99a9a8c --- /dev/null +++ b/assets/minecraft/items/stripped_birch_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_birch_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_birch_wood.json b/assets/minecraft/items/stripped_birch_wood.json new file mode 100644 index 00000000..80f86c85 --- /dev/null +++ b/assets/minecraft/items/stripped_birch_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_birch_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_cherry_log.json b/assets/minecraft/items/stripped_cherry_log.json new file mode 100644 index 00000000..47cde5cc --- /dev/null +++ b/assets/minecraft/items/stripped_cherry_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_cherry_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_cherry_wood.json b/assets/minecraft/items/stripped_cherry_wood.json new file mode 100644 index 00000000..daefe8ee --- /dev/null +++ b/assets/minecraft/items/stripped_cherry_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_cherry_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_crimson_hyphae.json b/assets/minecraft/items/stripped_crimson_hyphae.json new file mode 100644 index 00000000..5cf344ef --- /dev/null +++ b/assets/minecraft/items/stripped_crimson_hyphae.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_crimson_hyphae" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_crimson_stem.json b/assets/minecraft/items/stripped_crimson_stem.json new file mode 100644 index 00000000..96e913a1 --- /dev/null +++ b/assets/minecraft/items/stripped_crimson_stem.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_crimson_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_dark_oak_log.json b/assets/minecraft/items/stripped_dark_oak_log.json new file mode 100644 index 00000000..b8416662 --- /dev/null +++ b/assets/minecraft/items/stripped_dark_oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_dark_oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_dark_oak_wood.json b/assets/minecraft/items/stripped_dark_oak_wood.json new file mode 100644 index 00000000..f673458a --- /dev/null +++ b/assets/minecraft/items/stripped_dark_oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_dark_oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_jungle_log.json b/assets/minecraft/items/stripped_jungle_log.json new file mode 100644 index 00000000..1e1a81bc --- /dev/null +++ b/assets/minecraft/items/stripped_jungle_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_jungle_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_jungle_wood.json b/assets/minecraft/items/stripped_jungle_wood.json new file mode 100644 index 00000000..79a56093 --- /dev/null +++ b/assets/minecraft/items/stripped_jungle_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_jungle_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_mangrove_log.json b/assets/minecraft/items/stripped_mangrove_log.json new file mode 100644 index 00000000..ad55c407 --- /dev/null +++ b/assets/minecraft/items/stripped_mangrove_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_mangrove_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_mangrove_wood.json b/assets/minecraft/items/stripped_mangrove_wood.json new file mode 100644 index 00000000..a9316c1a --- /dev/null +++ b/assets/minecraft/items/stripped_mangrove_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_mangrove_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_oak_log.json b/assets/minecraft/items/stripped_oak_log.json new file mode 100644 index 00000000..9f4bf584 --- /dev/null +++ b/assets/minecraft/items/stripped_oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_oak_wood.json b/assets/minecraft/items/stripped_oak_wood.json new file mode 100644 index 00000000..7ad32214 --- /dev/null +++ b/assets/minecraft/items/stripped_oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_pale_oak_log.json b/assets/minecraft/items/stripped_pale_oak_log.json new file mode 100644 index 00000000..0446e281 --- /dev/null +++ b/assets/minecraft/items/stripped_pale_oak_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_pale_oak_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_pale_oak_wood.json b/assets/minecraft/items/stripped_pale_oak_wood.json new file mode 100644 index 00000000..109ad1ac --- /dev/null +++ b/assets/minecraft/items/stripped_pale_oak_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_pale_oak_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_spruce_log.json b/assets/minecraft/items/stripped_spruce_log.json new file mode 100644 index 00000000..cdd2f292 --- /dev/null +++ b/assets/minecraft/items/stripped_spruce_log.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_spruce_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_spruce_wood.json b/assets/minecraft/items/stripped_spruce_wood.json new file mode 100644 index 00000000..28cf5b63 --- /dev/null +++ b/assets/minecraft/items/stripped_spruce_wood.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_spruce_wood" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_warped_hyphae.json b/assets/minecraft/items/stripped_warped_hyphae.json new file mode 100644 index 00000000..4e814822 --- /dev/null +++ b/assets/minecraft/items/stripped_warped_hyphae.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_warped_hyphae" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/stripped_warped_stem.json b/assets/minecraft/items/stripped_warped_stem.json new file mode 100644 index 00000000..e3bbcec3 --- /dev/null +++ b/assets/minecraft/items/stripped_warped_stem.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/stripped_warped_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/structure_block.json b/assets/minecraft/items/structure_block.json new file mode 100644 index 00000000..bf984362 --- /dev/null +++ b/assets/minecraft/items/structure_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/structure_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/structure_void.json b/assets/minecraft/items/structure_void.json new file mode 100644 index 00000000..80679116 --- /dev/null +++ b/assets/minecraft/items/structure_void.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/structure_void" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sugar.json b/assets/minecraft/items/sugar.json new file mode 100644 index 00000000..8a2ac1f0 --- /dev/null +++ b/assets/minecraft/items/sugar.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sugar" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sugar_cane.json b/assets/minecraft/items/sugar_cane.json new file mode 100644 index 00000000..fcffd263 --- /dev/null +++ b/assets/minecraft/items/sugar_cane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sugar_cane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sunflower.json b/assets/minecraft/items/sunflower.json new file mode 100644 index 00000000..db77a8cb --- /dev/null +++ b/assets/minecraft/items/sunflower.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sunflower" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/suspicious_gravel.json b/assets/minecraft/items/suspicious_gravel.json new file mode 100644 index 00000000..a2ae98d8 --- /dev/null +++ b/assets/minecraft/items/suspicious_gravel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/suspicious_gravel_0" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/suspicious_sand.json b/assets/minecraft/items/suspicious_sand.json new file mode 100644 index 00000000..d1e5b53e --- /dev/null +++ b/assets/minecraft/items/suspicious_sand.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/suspicious_sand_0" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/suspicious_stew.json b/assets/minecraft/items/suspicious_stew.json new file mode 100644 index 00000000..39814c70 --- /dev/null +++ b/assets/minecraft/items/suspicious_stew.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/suspicious_stew" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/sweet_berries.json b/assets/minecraft/items/sweet_berries.json new file mode 100644 index 00000000..abce325f --- /dev/null +++ b/assets/minecraft/items/sweet_berries.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/sweet_berries" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tadpole_bucket.json b/assets/minecraft/items/tadpole_bucket.json new file mode 100644 index 00000000..6a3f1f5c --- /dev/null +++ b/assets/minecraft/items/tadpole_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tadpole_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tadpole_spawn_egg.json b/assets/minecraft/items/tadpole_spawn_egg.json new file mode 100644 index 00000000..85a709a9 --- /dev/null +++ b/assets/minecraft/items/tadpole_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tadpole_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tall_dry_grass.json b/assets/minecraft/items/tall_dry_grass.json new file mode 100644 index 00000000..fb4a4fd6 --- /dev/null +++ b/assets/minecraft/items/tall_dry_grass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tall_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tall_grass.json b/assets/minecraft/items/tall_grass.json new file mode 100644 index 00000000..8e524c31 --- /dev/null +++ b/assets/minecraft/items/tall_grass.json @@ -0,0 +1,13 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tall_grass", + "tints": [ + { + "type": "minecraft:grass", + "downfall": 1.0, + "temperature": 0.5 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/target.json b/assets/minecraft/items/target.json new file mode 100644 index 00000000..06200fd8 --- /dev/null +++ b/assets/minecraft/items/target.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/target" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/terracotta.json b/assets/minecraft/items/terracotta.json new file mode 100644 index 00000000..690ee815 --- /dev/null +++ b/assets/minecraft/items/terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/test_block.json b/assets/minecraft/items/test_block.json new file mode 100644 index 00000000..706d749c --- /dev/null +++ b/assets/minecraft/items/test_block.json @@ -0,0 +1,34 @@ +{ + "model": { + "type": "minecraft:select", + "block_state_property": "mode", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:block/test_block_log" + }, + "when": "log" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:block/test_block_fail" + }, + "when": "fail" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:block/test_block_accept" + }, + "when": "accept" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:block/test_block_start" + }, + "property": "minecraft:block_state" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/test_instance_block.json b/assets/minecraft/items/test_instance_block.json new file mode 100644 index 00000000..d153ca1c --- /dev/null +++ b/assets/minecraft/items/test_instance_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/test_instance_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tide_armor_trim_smithing_template.json b/assets/minecraft/items/tide_armor_trim_smithing_template.json new file mode 100644 index 00000000..a4578f21 --- /dev/null +++ b/assets/minecraft/items/tide_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tide_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tinted_glass.json b/assets/minecraft/items/tinted_glass.json new file mode 100644 index 00000000..9a56958c --- /dev/null +++ b/assets/minecraft/items/tinted_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tinted_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tipped_arrow.json b/assets/minecraft/items/tipped_arrow.json new file mode 100644 index 00000000..77ba8aa8 --- /dev/null +++ b/assets/minecraft/items/tipped_arrow.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tipped_arrow", + "tints": [ + { + "type": "minecraft:potion", + "default": -13083194 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tnt.json b/assets/minecraft/items/tnt.json new file mode 100644 index 00000000..ed41988a --- /dev/null +++ b/assets/minecraft/items/tnt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tnt" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tnt_minecart.json b/assets/minecraft/items/tnt_minecart.json new file mode 100644 index 00000000..f390cb9b --- /dev/null +++ b/assets/minecraft/items/tnt_minecart.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tnt_minecart" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/torch.json b/assets/minecraft/items/torch.json new file mode 100644 index 00000000..44a5efb9 --- /dev/null +++ b/assets/minecraft/items/torch.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/torch" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/torchflower.json b/assets/minecraft/items/torchflower.json new file mode 100644 index 00000000..aeb1619c --- /dev/null +++ b/assets/minecraft/items/torchflower.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/torchflower" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/torchflower_seeds.json b/assets/minecraft/items/torchflower_seeds.json new file mode 100644 index 00000000..d8ad414e --- /dev/null +++ b/assets/minecraft/items/torchflower_seeds.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/torchflower_seeds" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/totem_of_undying.json b/assets/minecraft/items/totem_of_undying.json new file mode 100644 index 00000000..e1844f63 --- /dev/null +++ b/assets/minecraft/items/totem_of_undying.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/totem_of_undying" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/trader_llama_spawn_egg.json b/assets/minecraft/items/trader_llama_spawn_egg.json new file mode 100644 index 00000000..61e69441 --- /dev/null +++ b/assets/minecraft/items/trader_llama_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/trader_llama_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/trapped_chest.json b/assets/minecraft/items/trapped_chest.json new file mode 100644 index 00000000..bac5cdb5 --- /dev/null +++ b/assets/minecraft/items/trapped_chest.json @@ -0,0 +1,32 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:special", + "base": "minecraft:item/trapped_chest", + "model": { + "type": "minecraft:chest", + "texture": "minecraft:christmas" + } + }, + "when": [ + "12-24", + "12-25", + "12-26" + ] + } + ], + "fallback": { + "type": "minecraft:special", + "base": "minecraft:item/trapped_chest", + "model": { + "type": "minecraft:chest", + "texture": "minecraft:trapped" + } + }, + "pattern": "MM-dd", + "property": "minecraft:local_time" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/trial_key.json b/assets/minecraft/items/trial_key.json new file mode 100644 index 00000000..3a34cbaf --- /dev/null +++ b/assets/minecraft/items/trial_key.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/trial_key" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/trial_spawner.json b/assets/minecraft/items/trial_spawner.json new file mode 100644 index 00000000..809b4460 --- /dev/null +++ b/assets/minecraft/items/trial_spawner.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/trial_spawner" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/trident.json b/assets/minecraft/items/trident.json new file mode 100644 index 00000000..9f6c4780 --- /dev/null +++ b/assets/minecraft/items/trident.json @@ -0,0 +1,37 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/trident" + }, + "when": [ + "gui", + "ground", + "fixed" + ] + } + ], + "fallback": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:special", + "base": "minecraft:item/trident_in_hand", + "model": { + "type": "minecraft:trident" + } + }, + "on_true": { + "type": "minecraft:special", + "base": "minecraft:item/trident_throwing", + "model": { + "type": "minecraft:trident" + } + }, + "property": "minecraft:using_item" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tripwire_hook.json b/assets/minecraft/items/tripwire_hook.json new file mode 100644 index 00000000..f9bf5abd --- /dev/null +++ b/assets/minecraft/items/tripwire_hook.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tripwire_hook" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tropical_fish.json b/assets/minecraft/items/tropical_fish.json new file mode 100644 index 00000000..26f2f487 --- /dev/null +++ b/assets/minecraft/items/tropical_fish.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tropical_fish" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tropical_fish_bucket.json b/assets/minecraft/items/tropical_fish_bucket.json new file mode 100644 index 00000000..2db71364 --- /dev/null +++ b/assets/minecraft/items/tropical_fish_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tropical_fish_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tropical_fish_spawn_egg.json b/assets/minecraft/items/tropical_fish_spawn_egg.json new file mode 100644 index 00000000..18fade41 --- /dev/null +++ b/assets/minecraft/items/tropical_fish_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tropical_fish_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tube_coral.json b/assets/minecraft/items/tube_coral.json new file mode 100644 index 00000000..93108780 --- /dev/null +++ b/assets/minecraft/items/tube_coral.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tube_coral" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tube_coral_block.json b/assets/minecraft/items/tube_coral_block.json new file mode 100644 index 00000000..790d51d2 --- /dev/null +++ b/assets/minecraft/items/tube_coral_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tube_coral_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tube_coral_fan.json b/assets/minecraft/items/tube_coral_fan.json new file mode 100644 index 00000000..6159f263 --- /dev/null +++ b/assets/minecraft/items/tube_coral_fan.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tube_coral_fan" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff.json b/assets/minecraft/items/tuff.json new file mode 100644 index 00000000..610c254a --- /dev/null +++ b/assets/minecraft/items/tuff.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_brick_slab.json b/assets/minecraft/items/tuff_brick_slab.json new file mode 100644 index 00000000..0cdb4823 --- /dev/null +++ b/assets/minecraft/items/tuff_brick_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_brick_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_brick_stairs.json b/assets/minecraft/items/tuff_brick_stairs.json new file mode 100644 index 00000000..378136c3 --- /dev/null +++ b/assets/minecraft/items/tuff_brick_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_brick_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_brick_wall.json b/assets/minecraft/items/tuff_brick_wall.json new file mode 100644 index 00000000..7ce46809 --- /dev/null +++ b/assets/minecraft/items/tuff_brick_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_brick_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_bricks.json b/assets/minecraft/items/tuff_bricks.json new file mode 100644 index 00000000..2d4f32e6 --- /dev/null +++ b/assets/minecraft/items/tuff_bricks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_slab.json b/assets/minecraft/items/tuff_slab.json new file mode 100644 index 00000000..abd0a96a --- /dev/null +++ b/assets/minecraft/items/tuff_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_stairs.json b/assets/minecraft/items/tuff_stairs.json new file mode 100644 index 00000000..7011809e --- /dev/null +++ b/assets/minecraft/items/tuff_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/tuff_wall.json b/assets/minecraft/items/tuff_wall.json new file mode 100644 index 00000000..886b4bcb --- /dev/null +++ b/assets/minecraft/items/tuff_wall.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/tuff_wall_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/turtle_egg.json b/assets/minecraft/items/turtle_egg.json new file mode 100644 index 00000000..fc91fe7d --- /dev/null +++ b/assets/minecraft/items/turtle_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/turtle_helmet.json b/assets/minecraft/items/turtle_helmet.json new file mode 100644 index 00000000..5fa761e9 --- /dev/null +++ b/assets/minecraft/items/turtle_helmet.json @@ -0,0 +1,89 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_quartz_trim" + }, + "when": "minecraft:quartz" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_iron_trim" + }, + "when": "minecraft:iron" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_netherite_trim" + }, + "when": "minecraft:netherite" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_redstone_trim" + }, + "when": "minecraft:redstone" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_copper_trim" + }, + "when": "minecraft:copper" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_gold_trim" + }, + "when": "minecraft:gold" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_emerald_trim" + }, + "when": "minecraft:emerald" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_diamond_trim" + }, + "when": "minecraft:diamond" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_lapis_trim" + }, + "when": "minecraft:lapis" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_amethyst_trim" + }, + "when": "minecraft:amethyst" + }, + { + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet_resin_trim" + }, + "when": "minecraft:resin" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_helmet" + }, + "property": "minecraft:trim_material" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/turtle_scute.json b/assets/minecraft/items/turtle_scute.json new file mode 100644 index 00000000..9c250150 --- /dev/null +++ b/assets/minecraft/items/turtle_scute.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_scute" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/turtle_spawn_egg.json b/assets/minecraft/items/turtle_spawn_egg.json new file mode 100644 index 00000000..6a9152c1 --- /dev/null +++ b/assets/minecraft/items/turtle_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/turtle_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/twisting_vines.json b/assets/minecraft/items/twisting_vines.json new file mode 100644 index 00000000..53aa26dd --- /dev/null +++ b/assets/minecraft/items/twisting_vines.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/twisting_vines" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/vault.json b/assets/minecraft/items/vault.json new file mode 100644 index 00000000..822f3d24 --- /dev/null +++ b/assets/minecraft/items/vault.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/vault" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/verdant_froglight.json b/assets/minecraft/items/verdant_froglight.json new file mode 100644 index 00000000..78844215 --- /dev/null +++ b/assets/minecraft/items/verdant_froglight.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/verdant_froglight" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/vex_armor_trim_smithing_template.json b/assets/minecraft/items/vex_armor_trim_smithing_template.json new file mode 100644 index 00000000..59c22037 --- /dev/null +++ b/assets/minecraft/items/vex_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/vex_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/vex_spawn_egg.json b/assets/minecraft/items/vex_spawn_egg.json new file mode 100644 index 00000000..13c93282 --- /dev/null +++ b/assets/minecraft/items/vex_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/vex_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/villager_spawn_egg.json b/assets/minecraft/items/villager_spawn_egg.json new file mode 100644 index 00000000..a1c89c61 --- /dev/null +++ b/assets/minecraft/items/villager_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/villager_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/vindicator_spawn_egg.json b/assets/minecraft/items/vindicator_spawn_egg.json new file mode 100644 index 00000000..e6909698 --- /dev/null +++ b/assets/minecraft/items/vindicator_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/vindicator_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/vine.json b/assets/minecraft/items/vine.json new file mode 100644 index 00000000..e13000c1 --- /dev/null +++ b/assets/minecraft/items/vine.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/vine", + "tints": [ + { + "type": "minecraft:constant", + "value": -12012264 + } + ] + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wandering_trader_spawn_egg.json b/assets/minecraft/items/wandering_trader_spawn_egg.json new file mode 100644 index 00000000..0db47663 --- /dev/null +++ b/assets/minecraft/items/wandering_trader_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wandering_trader_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/ward_armor_trim_smithing_template.json b/assets/minecraft/items/ward_armor_trim_smithing_template.json new file mode 100644 index 00000000..c329bccc --- /dev/null +++ b/assets/minecraft/items/ward_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/ward_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warden_spawn_egg.json b/assets/minecraft/items/warden_spawn_egg.json new file mode 100644 index 00000000..8d20e024 --- /dev/null +++ b/assets/minecraft/items/warden_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warden_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_button.json b/assets/minecraft/items/warped_button.json new file mode 100644 index 00000000..aa659e22 --- /dev/null +++ b/assets/minecraft/items/warped_button.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_button_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_door.json b/assets/minecraft/items/warped_door.json new file mode 100644 index 00000000..dbeece42 --- /dev/null +++ b/assets/minecraft/items/warped_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_fence.json b/assets/minecraft/items/warped_fence.json new file mode 100644 index 00000000..815eacdb --- /dev/null +++ b/assets/minecraft/items/warped_fence.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_fence_inventory" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_fence_gate.json b/assets/minecraft/items/warped_fence_gate.json new file mode 100644 index 00000000..e572057d --- /dev/null +++ b/assets/minecraft/items/warped_fence_gate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_fence_gate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_fungus.json b/assets/minecraft/items/warped_fungus.json new file mode 100644 index 00000000..085c1e25 --- /dev/null +++ b/assets/minecraft/items/warped_fungus.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_fungus" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_fungus_on_a_stick.json b/assets/minecraft/items/warped_fungus_on_a_stick.json new file mode 100644 index 00000000..678bf626 --- /dev/null +++ b/assets/minecraft/items/warped_fungus_on_a_stick.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_fungus_on_a_stick" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_hanging_sign.json b/assets/minecraft/items/warped_hanging_sign.json new file mode 100644 index 00000000..f823655b --- /dev/null +++ b/assets/minecraft/items/warped_hanging_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_hanging_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_hyphae.json b/assets/minecraft/items/warped_hyphae.json new file mode 100644 index 00000000..cb3ab3d2 --- /dev/null +++ b/assets/minecraft/items/warped_hyphae.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_hyphae" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_nylium.json b/assets/minecraft/items/warped_nylium.json new file mode 100644 index 00000000..a9627787 --- /dev/null +++ b/assets/minecraft/items/warped_nylium.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_nylium" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_planks.json b/assets/minecraft/items/warped_planks.json new file mode 100644 index 00000000..25e02f2f --- /dev/null +++ b/assets/minecraft/items/warped_planks.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_pressure_plate.json b/assets/minecraft/items/warped_pressure_plate.json new file mode 100644 index 00000000..13d62076 --- /dev/null +++ b/assets/minecraft/items/warped_pressure_plate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_pressure_plate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_roots.json b/assets/minecraft/items/warped_roots.json new file mode 100644 index 00000000..f9e0e5d0 --- /dev/null +++ b/assets/minecraft/items/warped_roots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_roots" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_sign.json b/assets/minecraft/items/warped_sign.json new file mode 100644 index 00000000..c8a6a952 --- /dev/null +++ b/assets/minecraft/items/warped_sign.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/warped_sign" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_slab.json b/assets/minecraft/items/warped_slab.json new file mode 100644 index 00000000..bcde31a9 --- /dev/null +++ b/assets/minecraft/items/warped_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_stairs.json b/assets/minecraft/items/warped_stairs.json new file mode 100644 index 00000000..9d6eff56 --- /dev/null +++ b/assets/minecraft/items/warped_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_stem.json b/assets/minecraft/items/warped_stem.json new file mode 100644 index 00000000..6766888d --- /dev/null +++ b/assets/minecraft/items/warped_stem.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_trapdoor.json b/assets/minecraft/items/warped_trapdoor.json new file mode 100644 index 00000000..f3a05d24 --- /dev/null +++ b/assets/minecraft/items/warped_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/warped_wart_block.json b/assets/minecraft/items/warped_wart_block.json new file mode 100644 index 00000000..cd1c6408 --- /dev/null +++ b/assets/minecraft/items/warped_wart_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/warped_wart_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/water_bucket.json b/assets/minecraft/items/water_bucket.json new file mode 100644 index 00000000..0a616959 --- /dev/null +++ b/assets/minecraft/items/water_bucket.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/water_bucket" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_chiseled_copper.json b/assets/minecraft/items/waxed_chiseled_copper.json new file mode 100644 index 00000000..99d4996d --- /dev/null +++ b/assets/minecraft/items/waxed_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_copper_block.json b/assets/minecraft/items/waxed_copper_block.json new file mode 100644 index 00000000..5060ed21 --- /dev/null +++ b/assets/minecraft/items/waxed_copper_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_copper_bulb.json b/assets/minecraft/items/waxed_copper_bulb.json new file mode 100644 index 00000000..feafbf2c --- /dev/null +++ b/assets/minecraft/items/waxed_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_copper_door.json b/assets/minecraft/items/waxed_copper_door.json new file mode 100644 index 00000000..6bc75ee4 --- /dev/null +++ b/assets/minecraft/items/waxed_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_copper_grate.json b/assets/minecraft/items/waxed_copper_grate.json new file mode 100644 index 00000000..7d9789bc --- /dev/null +++ b/assets/minecraft/items/waxed_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_copper_trapdoor.json b/assets/minecraft/items/waxed_copper_trapdoor.json new file mode 100644 index 00000000..03981dc9 --- /dev/null +++ b/assets/minecraft/items/waxed_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_cut_copper.json b/assets/minecraft/items/waxed_cut_copper.json new file mode 100644 index 00000000..69a734c6 --- /dev/null +++ b/assets/minecraft/items/waxed_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_cut_copper_slab.json b/assets/minecraft/items/waxed_cut_copper_slab.json new file mode 100644 index 00000000..1f8c6197 --- /dev/null +++ b/assets/minecraft/items/waxed_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_cut_copper_stairs.json b/assets/minecraft/items/waxed_cut_copper_stairs.json new file mode 100644 index 00000000..d63128c1 --- /dev/null +++ b/assets/minecraft/items/waxed_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_chiseled_copper.json b/assets/minecraft/items/waxed_exposed_chiseled_copper.json new file mode 100644 index 00000000..22657b6a --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_copper.json b/assets/minecraft/items/waxed_exposed_copper.json new file mode 100644 index 00000000..632da674 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_copper_bulb.json b/assets/minecraft/items/waxed_exposed_copper_bulb.json new file mode 100644 index 00000000..d54e6306 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_copper_door.json b/assets/minecraft/items/waxed_exposed_copper_door.json new file mode 100644 index 00000000..0ca6e2ca --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/exposed_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_copper_grate.json b/assets/minecraft/items/waxed_exposed_copper_grate.json new file mode 100644 index 00000000..07c561b4 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_copper_trapdoor.json b/assets/minecraft/items/waxed_exposed_copper_trapdoor.json new file mode 100644 index 00000000..260b680e --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_cut_copper.json b/assets/minecraft/items/waxed_exposed_cut_copper.json new file mode 100644 index 00000000..35932366 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_cut_copper_slab.json b/assets/minecraft/items/waxed_exposed_cut_copper_slab.json new file mode 100644 index 00000000..818f8860 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_exposed_cut_copper_stairs.json b/assets/minecraft/items/waxed_exposed_cut_copper_stairs.json new file mode 100644 index 00000000..54f5c1f0 --- /dev/null +++ b/assets/minecraft/items/waxed_exposed_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/exposed_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_chiseled_copper.json b/assets/minecraft/items/waxed_oxidized_chiseled_copper.json new file mode 100644 index 00000000..78b7eae0 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_copper.json b/assets/minecraft/items/waxed_oxidized_copper.json new file mode 100644 index 00000000..c58b7f62 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_copper_bulb.json b/assets/minecraft/items/waxed_oxidized_copper_bulb.json new file mode 100644 index 00000000..aeab2c8c --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_copper_door.json b/assets/minecraft/items/waxed_oxidized_copper_door.json new file mode 100644 index 00000000..b5cc84d3 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/oxidized_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_copper_grate.json b/assets/minecraft/items/waxed_oxidized_copper_grate.json new file mode 100644 index 00000000..90d2a483 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_copper_trapdoor.json b/assets/minecraft/items/waxed_oxidized_copper_trapdoor.json new file mode 100644 index 00000000..245f08ef --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_cut_copper.json b/assets/minecraft/items/waxed_oxidized_cut_copper.json new file mode 100644 index 00000000..ec0748d3 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_cut_copper_slab.json b/assets/minecraft/items/waxed_oxidized_cut_copper_slab.json new file mode 100644 index 00000000..3e15eec7 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_oxidized_cut_copper_stairs.json b/assets/minecraft/items/waxed_oxidized_cut_copper_stairs.json new file mode 100644 index 00000000..7fd0b7f0 --- /dev/null +++ b/assets/minecraft/items/waxed_oxidized_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/oxidized_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_chiseled_copper.json b/assets/minecraft/items/waxed_weathered_chiseled_copper.json new file mode 100644 index 00000000..f046852b --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_copper.json b/assets/minecraft/items/waxed_weathered_copper.json new file mode 100644 index 00000000..75710bc9 --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_copper_bulb.json b/assets/minecraft/items/waxed_weathered_copper_bulb.json new file mode 100644 index 00000000..5866e1d3 --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_copper_door.json b/assets/minecraft/items/waxed_weathered_copper_door.json new file mode 100644 index 00000000..4ec7f82f --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/weathered_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_copper_grate.json b/assets/minecraft/items/waxed_weathered_copper_grate.json new file mode 100644 index 00000000..c23ee224 --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_copper_trapdoor.json b/assets/minecraft/items/waxed_weathered_copper_trapdoor.json new file mode 100644 index 00000000..d09a144f --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_cut_copper.json b/assets/minecraft/items/waxed_weathered_cut_copper.json new file mode 100644 index 00000000..15a90ec8 --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_cut_copper_slab.json b/assets/minecraft/items/waxed_weathered_cut_copper_slab.json new file mode 100644 index 00000000..0084def1 --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/waxed_weathered_cut_copper_stairs.json b/assets/minecraft/items/waxed_weathered_cut_copper_stairs.json new file mode 100644 index 00000000..2050ef4d --- /dev/null +++ b/assets/minecraft/items/waxed_weathered_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wayfinder_armor_trim_smithing_template.json b/assets/minecraft/items/wayfinder_armor_trim_smithing_template.json new file mode 100644 index 00000000..cd3ba959 --- /dev/null +++ b/assets/minecraft/items/wayfinder_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wayfinder_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_chiseled_copper.json b/assets/minecraft/items/weathered_chiseled_copper.json new file mode 100644 index 00000000..f046852b --- /dev/null +++ b/assets/minecraft/items/weathered_chiseled_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_chiseled_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_copper.json b/assets/minecraft/items/weathered_copper.json new file mode 100644 index 00000000..75710bc9 --- /dev/null +++ b/assets/minecraft/items/weathered_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_copper_bulb.json b/assets/minecraft/items/weathered_copper_bulb.json new file mode 100644 index 00000000..5866e1d3 --- /dev/null +++ b/assets/minecraft/items/weathered_copper_bulb.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_bulb" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_copper_door.json b/assets/minecraft/items/weathered_copper_door.json new file mode 100644 index 00000000..4ec7f82f --- /dev/null +++ b/assets/minecraft/items/weathered_copper_door.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/weathered_copper_door" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_copper_grate.json b/assets/minecraft/items/weathered_copper_grate.json new file mode 100644 index 00000000..c23ee224 --- /dev/null +++ b/assets/minecraft/items/weathered_copper_grate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_grate" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_copper_trapdoor.json b/assets/minecraft/items/weathered_copper_trapdoor.json new file mode 100644 index 00000000..d09a144f --- /dev/null +++ b/assets/minecraft/items/weathered_copper_trapdoor.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_copper_trapdoor_bottom" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_cut_copper.json b/assets/minecraft/items/weathered_cut_copper.json new file mode 100644 index 00000000..15a90ec8 --- /dev/null +++ b/assets/minecraft/items/weathered_cut_copper.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_cut_copper_slab.json b/assets/minecraft/items/weathered_cut_copper_slab.json new file mode 100644 index 00000000..0084def1 --- /dev/null +++ b/assets/minecraft/items/weathered_cut_copper_slab.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper_slab" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weathered_cut_copper_stairs.json b/assets/minecraft/items/weathered_cut_copper_stairs.json new file mode 100644 index 00000000..2050ef4d --- /dev/null +++ b/assets/minecraft/items/weathered_cut_copper_stairs.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/weathered_cut_copper_stairs" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/weeping_vines.json b/assets/minecraft/items/weeping_vines.json new file mode 100644 index 00000000..3f169a7a --- /dev/null +++ b/assets/minecraft/items/weeping_vines.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/weeping_vines" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wet_sponge.json b/assets/minecraft/items/wet_sponge.json new file mode 100644 index 00000000..7e33cdd2 --- /dev/null +++ b/assets/minecraft/items/wet_sponge.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/wet_sponge" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wheat.json b/assets/minecraft/items/wheat.json new file mode 100644 index 00000000..f4fb4b7b --- /dev/null +++ b/assets/minecraft/items/wheat.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wheat" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wheat_seeds.json b/assets/minecraft/items/wheat_seeds.json new file mode 100644 index 00000000..8ae46474 --- /dev/null +++ b/assets/minecraft/items/wheat_seeds.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wheat_seeds" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_banner.json b/assets/minecraft/items/white_banner.json new file mode 100644 index 00000000..f87b23e9 --- /dev/null +++ b/assets/minecraft/items/white_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "white" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_bed.json b/assets/minecraft/items/white_bed.json new file mode 100644 index 00000000..7e3aa006 --- /dev/null +++ b/assets/minecraft/items/white_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/white_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:white" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_bundle.json b/assets/minecraft/items/white_bundle.json new file mode 100644 index 00000000..05c547af --- /dev/null +++ b/assets/minecraft/items/white_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/white_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/white_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/white_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/white_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_candle.json b/assets/minecraft/items/white_candle.json new file mode 100644 index 00000000..6d60a581 --- /dev/null +++ b/assets/minecraft/items/white_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/white_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_carpet.json b/assets/minecraft/items/white_carpet.json new file mode 100644 index 00000000..d56e7f94 --- /dev/null +++ b/assets/minecraft/items/white_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_concrete.json b/assets/minecraft/items/white_concrete.json new file mode 100644 index 00000000..822c0565 --- /dev/null +++ b/assets/minecraft/items/white_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_concrete_powder.json b/assets/minecraft/items/white_concrete_powder.json new file mode 100644 index 00000000..56e5f763 --- /dev/null +++ b/assets/minecraft/items/white_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_dye.json b/assets/minecraft/items/white_dye.json new file mode 100644 index 00000000..2684014a --- /dev/null +++ b/assets/minecraft/items/white_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/white_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_glazed_terracotta.json b/assets/minecraft/items/white_glazed_terracotta.json new file mode 100644 index 00000000..5cb0220c --- /dev/null +++ b/assets/minecraft/items/white_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_shulker_box.json b/assets/minecraft/items/white_shulker_box.json new file mode 100644 index 00000000..3e4d8e80 --- /dev/null +++ b/assets/minecraft/items/white_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/white_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_white" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_stained_glass.json b/assets/minecraft/items/white_stained_glass.json new file mode 100644 index 00000000..ae78ae28 --- /dev/null +++ b/assets/minecraft/items/white_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_stained_glass_pane.json b/assets/minecraft/items/white_stained_glass_pane.json new file mode 100644 index 00000000..72f6e606 --- /dev/null +++ b/assets/minecraft/items/white_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/white_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_terracotta.json b/assets/minecraft/items/white_terracotta.json new file mode 100644 index 00000000..af76a078 --- /dev/null +++ b/assets/minecraft/items/white_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_tulip.json b/assets/minecraft/items/white_tulip.json new file mode 100644 index 00000000..d56307a2 --- /dev/null +++ b/assets/minecraft/items/white_tulip.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/white_tulip" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/white_wool.json b/assets/minecraft/items/white_wool.json new file mode 100644 index 00000000..709d4843 --- /dev/null +++ b/assets/minecraft/items/white_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/white_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wild_armor_trim_smithing_template.json b/assets/minecraft/items/wild_armor_trim_smithing_template.json new file mode 100644 index 00000000..37b2bf40 --- /dev/null +++ b/assets/minecraft/items/wild_armor_trim_smithing_template.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wild_armor_trim_smithing_template" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wildflowers.json b/assets/minecraft/items/wildflowers.json new file mode 100644 index 00000000..9d441076 --- /dev/null +++ b/assets/minecraft/items/wildflowers.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wildflowers" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wind_charge.json b/assets/minecraft/items/wind_charge.json new file mode 100644 index 00000000..b9f3a063 --- /dev/null +++ b/assets/minecraft/items/wind_charge.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wind_charge" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/witch_spawn_egg.json b/assets/minecraft/items/witch_spawn_egg.json new file mode 100644 index 00000000..94b7d48b --- /dev/null +++ b/assets/minecraft/items/witch_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/witch_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wither_rose.json b/assets/minecraft/items/wither_rose.json new file mode 100644 index 00000000..558c37f7 --- /dev/null +++ b/assets/minecraft/items/wither_rose.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wither_rose" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wither_skeleton_skull.json b/assets/minecraft/items/wither_skeleton_skull.json new file mode 100644 index 00000000..67302cda --- /dev/null +++ b/assets/minecraft/items/wither_skeleton_skull.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "wither_skeleton" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wither_skeleton_spawn_egg.json b/assets/minecraft/items/wither_skeleton_spawn_egg.json new file mode 100644 index 00000000..d10bff4a --- /dev/null +++ b/assets/minecraft/items/wither_skeleton_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wither_skeleton_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wither_spawn_egg.json b/assets/minecraft/items/wither_spawn_egg.json new file mode 100644 index 00000000..b4fe9d30 --- /dev/null +++ b/assets/minecraft/items/wither_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wither_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wolf_armor.json b/assets/minecraft/items/wolf_armor.json new file mode 100644 index 00000000..443cc953 --- /dev/null +++ b/assets/minecraft/items/wolf_armor.json @@ -0,0 +1,25 @@ +{ + "model": { + "type": "minecraft:condition", + "component": "minecraft:dyed_color", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/wolf_armor" + }, + "on_true": { + "type": "minecraft:model", + "model": "minecraft:item/wolf_armor_dyed", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:dye", + "default": 0 + } + ] + }, + "property": "minecraft:has_component" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wolf_spawn_egg.json b/assets/minecraft/items/wolf_spawn_egg.json new file mode 100644 index 00000000..cd97950d --- /dev/null +++ b/assets/minecraft/items/wolf_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wolf_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wooden_axe.json b/assets/minecraft/items/wooden_axe.json new file mode 100644 index 00000000..1794004d --- /dev/null +++ b/assets/minecraft/items/wooden_axe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wooden_axe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wooden_hoe.json b/assets/minecraft/items/wooden_hoe.json new file mode 100644 index 00000000..33fa0070 --- /dev/null +++ b/assets/minecraft/items/wooden_hoe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wooden_hoe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wooden_pickaxe.json b/assets/minecraft/items/wooden_pickaxe.json new file mode 100644 index 00000000..353c33e0 --- /dev/null +++ b/assets/minecraft/items/wooden_pickaxe.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wooden_pickaxe" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wooden_shovel.json b/assets/minecraft/items/wooden_shovel.json new file mode 100644 index 00000000..5fbb6c68 --- /dev/null +++ b/assets/minecraft/items/wooden_shovel.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wooden_shovel" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/wooden_sword.json b/assets/minecraft/items/wooden_sword.json new file mode 100644 index 00000000..aacc2b94 --- /dev/null +++ b/assets/minecraft/items/wooden_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/wooden_sword" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/writable_book.json b/assets/minecraft/items/writable_book.json new file mode 100644 index 00000000..6cea1bd9 --- /dev/null +++ b/assets/minecraft/items/writable_book.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/writable_book" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/written_book.json b/assets/minecraft/items/written_book.json new file mode 100644 index 00000000..e49699a3 --- /dev/null +++ b/assets/minecraft/items/written_book.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/written_book" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_banner.json b/assets/minecraft/items/yellow_banner.json new file mode 100644 index 00000000..1acffce4 --- /dev/null +++ b/assets/minecraft/items/yellow_banner.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_banner", + "model": { + "type": "minecraft:banner", + "color": "yellow" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_bed.json b/assets/minecraft/items/yellow_bed.json new file mode 100644 index 00000000..184bfe99 --- /dev/null +++ b/assets/minecraft/items/yellow_bed.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/yellow_bed", + "model": { + "type": "minecraft:bed", + "texture": "minecraft:yellow" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_bundle.json b/assets/minecraft/items/yellow_bundle.json new file mode 100644 index 00000000..d37eca64 --- /dev/null +++ b/assets/minecraft/items/yellow_bundle.json @@ -0,0 +1,39 @@ +{ + "model": { + "type": "minecraft:select", + "cases": [ + { + "model": { + "type": "minecraft:condition", + "on_false": { + "type": "minecraft:model", + "model": "minecraft:item/yellow_bundle" + }, + "on_true": { + "type": "minecraft:composite", + "models": [ + { + "type": "minecraft:model", + "model": "minecraft:item/yellow_bundle_open_back" + }, + { + "type": "minecraft:bundle/selected_item" + }, + { + "type": "minecraft:model", + "model": "minecraft:item/yellow_bundle_open_front" + } + ] + }, + "property": "minecraft:bundle/has_selected_item" + }, + "when": "gui" + } + ], + "fallback": { + "type": "minecraft:model", + "model": "minecraft:item/yellow_bundle" + }, + "property": "minecraft:display_context" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_candle.json b/assets/minecraft/items/yellow_candle.json new file mode 100644 index 00000000..5ed2d61e --- /dev/null +++ b/assets/minecraft/items/yellow_candle.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/yellow_candle" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_carpet.json b/assets/minecraft/items/yellow_carpet.json new file mode 100644 index 00000000..2f270df8 --- /dev/null +++ b/assets/minecraft/items/yellow_carpet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_carpet" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_concrete.json b/assets/minecraft/items/yellow_concrete.json new file mode 100644 index 00000000..c55b15f1 --- /dev/null +++ b/assets/minecraft/items/yellow_concrete.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_concrete" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_concrete_powder.json b/assets/minecraft/items/yellow_concrete_powder.json new file mode 100644 index 00000000..839a491d --- /dev/null +++ b/assets/minecraft/items/yellow_concrete_powder.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_concrete_powder" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_dye.json b/assets/minecraft/items/yellow_dye.json new file mode 100644 index 00000000..a56a986b --- /dev/null +++ b/assets/minecraft/items/yellow_dye.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/yellow_dye" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_glazed_terracotta.json b/assets/minecraft/items/yellow_glazed_terracotta.json new file mode 100644 index 00000000..3da8eb40 --- /dev/null +++ b/assets/minecraft/items/yellow_glazed_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_glazed_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_shulker_box.json b/assets/minecraft/items/yellow_shulker_box.json new file mode 100644 index 00000000..bd78cb72 --- /dev/null +++ b/assets/minecraft/items/yellow_shulker_box.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/yellow_shulker_box", + "model": { + "type": "minecraft:shulker_box", + "texture": "minecraft:shulker_yellow" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_stained_glass.json b/assets/minecraft/items/yellow_stained_glass.json new file mode 100644 index 00000000..e4f6432a --- /dev/null +++ b/assets/minecraft/items/yellow_stained_glass.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_stained_glass" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_stained_glass_pane.json b/assets/minecraft/items/yellow_stained_glass_pane.json new file mode 100644 index 00000000..bf3c0337 --- /dev/null +++ b/assets/minecraft/items/yellow_stained_glass_pane.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/yellow_stained_glass_pane" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_terracotta.json b/assets/minecraft/items/yellow_terracotta.json new file mode 100644 index 00000000..411c0705 --- /dev/null +++ b/assets/minecraft/items/yellow_terracotta.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_terracotta" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/yellow_wool.json b/assets/minecraft/items/yellow_wool.json new file mode 100644 index 00000000..7e1fa953 --- /dev/null +++ b/assets/minecraft/items/yellow_wool.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:block/yellow_wool" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zoglin_spawn_egg.json b/assets/minecraft/items/zoglin_spawn_egg.json new file mode 100644 index 00000000..3f9c6b08 --- /dev/null +++ b/assets/minecraft/items/zoglin_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/zoglin_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zombie_head.json b/assets/minecraft/items/zombie_head.json new file mode 100644 index 00000000..f30d13bb --- /dev/null +++ b/assets/minecraft/items/zombie_head.json @@ -0,0 +1,10 @@ +{ + "model": { + "type": "minecraft:special", + "base": "minecraft:item/template_skull", + "model": { + "type": "minecraft:head", + "kind": "zombie" + } + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zombie_horse_spawn_egg.json b/assets/minecraft/items/zombie_horse_spawn_egg.json new file mode 100644 index 00000000..7e975af9 --- /dev/null +++ b/assets/minecraft/items/zombie_horse_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/zombie_horse_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zombie_spawn_egg.json b/assets/minecraft/items/zombie_spawn_egg.json new file mode 100644 index 00000000..eee9ace3 --- /dev/null +++ b/assets/minecraft/items/zombie_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/zombie_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zombie_villager_spawn_egg.json b/assets/minecraft/items/zombie_villager_spawn_egg.json new file mode 100644 index 00000000..72a41ecd --- /dev/null +++ b/assets/minecraft/items/zombie_villager_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/zombie_villager_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/items/zombified_piglin_spawn_egg.json b/assets/minecraft/items/zombified_piglin_spawn_egg.json new file mode 100644 index 00000000..d7699695 --- /dev/null +++ b/assets/minecraft/items/zombified_piglin_spawn_egg.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/zombified_piglin_spawn_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/lang/deprecated.json b/assets/minecraft/lang/deprecated.json index b7987e7a..c684c464 100644 --- a/assets/minecraft/lang/deprecated.json +++ b/assets/minecraft/lang/deprecated.json @@ -24,7 +24,10 @@ "dataPack.update_1_20.name", "dataPack.update_1_21.description", "dataPack.update_1_21.name", + "dataPack.winter_drop.description", + "dataPack.winter_drop.name", "deathScreen.score", + "entity.minecraft.creaking_transient", "event.minecraft.raid.defeat", "event.minecraft.raid.victory", "gui.abuseReport.reason.false_reporting", @@ -131,6 +134,7 @@ "mco.snapshot.friendsRealm.upgrade", "mco.upload.entry.cheats", "mco.upload.entry.commands", + "mco.upload.hardcore", "mco.upload.size.failure.line1", "mco.upload.size.failure.line2", "mco.version", @@ -179,6 +183,8 @@ "subtitles.entity.goat.step", "subtitles.entity.hoglin.step", "subtitles.entity.llama.step", + "subtitles.entity.minecart.inside", + "subtitles.entity.minecart.inside_underwater", "subtitles.entity.panda.step", "subtitles.entity.piglin_brute.step", "subtitles.entity.piglin.step", @@ -231,7 +237,15 @@ "attribute.name.zombie.spawn_reinforcements", "realms.missing.snapshot.error.text", "entity.minecraft.boat", - "entity.minecraft.chest_boat" + "entity.minecraft.chest_boat", + "subtitles.ambient.cave", + "subtitles.block.creaking_heart.idle", + "subtitles.block.eyeblossom.idle", + "subtitles.block.generic.idle", + "entity.minecraft.potion", + "argument.nbt.list.mixed", + "item.minecraft.crossbow.projectile", + "subtitles.entity.wolf.ambient" ], "renamed": { "item.minecraft.dune_armor_trim_smithing_template.new": "item.minecraft.dune_armor_trim_smithing_template", @@ -267,6 +281,14 @@ "selectWorld.allowCommands.new": "selectWorld.allowCommands", "gui.abuseReport.reason.generic": "gui.abuseReport.reason.i_want_to_report_them", "gui.abuseReport.reason.generic.description": "gui.abuseReport.reason.i_want_to_report_them.description", - "commands.drop.no_loot_table": "commands.drop.no_loot_table.entity" + "commands.drop.no_loot_table": "commands.drop.no_loot_table.entity", + "item.op_block_warning.line1": "item.op_warning.line1", + "item.op_block_warning.line2": "item.op_warning.line2", + "item.op_block_warning.line3": "item.op_warning.line3", + "container.shulkerBox.unknownContents": "item.container.loot_table.unknown", + "container.shulkerBox.itemCount": "item.container.item_count", + "container.shulkerBox.more": "item.container.more_items", + "advancements.nether.use_lodestone.description": "advancements.adventure.use_lodestone.description", + "advancements.nether.use_lodestone.title": "advancements.adventure.use_lodestone.title" } } diff --git a/assets/minecraft/lang/en_us.json b/assets/minecraft/lang/en_us.json index ea1055b5..8394be03 100644 --- a/assets/minecraft/lang/en_us.json +++ b/assets/minecraft/lang/en_us.json @@ -89,6 +89,8 @@ "advancements.adventure.two_birds_one_arrow.title": "Two Birds, One Arrow", "advancements.adventure.under_lock_and_key.description": "Unlock a Vault with a Trial Key", "advancements.adventure.under_lock_and_key.title": "Under Lock and Key", + "advancements.adventure.use_lodestone.description": "Use a Compass on a Lodestone", + "advancements.adventure.use_lodestone.title": "Country Lode, Take Me Home", "advancements.adventure.very_very_frightening.description": "Strike a Villager with lightning", "advancements.adventure.very_very_frightening.title": "Very Very Frightening", "advancements.adventure.voluntary_exile.description": "Kill a raid captain.\nMaybe consider staying away from villages for the time being...", @@ -354,6 +356,7 @@ "argument.message.too_long": "Chat message was too long (%s > maximum %s characters)", "argument.nbt.array.invalid": "Invalid array type '%s'", "argument.nbt.array.mixed": "Can't insert %s into %s", + "argument.nbt.expected.compound": "Expected compound tag", "argument.nbt.expected.key": "Expected key", "argument.nbt.expected.value": "Expected value", "argument.nbt.list.mixed": "Can't insert %s into list of %s", @@ -374,6 +377,7 @@ "argument.range.swapped": "Min cannot be bigger than max", "argument.resource_or_id.failed_to_parse": "Failed to parse structure: %s", "argument.resource_or_id.invalid": "Invalid id or tag", + "argument.resource_selector.not_found": "No matches for selector '%s' of type '%s'", "argument.resource_tag.invalid_type": "Tag '%s' has wrong type '%s' (expected '%s')", "argument.resource_tag.not_found": "Can't find tag '%s' of type '%s'", "argument.resource.invalid_type": "Element '%s' has wrong type '%s' (expected '%s')", @@ -1387,7 +1391,9 @@ "block.minecraft.bubble_coral_fan": "Bubble Coral Fan", "block.minecraft.bubble_coral_wall_fan": "Bubble Coral Wall Fan", "block.minecraft.budding_amethyst": "Budding Amethyst", + "block.minecraft.bush": "Bush", "block.minecraft.cactus": "Cactus", + "block.minecraft.cactus_flower": "Cactus Flower", "block.minecraft.cake": "Cake", "block.minecraft.calcite": "Calcite", "block.minecraft.calibrated_sculk_sensor": "Calibrated Sculk Sensor", @@ -1429,6 +1435,7 @@ "block.minecraft.chiseled_polished_blackstone": "Chiseled Polished Blackstone", "block.minecraft.chiseled_quartz_block": "Chiseled Quartz Block", "block.minecraft.chiseled_red_sandstone": "Chiseled Red Sandstone", + "block.minecraft.chiseled_resin_bricks": "Chiseled Resin Bricks", "block.minecraft.chiseled_sandstone": "Chiseled Sandstone", "block.minecraft.chiseled_stone_bricks": "Chiseled Stone Bricks", "block.minecraft.chiseled_tuff": "Chiseled Tuff", @@ -1436,6 +1443,7 @@ "block.minecraft.chorus_flower": "Chorus Flower", "block.minecraft.chorus_plant": "Chorus Plant", "block.minecraft.clay": "Clay", + "block.minecraft.closed_eyeblossom": "Closed Eyeblossom", "block.minecraft.coal_block": "Block of Coal", "block.minecraft.coal_ore": "Coal Ore", "block.minecraft.coarse_dirt": "Coarse Dirt", @@ -1616,6 +1624,7 @@ "block.minecraft.fire_coral_block": "Fire Coral Block", "block.minecraft.fire_coral_fan": "Fire Coral Fan", "block.minecraft.fire_coral_wall_fan": "Fire Coral Wall Fan", + "block.minecraft.firefly_bush": "Firefly Bush", "block.minecraft.fletching_table": "Fletching Table", "block.minecraft.flower_pot": "Flower Pot", "block.minecraft.flowering_azalea": "Flowering Azalea", @@ -1718,6 +1727,7 @@ "block.minecraft.large_fern": "Large Fern", "block.minecraft.lava": "Lava", "block.minecraft.lava_cauldron": "Lava Cauldron", + "block.minecraft.leaf_litter": "Leaf Litter", "block.minecraft.lectern": "Lectern", "block.minecraft.lever": "Lever", "block.minecraft.light": "Light", @@ -1856,6 +1866,7 @@ "block.minecraft.obsidian": "Obsidian", "block.minecraft.ochre_froglight": "Ochre Froglight", "block.minecraft.ominous_banner": "Ominous Banner", + "block.minecraft.open_eyeblossom": "Open Eyeblossom", "block.minecraft.orange_banner": "Orange Banner", "block.minecraft.orange_bed": "Orange Bed", "block.minecraft.orange_candle": "Orange Candle", @@ -1971,6 +1982,7 @@ "block.minecraft.potted_brown_mushroom": "Potted Brown Mushroom", "block.minecraft.potted_cactus": "Potted Cactus", "block.minecraft.potted_cherry_sapling": "Potted Cherry Sapling", + "block.minecraft.potted_closed_eyeblossom": "Potted Closed Eyeblossom", "block.minecraft.potted_cornflower": "Potted Cornflower", "block.minecraft.potted_crimson_fungus": "Potted Crimson Fungus", "block.minecraft.potted_crimson_roots": "Potted Crimson Roots", @@ -1983,6 +1995,7 @@ "block.minecraft.potted_lily_of_the_valley": "Potted Lily of the Valley", "block.minecraft.potted_mangrove_propagule": "Potted Mangrove Propagule", "block.minecraft.potted_oak_sapling": "Potted Oak Sapling", + "block.minecraft.potted_open_eyeblossom": "Potted Open Eyeblossom", "block.minecraft.potted_orange_tulip": "Potted Orange Tulip", "block.minecraft.potted_oxeye_daisy": "Potted Oxeye Daisy", "block.minecraft.potted_pale_oak_sapling": "Potted Pale Oak Sapling", @@ -2068,6 +2081,12 @@ "block.minecraft.reinforced_deepslate": "Reinforced Deepslate", "block.minecraft.repeater": "Redstone Repeater", "block.minecraft.repeating_command_block": "Repeating Command Block", + "block.minecraft.resin_block": "Block of Resin", + "block.minecraft.resin_brick_slab": "Resin Brick Slab", + "block.minecraft.resin_brick_stairs": "Resin Brick Stairs", + "block.minecraft.resin_brick_wall": "Resin Brick Wall", + "block.minecraft.resin_bricks": "Resin Bricks", + "block.minecraft.resin_clump": "Resin Clump", "block.minecraft.respawn_anchor": "Respawn Anchor", "block.minecraft.rooted_dirt": "Rooted Dirt", "block.minecraft.rose_bush": "Rose Bush", @@ -2086,6 +2105,7 @@ "block.minecraft.sea_pickle": "Sea Pickle", "block.minecraft.seagrass": "Seagrass", "block.minecraft.set_spawn": "Respawn point set", + "block.minecraft.short_dry_grass": "Short Dry Grass", "block.minecraft.short_grass": "Short Grass", "block.minecraft.shroomlight": "Shroomlight", "block.minecraft.shulker_box": "Shulker Box", @@ -2182,12 +2202,16 @@ "block.minecraft.suspicious_gravel": "Suspicious Gravel", "block.minecraft.suspicious_sand": "Suspicious Sand", "block.minecraft.sweet_berry_bush": "Sweet Berry Bush", + "block.minecraft.tall_dry_grass": "Tall Dry Grass", "block.minecraft.tall_grass": "Tall Grass", "block.minecraft.tall_seagrass": "Tall Seagrass", "block.minecraft.target": "Target", "block.minecraft.terracotta": "Terracotta", + "block.minecraft.test_block": "Test Block", + "block.minecraft.test_instance_block": "Test Instance Block", "block.minecraft.tinted_glass": "Tinted Glass", "block.minecraft.tnt": "TNT", + "block.minecraft.tnt.disabled": "TNT explosions are disabled", "block.minecraft.torch": "Torch", "block.minecraft.torchflower": "Torchflower", "block.minecraft.torchflower_crop": "Torchflower Crop", @@ -2299,6 +2323,7 @@ "block.minecraft.white_terracotta": "White Terracotta", "block.minecraft.white_tulip": "White Tulip", "block.minecraft.white_wool": "White Wool", + "block.minecraft.wildflowers": "Wildflowers", "block.minecraft.wither_rose": "Wither Rose", "block.minecraft.wither_skeleton_skull": "Wither Skeleton Skull", "block.minecraft.wither_skeleton_wall_skull": "Wither Skeleton Wall Skull", @@ -2431,6 +2456,7 @@ "commands.advancement.revoke.one.to.one.failure": "Couldn't revoke advancement %s from %s as they don't have it", "commands.advancement.revoke.one.to.one.success": "Revoked the advancement %s from %s", "commands.attribute.base_value.get.success": "Base value of attribute %s for entity %s is %s", + "commands.attribute.base_value.reset.success": "Base value for attribute %s for entity %s reset to default %s", "commands.attribute.base_value.set.success": "Base value for attribute %s for entity %s set to %s", "commands.attribute.failed.entity": "%s is not a valid entity for this command", "commands.attribute.failed.modifier_already_present": "Modifier %s is already present on attribute %s for entity %s", @@ -2685,11 +2711,11 @@ "commands.random.roll": "%s rolled %s (from %s to %s)", "commands.random.sample.success": "Randomized value: %s", "commands.recipe.give.failed": "No new recipes were learned", - "commands.recipe.give.success.multiple": "Unlocked %s recipes for %s players", - "commands.recipe.give.success.single": "Unlocked %s recipes for %s", + "commands.recipe.give.success.multiple": "Unlocked %s recipe(s) for %s players", + "commands.recipe.give.success.single": "Unlocked %s recipe(s) for %s", "commands.recipe.take.failed": "No recipes could be forgotten", - "commands.recipe.take.success.multiple": "Took %s recipes from %s players", - "commands.recipe.take.success.single": "Took %s recipes from %s", + "commands.recipe.take.success.multiple": "Took %s recipe(s) from %s players", + "commands.recipe.take.success.single": "Took %s recipe(s) from %s", "commands.reload.failure": "Reload failed; keeping old data", "commands.reload.success": "Reloading!", "commands.ride.already_riding": "%s is already riding %s", @@ -2836,6 +2862,32 @@ "commands.teleport.success.entity.single": "Teleported %s to %s", "commands.teleport.success.location.multiple": "Teleported %s entities to %s, %s, %s", "commands.teleport.success.location.single": "Teleported %s to %s, %s, %s", + "commands.test.batch.starting": "Starting environment %s batch %s", + "commands.test.clear.error.no_tests": "Could not find any tests to clear", + "commands.test.clear.success": "Cleared %s structure(s)", + "commands.test.coordinates": "%s, %s, %s", + "commands.test.coordinates.copy": "Click to copy to clipboard", + "commands.test.create.success": "Created test setup for test %s", + "commands.test.error.no_test_containing_pos": "Can't find a test instance that contains %s, %s, %s", + "commands.test.error.no_test_instances": "Found no test instances", + "commands.test.error.non_existant_test": "Test %s could not be found", + "commands.test.error.structure_not_found": "Test structure %s could not be found", + "commands.test.error.test_instance_not_found": "Test instance block entity could not be found", + "commands.test.error.test_instance_not_found.position": "Test instance block entity could not be found for test at %s, %s, %s", + "commands.test.error.too_large": "The structure size must be less than %s blocks along each axis", + "commands.test.locate.done": "Finished locating, found %s structure(s)", + "commands.test.locate.found": "Found structure at: %s (distance: %s)", + "commands.test.locate.started": "Started locating test structures, this might take a while...", + "commands.test.no_tests": "No tests to run", + "commands.test.relative_position": "Position relative to %s: %s", + "commands.test.reset.error.no_tests": "Could not find any tests to reset", + "commands.test.reset.success": "Reset %s structure(s)", + "commands.test.run.no_tests": "No tests found", + "commands.test.run.running": "Running %s test(s)...", + "commands.test.summary": "Game Test complete! %s test(s) were run", + "commands.test.summary.all_required_passed": "All required tests passed :)", + "commands.test.summary.failed": "%s required test(s) failed :(", + "commands.test.summary.optional_failed": "%s optional test(s) failed", "commands.tick.query.percentiles": "Percentiles: P50: %sms P95: %sms P99: %sms, sample: %s", "commands.tick.query.rate.running": "Target tick rate: %s per second.\nAverage time per tick: %sms (Target: %sms)", "commands.tick.query.rate.sprinting": "Target tick rate: %s per second (ignored, reference only).\nAverage time per tick: %sms", @@ -2968,7 +3020,7 @@ "controls.resetAll": "Reset Keys", "controls.title": "Controls", "createWorld.customize.buffet.biome": "Please select a biome", - "createWorld.customize.buffet.title": "Buffet world customization", + "createWorld.customize.buffet.title": "Single Biome Customization", "createWorld.customize.flat.height": "Height", "createWorld.customize.flat.layer": "%s", "createWorld.customize.flat.layer.bottom": "Bottom - %s", @@ -2977,7 +3029,7 @@ "createWorld.customize.flat.tile": "Layer Material", "createWorld.customize.flat.title": "Superflat Customization", "createWorld.customize.presets": "Presets", - "createWorld.customize.presets.list": "Alternatively, here's some we made earlier!", + "createWorld.customize.presets.list": "Alternatively, here are some we made earlier!", "createWorld.customize.presets.select": "Use Preset", "createWorld.customize.presets.share": "Want to share your preset with someone? Use the box below!", "createWorld.customize.presets.title": "Select a Preset", @@ -3381,6 +3433,7 @@ "entity.minecraft.killer_bunny": "The Killer Bunny", "entity.minecraft.leash_knot": "Leash Knot", "entity.minecraft.lightning_bolt": "Lightning Bolt", + "entity.minecraft.lingering_potion": "Lingering Potion", "entity.minecraft.llama": "Llama", "entity.minecraft.llama_spit": "Llama Spit", "entity.minecraft.magma_cube": "Magma Cube", @@ -3425,6 +3478,7 @@ "entity.minecraft.spawner_minecart": "Minecart with Monster Spawner", "entity.minecraft.spectral_arrow": "Spectral Arrow", "entity.minecraft.spider": "Spider", + "entity.minecraft.splash_potion": "Splash Potion", "entity.minecraft.spruce_boat": "Spruce Boat", "entity.minecraft.spruce_chest_boat": "Spruce Boat with Chest", "entity.minecraft.squid": "Squid", @@ -3539,9 +3593,11 @@ "gameMode.adventure": "Adventure Mode", "gameMode.changed": "Your game mode has been updated to %s", "gameMode.creative": "Creative Mode", - "gameMode.hardcore": "Hardcore Mode!", + "gameMode.hardcore": "Hardcore Mode", "gameMode.spectator": "Spectator Mode", "gameMode.survival": "Survival Mode", + "gamerule.allowFireTicksAwayFromPlayer": "Tick fire away from players", + "gamerule.allowFireTicksAwayFromPlayer.description": "Controls whether or not fire and lava should be able to tick further than 8 chunks away from any player", "gamerule.announceAdvancements": "Announce advancements", "gamerule.blockExplosionDropDecay": "In block interaction explosions, some blocks won't drop their loot", "gamerule.blockExplosionDropDecay.description": "Some of the drops from blocks destroyed by explosions caused by block interactions are lost in the explosion.", @@ -3625,6 +3681,7 @@ "gamerule.spawnRadius": "Respawn location radius", "gamerule.spawnRadius.description": "Controls the size of the area around the spawn point that players can spawn in.", "gamerule.spectatorsGenerateChunks": "Allow spectators to generate terrain", + "gamerule.tntExplodes": "Allow TNT to be activated and to explode", "gamerule.tntExplosionDropDecay": "In TNT explosions, some blocks won't drop their loot", "gamerule.tntExplosionDropDecay.description": "Some of the drops from blocks destroyed by explosions caused by TNT are lost in the explosion.", "gamerule.universalAnger": "Universal anger", @@ -3899,6 +3956,7 @@ "item.minecraft.blaze_spawn_egg": "Blaze Spawn Egg", "item.minecraft.blue_bundle": "Blue Bundle", "item.minecraft.blue_dye": "Blue Dye", + "item.minecraft.blue_egg": "Blue Egg", "item.minecraft.bogged_spawn_egg": "Bogged Spawn Egg", "item.minecraft.bolt_armor_trim_smithing_template": "Smithing Template", "item.minecraft.bolt_armor_trim_smithing_template.new": "Bolt Armor Trim", @@ -3917,6 +3975,7 @@ "item.minecraft.brick": "Brick", "item.minecraft.brown_bundle": "Brown Bundle", "item.minecraft.brown_dye": "Brown Dye", + "item.minecraft.brown_egg": "Brown Egg", "item.minecraft.brush": "Brush", "item.minecraft.bucket": "Bucket", "item.minecraft.bundle": "Bundle", @@ -3971,6 +4030,8 @@ "item.minecraft.creeper_spawn_egg": "Creeper Spawn Egg", "item.minecraft.crossbow": "Crossbow", "item.minecraft.crossbow.projectile": "Projectile:", + "item.minecraft.crossbow.projectile.multiple": "Projectile: %s x %s", + "item.minecraft.crossbow.projectile.single": "Projectile: %s", "item.minecraft.cyan_bundle": "Cyan Bundle", "item.minecraft.cyan_dye": "Cyan Dye", "item.minecraft.danger_pottery_shard": "Danger Pottery Shard", @@ -4027,6 +4088,8 @@ "item.minecraft.fire_charge": "Fire Charge", "item.minecraft.firework_rocket": "Firework Rocket", "item.minecraft.firework_rocket.flight": "Flight Duration:", + "item.minecraft.firework_rocket.multiple_stars": "%s x %s", + "item.minecraft.firework_rocket.single_star": "%s", "item.minecraft.firework_star": "Firework Star", "item.minecraft.firework_star.black": "Black", "item.minecraft.firework_star.blue": "Blue", @@ -4358,6 +4421,8 @@ "item.minecraft.red_bundle": "Red Bundle", "item.minecraft.red_dye": "Red Dye", "item.minecraft.redstone": "Redstone Dust", + "item.minecraft.resin_brick": "Resin Brick", + "item.minecraft.resin_clump": "Resin Clump", "item.minecraft.rib_armor_trim_smithing_template": "Smithing Template", "item.minecraft.rib_armor_trim_smithing_template.new": "Rib Armor Trim", "item.minecraft.rotten_flesh": "Rotten Flesh", @@ -4561,14 +4626,18 @@ "item.modifiers.any": "When equipped:", "item.modifiers.armor": "When worn:", "item.modifiers.body": "When equipped:", - "item.modifiers.chest": "When on Body:", + "item.modifiers.chest": "When on Chest:", "item.modifiers.feet": "When on Feet:", "item.modifiers.hand": "When held:", "item.modifiers.head": "When on Head:", "item.modifiers.legs": "When on Legs:", "item.modifiers.mainhand": "When in Main Hand:", "item.modifiers.offhand": "When in Off Hand:", + "item.modifiers.saddle": "When saddled:", "item.nbt_tags": "NBT: %s tag(s)", + "item.op_block_warning.line1": "Warning:", + "item.op_block_warning.line2": "Use of this item might lead to command execution", + "item.op_block_warning.line3": "Do not use unless you know the exact contents!", "item.unbreakable": "Unbreakable", "itemGroup.buildingBlocks": "Building Blocks", "itemGroup.coloredBlocks": "Colored Blocks", @@ -4800,15 +4869,15 @@ "mco.backup.generate.world": "Generate world", "mco.backup.info.title": "Changes From Last Backup", "mco.backup.narration": "Backup from %s", - "mco.backup.nobackups": "This realm doesn't have any backups currently.", - "mco.backup.restoring": "Restoring your realm", + "mco.backup.nobackups": "This Realm doesn't have any backups currently.", + "mco.backup.restoring": "Restoring your Realm", "mco.backup.unknown": "UNKNOWN", "mco.brokenworld.download": "Download", "mco.brokenworld.downloaded": "Downloaded", "mco.brokenworld.message.line1": "Please reset or select another world.", "mco.brokenworld.message.line2": "You can also choose to download the world to singleplayer.", "mco.brokenworld.minigame.title": "This minigame is no longer supported", - "mco.brokenworld.nonowner.error": "Please wait for the realm owner to reset the world", + "mco.brokenworld.nonowner.error": "Please wait for the Realm owner to reset the world", "mco.brokenworld.nonowner.title": "World is out of date", "mco.brokenworld.play": "Play", "mco.brokenworld.reset": "Reset", @@ -4847,12 +4916,12 @@ "mco.configure.world.buttons.settings": "Settings", "mco.configure.world.buttons.subscription": "Subscription", "mco.configure.world.buttons.switchminigame": "Switch Minigame", - "mco.configure.world.close.question.line1": "Your realm will become unavailable.", + "mco.configure.world.close.question.line1": "Your Realm will become unavailable.", "mco.configure.world.close.question.line2": "Are you sure you want to continue?", - "mco.configure.world.closing": "Closing the realm...", + "mco.configure.world.closing": "Closing the Realm...", "mco.configure.world.commandBlocks": "Command Blocks", "mco.configure.world.delete.button": "Delete Realm", - "mco.configure.world.delete.question.line1": "Your realm will be permanently deleted", + "mco.configure.world.delete.question.line1": "Your Realm will be permanently deleted", "mco.configure.world.delete.question.line2": "Are you sure you want to continue?", "mco.configure.world.description": "Realm Description", "mco.configure.world.edit.slot.name": "World Name", @@ -4867,20 +4936,20 @@ "mco.configure.world.invites.normal.tooltip": "Normal User", "mco.configure.world.invites.ops.tooltip": "Operator", "mco.configure.world.invites.remove.tooltip": "Remove", - "mco.configure.world.leave.question.line1": "If you leave this realm you won't see it unless you are invited again", + "mco.configure.world.leave.question.line1": "If you leave this Realm you won't see it unless you are invited again", "mco.configure.world.leave.question.line2": "Are you sure you want to continue?", "mco.configure.world.location": "Location", "mco.configure.world.minigame": "Current: %s", "mco.configure.world.name": "Realm Name", - "mco.configure.world.opening": "Opening the realm...", + "mco.configure.world.opening": "Opening the Realm...", "mco.configure.world.players.error": "A player with the provided name does not exist", "mco.configure.world.players.inviting": "Inviting player...", "mco.configure.world.players.title": "Players", "mco.configure.world.pvp": "PVP", "mco.configure.world.reset.question.line1": "Your world will be regenerated and your current world will be lost", "mco.configure.world.reset.question.line2": "Are you sure you want to continue?", - "mco.configure.world.resourcepack.question": "You need a custom resource pack to play on this realm\n\nDo you want to download it and play?", - "mco.configure.world.resourcepack.question.line1": "You need a custom resource pack to play on this realm", + "mco.configure.world.resourcepack.question": "You need a custom resource pack to play on this Realm\n\nDo you want to download it and play?", + "mco.configure.world.resourcepack.question.line1": "You need a custom resource pack to play on this Realm", "mco.configure.world.resourcepack.question.line2": "Do you want to download it and play?", "mco.configure.world.restore.download.question.line1": "The world will be downloaded and added to your single player worlds.", "mco.configure.world.restore.download.question.line2": "Do you want to continue?", @@ -4889,7 +4958,7 @@ "mco.configure.world.settings.title": "Settings", "mco.configure.world.slot": "World %s", "mco.configure.world.slot.empty": "Empty", - "mco.configure.world.slot.switch.question.line1": "Your realm will be switched to another world", + "mco.configure.world.slot.switch.question.line1": "Your Realm will be switched to another world", "mco.configure.world.slot.switch.question.line2": "Are you sure you want to continue?", "mco.configure.world.slot.tooltip": "Switch to world", "mco.configure.world.slot.tooltip.active": "Join", @@ -4925,20 +4994,20 @@ "mco.configure.world.uninvite.question": "Are you sure that you want to uninvite", "mco.configure.worlds.title": "Worlds", "mco.connect.authorizing": "Logging in...", - "mco.connect.connecting": "Connecting to the realm...", - "mco.connect.failed": "Failed to connect to the realm", + "mco.connect.connecting": "Connecting to the Realm...", + "mco.connect.failed": "Failed to connect to the Realm", "mco.connect.success": "Done", "mco.create.world": "Create", "mco.create.world.error": "You must enter a name!", "mco.create.world.failed": "Failed to create world!", "mco.create.world.reset.title": "Creating world...", "mco.create.world.skip": "Skip", - "mco.create.world.subtitle": "Optionally, select what world to put on your new realm", - "mco.create.world.wait": "Creating the realm...", + "mco.create.world.subtitle": "Optionally, select what world to put on your new Realm", + "mco.create.world.wait": "Creating the Realm...", "mco.download.cancelled": "Download cancelled", "mco.download.confirmation.line1": "The world you are going to download is larger than %s", - "mco.download.confirmation.line2": "You won't be able to upload this world to your realm again", - "mco.download.confirmation.oversized": "The world you are going to download is larger than %s\n\nYou won't be able to upload this world to your realm again", + "mco.download.confirmation.line2": "You won't be able to upload this world to your Realm again", + "mco.download.confirmation.oversized": "The world you are going to download is larger than %s\n\nYou won't be able to upload this world to your Realm again", "mco.download.done": "Download done", "mco.download.downloading": "Downloading", "mco.download.extracting": "Extracting", @@ -4984,7 +5053,7 @@ "mco.minigame.world.info.line2": "You can later return to your original world without losing anything.", "mco.minigame.world.noSelection": "Please make a selection", "mco.minigame.world.restore": "Ending Minigame...", - "mco.minigame.world.restore.question.line1": "The minigame will end and your realm will be restored.", + "mco.minigame.world.restore.question.line1": "The minigame will end and your Realm will be restored.", "mco.minigame.world.restore.question.line2": "Are you sure you want to continue?", "mco.minigame.world.selected": "Selected Minigame:", "mco.minigame.world.slot.screen.title": "Switching World...", @@ -5011,16 +5080,16 @@ "mco.reset.world.template": "World Templates", "mco.reset.world.title": "Reset World", "mco.reset.world.upload": "Upload world", - "mco.reset.world.warning": "This will replace the current world of your realm", + "mco.reset.world.warning": "This will replace the current world of your Realm", "mco.selectServer.buy": "Buy a Realm!", "mco.selectServer.close": "Close", - "mco.selectServer.closed": "Closed realm", - "mco.selectServer.closeserver": "Close realm", + "mco.selectServer.closed": "Closed Realm", + "mco.selectServer.closeserver": "Close Realm", "mco.selectServer.configure": "Configure", - "mco.selectServer.configureRealm": "Configure realm", + "mco.selectServer.configureRealm": "Configure Realm", "mco.selectServer.create": "Create Realm", - "mco.selectServer.create.subtitle": "Select what world to put on your new realm", - "mco.selectServer.expired": "Expired realm", + "mco.selectServer.create.subtitle": "Select what world to put on your new Realm", + "mco.selectServer.expired": "Expired Realm", "mco.selectServer.expiredList": "Your subscription has expired", "mco.selectServer.expiredRenew": "Renew", "mco.selectServer.expiredSubscribe": "Subscribe", @@ -5036,13 +5105,13 @@ "mco.selectServer.minigameNotSupportedInVersion": "Can't play this minigame in %s", "mco.selectServer.noRealms": "You don't seem to have a Realm. Add a Realm to play together with your friends.", "mco.selectServer.note": "Note:", - "mco.selectServer.open": "Open realm", - "mco.selectServer.openserver": "Open realm", + "mco.selectServer.open": "Open Realm", + "mco.selectServer.openserver": "Open Realm", "mco.selectServer.play": "Play", "mco.selectServer.popup": "Realms is a safe, simple way to enjoy an online Minecraft world with up to ten friends at a time. It supports loads of minigames and plenty of custom worlds! Only the owner of the realm needs to pay.", "mco.selectServer.purchase": "Add Realm", "mco.selectServer.trial": "Get a Trial!", - "mco.selectServer.uninitialized": "Click to start your new realm!", + "mco.selectServer.uninitialized": "Click to start your new Realm!", "mco.snapshot.createSnapshotPopup.text": "You are about to create a free Snapshot Realm that will be paired with your paid Realms subscription. This new Snapshot Realm will be accessible for as long as the paid subscription is active. Your paid Realm will not be affected.", "mco.snapshot.createSnapshotPopup.title": "Create Snapshot Realm?", "mco.snapshot.creating": "Creating Snapshot Realm...", @@ -5081,11 +5150,11 @@ "mco.time.minutesAgo": "%1$s minute(s) ago", "mco.time.now": "right now", "mco.time.secondsAgo": "%1$s second(s) ago", - "mco.trial.message.line1": "Want to get your own realm?", + "mco.trial.message.line1": "Want to get your own Realm?", "mco.trial.message.line2": "Click here for more info!", "mco.upload.button.name": "Upload", "mco.upload.cancelled": "Upload cancelled", - "mco.upload.close.failure": "Could not close your realm, please try again later", + "mco.upload.close.failure": "Could not close your Realm, please try again later", "mco.upload.done": "Upload done", "mco.upload.entry.cheats": "%1$s, %2$s", "mco.upload.entry.commands": "%1$s, %2$s", @@ -5145,6 +5214,7 @@ "mount.onboard": "Press %1$s to Dismount", "multiplayer.applyingPack": "Applying resource pack", "multiplayer.disconnect.authservers_down": "Authentication servers are down. Please try again later, sorry!", + "multiplayer.disconnect.bad_chat_index": "Detected missed or reordered chat message from server", "multiplayer.disconnect.banned": "You are banned from this server", "multiplayer.disconnect.banned_ip.expiration": "\nYour ban will be removed on %s", "multiplayer.disconnect.banned_ip.reason": "Your IP address is banned from this server.\nReason: %s", @@ -5680,7 +5750,7 @@ "realms.missing.snapshot.error.text": "Realms is currently not supported in snapshots", "recipe.notFound": "Unknown recipe: %s", "recipe.toast.description": "Check your recipe book", - "recipe.toast.title": "New Recipes Unlocked!", + "recipe.toast.title": "New Recipe(s) Unlocked!", "record.nowPlaying": "Now Playing: %s", "recover_world.bug_tracker": "Report a Bug", "recover_world.button": "Attempt to Recover", @@ -5851,6 +5921,27 @@ "sleep.skipping_night": "Sleeping through this night", "slot.only_single_allowed": "Only single slots allowed, got '%s'", "slot.unknown": "Unknown slot '%s'", + "snbt.parser.empty_key": "Key cannot be empty", + "snbt.parser.expected_binary_numeral": "Expected a binary number", + "snbt.parser.expected_decimal_numeral": "Expected a decimal number", + "snbt.parser.expected_float_type": "Expected a floating point number", + "snbt.parser.expected_hex_escape": "Expected a character literal of length %s", + "snbt.parser.expected_hex_numeral": "Expected a hexadecimal number", + "snbt.parser.expected_integer_type": "Expected an integer number", + "snbt.parser.expected_non_negative_number": "Expected a non-negative number", + "snbt.parser.expected_number_or_boolean": "Expected a number or a boolean", + "snbt.parser.expected_string_uuid": "Expected a string representing a valid UUID", + "snbt.parser.expected_unquoted_string": "Expected a valid unquoted string", + "snbt.parser.infinity_not_allowed": "Non-finite numbers are not allowed", + "snbt.parser.invalid_array_element_type": "Invalid array element type", + "snbt.parser.invalid_character_name": "Invalid Unicode character name", + "snbt.parser.invalid_codepoint": "Invalid Unicode character value: %s", + "snbt.parser.invalid_string_contents": "Invalid string contents", + "snbt.parser.invalid_unquoted_start": "Unquoted strings can't start with digits 0-9, + or -", + "snbt.parser.leading_zero_not_allowed": "Decimal numbers can't start with 0", + "snbt.parser.no_such_operation": "No such operation: %s", + "snbt.parser.number_parse_failure": "Failed to parse number: %s", + "snbt.parser.undescore_not_allowed": "Underscore characters are not allowed at the start or end of a number", "soundCategory.ambient": "Ambient/Environment", "soundCategory.block": "Blocks", "soundCategory.hostile": "Hostile Creatures", @@ -5975,10 +6066,10 @@ "structure_block.load_not_found": "Structure '%s' is not available", "structure_block.load_prepare": "Structure '%s' position prepared", "structure_block.load_success": "Structure loaded from '%s'", - "structure_block.mode_info.corner": "Corner Mode - Placement and Size Marker", - "structure_block.mode_info.data": "Data Mode - Game Logic Marker", - "structure_block.mode_info.load": "Load Mode - Load from File", - "structure_block.mode_info.save": "Save Mode - Write to File", + "structure_block.mode_info.corner": "Corner Mode - Placement and size marker", + "structure_block.mode_info.data": "Data Mode - Game logic marker", + "structure_block.mode_info.load": "Load Mode - Load from file", + "structure_block.mode_info.save": "Save Mode - Write to file", "structure_block.mode.corner": "Corner", "structure_block.mode.data": "Data", "structure_block.mode.load": "Load", @@ -5997,8 +6088,10 @@ "structure_block.size.x": "structure size x", "structure_block.size.y": "structure size y", "structure_block.size.z": "structure size z", + "structure_block.strict": "Strict Placement:", "structure_block.structure_name": "Structure Name", "subtitles.ambient.cave": "Eerie noise", + "subtitles.ambient.sound": "Eerie noise", "subtitles.block.amethyst_block.chime": "Amethyst chimes", "subtitles.block.amethyst_block.resonate": "Amethyst resonates", "subtitles.block.anvil.destroy": "Anvil destroyed", @@ -6050,9 +6143,10 @@ "subtitles.block.copper_trapdoor.open": "Trapdoor opens", "subtitles.block.crafter.craft": "Crafter crafts", "subtitles.block.crafter.fail": "Crafter fails crafting", - "subtitles.block.creaking_heart.hurt": "Creaking Heart screams", + "subtitles.block.creaking_heart.hurt": "Creaking Heart grumbles", "subtitles.block.creaking_heart.idle": "Eerie noise", "subtitles.block.creaking_heart.spawn": "Creaking Heart awakens", + "subtitles.block.deadbush.idle": "Dry sounds", "subtitles.block.decorated_pot.insert": "Decorated Pot fills", "subtitles.block.decorated_pot.insert_fail": "Decorated Pot wobbles", "subtitles.block.decorated_pot.shatter": "Decorated Pot shatters", @@ -6062,12 +6156,17 @@ "subtitles.block.enchantment_table.use": "Enchanting Table used", "subtitles.block.end_portal_frame.fill": "Eye of Ender attaches", "subtitles.block.end_portal.spawn": "End Portal opens", + "subtitles.block.eyeblossom.close": "Eyeblossom closes", + "subtitles.block.eyeblossom.idle": "Eyeblossom whispers", + "subtitles.block.eyeblossom.open": "Eyeblossom opens", "subtitles.block.fence_gate.toggle": "Fence Gate creaks", "subtitles.block.fire.ambient": "Fire crackles", "subtitles.block.fire.extinguish": "Fire extinguished", + "subtitles.block.firefly_bush.idle": "Fireflies buzz", "subtitles.block.frogspawn.hatch": "Tadpole hatches", "subtitles.block.furnace.fire_crackle": "Furnace crackles", "subtitles.block.generic.break": "Block broken", + "subtitles.block.generic.fall": "Something falls on a block", "subtitles.block.generic.footsteps": "Footsteps", "subtitles.block.generic.hit": "Block breaking", "subtitles.block.generic.place": "Block placed", @@ -6098,14 +6197,16 @@ "subtitles.block.respawn_anchor.charge": "Respawn Anchor is charged", "subtitles.block.respawn_anchor.deplete": "Respawn Anchor depletes", "subtitles.block.respawn_anchor.set_spawn": "Respawn Anchor sets spawn", + "subtitles.block.sand.idle": "Sandy sounds", + "subtitles.block.sand.wind": "Windy sounds", "subtitles.block.sculk_catalyst.bloom": "Sculk Catalyst blooms", "subtitles.block.sculk_sensor.clicking": "Sculk Sensor clicks", "subtitles.block.sculk_sensor.clicking_stop": "Sculk Sensor stops clicking", "subtitles.block.sculk_shrieker.shriek": "Sculk Shrieker shrieks", "subtitles.block.sculk.charge": "Sculk bubbles", "subtitles.block.sculk.spread": "Sculk spreads", - "subtitles.block.shulker_box.close": "Shulker closes", - "subtitles.block.shulker_box.open": "Shulker opens", + "subtitles.block.shulker_box.close": "Shulker box closes", + "subtitles.block.shulker_box.open": "Shulker box opens", "subtitles.block.sign.waxed_interact_fail": "Sign wobbles", "subtitles.block.smithing_table.use": "Smithing Table used", "subtitles.block.smoker.smoke": "Smoker smokes", @@ -6240,15 +6341,15 @@ "subtitles.entity.cow.death": "Cow dies", "subtitles.entity.cow.hurt": "Cow hurts", "subtitles.entity.cow.milk": "Cow gets milked", - "subtitles.entity.creaking.activate": "Creaking activates", + "subtitles.entity.creaking.activate": "Creaking watches", "subtitles.entity.creaking.ambient": "Creaking creaks", - "subtitles.entity.creaking.angry": "Creaking sees player", "subtitles.entity.creaking.attack": "Creaking attacks", - "subtitles.entity.creaking.deactivate": "Creaking deactivates", - "subtitles.entity.creaking.death": "Creaking dies", + "subtitles.entity.creaking.deactivate": "Creaking calms", + "subtitles.entity.creaking.death": "Creaking crumbles", "subtitles.entity.creaking.freeze": "Creaking stops", - "subtitles.entity.creaking.spawn": "Creaking lives", - "subtitles.entity.creaking.sway": "Creaking is shielded", + "subtitles.entity.creaking.spawn": "Creaking manifests", + "subtitles.entity.creaking.sway": "Creaking is hit", + "subtitles.entity.creaking.twitch": "Creaking twitches", "subtitles.entity.creaking.unfreeze": "Creaking moves", "subtitles.entity.creeper.death": "Creeper dies", "subtitles.entity.creeper.hurt": "Creeper hurts", @@ -6315,6 +6416,7 @@ "subtitles.entity.firework_rocket.blast": "Firework blasts", "subtitles.entity.firework_rocket.launch": "Firework launches", "subtitles.entity.firework_rocket.twinkle": "Firework twinkles", + "subtitles.entity.fish.swim": "Splashes", "subtitles.entity.fishing_bobber.retrieve": "Bobber retrieved", "subtitles.entity.fishing_bobber.splash": "Fishing Bobber splashes", "subtitles.entity.fishing_bobber.throw": "Bobber thrown", @@ -6434,6 +6536,8 @@ "subtitles.entity.magma_cube.death": "Magma Cube dies", "subtitles.entity.magma_cube.hurt": "Magma Cube hurts", "subtitles.entity.magma_cube.squish": "Magma Cube squishes", + "subtitles.entity.minecart.inside": "Minecart jangles", + "subtitles.entity.minecart.inside_underwater": "Minecart jangles underwater", "subtitles.entity.minecart.riding": "Minecart rolls", "subtitles.entity.mooshroom.convert": "Mooshroom transforms", "subtitles.entity.mooshroom.eat": "Mooshroom eats", @@ -6590,6 +6694,7 @@ "subtitles.entity.skeleton_horse.ambient": "Skeleton Horse cries", "subtitles.entity.skeleton_horse.death": "Skeleton Horse dies", "subtitles.entity.skeleton_horse.hurt": "Skeleton Horse hurts", + "subtitles.entity.skeleton_horse.jump_water": "Skeleton Horse jumps", "subtitles.entity.skeleton_horse.swim": "Skeleton Horse swims", "subtitles.entity.skeleton.ambient": "Skeleton rattles", "subtitles.entity.skeleton.converted_to_stray": "Skeleton converts to Stray", @@ -6728,10 +6833,13 @@ "subtitles.entity.wither.shoot": "Wither attacks", "subtitles.entity.wither.spawn": "Wither released", "subtitles.entity.wolf.ambient": "Wolf pants", + "subtitles.entity.wolf.bark": "Wolf barks", "subtitles.entity.wolf.death": "Wolf dies", "subtitles.entity.wolf.growl": "Wolf growls", "subtitles.entity.wolf.hurt": "Wolf hurts", + "subtitles.entity.wolf.pant": "Wolf pants", "subtitles.entity.wolf.shake": "Wolf shakes", + "subtitles.entity.wolf.whine": "Wolf whines", "subtitles.entity.zoglin.ambient": "Zoglin growls", "subtitles.entity.zoglin.angry": "Zoglin growls angrily", "subtitles.entity.zoglin.attack": "Zoglin attacks", @@ -6802,6 +6910,7 @@ "subtitles.item.crossbow.load": "Crossbow loads", "subtitles.item.crossbow.shoot": "Crossbow fires", "subtitles.item.dye.use": "Dye stains", + "subtitles.item.elytra.flying": "Swoosh", "subtitles.item.firecharge.use": "Fireball whooshes", "subtitles.item.flintandsteel.use": "Flint and Steel click", "subtitles.item.glow_ink_sac.use": "Glow Ink Sac splotches", @@ -6906,6 +7015,85 @@ "telemetry.property.user_id.title": "User ID", "telemetry.property.world_load_time_ms.title": "World Load Time (Milliseconds)", "telemetry.property.world_session_id.title": "World Session ID", + "test_block.error.missing": "Test structure missing %s block", + "test_block.error.too_many": "Too many %s blocks", + "test_block.invalid_timeout": "Invalid timeout (%s) - must be a positive number of ticks", + "test_block.message": "Message:", + "test_block.mode_info.accept": "Accept Mode - Accept success for (part of) a test", + "test_block.mode_info.fail": "Fail Mode - Fail the test", + "test_block.mode_info.log": "Log Mode - Log a message", + "test_block.mode_info.start": "Start Mode - The starting point for a test", + "test_block.mode.accept": "Accept", + "test_block.mode.fail": "Fail", + "test_block.mode.log": "Log", + "test_block.mode.start": "Start", + "test_instance_block.entities": "Entities:", + "test_instance_block.error.no_test": "Unable to run test instance at %s, %s, %s since it has an undefined test", + "test_instance_block.error.no_test_structure": "Unable to run test instance at %s, %s, %s since it has no test structure", + "test_instance_block.error.unable_to_save": "Unable to save test structure template for test instance at %s, %s, %s", + "test_instance_block.invalid": "[invalid]", + "test_instance_block.reset_success": "Reset succeeded for test: %s", + "test_instance_block.rotation": "Rotation:", + "test_instance_block.size": "Test Structure Size", + "test_instance_block.starting": "Starting test %s", + "test_instance_block.test_id": "Test Instance ID", + "test_instance.action.reset": "Reset and Load", + "test_instance.action.run": "Load and Run", + "test_instance.action.save": "Save Structure", + "test_instance.description.batch": "Batch: %s", + "test_instance.description.failed": "Failed: %s", + "test_instance.description.function": "Function: %s", + "test_instance.description.invalid_id": "Invalid test ID", + "test_instance.description.no_test": "No such test", + "test_instance.description.structure": "Structure: %s", + "test_instance.description.type": "Type: %s", + "test_instance.type.block_based": "Block-Based Test", + "test_instance.type.function": "Built-in Function Test", + "test.error.block_property_mismatch": "Expected property %s to be %s, was %s", + "test.error.block_property_missing": "Block property missing, expected property %s to be %s", + "test.error.entity_property": "Entity %s failed test: %s", + "test.error.entity_property_details": "Entity %s failed test: %s, expected: %s, was: %s", + "test.error.expected_block": "Expected block %s, got %s", + "test.error.expected_block_tag": "Expected block in #%s, got %s", + "test.error.expected_container_contents": "Container should contain: %s", + "test.error.expected_container_contents_single": "Container should contain a single: %s", + "test.error.expected_empty_container": "Container should be empty", + "test.error.expected_entity": "Expected %s", + "test.error.expected_entity_around": "Expected %s to exist around %s, %s, %s", + "test.error.expected_entity_count": "Expected %s entities of type %s, found %s", + "test.error.expected_entity_data": "Expected entity data to be: %s, was: %s", + "test.error.expected_entity_data_predicate": "Entity data mismatch for %s", + "test.error.expected_entity_effect": "Expected %s to have effect %s %s", + "test.error.expected_entity_having": "Entity inventory should contain %s", + "test.error.expected_entity_holding": "Entity should be holding %s", + "test.error.expected_entity_in_test": "Expected %s to exist in test", + "test.error.expected_entity_not_touching": "Did not expect %s touching %s, %s, %s (relative: %s, %s, %s)", + "test.error.expected_entity_touching": "Expected %s touching %s, %s, %s (relative: %s, %s, %s)", + "test.error.expected_item": "Expected item of type %s", + "test.error.expected_items_count": "Expected %s items of type %s, found %s", + "test.error.fail": "Fail conditions met", + "test.error.invalid_block_type": "Unexpected block type found: %s", + "test.error.missing_block_entity": "Missing block entity", + "test.error.position": "%s at %s, %s, %s (relative: %s, %s, %s) on tick %s", + "test.error.sequence.condition_already_triggered": "Condition already triggered at %s", + "test.error.sequence.condition_not_triggered": "Condition not triggered", + "test.error.sequence.invalid_tick": "Succeeded in invalid tick: expected %s", + "test.error.sequence.not_completed": "Test timed out before sequence completed", + "test.error.set_biome": "Failed to set biome for test", + "test.error.spawn_failure": "Failed to create entity %s", + "test.error.state_not_equal": "Incorrect state. Expected %s, was %s", + "test.error.structure.failure": "Failed to place test structure for %s", + "test.error.tick": "%s on tick %s", + "test.error.ticking_without_structure": "Ticking test before placing structure", + "test.error.timeout.no_result": "Didn't succeed or fail within %s ticks", + "test.error.timeout.no_sequences_finished": "No sequences finished within %s ticks", + "test.error.too_many_entities": "Expected only one %s to exist around %s, %s, %s but found %s", + "test.error.unexpected_block": "Did not expect block to be %s", + "test.error.unexpected_entity": "Did not expect %s to exist", + "test.error.unexpected_item": "Did not expect item of type %s", + "test.error.unknown": "Unknown internal error: %s", + "test.error.value_not_equal": "Expected %s to be %s, was %s", + "test.error.wrong_block_entity": "Wrong block entity type: %s", "title.32bit.deprecation": "32-bit system detected: this may prevent you from playing in the future as a 64-bit system will be required!", "title.32bit.deprecation.realms": "Minecraft will soon require a 64-bit system, which will prevent you from playing or using Realms on this device. You will need to manually cancel any Realms subscription.", "title.32bit.deprecation.realms.check": "Do not show this screen again", @@ -6936,6 +7124,7 @@ "trim_material.minecraft.netherite": "Netherite Material", "trim_material.minecraft.quartz": "Quartz Material", "trim_material.minecraft.redstone": "Redstone Material", + "trim_material.minecraft.resin": "Resin Material", "trim_pattern.minecraft.bolt": "Bolt Armor Trim", "trim_pattern.minecraft.coast": "Coast Armor Trim", "trim_pattern.minecraft.dune": "Dune Armor Trim", diff --git a/assets/minecraft/models/block/air.json b/assets/minecraft/models/block/air.json index 2c63c085..e7062e63 100644 --- a/assets/minecraft/models/block/air.json +++ b/assets/minecraft/models/block/air.json @@ -1,2 +1,5 @@ { + "textures": { + "particle": "minecraft:missingno" + } } diff --git a/assets/minecraft/models/block/bush.json b/assets/minecraft/models/block/bush.json new file mode 100644 index 00000000..e58ffca2 --- /dev/null +++ b/assets/minecraft/models/block/bush.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/tinted_cross", + "textures": { + "cross": "minecraft:block/bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/cactus_flower.json b/assets/minecraft/models/block/cactus_flower.json new file mode 100644 index 00000000..541d458c --- /dev/null +++ b/assets/minecraft/models/block/cactus_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "minecraft:block/cactus_flower" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/chiseled_resin_bricks.json b/assets/minecraft/models/block/chiseled_resin_bricks.json new file mode 100644 index 00000000..16b8f9af --- /dev/null +++ b/assets/minecraft/models/block/chiseled_resin_bricks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/chiseled_resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/closed_eyeblossom.json b/assets/minecraft/models/block/closed_eyeblossom.json new file mode 100644 index 00000000..a99d9a51 --- /dev/null +++ b/assets/minecraft/models/block/closed_eyeblossom.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "minecraft:block/closed_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_active.json b/assets/minecraft/models/block/creaking_heart_active.json deleted file mode 100644 index cd2b0498..00000000 --- a/assets/minecraft/models/block/creaking_heart_active.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:block/cube_column", - "textures": { - "end": "minecraft:block/creaking_heart_top_active", - "side": "minecraft:block/creaking_heart_active" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_active_horizontal.json b/assets/minecraft/models/block/creaking_heart_active_horizontal.json deleted file mode 100644 index c3601332..00000000 --- a/assets/minecraft/models/block/creaking_heart_active_horizontal.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:block/cube_column_horizontal", - "textures": { - "end": "minecraft:block/creaking_heart_top_active", - "side": "minecraft:block/creaking_heart_active" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_awake.json b/assets/minecraft/models/block/creaking_heart_awake.json new file mode 100644 index 00000000..75db0a2f --- /dev/null +++ b/assets/minecraft/models/block/creaking_heart_awake.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "minecraft:block/creaking_heart_top_awake", + "side": "minecraft:block/creaking_heart_awake" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_awake_horizontal.json b/assets/minecraft/models/block/creaking_heart_awake_horizontal.json new file mode 100644 index 00000000..b4e45301 --- /dev/null +++ b/assets/minecraft/models/block/creaking_heart_awake_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "minecraft:block/creaking_heart_top_awake", + "side": "minecraft:block/creaking_heart_awake" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_dormant.json b/assets/minecraft/models/block/creaking_heart_dormant.json new file mode 100644 index 00000000..6ae07d24 --- /dev/null +++ b/assets/minecraft/models/block/creaking_heart_dormant.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "minecraft:block/creaking_heart_top_dormant", + "side": "minecraft:block/creaking_heart_dormant" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/creaking_heart_dormant_horizontal.json b/assets/minecraft/models/block/creaking_heart_dormant_horizontal.json new file mode 100644 index 00000000..acb48037 --- /dev/null +++ b/assets/minecraft/models/block/creaking_heart_dormant_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "minecraft:block/creaking_heart_top_dormant", + "side": "minecraft:block/creaking_heart_dormant" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/cross_emissive.json b/assets/minecraft/models/block/cross_emissive.json new file mode 100644 index 00000000..d8fe3490 --- /dev/null +++ b/assets/minecraft/models/block/cross_emissive.json @@ -0,0 +1,46 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#cross" + }, + "elements": [ + { "from": [ 0.8, 0, 8 ], + "to": [ 15.2, 16, 8 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" } + } + }, + { "from": [ 8, 0, 0.8 ], + "to": [ 8, 16, 15.2 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross" } + } + }, + { "from": [ 0.8, 0, 8 ], + "to": [ 15.2, 16, 8 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "light_emission": 15, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" } + } + }, + { "from": [ 8, 0, 0.8 ], + "to": [ 8, 16, 15.2 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "light_emission": 15, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" } + } + } + ] +} diff --git a/assets/minecraft/models/block/custom_fence_inventory.json b/assets/minecraft/models/block/custom_fence_inventory.json index 7baa4a1e..8de00b6d 100644 --- a/assets/minecraft/models/block/custom_fence_inventory.json +++ b/assets/minecraft/models/block/custom_fence_inventory.json @@ -12,6 +12,9 @@ "scale":[ 0.5, 0.5, 0.5 ] } }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [ 6, 0, 0 ], "to": [ 10, 16, 4 ], diff --git a/assets/minecraft/models/block/custom_fence_side_east.json b/assets/minecraft/models/block/custom_fence_side_east.json index 1177bf20..9a4bc2de 100644 --- a/assets/minecraft/models/block/custom_fence_side_east.json +++ b/assets/minecraft/models/block/custom_fence_side_east.json @@ -1,4 +1,7 @@ { + "textures": { + "particle": "#texture" + }, "elements": [ { "name": "top bar", diff --git a/assets/minecraft/models/block/custom_fence_side_north.json b/assets/minecraft/models/block/custom_fence_side_north.json index d96583ef..a99e1820 100644 --- a/assets/minecraft/models/block/custom_fence_side_north.json +++ b/assets/minecraft/models/block/custom_fence_side_north.json @@ -1,4 +1,7 @@ { + "textures": { + "particle": "#texture" + }, "elements": [ { "name": "top bar", diff --git a/assets/minecraft/models/block/custom_fence_side_south.json b/assets/minecraft/models/block/custom_fence_side_south.json index 9186ac0a..9c7c4669 100644 --- a/assets/minecraft/models/block/custom_fence_side_south.json +++ b/assets/minecraft/models/block/custom_fence_side_south.json @@ -1,4 +1,7 @@ { + "textures": { + "particle": "#texture" + }, "elements": [ { "name": "top bar", diff --git a/assets/minecraft/models/block/custom_fence_side_west.json b/assets/minecraft/models/block/custom_fence_side_west.json index 9c33406c..8bca73fe 100644 --- a/assets/minecraft/models/block/custom_fence_side_west.json +++ b/assets/minecraft/models/block/custom_fence_side_west.json @@ -1,4 +1,7 @@ { + "textures": { + "particle": "#texture" + }, "elements": [ { "name": "top bar", diff --git a/assets/minecraft/models/block/end_gateway.json b/assets/minecraft/models/block/end_gateway.json new file mode 100644 index 00000000..ae6b33b2 --- /dev/null +++ b/assets/minecraft/models/block/end_gateway.json @@ -0,0 +1,5 @@ +{ + "textures": { + "particle": "minecraft:block/obsidian" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/firefly_bush.json b/assets/minecraft/models/block/firefly_bush.json new file mode 100644 index 00000000..668f253c --- /dev/null +++ b/assets/minecraft/models/block/firefly_bush.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cross_emissive", + "textures": { + "cross": "minecraft:block/firefly_bush", + "cross_emissive": "minecraft:block/firefly_bush_emissive" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/flower_pot_cross_emissive.json b/assets/minecraft/models/block/flower_pot_cross_emissive.json new file mode 100644 index 00000000..e8fd2d53 --- /dev/null +++ b/assets/minecraft/models/block/flower_pot_cross_emissive.json @@ -0,0 +1,95 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "block/flower_pot", + "flowerpot": "block/flower_pot", + "dirt": "block/dirt" + }, + "elements": [ + { "from": [ 5, 0, 5 ], + "to": [ 6, 6, 11 ], + "faces": { + "down": { "uv": [ 5, 5, 6, 11 ], "texture": "#flowerpot", "cullface": "down" }, + "up": { "uv": [ 5, 5, 6, 11 ], "texture": "#flowerpot" }, + "north": { "uv": [ 10, 10, 11, 16 ], "texture": "#flowerpot" }, + "south": { "uv": [ 5, 10, 6, 16 ], "texture": "#flowerpot" }, + "west": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" }, + "east": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" } + } + }, + { "from": [ 10, 0, 5 ], + "to": [ 11, 6, 11 ], + "faces": { + "down": { "uv": [ 10, 5, 11, 11 ], "texture": "#flowerpot", "cullface": "down" }, + "up": { "uv": [ 10, 5, 11, 11 ], "texture": "#flowerpot" }, + "north": { "uv": [ 5, 10, 6, 16 ], "texture": "#flowerpot" }, + "south": { "uv": [ 10, 10, 11, 16 ], "texture": "#flowerpot" }, + "west": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" }, + "east": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" } + } + }, + { "from": [ 6, 0, 5 ], + "to": [ 10, 6, 6 ], + "faces": { + "down": { "uv": [ 6, 10, 10, 11 ], "texture": "#flowerpot", "cullface": "down" }, + "up": { "uv": [ 6, 5, 10, 6 ], "texture": "#flowerpot" }, + "north": { "uv": [ 6, 10, 10, 16 ], "texture": "#flowerpot" }, + "south": { "uv": [ 6, 10, 10, 16 ], "texture": "#flowerpot" } + } + }, + { "from": [ 6, 0, 10 ], + "to": [ 10, 6, 11 ], + "faces": { + "down": { "uv": [ 6, 5, 10, 6 ], "texture": "#flowerpot", "cullface": "down" }, + "up": { "uv": [ 6, 10, 10, 11 ], "texture": "#flowerpot" }, + "north": { "uv": [ 6, 10, 10, 16 ], "texture": "#flowerpot" }, + "south": { "uv": [ 6, 10, 10, 16 ], "texture": "#flowerpot" } + } + }, + { "from": [ 6, 0, 6 ], + "to": [ 10, 4, 10 ], + "faces": { + "down": { "uv": [ 6, 12, 10, 16 ], "texture": "#flowerpot", "cullface": "down" }, + "up": { "uv": [ 6, 6, 10, 10 ], "texture": "#dirt" } + } + }, + { "from": [ 2.6, 4, 8 ], + "to": [ 13.4, 16, 8 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" } + } + }, + { "from": [ 8, 4, 2.6 ], + "to": [ 8, 16, 13.4 ], + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" } + } + }, + { "from": [ 2.6, 4, 8 ], + "to": [ 13.4, 16, 8 ], + "light_emission": 15, + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" } + } + }, + { "from": [ 8, 4, 2.6 ], + "to": [ 8, 16, 13.4 ], + "light_emission": 15, + "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true }, + "shade": false, + "faces": { + "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" }, + "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#cross_emissive" } + } + } + ] +} diff --git a/assets/minecraft/models/block/leaf_litter_1.json b/assets/minecraft/models/block/leaf_litter_1.json new file mode 100644 index 00000000..cf22052c --- /dev/null +++ b/assets/minecraft/models/block/leaf_litter_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_leaf_litter_1", + "textures": { + "texture": "minecraft:block/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/leaf_litter_2.json b/assets/minecraft/models/block/leaf_litter_2.json new file mode 100644 index 00000000..17325008 --- /dev/null +++ b/assets/minecraft/models/block/leaf_litter_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_leaf_litter_2", + "textures": { + "texture": "minecraft:block/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/leaf_litter_3.json b/assets/minecraft/models/block/leaf_litter_3.json new file mode 100644 index 00000000..26644529 --- /dev/null +++ b/assets/minecraft/models/block/leaf_litter_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_leaf_litter_3", + "textures": { + "texture": "minecraft:block/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/leaf_litter_4.json b/assets/minecraft/models/block/leaf_litter_4.json new file mode 100644 index 00000000..0e565f75 --- /dev/null +++ b/assets/minecraft/models/block/leaf_litter_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_leaf_litter_4", + "textures": { + "texture": "minecraft:block/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/open_eyeblossom.json b/assets/minecraft/models/block/open_eyeblossom.json new file mode 100644 index 00000000..1d2194bb --- /dev/null +++ b/assets/minecraft/models/block/open_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cross_emissive", + "textures": { + "cross": "minecraft:block/open_eyeblossom", + "cross_emissive": "minecraft:block/open_eyeblossom_emissive" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/potted_closed_eyeblossom.json b/assets/minecraft/models/block/potted_closed_eyeblossom.json new file mode 100644 index 00000000..12f3acbe --- /dev/null +++ b/assets/minecraft/models/block/potted_closed_eyeblossom.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/flower_pot_cross", + "textures": { + "plant": "minecraft:block/closed_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/potted_open_eyeblossom.json b/assets/minecraft/models/block/potted_open_eyeblossom.json new file mode 100644 index 00000000..adcdc0e4 --- /dev/null +++ b/assets/minecraft/models/block/potted_open_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/flower_pot_cross_emissive", + "textures": { + "cross_emissive": "minecraft:block/open_eyeblossom_emissive", + "plant": "minecraft:block/open_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_block.json b/assets/minecraft/models/block/resin_block.json new file mode 100644 index 00000000..00105c85 --- /dev/null +++ b/assets/minecraft/models/block/resin_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/resin_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_slab.json b/assets/minecraft/models/block/resin_brick_slab.json new file mode 100644 index 00000000..2bfd9fd3 --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_slab.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/slab", + "textures": { + "bottom": "minecraft:block/resin_bricks", + "side": "minecraft:block/resin_bricks", + "top": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_slab_top.json b/assets/minecraft/models/block/resin_brick_slab_top.json new file mode 100644 index 00000000..4e4c9f7f --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_slab_top.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/slab_top", + "textures": { + "bottom": "minecraft:block/resin_bricks", + "side": "minecraft:block/resin_bricks", + "top": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_stairs.json b/assets/minecraft/models/block/resin_brick_stairs.json new file mode 100644 index 00000000..bd7641da --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_stairs.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/stairs", + "textures": { + "bottom": "minecraft:block/resin_bricks", + "side": "minecraft:block/resin_bricks", + "top": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_stairs_inner.json b/assets/minecraft/models/block/resin_brick_stairs_inner.json new file mode 100644 index 00000000..c047a26e --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_stairs_inner.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/inner_stairs", + "textures": { + "bottom": "minecraft:block/resin_bricks", + "side": "minecraft:block/resin_bricks", + "top": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_stairs_outer.json b/assets/minecraft/models/block/resin_brick_stairs_outer.json new file mode 100644 index 00000000..224ab606 --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_stairs_outer.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/outer_stairs", + "textures": { + "bottom": "minecraft:block/resin_bricks", + "side": "minecraft:block/resin_bricks", + "top": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_wall_inventory.json b/assets/minecraft/models/block/resin_brick_wall_inventory.json new file mode 100644 index 00000000..3df22e2a --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_wall_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_wall_post.json b/assets/minecraft/models/block/resin_brick_wall_post.json new file mode 100644 index 00000000..6279361f --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_post", + "textures": { + "wall": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_wall_side.json b/assets/minecraft/models/block/resin_brick_wall_side.json new file mode 100644 index 00000000..60f1aa1d --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side", + "textures": { + "wall": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_brick_wall_side_tall.json b/assets/minecraft/models/block/resin_brick_wall_side_tall.json new file mode 100644 index 00000000..d72cfbaf --- /dev/null +++ b/assets/minecraft/models/block/resin_brick_wall_side_tall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_wall_side_tall", + "textures": { + "wall": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_bricks.json b/assets/minecraft/models/block/resin_bricks.json new file mode 100644 index 00000000..60373f8e --- /dev/null +++ b/assets/minecraft/models/block/resin_bricks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/resin_bricks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/resin_clump.json b/assets/minecraft/models/block/resin_clump.json new file mode 100644 index 00000000..5f2f603d --- /dev/null +++ b/assets/minecraft/models/block/resin_clump.json @@ -0,0 +1,16 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "block/resin_clump", + "texture": "block/resin_clump" + }, + "elements": [ + { "from": [ 0, 0, 0.1 ], + "to": [ 16, 16, 0.1 ], + "faces": { + "north": { "uv": [ 16, 0, 0, 16 ], "texture": "#texture" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } + } + } + ] +} diff --git a/assets/minecraft/models/block/sculk_vein.json b/assets/minecraft/models/block/sculk_vein.json index 03f39419..808c3ca9 100644 --- a/assets/minecraft/models/block/sculk_vein.json +++ b/assets/minecraft/models/block/sculk_vein.json @@ -8,7 +8,7 @@ { "from": [ 0, 0, 0.1 ], "to": [ 16, 16, 0.1 ], "faces": { - "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#sculk_vein" }, + "north": { "uv": [ 16, 0, 0, 16 ], "texture": "#sculk_vein" }, "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#sculk_vein" } } } diff --git a/assets/minecraft/models/block/short_dry_grass.json b/assets/minecraft/models/block/short_dry_grass.json new file mode 100644 index 00000000..062a1f33 --- /dev/null +++ b/assets/minecraft/models/block/short_dry_grass.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "minecraft:block/short_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/tall_dry_grass.json b/assets/minecraft/models/block/tall_dry_grass.json new file mode 100644 index 00000000..eeefccac --- /dev/null +++ b/assets/minecraft/models/block/tall_dry_grass.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "minecraft:block/tall_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_left.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_left.json index ee8a35b9..f224a1e8 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_left.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_left.json @@ -1,6 +1,6 @@ { "textures": { - "texture": "#texture" + "particle": "#texture" }, "elements": [ { diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_mid.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_mid.json index f29dadfc..a1c54d92 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_mid.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_mid.json @@ -1,7 +1,7 @@ { - "textures": { - "texture": "#texture" - }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [5, 0, 0], diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_right.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_right.json index c4ccaaff..5acdabdf 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_right.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_bottom_right.json @@ -1,7 +1,7 @@ { - "textures": { - "texture": "#texture" - }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [0, 0, 0], diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_left.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_left.json index 77dcb59a..da9fc591 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_left.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_left.json @@ -1,7 +1,7 @@ { - "textures": { - "texture": "#texture" - }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [10, 8, 0], diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_mid.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_mid.json index 736bf09c..25cc8308 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_mid.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_mid.json @@ -1,7 +1,7 @@ { - "textures": { - "texture": "#texture" - }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [5, 8, 0], diff --git a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_right.json b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_right.json index 072a1eef..077f1276 100644 --- a/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_right.json +++ b/assets/minecraft/models/block/template_chiseled_bookshelf_slot_top_right.json @@ -1,7 +1,7 @@ { - "textures": { - "texture": "#texture" - }, + "textures": { + "particle": "#texture" + }, "elements": [ { "from": [0, 8, 0], diff --git a/assets/minecraft/models/block/template_leaf_litter_1.json b/assets/minecraft/models/block/template_leaf_litter_1.json new file mode 100644 index 00000000..355e715e --- /dev/null +++ b/assets/minecraft/models/block/template_leaf_litter_1.json @@ -0,0 +1,16 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "from": [0, 0.25, 0], + "to": [8, 0.25, 8], + "faces": { + "up": {"uv": [0, 0, 8, 8], "texture": "#texture", "tintindex": 0}, + "down": {"uv": [0, 8, 8, 0], "texture": "#texture", "tintindex": 0} + } + } + ] +} diff --git a/assets/minecraft/models/block/template_leaf_litter_2.json b/assets/minecraft/models/block/template_leaf_litter_2.json new file mode 100644 index 00000000..06589413 --- /dev/null +++ b/assets/minecraft/models/block/template_leaf_litter_2.json @@ -0,0 +1,16 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "from": [0, 0.25, 0], + "to": [8, 0.25, 16], + "faces": { + "up": {"uv": [0, 0, 8, 16], "texture": "#texture", "tintindex": 0}, + "down": {"uv": [0, 16, 8, 0], "texture": "#texture", "tintindex": 0} + } + } + ] +} diff --git a/assets/minecraft/models/block/template_leaf_litter_3.json b/assets/minecraft/models/block/template_leaf_litter_3.json new file mode 100644 index 00000000..bcd97e3a --- /dev/null +++ b/assets/minecraft/models/block/template_leaf_litter_3.json @@ -0,0 +1,16 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "from": [8, 0.25, 8], + "to": [16, 0.25, 16], + "faces": { + "up": {"uv": [8, 8, 16, 16], "texture": "#texture", "tintindex": 0}, + "down": {"uv": [8, 16, 16, 8], "texture": "#texture", "tintindex": 0} + } + } + ] +} diff --git a/assets/minecraft/models/block/template_leaf_litter_4.json b/assets/minecraft/models/block/template_leaf_litter_4.json new file mode 100644 index 00000000..f8d9d434 --- /dev/null +++ b/assets/minecraft/models/block/template_leaf_litter_4.json @@ -0,0 +1,16 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "#texture" + }, + "elements": [ + { + "from": [0, 0.25, 0], + "to": [16, 0.25, 16], + "faces": { + "up": {"uv": [0, 0, 16, 16], "texture": "#texture", "tintindex": 0}, + "down": {"uv": [0, 16, 16, 0], "texture": "#texture", "tintindex": 0} + } + } + ] +} diff --git a/assets/minecraft/models/block/test_block_accept.json b/assets/minecraft/models/block/test_block_accept.json new file mode 100644 index 00000000..e9bf9b1c --- /dev/null +++ b/assets/minecraft/models/block/test_block_accept.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/test_block_accept" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/test_block_fail.json b/assets/minecraft/models/block/test_block_fail.json new file mode 100644 index 00000000..04fd1773 --- /dev/null +++ b/assets/minecraft/models/block/test_block_fail.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/test_block_fail" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/test_block_log.json b/assets/minecraft/models/block/test_block_log.json new file mode 100644 index 00000000..9799e8df --- /dev/null +++ b/assets/minecraft/models/block/test_block_log.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/test_block_log" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/test_block_start.json b/assets/minecraft/models/block/test_block_start.json new file mode 100644 index 00000000..387827a4 --- /dev/null +++ b/assets/minecraft/models/block/test_block_start.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/test_block_start" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/test_instance_block.json b/assets/minecraft/models/block/test_instance_block.json new file mode 100644 index 00000000..dae43c63 --- /dev/null +++ b/assets/minecraft/models/block/test_instance_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "minecraft:block/test_instance_block" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/trapped_chest.json b/assets/minecraft/models/block/trapped_chest.json new file mode 100644 index 00000000..9406a849 --- /dev/null +++ b/assets/minecraft/models/block/trapped_chest.json @@ -0,0 +1,5 @@ +{ + "textures": { + "particle": "minecraft:block/oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/wildflowers_1.json b/assets/minecraft/models/block/wildflowers_1.json new file mode 100644 index 00000000..d6ec7f17 --- /dev/null +++ b/assets/minecraft/models/block/wildflowers_1.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/flowerbed_1", + "textures": { + "flowerbed": "minecraft:block/wildflowers", + "stem": "minecraft:block/wildflowers_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/wildflowers_2.json b/assets/minecraft/models/block/wildflowers_2.json new file mode 100644 index 00000000..7bb30b8b --- /dev/null +++ b/assets/minecraft/models/block/wildflowers_2.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/flowerbed_2", + "textures": { + "flowerbed": "minecraft:block/wildflowers", + "stem": "minecraft:block/wildflowers_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/wildflowers_3.json b/assets/minecraft/models/block/wildflowers_3.json new file mode 100644 index 00000000..e2e004f5 --- /dev/null +++ b/assets/minecraft/models/block/wildflowers_3.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/flowerbed_3", + "textures": { + "flowerbed": "minecraft:block/wildflowers", + "stem": "minecraft:block/wildflowers_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/block/wildflowers_4.json b/assets/minecraft/models/block/wildflowers_4.json new file mode 100644 index 00000000..ee50217b --- /dev/null +++ b/assets/minecraft/models/block/wildflowers_4.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/flowerbed_4", + "textures": { + "flowerbed": "minecraft:block/wildflowers", + "stem": "minecraft:block/wildflowers_stem" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_button.json b/assets/minecraft/models/item/acacia_button.json deleted file mode 100644 index d5affffa..00000000 --- a/assets/minecraft/models/item/acacia_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_fence.json b/assets/minecraft/models/item/acacia_fence.json deleted file mode 100644 index 4db3c891..00000000 --- a/assets/minecraft/models/item/acacia_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_fence_gate.json b/assets/minecraft/models/item/acacia_fence_gate.json deleted file mode 100644 index f5875533..00000000 --- a/assets/minecraft/models/item/acacia_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_leaves.json b/assets/minecraft/models/item/acacia_leaves.json deleted file mode 100644 index b1ef8fa9..00000000 --- a/assets/minecraft/models/item/acacia_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_log.json b/assets/minecraft/models/item/acacia_log.json deleted file mode 100644 index 0b9f607e..00000000 --- a/assets/minecraft/models/item/acacia_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_planks.json b/assets/minecraft/models/item/acacia_planks.json deleted file mode 100644 index 3c90abef..00000000 --- a/assets/minecraft/models/item/acacia_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_pressure_plate.json b/assets/minecraft/models/item/acacia_pressure_plate.json deleted file mode 100644 index 318e49ad..00000000 --- a/assets/minecraft/models/item/acacia_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_slab.json b/assets/minecraft/models/item/acacia_slab.json deleted file mode 100644 index bb3480c7..00000000 --- a/assets/minecraft/models/item/acacia_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_stairs.json b/assets/minecraft/models/item/acacia_stairs.json deleted file mode 100644 index 58ab5e2d..00000000 --- a/assets/minecraft/models/item/acacia_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_trapdoor.json b/assets/minecraft/models/item/acacia_trapdoor.json deleted file mode 100644 index 701a6862..00000000 --- a/assets/minecraft/models/item/acacia_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/acacia_wood.json b/assets/minecraft/models/item/acacia_wood.json deleted file mode 100644 index 4a5086de..00000000 --- a/assets/minecraft/models/item/acacia_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/acacia_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/air.json b/assets/minecraft/models/item/air.json index 2c63c085..e7062e63 100644 --- a/assets/minecraft/models/item/air.json +++ b/assets/minecraft/models/item/air.json @@ -1,2 +1,5 @@ { + "textures": { + "particle": "minecraft:missingno" + } } diff --git a/assets/minecraft/models/item/allay_spawn_egg.json b/assets/minecraft/models/item/allay_spawn_egg.json index d1aaa9d6..b7365fef 100644 --- a/assets/minecraft/models/item/allay_spawn_egg.json +++ b/assets/minecraft/models/item/allay_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/allay_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/amethyst_block.json b/assets/minecraft/models/item/amethyst_block.json deleted file mode 100644 index b4899515..00000000 --- a/assets/minecraft/models/item/amethyst_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/amethyst_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/ancient_debris.json b/assets/minecraft/models/item/ancient_debris.json deleted file mode 100644 index f8c6c3d5..00000000 --- a/assets/minecraft/models/item/ancient_debris.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/ancient_debris" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/andesite.json b/assets/minecraft/models/item/andesite.json deleted file mode 100644 index d6b76e17..00000000 --- a/assets/minecraft/models/item/andesite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/andesite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/andesite_slab.json b/assets/minecraft/models/item/andesite_slab.json deleted file mode 100644 index 4bd78770..00000000 --- a/assets/minecraft/models/item/andesite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/andesite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/andesite_stairs.json b/assets/minecraft/models/item/andesite_stairs.json deleted file mode 100644 index 03e452df..00000000 --- a/assets/minecraft/models/item/andesite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/andesite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/andesite_wall.json b/assets/minecraft/models/item/andesite_wall.json deleted file mode 100644 index f10f1ec3..00000000 --- a/assets/minecraft/models/item/andesite_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/andesite_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/anvil.json b/assets/minecraft/models/item/anvil.json deleted file mode 100644 index 9168b26b..00000000 --- a/assets/minecraft/models/item/anvil.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/anvil" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/armadillo_spawn_egg.json b/assets/minecraft/models/item/armadillo_spawn_egg.json index d1aaa9d6..73c5e691 100644 --- a/assets/minecraft/models/item/armadillo_spawn_egg.json +++ b/assets/minecraft/models/item/armadillo_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/armadillo_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/axolotl_spawn_egg.json b/assets/minecraft/models/item/axolotl_spawn_egg.json index d1aaa9d6..90a12422 100644 --- a/assets/minecraft/models/item/axolotl_spawn_egg.json +++ b/assets/minecraft/models/item/axolotl_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/axolotl_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/azalea.json b/assets/minecraft/models/item/azalea.json deleted file mode 100644 index 062330c7..00000000 --- a/assets/minecraft/models/item/azalea.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/azalea" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/azalea_leaves.json b/assets/minecraft/models/item/azalea_leaves.json deleted file mode 100644 index 6b26318b..00000000 --- a/assets/minecraft/models/item/azalea_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/azalea_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_block.json b/assets/minecraft/models/item/bamboo_block.json deleted file mode 100644 index f75fac0f..00000000 --- a/assets/minecraft/models/item/bamboo_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_button.json b/assets/minecraft/models/item/bamboo_button.json deleted file mode 100644 index c1152b50..00000000 --- a/assets/minecraft/models/item/bamboo_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_fence.json b/assets/minecraft/models/item/bamboo_fence.json deleted file mode 100644 index 2b11ca8c..00000000 --- a/assets/minecraft/models/item/bamboo_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_fence_gate.json b/assets/minecraft/models/item/bamboo_fence_gate.json deleted file mode 100644 index eba9a06e..00000000 --- a/assets/minecraft/models/item/bamboo_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_mosaic.json b/assets/minecraft/models/item/bamboo_mosaic.json deleted file mode 100644 index 6892f31f..00000000 --- a/assets/minecraft/models/item/bamboo_mosaic.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_mosaic" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_mosaic_slab.json b/assets/minecraft/models/item/bamboo_mosaic_slab.json deleted file mode 100644 index d7b3e3e2..00000000 --- a/assets/minecraft/models/item/bamboo_mosaic_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_mosaic_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_mosaic_stairs.json b/assets/minecraft/models/item/bamboo_mosaic_stairs.json deleted file mode 100644 index e6ae86d0..00000000 --- a/assets/minecraft/models/item/bamboo_mosaic_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_mosaic_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_planks.json b/assets/minecraft/models/item/bamboo_planks.json deleted file mode 100644 index 4e591abe..00000000 --- a/assets/minecraft/models/item/bamboo_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_pressure_plate.json b/assets/minecraft/models/item/bamboo_pressure_plate.json deleted file mode 100644 index 8a7a0ff5..00000000 --- a/assets/minecraft/models/item/bamboo_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_slab.json b/assets/minecraft/models/item/bamboo_slab.json deleted file mode 100644 index 0d94c19f..00000000 --- a/assets/minecraft/models/item/bamboo_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_stairs.json b/assets/minecraft/models/item/bamboo_stairs.json deleted file mode 100644 index c96c6069..00000000 --- a/assets/minecraft/models/item/bamboo_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bamboo_trapdoor.json b/assets/minecraft/models/item/bamboo_trapdoor.json deleted file mode 100644 index cd10b18e..00000000 --- a/assets/minecraft/models/item/bamboo_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bamboo_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/barrel.json b/assets/minecraft/models/item/barrel.json deleted file mode 100644 index 553ec3e0..00000000 --- a/assets/minecraft/models/item/barrel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/barrel" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/basalt.json b/assets/minecraft/models/item/basalt.json deleted file mode 100644 index eaa67e62..00000000 --- a/assets/minecraft/models/item/basalt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/basalt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bat_spawn_egg.json b/assets/minecraft/models/item/bat_spawn_egg.json index d1aaa9d6..1d2f0475 100644 --- a/assets/minecraft/models/item/bat_spawn_egg.json +++ b/assets/minecraft/models/item/bat_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/bat_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/beacon.json b/assets/minecraft/models/item/beacon.json deleted file mode 100644 index b6a014e6..00000000 --- a/assets/minecraft/models/item/beacon.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/beacon" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bedrock.json b/assets/minecraft/models/item/bedrock.json deleted file mode 100644 index c1b8427e..00000000 --- a/assets/minecraft/models/item/bedrock.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bedrock" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bee_nest.json b/assets/minecraft/models/item/bee_nest.json deleted file mode 100644 index 39634a5b..00000000 --- a/assets/minecraft/models/item/bee_nest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parent": "minecraft:block/bee_nest_empty", - "overrides" : [ - { - "predicate" : { - "honey_level" : 0 - }, - "model" : "item/bee_nest_empty" - }, - { - "predicate" : { - "honey_level" : 1 - }, - "model" : "item/bee_nest_honey" - } - ] -} diff --git a/assets/minecraft/models/item/bee_nest_empty.json b/assets/minecraft/models/item/bee_nest_empty.json deleted file mode 100644 index ac0aa623..00000000 --- a/assets/minecraft/models/item/bee_nest_empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "minecraft:block/orientable_with_bottom", - "textures": { - "bottom": "minecraft:block/bee_nest_bottom", - "front": "minecraft:block/bee_nest_front", - "particle": "minecraft:block/bee_nest_side", - "side": "minecraft:block/bee_nest_side", - "top": "minecraft:block/bee_nest_top" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bee_nest_honey.json b/assets/minecraft/models/item/bee_nest_honey.json deleted file mode 100644 index 25850dbf..00000000 --- a/assets/minecraft/models/item/bee_nest_honey.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "minecraft:block/orientable_with_bottom", - "textures": { - "bottom": "minecraft:block/bee_nest_bottom", - "front": "minecraft:block/bee_nest_front_honey", - "particle": "minecraft:block/bee_nest_side", - "side": "minecraft:block/bee_nest_side", - "top": "minecraft:block/bee_nest_top" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bee_spawn_egg.json b/assets/minecraft/models/item/bee_spawn_egg.json index d1aaa9d6..93aed8c1 100644 --- a/assets/minecraft/models/item/bee_spawn_egg.json +++ b/assets/minecraft/models/item/bee_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/bee_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/beehive.json b/assets/minecraft/models/item/beehive.json deleted file mode 100644 index afc4081b..00000000 --- a/assets/minecraft/models/item/beehive.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parent": "minecraft:block/beehive_empty", - "overrides" : [ - { - "predicate" : { - "honey_level" : 0 - }, - "model" : "item/beehive_empty" - }, - { - "predicate" : { - "honey_level" : 1 - }, - "model" : "item/beehive_honey" - } - ] -} diff --git a/assets/minecraft/models/item/beehive_empty.json b/assets/minecraft/models/item/beehive_empty.json deleted file mode 100644 index 4c875e63..00000000 --- a/assets/minecraft/models/item/beehive_empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "minecraft:block/orientable_with_bottom", - "textures": { - "bottom": "minecraft:block/beehive_end", - "front": "minecraft:block/beehive_front", - "particle": "minecraft:block/beehive_side", - "side": "minecraft:block/beehive_side", - "top": "minecraft:block/beehive_end" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/item/beehive_honey.json b/assets/minecraft/models/item/beehive_honey.json deleted file mode 100644 index 1973867c..00000000 --- a/assets/minecraft/models/item/beehive_honey.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parent": "minecraft:block/orientable_with_bottom", - "textures": { - "bottom": "minecraft:block/beehive_end", - "front": "minecraft:block/beehive_front_honey", - "particle": "minecraft:block/beehive_side", - "side": "minecraft:block/beehive_side", - "top": "minecraft:block/beehive_end" - } -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_button.json b/assets/minecraft/models/item/birch_button.json deleted file mode 100644 index f0065c47..00000000 --- a/assets/minecraft/models/item/birch_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_fence.json b/assets/minecraft/models/item/birch_fence.json deleted file mode 100644 index ca097fb1..00000000 --- a/assets/minecraft/models/item/birch_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_fence_gate.json b/assets/minecraft/models/item/birch_fence_gate.json deleted file mode 100644 index 732026b8..00000000 --- a/assets/minecraft/models/item/birch_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_leaves.json b/assets/minecraft/models/item/birch_leaves.json deleted file mode 100644 index 4f543d46..00000000 --- a/assets/minecraft/models/item/birch_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_log.json b/assets/minecraft/models/item/birch_log.json deleted file mode 100644 index cd42b0b7..00000000 --- a/assets/minecraft/models/item/birch_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_planks.json b/assets/minecraft/models/item/birch_planks.json deleted file mode 100644 index 06e3a6d3..00000000 --- a/assets/minecraft/models/item/birch_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_pressure_plate.json b/assets/minecraft/models/item/birch_pressure_plate.json deleted file mode 100644 index e8dfb642..00000000 --- a/assets/minecraft/models/item/birch_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_slab.json b/assets/minecraft/models/item/birch_slab.json deleted file mode 100644 index c17a8e79..00000000 --- a/assets/minecraft/models/item/birch_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_stairs.json b/assets/minecraft/models/item/birch_stairs.json deleted file mode 100644 index ec8fd2b9..00000000 --- a/assets/minecraft/models/item/birch_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_trapdoor.json b/assets/minecraft/models/item/birch_trapdoor.json deleted file mode 100644 index 7db49741..00000000 --- a/assets/minecraft/models/item/birch_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/birch_wood.json b/assets/minecraft/models/item/birch_wood.json deleted file mode 100644 index cd1881b0..00000000 --- a/assets/minecraft/models/item/birch_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/birch_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_banner.json b/assets/minecraft/models/item/black_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/black_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_bundle_open_back.json b/assets/minecraft/models/item/black_bundle_open_back.json index 863e592b..ff313951 100644 --- a/assets/minecraft/models/item/black_bundle_open_back.json +++ b/assets/minecraft/models/item/black_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/black_bundle_open_back" + "layer0": "minecraft:item/black_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_bundle_open_front.json b/assets/minecraft/models/item/black_bundle_open_front.json index d0159a8f..d31bc086 100644 --- a/assets/minecraft/models/item/black_bundle_open_front.json +++ b/assets/minecraft/models/item/black_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/black_bundle_open_front" + "layer0": "minecraft:item/black_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_carpet.json b/assets/minecraft/models/item/black_carpet.json deleted file mode 100644 index 618d2130..00000000 --- a/assets/minecraft/models/item/black_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_concrete.json b/assets/minecraft/models/item/black_concrete.json deleted file mode 100644 index eb5aadc3..00000000 --- a/assets/minecraft/models/item/black_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_concrete_powder.json b/assets/minecraft/models/item/black_concrete_powder.json deleted file mode 100644 index 03af09ea..00000000 --- a/assets/minecraft/models/item/black_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_glazed_terracotta.json b/assets/minecraft/models/item/black_glazed_terracotta.json deleted file mode 100644 index e1f73ff8..00000000 --- a/assets/minecraft/models/item/black_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_stained_glass.json b/assets/minecraft/models/item/black_stained_glass.json deleted file mode 100644 index dfc8fab3..00000000 --- a/assets/minecraft/models/item/black_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_terracotta.json b/assets/minecraft/models/item/black_terracotta.json deleted file mode 100644 index eee57e8e..00000000 --- a/assets/minecraft/models/item/black_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/black_wool.json b/assets/minecraft/models/item/black_wool.json deleted file mode 100644 index a0e49abc..00000000 --- a/assets/minecraft/models/item/black_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/black_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blackstone.json b/assets/minecraft/models/item/blackstone.json deleted file mode 100644 index e4defbd6..00000000 --- a/assets/minecraft/models/item/blackstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blackstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blackstone_slab.json b/assets/minecraft/models/item/blackstone_slab.json deleted file mode 100644 index 481376f4..00000000 --- a/assets/minecraft/models/item/blackstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blackstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blackstone_stairs.json b/assets/minecraft/models/item/blackstone_stairs.json deleted file mode 100644 index 83a61e18..00000000 --- a/assets/minecraft/models/item/blackstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blackstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blackstone_wall.json b/assets/minecraft/models/item/blackstone_wall.json deleted file mode 100644 index 8c2bc6d6..00000000 --- a/assets/minecraft/models/item/blackstone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blackstone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blast_furnace.json b/assets/minecraft/models/item/blast_furnace.json deleted file mode 100644 index 5189a013..00000000 --- a/assets/minecraft/models/item/blast_furnace.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blast_furnace" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blaze_spawn_egg.json b/assets/minecraft/models/item/blaze_spawn_egg.json index d1aaa9d6..46864292 100644 --- a/assets/minecraft/models/item/blaze_spawn_egg.json +++ b/assets/minecraft/models/item/blaze_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/blaze_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_banner.json b/assets/minecraft/models/item/blue_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/blue_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_bundle_open_back.json b/assets/minecraft/models/item/blue_bundle_open_back.json index 29011ca3..ff7d420e 100644 --- a/assets/minecraft/models/item/blue_bundle_open_back.json +++ b/assets/minecraft/models/item/blue_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/blue_bundle_open_back" + "layer0": "minecraft:item/blue_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_bundle_open_front.json b/assets/minecraft/models/item/blue_bundle_open_front.json index 0dca2593..3e06e408 100644 --- a/assets/minecraft/models/item/blue_bundle_open_front.json +++ b/assets/minecraft/models/item/blue_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/blue_bundle_open_front" + "layer0": "minecraft:item/blue_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_carpet.json b/assets/minecraft/models/item/blue_carpet.json deleted file mode 100644 index 0ced6287..00000000 --- a/assets/minecraft/models/item/blue_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_concrete.json b/assets/minecraft/models/item/blue_concrete.json deleted file mode 100644 index 4c15897c..00000000 --- a/assets/minecraft/models/item/blue_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_concrete_powder.json b/assets/minecraft/models/item/blue_concrete_powder.json deleted file mode 100644 index e5f13d4a..00000000 --- a/assets/minecraft/models/item/blue_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_egg.json b/assets/minecraft/models/item/blue_egg.json new file mode 100644 index 00000000..5d2aa874 --- /dev/null +++ b/assets/minecraft/models/item/blue_egg.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/blue_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_glazed_terracotta.json b/assets/minecraft/models/item/blue_glazed_terracotta.json deleted file mode 100644 index f7b0efbb..00000000 --- a/assets/minecraft/models/item/blue_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_ice.json b/assets/minecraft/models/item/blue_ice.json deleted file mode 100644 index 86d267e5..00000000 --- a/assets/minecraft/models/item/blue_ice.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_ice" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_stained_glass.json b/assets/minecraft/models/item/blue_stained_glass.json deleted file mode 100644 index c3727cd8..00000000 --- a/assets/minecraft/models/item/blue_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_terracotta.json b/assets/minecraft/models/item/blue_terracotta.json deleted file mode 100644 index a89b057d..00000000 --- a/assets/minecraft/models/item/blue_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/blue_wool.json b/assets/minecraft/models/item/blue_wool.json deleted file mode 100644 index 22458dbd..00000000 --- a/assets/minecraft/models/item/blue_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/blue_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bogged_spawn_egg.json b/assets/minecraft/models/item/bogged_spawn_egg.json index d1aaa9d6..fb5ddc07 100644 --- a/assets/minecraft/models/item/bogged_spawn_egg.json +++ b/assets/minecraft/models/item/bogged_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/bogged_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/bone_block.json b/assets/minecraft/models/item/bone_block.json deleted file mode 100644 index 1374ccda..00000000 --- a/assets/minecraft/models/item/bone_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bone_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bookshelf.json b/assets/minecraft/models/item/bookshelf.json deleted file mode 100644 index 57943d42..00000000 --- a/assets/minecraft/models/item/bookshelf.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bookshelf" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bow.json b/assets/minecraft/models/item/bow.json index c2128757..f6c19330 100644 --- a/assets/minecraft/models/item/bow.json +++ b/assets/minecraft/models/item/bow.json @@ -24,27 +24,5 @@ "translation": [ 1.13, 3.2, 1.13], "scale": [ 0.68, 0.68, 0.68 ] } - }, - "overrides": [ - { - "predicate": { - "pulling": 1 - }, - "model": "item/bow_pulling_0" - }, - { - "predicate": { - "pulling": 1, - "pull": 0.65 - }, - "model": "item/bow_pulling_1" - }, - { - "predicate": { - "pulling": 1, - "pull": 0.9 - }, - "model": "item/bow_pulling_2" - } - ] + } } diff --git a/assets/minecraft/models/item/bow_pulling_0.json b/assets/minecraft/models/item/bow_pulling_0.json index 8a44db20..06526481 100644 --- a/assets/minecraft/models/item/bow_pulling_0.json +++ b/assets/minecraft/models/item/bow_pulling_0.json @@ -1,6 +1,6 @@ { - "parent": "item/bow", - "textures": { - "layer0": "item/bow_pulling_0" - } -} + "parent": "minecraft:item/bow", + "textures": { + "layer0": "minecraft:item/bow_pulling_0" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/bow_pulling_1.json b/assets/minecraft/models/item/bow_pulling_1.json index 5fd94893..bc1f9778 100644 --- a/assets/minecraft/models/item/bow_pulling_1.json +++ b/assets/minecraft/models/item/bow_pulling_1.json @@ -1,6 +1,6 @@ { - "parent": "item/bow", - "textures": { - "layer0": "item/bow_pulling_1" - } -} + "parent": "minecraft:item/bow", + "textures": { + "layer0": "minecraft:item/bow_pulling_1" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/bow_pulling_2.json b/assets/minecraft/models/item/bow_pulling_2.json index 8584d5b3..cec87c74 100644 --- a/assets/minecraft/models/item/bow_pulling_2.json +++ b/assets/minecraft/models/item/bow_pulling_2.json @@ -1,6 +1,6 @@ { - "parent": "item/bow", - "textures": { - "layer0": "item/bow_pulling_2" - } -} + "parent": "minecraft:item/bow", + "textures": { + "layer0": "minecraft:item/bow_pulling_2" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/brain_coral_block.json b/assets/minecraft/models/item/brain_coral_block.json deleted file mode 100644 index 04d112ab..00000000 --- a/assets/minecraft/models/item/brain_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brain_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/breeze_spawn_egg.json b/assets/minecraft/models/item/breeze_spawn_egg.json index d1aaa9d6..e421a590 100644 --- a/assets/minecraft/models/item/breeze_spawn_egg.json +++ b/assets/minecraft/models/item/breeze_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/breeze_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/brick_slab.json b/assets/minecraft/models/item/brick_slab.json deleted file mode 100644 index 754deec6..00000000 --- a/assets/minecraft/models/item/brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brick_stairs.json b/assets/minecraft/models/item/brick_stairs.json deleted file mode 100644 index 2a2318dc..00000000 --- a/assets/minecraft/models/item/brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brick_wall.json b/assets/minecraft/models/item/brick_wall.json deleted file mode 100644 index 52dcc04e..00000000 --- a/assets/minecraft/models/item/brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bricks.json b/assets/minecraft/models/item/bricks.json deleted file mode 100644 index dd257a86..00000000 --- a/assets/minecraft/models/item/bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/broken_elytra.json b/assets/minecraft/models/item/broken_elytra.json deleted file mode 100644 index ca77df44..00000000 --- a/assets/minecraft/models/item/broken_elytra.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "item/broken_elytra" - } -} diff --git a/assets/minecraft/models/item/brown_banner.json b/assets/minecraft/models/item/brown_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/brown_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_bundle_open_back.json b/assets/minecraft/models/item/brown_bundle_open_back.json index bf1e27b0..fa9041eb 100644 --- a/assets/minecraft/models/item/brown_bundle_open_back.json +++ b/assets/minecraft/models/item/brown_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/brown_bundle_open_back" + "layer0": "minecraft:item/brown_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_bundle_open_front.json b/assets/minecraft/models/item/brown_bundle_open_front.json index 637ad47e..e0fa96f0 100644 --- a/assets/minecraft/models/item/brown_bundle_open_front.json +++ b/assets/minecraft/models/item/brown_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/brown_bundle_open_front" + "layer0": "minecraft:item/brown_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_carpet.json b/assets/minecraft/models/item/brown_carpet.json deleted file mode 100644 index 144ce5ad..00000000 --- a/assets/minecraft/models/item/brown_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_concrete.json b/assets/minecraft/models/item/brown_concrete.json deleted file mode 100644 index 7aec153e..00000000 --- a/assets/minecraft/models/item/brown_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_concrete_powder.json b/assets/minecraft/models/item/brown_concrete_powder.json deleted file mode 100644 index e228eaaa..00000000 --- a/assets/minecraft/models/item/brown_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_egg.json b/assets/minecraft/models/item/brown_egg.json new file mode 100644 index 00000000..900e61a9 --- /dev/null +++ b/assets/minecraft/models/item/brown_egg.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/brown_egg" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_glazed_terracotta.json b/assets/minecraft/models/item/brown_glazed_terracotta.json deleted file mode 100644 index 8ed9bac4..00000000 --- a/assets/minecraft/models/item/brown_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_mushroom_block.json b/assets/minecraft/models/item/brown_mushroom_block.json deleted file mode 100644 index c9d6b06e..00000000 --- a/assets/minecraft/models/item/brown_mushroom_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_mushroom_block_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_stained_glass.json b/assets/minecraft/models/item/brown_stained_glass.json deleted file mode 100644 index a3aac572..00000000 --- a/assets/minecraft/models/item/brown_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_terracotta.json b/assets/minecraft/models/item/brown_terracotta.json deleted file mode 100644 index 17f524a7..00000000 --- a/assets/minecraft/models/item/brown_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brown_wool.json b/assets/minecraft/models/item/brown_wool.json deleted file mode 100644 index 85520a1b..00000000 --- a/assets/minecraft/models/item/brown_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/brown_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/brush.json b/assets/minecraft/models/item/brush.json index 231aa70c..8973ac98 100644 --- a/assets/minecraft/models/item/brush.json +++ b/assets/minecraft/models/item/brush.json @@ -19,25 +19,5 @@ "translation": [ 0, 4, 0 ], "scale": [ 0.9, 0.9, 0.9 ] } - }, - "overrides": [ - { - "predicate": { - "brushing": 0.25 - }, - "model": "item/brush_brushing_0" - }, - { - "predicate": { - "brushing": 0.5 - }, - "model": "item/brush_brushing_1" - }, - { - "predicate": { - "brushing": 0.75 - }, - "model": "item/brush_brushing_2" - } - ] + } } diff --git a/assets/minecraft/models/item/bubble_coral_block.json b/assets/minecraft/models/item/bubble_coral_block.json deleted file mode 100644 index 05a1309f..00000000 --- a/assets/minecraft/models/item/bubble_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/bubble_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/budding_amethyst.json b/assets/minecraft/models/item/budding_amethyst.json deleted file mode 100644 index c210bd6e..00000000 --- a/assets/minecraft/models/item/budding_amethyst.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/budding_amethyst" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/bundle_open_back.json b/assets/minecraft/models/item/bundle_open_back.json index 66851f18..18ed887f 100644 --- a/assets/minecraft/models/item/bundle_open_back.json +++ b/assets/minecraft/models/item/bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/bundle_open_back" + "layer0": "minecraft:item/bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/bundle_open_front.json b/assets/minecraft/models/item/bundle_open_front.json index 9c254570..aa799600 100644 --- a/assets/minecraft/models/item/bundle_open_front.json +++ b/assets/minecraft/models/item/bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/bundle_open_front" + "layer0": "minecraft:item/bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/bush.json b/assets/minecraft/models/item/bush.json new file mode 100644 index 00000000..b9945900 --- /dev/null +++ b/assets/minecraft/models/item/bush.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/cactus.json b/assets/minecraft/models/item/cactus.json deleted file mode 100644 index d1413ecf..00000000 --- a/assets/minecraft/models/item/cactus.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cactus" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cactus_flower.json b/assets/minecraft/models/item/cactus_flower.json new file mode 100644 index 00000000..c9760172 --- /dev/null +++ b/assets/minecraft/models/item/cactus_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/cactus_flower" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/calcite.json b/assets/minecraft/models/item/calcite.json deleted file mode 100644 index 11a880b3..00000000 --- a/assets/minecraft/models/item/calcite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/calcite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/calibrated_sculk_sensor.json b/assets/minecraft/models/item/calibrated_sculk_sensor.json deleted file mode 100644 index d99476e5..00000000 --- a/assets/minecraft/models/item/calibrated_sculk_sensor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/calibrated_sculk_sensor_inactive" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/camel_spawn_egg.json b/assets/minecraft/models/item/camel_spawn_egg.json index d1aaa9d6..1ac9acb3 100644 --- a/assets/minecraft/models/item/camel_spawn_egg.json +++ b/assets/minecraft/models/item/camel_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/camel_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/cartography_table.json b/assets/minecraft/models/item/cartography_table.json deleted file mode 100644 index b7fe4e47..00000000 --- a/assets/minecraft/models/item/cartography_table.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cartography_table" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/carved_pumpkin.json b/assets/minecraft/models/item/carved_pumpkin.json deleted file mode 100644 index 54f009c0..00000000 --- a/assets/minecraft/models/item/carved_pumpkin.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/carved_pumpkin" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cat_spawn_egg.json b/assets/minecraft/models/item/cat_spawn_egg.json index d1aaa9d6..385f2c10 100644 --- a/assets/minecraft/models/item/cat_spawn_egg.json +++ b/assets/minecraft/models/item/cat_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/cat_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/cave_spider_spawn_egg.json b/assets/minecraft/models/item/cave_spider_spawn_egg.json index d1aaa9d6..f5f57afb 100644 --- a/assets/minecraft/models/item/cave_spider_spawn_egg.json +++ b/assets/minecraft/models/item/cave_spider_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/cave_spider_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/chain_command_block.json b/assets/minecraft/models/item/chain_command_block.json deleted file mode 100644 index 44af865a..00000000 --- a/assets/minecraft/models/item/chain_command_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chain_command_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chainmail_boots.json b/assets/minecraft/models/item/chainmail_boots.json index 1e54e8c6..35126d5e 100644 --- a/assets/minecraft/models/item/chainmail_boots.json +++ b/assets/minecraft/models/item/chainmail_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/chainmail_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/chainmail_boots_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/chainmail_boots_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/chainmail_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/chainmail_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/chainmail_boots_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/chainmail_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/chainmail_boots_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/chainmail_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/chainmail_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/chainmail_boots" } diff --git a/assets/minecraft/models/item/chainmail_boots_resin_trim.json b/assets/minecraft/models/item/chainmail_boots_resin_trim.json new file mode 100644 index 00000000..b6c36c2d --- /dev/null +++ b/assets/minecraft/models/item/chainmail_boots_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/chainmail_boots", + "layer1": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/chainmail_chestplate.json b/assets/minecraft/models/item/chainmail_chestplate.json index 0bdb24bb..3efbf410 100644 --- a/assets/minecraft/models/item/chainmail_chestplate.json +++ b/assets/minecraft/models/item/chainmail_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/chainmail_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/chainmail_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/chainmail_chestplate" } diff --git a/assets/minecraft/models/item/chainmail_chestplate_resin_trim.json b/assets/minecraft/models/item/chainmail_chestplate_resin_trim.json new file mode 100644 index 00000000..f44bdc5e --- /dev/null +++ b/assets/minecraft/models/item/chainmail_chestplate_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/chainmail_chestplate", + "layer1": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/chainmail_helmet.json b/assets/minecraft/models/item/chainmail_helmet.json index dc35c600..e5bd2d42 100644 --- a/assets/minecraft/models/item/chainmail_helmet.json +++ b/assets/minecraft/models/item/chainmail_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/chainmail_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/chainmail_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/chainmail_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/chainmail_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/chainmail_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/chainmail_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/chainmail_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/chainmail_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/chainmail_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/chainmail_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/chainmail_helmet" } diff --git a/assets/minecraft/models/item/chainmail_helmet_resin_trim.json b/assets/minecraft/models/item/chainmail_helmet_resin_trim.json new file mode 100644 index 00000000..0d859307 --- /dev/null +++ b/assets/minecraft/models/item/chainmail_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/chainmail_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/chainmail_leggings.json b/assets/minecraft/models/item/chainmail_leggings.json index 23bebc65..22530cf9 100644 --- a/assets/minecraft/models/item/chainmail_leggings.json +++ b/assets/minecraft/models/item/chainmail_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/chainmail_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/chainmail_leggings_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/chainmail_leggings_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/chainmail_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/chainmail_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/chainmail_leggings_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/chainmail_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/chainmail_leggings_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/chainmail_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/chainmail_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/chainmail_leggings" } diff --git a/assets/minecraft/models/item/chainmail_leggings_resin_trim.json b/assets/minecraft/models/item/chainmail_leggings_resin_trim.json new file mode 100644 index 00000000..35912539 --- /dev/null +++ b/assets/minecraft/models/item/chainmail_leggings_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/chainmail_leggings", + "layer1": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_button.json b/assets/minecraft/models/item/cherry_button.json deleted file mode 100644 index bec3bdc6..00000000 --- a/assets/minecraft/models/item/cherry_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_fence.json b/assets/minecraft/models/item/cherry_fence.json deleted file mode 100644 index ffe1fb32..00000000 --- a/assets/minecraft/models/item/cherry_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_fence_gate.json b/assets/minecraft/models/item/cherry_fence_gate.json deleted file mode 100644 index b4137071..00000000 --- a/assets/minecraft/models/item/cherry_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_leaves.json b/assets/minecraft/models/item/cherry_leaves.json deleted file mode 100644 index 0b0683e9..00000000 --- a/assets/minecraft/models/item/cherry_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_log.json b/assets/minecraft/models/item/cherry_log.json deleted file mode 100644 index 7aceccbd..00000000 --- a/assets/minecraft/models/item/cherry_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_planks.json b/assets/minecraft/models/item/cherry_planks.json deleted file mode 100644 index d4f8dfef..00000000 --- a/assets/minecraft/models/item/cherry_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_pressure_plate.json b/assets/minecraft/models/item/cherry_pressure_plate.json deleted file mode 100644 index b207b042..00000000 --- a/assets/minecraft/models/item/cherry_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_slab.json b/assets/minecraft/models/item/cherry_slab.json deleted file mode 100644 index 50774910..00000000 --- a/assets/minecraft/models/item/cherry_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_stairs.json b/assets/minecraft/models/item/cherry_stairs.json deleted file mode 100644 index df08ac73..00000000 --- a/assets/minecraft/models/item/cherry_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_trapdoor.json b/assets/minecraft/models/item/cherry_trapdoor.json deleted file mode 100644 index 19daaafa..00000000 --- a/assets/minecraft/models/item/cherry_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cherry_wood.json b/assets/minecraft/models/item/cherry_wood.json deleted file mode 100644 index 71e59d45..00000000 --- a/assets/minecraft/models/item/cherry_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cherry_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chest.json b/assets/minecraft/models/item/chest.json index cdfd5488..fb1b4c69 100644 --- a/assets/minecraft/models/item/chest.json +++ b/assets/minecraft/models/item/chest.json @@ -1,38 +1,6 @@ { - "parent": "builtin/entity", - "textures": { - "particle": "block/oak_planks" - }, - "display": { - "gui": { - "rotation": [ 30, 45, 0 ], - "translation": [ 0, 0, 0], - "scale":[ 0.625, 0.625, 0.625 ] - }, - "ground": { - "rotation": [ 0, 0, 0 ], - "translation": [ 0, 3, 0], - "scale":[ 0.25, 0.25, 0.25 ] - }, - "head": { - "rotation": [ 0, 180, 0 ], - "translation": [ 0, 0, 0], - "scale":[ 1, 1, 1] - }, - "fixed": { - "rotation": [ 0, 180, 0 ], - "translation": [ 0, 0, 0], - "scale":[ 0.5, 0.5, 0.5 ] - }, - "thirdperson_righthand": { - "rotation": [ 75, 315, 0 ], - "translation": [ 0, 2.5, 0], - "scale": [ 0.375, 0.375, 0.375 ] - }, - "firstperson_righthand": { - "rotation": [ 0, 315, 0 ], - "translation": [ 0, 0, 0], - "scale": [ 0.4, 0.4, 0.4 ] - } - } -} + "parent": "minecraft:item/template_chest", + "textures": { + "particle": "minecraft:block/oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/chicken_spawn_egg.json b/assets/minecraft/models/item/chicken_spawn_egg.json index d1aaa9d6..bd2b54fd 100644 --- a/assets/minecraft/models/item/chicken_spawn_egg.json +++ b/assets/minecraft/models/item/chicken_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/chicken_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/chipped_anvil.json b/assets/minecraft/models/item/chipped_anvil.json deleted file mode 100644 index 46804e59..00000000 --- a/assets/minecraft/models/item/chipped_anvil.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chipped_anvil" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_bookshelf.json b/assets/minecraft/models/item/chiseled_bookshelf.json deleted file mode 100644 index 90befea8..00000000 --- a/assets/minecraft/models/item/chiseled_bookshelf.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_bookshelf_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_copper.json b/assets/minecraft/models/item/chiseled_copper.json deleted file mode 100644 index b88e810b..00000000 --- a/assets/minecraft/models/item/chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_deepslate.json b/assets/minecraft/models/item/chiseled_deepslate.json deleted file mode 100644 index 811f62f9..00000000 --- a/assets/minecraft/models/item/chiseled_deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_nether_bricks.json b/assets/minecraft/models/item/chiseled_nether_bricks.json deleted file mode 100644 index fb134fe3..00000000 --- a/assets/minecraft/models/item/chiseled_nether_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_nether_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_polished_blackstone.json b/assets/minecraft/models/item/chiseled_polished_blackstone.json deleted file mode 100644 index a2615345..00000000 --- a/assets/minecraft/models/item/chiseled_polished_blackstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_polished_blackstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_quartz_block.json b/assets/minecraft/models/item/chiseled_quartz_block.json deleted file mode 100644 index f8b20616..00000000 --- a/assets/minecraft/models/item/chiseled_quartz_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_quartz_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_red_sandstone.json b/assets/minecraft/models/item/chiseled_red_sandstone.json deleted file mode 100644 index e3ded796..00000000 --- a/assets/minecraft/models/item/chiseled_red_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_red_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_sandstone.json b/assets/minecraft/models/item/chiseled_sandstone.json deleted file mode 100644 index f6261725..00000000 --- a/assets/minecraft/models/item/chiseled_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_stone_bricks.json b/assets/minecraft/models/item/chiseled_stone_bricks.json deleted file mode 100644 index ac7e5e66..00000000 --- a/assets/minecraft/models/item/chiseled_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_tuff.json b/assets/minecraft/models/item/chiseled_tuff.json deleted file mode 100644 index 845bc289..00000000 --- a/assets/minecraft/models/item/chiseled_tuff.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_tuff" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chiseled_tuff_bricks.json b/assets/minecraft/models/item/chiseled_tuff_bricks.json deleted file mode 100644 index 6bea9351..00000000 --- a/assets/minecraft/models/item/chiseled_tuff_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_tuff_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chorus_flower.json b/assets/minecraft/models/item/chorus_flower.json deleted file mode 100644 index dc807298..00000000 --- a/assets/minecraft/models/item/chorus_flower.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chorus_flower" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/chorus_plant.json b/assets/minecraft/models/item/chorus_plant.json deleted file mode 100644 index b0741a69..00000000 --- a/assets/minecraft/models/item/chorus_plant.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chorus_plant" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/clay.json b/assets/minecraft/models/item/clay.json deleted file mode 100644 index 2510d78a..00000000 --- a/assets/minecraft/models/item/clay.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/clay" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/clock.json b/assets/minecraft/models/item/clock.json deleted file mode 100644 index 407b8aa7..00000000 --- a/assets/minecraft/models/item/clock.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "item/clock_00" - }, - "overrides": [ - { "predicate": { "time": 0.0000000 }, "model": "item/clock" }, - { "predicate": { "time": 0.0078125 }, "model": "item/clock_01" }, - { "predicate": { "time": 0.0234375 }, "model": "item/clock_02" }, - { "predicate": { "time": 0.0390625 }, "model": "item/clock_03" }, - { "predicate": { "time": 0.0546875 }, "model": "item/clock_04" }, - { "predicate": { "time": 0.0703125 }, "model": "item/clock_05" }, - { "predicate": { "time": 0.0859375 }, "model": "item/clock_06" }, - { "predicate": { "time": 0.1015625 }, "model": "item/clock_07" }, - { "predicate": { "time": 0.1171875 }, "model": "item/clock_08" }, - { "predicate": { "time": 0.1328125 }, "model": "item/clock_09" }, - { "predicate": { "time": 0.1484375 }, "model": "item/clock_10" }, - { "predicate": { "time": 0.1640625 }, "model": "item/clock_11" }, - { "predicate": { "time": 0.1796875 }, "model": "item/clock_12" }, - { "predicate": { "time": 0.1953125 }, "model": "item/clock_13" }, - { "predicate": { "time": 0.2109375 }, "model": "item/clock_14" }, - { "predicate": { "time": 0.2265625 }, "model": "item/clock_15" }, - { "predicate": { "time": 0.2421875 }, "model": "item/clock_16" }, - { "predicate": { "time": 0.2578125 }, "model": "item/clock_17" }, - { "predicate": { "time": 0.2734375 }, "model": "item/clock_18" }, - { "predicate": { "time": 0.2890625 }, "model": "item/clock_19" }, - { "predicate": { "time": 0.3046875 }, "model": "item/clock_20" }, - { "predicate": { "time": 0.3203125 }, "model": "item/clock_21" }, - { "predicate": { "time": 0.3359375 }, "model": "item/clock_22" }, - { "predicate": { "time": 0.3515625 }, "model": "item/clock_23" }, - { "predicate": { "time": 0.3671875 }, "model": "item/clock_24" }, - { "predicate": { "time": 0.3828125 }, "model": "item/clock_25" }, - { "predicate": { "time": 0.3984375 }, "model": "item/clock_26" }, - { "predicate": { "time": 0.4140625 }, "model": "item/clock_27" }, - { "predicate": { "time": 0.4296875 }, "model": "item/clock_28" }, - { "predicate": { "time": 0.4453125 }, "model": "item/clock_29" }, - { "predicate": { "time": 0.4609375 }, "model": "item/clock_30" }, - { "predicate": { "time": 0.4765625 }, "model": "item/clock_31" }, - { "predicate": { "time": 0.4921875 }, "model": "item/clock_32" }, - { "predicate": { "time": 0.5078125 }, "model": "item/clock_33" }, - { "predicate": { "time": 0.5234375 }, "model": "item/clock_34" }, - { "predicate": { "time": 0.5390625 }, "model": "item/clock_35" }, - { "predicate": { "time": 0.5546875 }, "model": "item/clock_36" }, - { "predicate": { "time": 0.5703125 }, "model": "item/clock_37" }, - { "predicate": { "time": 0.5859375 }, "model": "item/clock_38" }, - { "predicate": { "time": 0.6015625 }, "model": "item/clock_39" }, - { "predicate": { "time": 0.6171875 }, "model": "item/clock_40" }, - { "predicate": { "time": 0.6328125 }, "model": "item/clock_41" }, - { "predicate": { "time": 0.6484375 }, "model": "item/clock_42" }, - { "predicate": { "time": 0.6640625 }, "model": "item/clock_43" }, - { "predicate": { "time": 0.6796875 }, "model": "item/clock_44" }, - { "predicate": { "time": 0.6953125 }, "model": "item/clock_45" }, - { "predicate": { "time": 0.7109375 }, "model": "item/clock_46" }, - { "predicate": { "time": 0.7265625 }, "model": "item/clock_47" }, - { "predicate": { "time": 0.7421875 }, "model": "item/clock_48" }, - { "predicate": { "time": 0.7578125 }, "model": "item/clock_49" }, - { "predicate": { "time": 0.7734375 }, "model": "item/clock_50" }, - { "predicate": { "time": 0.7890625 }, "model": "item/clock_51" }, - { "predicate": { "time": 0.8046875 }, "model": "item/clock_52" }, - { "predicate": { "time": 0.8203125 }, "model": "item/clock_53" }, - { "predicate": { "time": 0.8359375 }, "model": "item/clock_54" }, - { "predicate": { "time": 0.8515625 }, "model": "item/clock_55" }, - { "predicate": { "time": 0.8671875 }, "model": "item/clock_56" }, - { "predicate": { "time": 0.8828125 }, "model": "item/clock_57" }, - { "predicate": { "time": 0.8984375 }, "model": "item/clock_58" }, - { "predicate": { "time": 0.9140625 }, "model": "item/clock_59" }, - { "predicate": { "time": 0.9296875 }, "model": "item/clock_60" }, - { "predicate": { "time": 0.9453125 }, "model": "item/clock_61" }, - { "predicate": { "time": 0.9609375 }, "model": "item/clock_62" }, - { "predicate": { "time": 0.9765625 }, "model": "item/clock_63" }, - { "predicate": { "time": 0.9921875 }, "model": "item/clock" } - ] -} diff --git a/assets/minecraft/models/item/clock_00.json b/assets/minecraft/models/item/clock_00.json new file mode 100644 index 00000000..e8dfc609 --- /dev/null +++ b/assets/minecraft/models/item/clock_00.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/clock_00" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/closed_eyeblossom.json b/assets/minecraft/models/item/closed_eyeblossom.json new file mode 100644 index 00000000..a75232fd --- /dev/null +++ b/assets/minecraft/models/item/closed_eyeblossom.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/closed_eyeblossom" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/coal_block.json b/assets/minecraft/models/item/coal_block.json deleted file mode 100644 index ee242673..00000000 --- a/assets/minecraft/models/item/coal_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/coal_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/coal_ore.json b/assets/minecraft/models/item/coal_ore.json deleted file mode 100644 index d6971d35..00000000 --- a/assets/minecraft/models/item/coal_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/coal_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/coarse_dirt.json b/assets/minecraft/models/item/coarse_dirt.json deleted file mode 100644 index 797b7cc7..00000000 --- a/assets/minecraft/models/item/coarse_dirt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/coarse_dirt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobbled_deepslate.json b/assets/minecraft/models/item/cobbled_deepslate.json deleted file mode 100644 index aceda4d8..00000000 --- a/assets/minecraft/models/item/cobbled_deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobbled_deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobbled_deepslate_slab.json b/assets/minecraft/models/item/cobbled_deepslate_slab.json deleted file mode 100644 index a4ea4d2d..00000000 --- a/assets/minecraft/models/item/cobbled_deepslate_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobbled_deepslate_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobbled_deepslate_stairs.json b/assets/minecraft/models/item/cobbled_deepslate_stairs.json deleted file mode 100644 index 054c8e6c..00000000 --- a/assets/minecraft/models/item/cobbled_deepslate_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobbled_deepslate_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobbled_deepslate_wall.json b/assets/minecraft/models/item/cobbled_deepslate_wall.json deleted file mode 100644 index 25b44645..00000000 --- a/assets/minecraft/models/item/cobbled_deepslate_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobbled_deepslate_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobblestone.json b/assets/minecraft/models/item/cobblestone.json deleted file mode 100644 index 35e828df..00000000 --- a/assets/minecraft/models/item/cobblestone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobblestone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobblestone_slab.json b/assets/minecraft/models/item/cobblestone_slab.json deleted file mode 100644 index 701123f0..00000000 --- a/assets/minecraft/models/item/cobblestone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobblestone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobblestone_stairs.json b/assets/minecraft/models/item/cobblestone_stairs.json deleted file mode 100644 index 48910bcc..00000000 --- a/assets/minecraft/models/item/cobblestone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobblestone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cobblestone_wall.json b/assets/minecraft/models/item/cobblestone_wall.json deleted file mode 100644 index 5c603a85..00000000 --- a/assets/minecraft/models/item/cobblestone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobblestone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cod_spawn_egg.json b/assets/minecraft/models/item/cod_spawn_egg.json index d1aaa9d6..f77e73aa 100644 --- a/assets/minecraft/models/item/cod_spawn_egg.json +++ b/assets/minecraft/models/item/cod_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/cod_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/command_block.json b/assets/minecraft/models/item/command_block.json deleted file mode 100644 index 43605276..00000000 --- a/assets/minecraft/models/item/command_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/command_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/compass.json b/assets/minecraft/models/item/compass.json deleted file mode 100644 index ec66bb16..00000000 --- a/assets/minecraft/models/item/compass.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "item/compass_16" - }, - "overrides": [ - { "predicate": { "angle": 0.000000 }, "model": "item/compass" }, - { "predicate": { "angle": 0.015625 }, "model": "item/compass_17" }, - { "predicate": { "angle": 0.046875 }, "model": "item/compass_18" }, - { "predicate": { "angle": 0.078125 }, "model": "item/compass_19" }, - { "predicate": { "angle": 0.109375 }, "model": "item/compass_20" }, - { "predicate": { "angle": 0.140625 }, "model": "item/compass_21" }, - { "predicate": { "angle": 0.171875 }, "model": "item/compass_22" }, - { "predicate": { "angle": 0.203125 }, "model": "item/compass_23" }, - { "predicate": { "angle": 0.234375 }, "model": "item/compass_24" }, - { "predicate": { "angle": 0.265625 }, "model": "item/compass_25" }, - { "predicate": { "angle": 0.296875 }, "model": "item/compass_26" }, - { "predicate": { "angle": 0.328125 }, "model": "item/compass_27" }, - { "predicate": { "angle": 0.359375 }, "model": "item/compass_28" }, - { "predicate": { "angle": 0.390625 }, "model": "item/compass_29" }, - { "predicate": { "angle": 0.421875 }, "model": "item/compass_30" }, - { "predicate": { "angle": 0.453125 }, "model": "item/compass_31" }, - { "predicate": { "angle": 0.484375 }, "model": "item/compass_00" }, - { "predicate": { "angle": 0.515625 }, "model": "item/compass_01" }, - { "predicate": { "angle": 0.546875 }, "model": "item/compass_02" }, - { "predicate": { "angle": 0.578125 }, "model": "item/compass_03" }, - { "predicate": { "angle": 0.609375 }, "model": "item/compass_04" }, - { "predicate": { "angle": 0.640625 }, "model": "item/compass_05" }, - { "predicate": { "angle": 0.671875 }, "model": "item/compass_06" }, - { "predicate": { "angle": 0.703125 }, "model": "item/compass_07" }, - { "predicate": { "angle": 0.734375 }, "model": "item/compass_08" }, - { "predicate": { "angle": 0.765625 }, "model": "item/compass_09" }, - { "predicate": { "angle": 0.796875 }, "model": "item/compass_10" }, - { "predicate": { "angle": 0.828125 }, "model": "item/compass_11" }, - { "predicate": { "angle": 0.859375 }, "model": "item/compass_12" }, - { "predicate": { "angle": 0.890625 }, "model": "item/compass_13" }, - { "predicate": { "angle": 0.921875 }, "model": "item/compass_14" }, - { "predicate": { "angle": 0.953125 }, "model": "item/compass_15" }, - { "predicate": { "angle": 0.984375 }, "model": "item/compass" } - ] -} diff --git a/assets/minecraft/models/item/compass_16.json b/assets/minecraft/models/item/compass_16.json new file mode 100644 index 00000000..19788d5e --- /dev/null +++ b/assets/minecraft/models/item/compass_16.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/compass_16" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/composter.json b/assets/minecraft/models/item/composter.json deleted file mode 100644 index a8a9be3b..00000000 --- a/assets/minecraft/models/item/composter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/composter" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/conduit.json b/assets/minecraft/models/item/conduit.json index f5785cdf..c8efa785 100644 --- a/assets/minecraft/models/item/conduit.json +++ b/assets/minecraft/models/item/conduit.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "textures": { "particle": "block/conduit" }, diff --git a/assets/minecraft/models/item/copper_block.json b/assets/minecraft/models/item/copper_block.json deleted file mode 100644 index 7bc2c018..00000000 --- a/assets/minecraft/models/item/copper_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/copper_bulb.json b/assets/minecraft/models/item/copper_bulb.json deleted file mode 100644 index bdf2e175..00000000 --- a/assets/minecraft/models/item/copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/copper_grate.json b/assets/minecraft/models/item/copper_grate.json deleted file mode 100644 index f4cff513..00000000 --- a/assets/minecraft/models/item/copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/copper_ore.json b/assets/minecraft/models/item/copper_ore.json deleted file mode 100644 index 773d4593..00000000 --- a/assets/minecraft/models/item/copper_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/copper_trapdoor.json b/assets/minecraft/models/item/copper_trapdoor.json deleted file mode 100644 index 77db2f8d..00000000 --- a/assets/minecraft/models/item/copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cow_spawn_egg.json b/assets/minecraft/models/item/cow_spawn_egg.json index d1aaa9d6..dff99686 100644 --- a/assets/minecraft/models/item/cow_spawn_egg.json +++ b/assets/minecraft/models/item/cow_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/cow_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/cracked_deepslate_bricks.json b/assets/minecraft/models/item/cracked_deepslate_bricks.json deleted file mode 100644 index 5edc2399..00000000 --- a/assets/minecraft/models/item/cracked_deepslate_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_deepslate_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cracked_deepslate_tiles.json b/assets/minecraft/models/item/cracked_deepslate_tiles.json deleted file mode 100644 index 9fc7a8c0..00000000 --- a/assets/minecraft/models/item/cracked_deepslate_tiles.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_deepslate_tiles" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cracked_nether_bricks.json b/assets/minecraft/models/item/cracked_nether_bricks.json deleted file mode 100644 index 09da8a18..00000000 --- a/assets/minecraft/models/item/cracked_nether_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_nether_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cracked_polished_blackstone_bricks.json b/assets/minecraft/models/item/cracked_polished_blackstone_bricks.json deleted file mode 100644 index 87b9f26e..00000000 --- a/assets/minecraft/models/item/cracked_polished_blackstone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_polished_blackstone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cracked_stone_bricks.json b/assets/minecraft/models/item/cracked_stone_bricks.json deleted file mode 100644 index 46802074..00000000 --- a/assets/minecraft/models/item/cracked_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crafter.json b/assets/minecraft/models/item/crafter.json deleted file mode 100644 index 65fda300..00000000 --- a/assets/minecraft/models/item/crafter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crafter" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crafting_table.json b/assets/minecraft/models/item/crafting_table.json deleted file mode 100644 index 323e84b6..00000000 --- a/assets/minecraft/models/item/crafting_table.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crafting_table" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/creaking_heart.json b/assets/minecraft/models/item/creaking_heart.json deleted file mode 100644 index a071b726..00000000 --- a/assets/minecraft/models/item/creaking_heart.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/creaking_heart" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/creaking_spawn_egg.json b/assets/minecraft/models/item/creaking_spawn_egg.json index d1aaa9d6..7f7e2f93 100644 --- a/assets/minecraft/models/item/creaking_spawn_egg.json +++ b/assets/minecraft/models/item/creaking_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/creaking_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/creeper_head.json b/assets/minecraft/models/item/creeper_head.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/creeper_head.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/creeper_spawn_egg.json b/assets/minecraft/models/item/creeper_spawn_egg.json index d1aaa9d6..226a73e7 100644 --- a/assets/minecraft/models/item/creeper_spawn_egg.json +++ b/assets/minecraft/models/item/creeper_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/creeper_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_button.json b/assets/minecraft/models/item/crimson_button.json deleted file mode 100644 index f58c71fc..00000000 --- a/assets/minecraft/models/item/crimson_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_fence.json b/assets/minecraft/models/item/crimson_fence.json deleted file mode 100644 index 3bdd71d1..00000000 --- a/assets/minecraft/models/item/crimson_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_fence_gate.json b/assets/minecraft/models/item/crimson_fence_gate.json deleted file mode 100644 index 36ef1c8c..00000000 --- a/assets/minecraft/models/item/crimson_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_hyphae.json b/assets/minecraft/models/item/crimson_hyphae.json deleted file mode 100644 index 6efe4610..00000000 --- a/assets/minecraft/models/item/crimson_hyphae.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_hyphae" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_nylium.json b/assets/minecraft/models/item/crimson_nylium.json deleted file mode 100644 index 74f93924..00000000 --- a/assets/minecraft/models/item/crimson_nylium.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_nylium" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_planks.json b/assets/minecraft/models/item/crimson_planks.json deleted file mode 100644 index 759128e1..00000000 --- a/assets/minecraft/models/item/crimson_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_pressure_plate.json b/assets/minecraft/models/item/crimson_pressure_plate.json deleted file mode 100644 index 436b0ba9..00000000 --- a/assets/minecraft/models/item/crimson_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_slab.json b/assets/minecraft/models/item/crimson_slab.json deleted file mode 100644 index 63ad2927..00000000 --- a/assets/minecraft/models/item/crimson_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_stairs.json b/assets/minecraft/models/item/crimson_stairs.json deleted file mode 100644 index 9cefb2d2..00000000 --- a/assets/minecraft/models/item/crimson_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_stem.json b/assets/minecraft/models/item/crimson_stem.json deleted file mode 100644 index 56d2001d..00000000 --- a/assets/minecraft/models/item/crimson_stem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_stem" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crimson_trapdoor.json b/assets/minecraft/models/item/crimson_trapdoor.json deleted file mode 100644 index b1cba031..00000000 --- a/assets/minecraft/models/item/crimson_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crimson_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/crossbow.json b/assets/minecraft/models/item/crossbow.json index 0cddcac4..173cac0f 100644 --- a/assets/minecraft/models/item/crossbow.json +++ b/assets/minecraft/models/item/crossbow.json @@ -24,40 +24,5 @@ "translation": [ 1.13, 3.2, 1.13], "scale": [ 0.68, 0.68, 0.68 ] } - }, - "overrides": [ - { - "predicate": { - "pulling": 1 - }, - "model": "item/crossbow_pulling_0" - }, - { - "predicate": { - "pulling": 1, - "pull": 0.58 - }, - "model": "item/crossbow_pulling_1" - }, - { - "predicate": { - "pulling": 1, - "pull": 1.0 - }, - "model": "item/crossbow_pulling_2" - }, - { - "predicate": { - "charged": 1 - }, - "model": "item/crossbow_arrow" - }, - { - "predicate": { - "charged": 1, - "firework": 1 - }, - "model": "item/crossbow_firework" - } - ] + } } diff --git a/assets/minecraft/models/item/crossbow_arrow.json b/assets/minecraft/models/item/crossbow_arrow.json index bc3e3543..5d324f9e 100644 --- a/assets/minecraft/models/item/crossbow_arrow.json +++ b/assets/minecraft/models/item/crossbow_arrow.json @@ -1,6 +1,6 @@ { - "parent": "item/crossbow", - "textures": { - "layer0": "item/crossbow_arrow" - } -} + "parent": "minecraft:item/crossbow", + "textures": { + "layer0": "minecraft:item/crossbow_arrow" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/crossbow_firework.json b/assets/minecraft/models/item/crossbow_firework.json index 1ebe175a..577cfeac 100644 --- a/assets/minecraft/models/item/crossbow_firework.json +++ b/assets/minecraft/models/item/crossbow_firework.json @@ -1,6 +1,6 @@ { - "parent": "item/crossbow", - "textures": { - "layer0": "item/crossbow_firework" - } -} + "parent": "minecraft:item/crossbow", + "textures": { + "layer0": "minecraft:item/crossbow_firework" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/crossbow_pulling_0.json b/assets/minecraft/models/item/crossbow_pulling_0.json index afd73b86..1eca0652 100644 --- a/assets/minecraft/models/item/crossbow_pulling_0.json +++ b/assets/minecraft/models/item/crossbow_pulling_0.json @@ -1,6 +1,6 @@ { - "parent": "item/crossbow", - "textures": { - "layer0": "item/crossbow_pulling_0" - } -} + "parent": "minecraft:item/crossbow", + "textures": { + "layer0": "minecraft:item/crossbow_pulling_0" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/crossbow_pulling_1.json b/assets/minecraft/models/item/crossbow_pulling_1.json index 1c48a748..d704c814 100644 --- a/assets/minecraft/models/item/crossbow_pulling_1.json +++ b/assets/minecraft/models/item/crossbow_pulling_1.json @@ -1,6 +1,6 @@ { - "parent": "item/crossbow", - "textures": { - "layer0": "item/crossbow_pulling_1" - } -} + "parent": "minecraft:item/crossbow", + "textures": { + "layer0": "minecraft:item/crossbow_pulling_1" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/crossbow_pulling_2.json b/assets/minecraft/models/item/crossbow_pulling_2.json index 3c2df500..aa95a944 100644 --- a/assets/minecraft/models/item/crossbow_pulling_2.json +++ b/assets/minecraft/models/item/crossbow_pulling_2.json @@ -1,6 +1,6 @@ { - "parent": "item/crossbow", - "textures": { - "layer0": "item/crossbow_pulling_2" - } -} + "parent": "minecraft:item/crossbow", + "textures": { + "layer0": "minecraft:item/crossbow_pulling_2" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/crying_obsidian.json b/assets/minecraft/models/item/crying_obsidian.json deleted file mode 100644 index 0d94bfb8..00000000 --- a/assets/minecraft/models/item/crying_obsidian.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/crying_obsidian" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_copper.json b/assets/minecraft/models/item/cut_copper.json deleted file mode 100644 index ce1ec597..00000000 --- a/assets/minecraft/models/item/cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_copper_slab.json b/assets/minecraft/models/item/cut_copper_slab.json deleted file mode 100644 index b6b05101..00000000 --- a/assets/minecraft/models/item/cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_copper_stairs.json b/assets/minecraft/models/item/cut_copper_stairs.json deleted file mode 100644 index 7376f52c..00000000 --- a/assets/minecraft/models/item/cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_red_sandstone.json b/assets/minecraft/models/item/cut_red_sandstone.json deleted file mode 100644 index 665df158..00000000 --- a/assets/minecraft/models/item/cut_red_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_red_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_red_sandstone_slab.json b/assets/minecraft/models/item/cut_red_sandstone_slab.json deleted file mode 100644 index 7767595c..00000000 --- a/assets/minecraft/models/item/cut_red_sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_red_sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_sandstone.json b/assets/minecraft/models/item/cut_sandstone.json deleted file mode 100644 index 865262dc..00000000 --- a/assets/minecraft/models/item/cut_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cut_sandstone_slab.json b/assets/minecraft/models/item/cut_sandstone_slab.json deleted file mode 100644 index cccc0035..00000000 --- a/assets/minecraft/models/item/cut_sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_banner.json b/assets/minecraft/models/item/cyan_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/cyan_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_bundle_open_back.json b/assets/minecraft/models/item/cyan_bundle_open_back.json index 27a03d17..44e1d54a 100644 --- a/assets/minecraft/models/item/cyan_bundle_open_back.json +++ b/assets/minecraft/models/item/cyan_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/cyan_bundle_open_back" + "layer0": "minecraft:item/cyan_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_bundle_open_front.json b/assets/minecraft/models/item/cyan_bundle_open_front.json index c7eccd84..e5e484d8 100644 --- a/assets/minecraft/models/item/cyan_bundle_open_front.json +++ b/assets/minecraft/models/item/cyan_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/cyan_bundle_open_front" + "layer0": "minecraft:item/cyan_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_carpet.json b/assets/minecraft/models/item/cyan_carpet.json deleted file mode 100644 index f67e7062..00000000 --- a/assets/minecraft/models/item/cyan_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_concrete.json b/assets/minecraft/models/item/cyan_concrete.json deleted file mode 100644 index 210de101..00000000 --- a/assets/minecraft/models/item/cyan_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_concrete_powder.json b/assets/minecraft/models/item/cyan_concrete_powder.json deleted file mode 100644 index 8fe4c546..00000000 --- a/assets/minecraft/models/item/cyan_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_glazed_terracotta.json b/assets/minecraft/models/item/cyan_glazed_terracotta.json deleted file mode 100644 index c98c2ac8..00000000 --- a/assets/minecraft/models/item/cyan_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_stained_glass.json b/assets/minecraft/models/item/cyan_stained_glass.json deleted file mode 100644 index 8cdd4b93..00000000 --- a/assets/minecraft/models/item/cyan_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_terracotta.json b/assets/minecraft/models/item/cyan_terracotta.json deleted file mode 100644 index 4053734c..00000000 --- a/assets/minecraft/models/item/cyan_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/cyan_wool.json b/assets/minecraft/models/item/cyan_wool.json deleted file mode 100644 index 30c92e7a..00000000 --- a/assets/minecraft/models/item/cyan_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cyan_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/damaged_anvil.json b/assets/minecraft/models/item/damaged_anvil.json deleted file mode 100644 index 657cbd68..00000000 --- a/assets/minecraft/models/item/damaged_anvil.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/damaged_anvil" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_button.json b/assets/minecraft/models/item/dark_oak_button.json deleted file mode 100644 index f2ff59ba..00000000 --- a/assets/minecraft/models/item/dark_oak_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_fence.json b/assets/minecraft/models/item/dark_oak_fence.json deleted file mode 100644 index c624d9c9..00000000 --- a/assets/minecraft/models/item/dark_oak_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_fence_gate.json b/assets/minecraft/models/item/dark_oak_fence_gate.json deleted file mode 100644 index 25cbe805..00000000 --- a/assets/minecraft/models/item/dark_oak_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_leaves.json b/assets/minecraft/models/item/dark_oak_leaves.json deleted file mode 100644 index 395882a7..00000000 --- a/assets/minecraft/models/item/dark_oak_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_log.json b/assets/minecraft/models/item/dark_oak_log.json deleted file mode 100644 index 6304aefb..00000000 --- a/assets/minecraft/models/item/dark_oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_planks.json b/assets/minecraft/models/item/dark_oak_planks.json deleted file mode 100644 index a3adda1d..00000000 --- a/assets/minecraft/models/item/dark_oak_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_pressure_plate.json b/assets/minecraft/models/item/dark_oak_pressure_plate.json deleted file mode 100644 index 7cd16b9d..00000000 --- a/assets/minecraft/models/item/dark_oak_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_slab.json b/assets/minecraft/models/item/dark_oak_slab.json deleted file mode 100644 index c66e4e43..00000000 --- a/assets/minecraft/models/item/dark_oak_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_stairs.json b/assets/minecraft/models/item/dark_oak_stairs.json deleted file mode 100644 index 1d7b821b..00000000 --- a/assets/minecraft/models/item/dark_oak_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_trapdoor.json b/assets/minecraft/models/item/dark_oak_trapdoor.json deleted file mode 100644 index a91f3c8f..00000000 --- a/assets/minecraft/models/item/dark_oak_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_oak_wood.json b/assets/minecraft/models/item/dark_oak_wood.json deleted file mode 100644 index 3a285ba3..00000000 --- a/assets/minecraft/models/item/dark_oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_prismarine.json b/assets/minecraft/models/item/dark_prismarine.json deleted file mode 100644 index 461468df..00000000 --- a/assets/minecraft/models/item/dark_prismarine.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_prismarine" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_prismarine_slab.json b/assets/minecraft/models/item/dark_prismarine_slab.json deleted file mode 100644 index a9605d9f..00000000 --- a/assets/minecraft/models/item/dark_prismarine_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_prismarine_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dark_prismarine_stairs.json b/assets/minecraft/models/item/dark_prismarine_stairs.json deleted file mode 100644 index 2a11dead..00000000 --- a/assets/minecraft/models/item/dark_prismarine_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dark_prismarine_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/daylight_detector.json b/assets/minecraft/models/item/daylight_detector.json deleted file mode 100644 index f52d6d9a..00000000 --- a/assets/minecraft/models/item/daylight_detector.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/daylight_detector" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dead_brain_coral_block.json b/assets/minecraft/models/item/dead_brain_coral_block.json deleted file mode 100644 index 3134d2b7..00000000 --- a/assets/minecraft/models/item/dead_brain_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dead_brain_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dead_bubble_coral_block.json b/assets/minecraft/models/item/dead_bubble_coral_block.json deleted file mode 100644 index ba3411da..00000000 --- a/assets/minecraft/models/item/dead_bubble_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dead_bubble_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dead_fire_coral_block.json b/assets/minecraft/models/item/dead_fire_coral_block.json deleted file mode 100644 index f169720a..00000000 --- a/assets/minecraft/models/item/dead_fire_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dead_fire_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dead_horn_coral_block.json b/assets/minecraft/models/item/dead_horn_coral_block.json deleted file mode 100644 index a7ed136d..00000000 --- a/assets/minecraft/models/item/dead_horn_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dead_horn_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dead_tube_coral_block.json b/assets/minecraft/models/item/dead_tube_coral_block.json deleted file mode 100644 index a16902f9..00000000 --- a/assets/minecraft/models/item/dead_tube_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dead_tube_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/decorated_pot.json b/assets/minecraft/models/item/decorated_pot.json index 70c96e0f..27f62a4a 100644 --- a/assets/minecraft/models/item/decorated_pot.json +++ b/assets/minecraft/models/item/decorated_pot.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "entity/decorated_pot/decorated_pot_side" diff --git a/assets/minecraft/models/item/deepslate.json b/assets/minecraft/models/item/deepslate.json deleted file mode 100644 index 13980a84..00000000 --- a/assets/minecraft/models/item/deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_brick_slab.json b/assets/minecraft/models/item/deepslate_brick_slab.json deleted file mode 100644 index 7e35175d..00000000 --- a/assets/minecraft/models/item/deepslate_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_brick_stairs.json b/assets/minecraft/models/item/deepslate_brick_stairs.json deleted file mode 100644 index 38c5e3f9..00000000 --- a/assets/minecraft/models/item/deepslate_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_brick_wall.json b/assets/minecraft/models/item/deepslate_brick_wall.json deleted file mode 100644 index d13b4d42..00000000 --- a/assets/minecraft/models/item/deepslate_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_bricks.json b/assets/minecraft/models/item/deepslate_bricks.json deleted file mode 100644 index 5c152588..00000000 --- a/assets/minecraft/models/item/deepslate_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_coal_ore.json b/assets/minecraft/models/item/deepslate_coal_ore.json deleted file mode 100644 index f94aeada..00000000 --- a/assets/minecraft/models/item/deepslate_coal_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_coal_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_copper_ore.json b/assets/minecraft/models/item/deepslate_copper_ore.json deleted file mode 100644 index b5425550..00000000 --- a/assets/minecraft/models/item/deepslate_copper_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_copper_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_diamond_ore.json b/assets/minecraft/models/item/deepslate_diamond_ore.json deleted file mode 100644 index 24eb2e5a..00000000 --- a/assets/minecraft/models/item/deepslate_diamond_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_diamond_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_emerald_ore.json b/assets/minecraft/models/item/deepslate_emerald_ore.json deleted file mode 100644 index a5354b18..00000000 --- a/assets/minecraft/models/item/deepslate_emerald_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_emerald_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_gold_ore.json b/assets/minecraft/models/item/deepslate_gold_ore.json deleted file mode 100644 index 910ff2f7..00000000 --- a/assets/minecraft/models/item/deepslate_gold_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_gold_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_iron_ore.json b/assets/minecraft/models/item/deepslate_iron_ore.json deleted file mode 100644 index 0b10edea..00000000 --- a/assets/minecraft/models/item/deepslate_iron_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_iron_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_lapis_ore.json b/assets/minecraft/models/item/deepslate_lapis_ore.json deleted file mode 100644 index d829cea2..00000000 --- a/assets/minecraft/models/item/deepslate_lapis_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_lapis_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_redstone_ore.json b/assets/minecraft/models/item/deepslate_redstone_ore.json deleted file mode 100644 index c9832e9a..00000000 --- a/assets/minecraft/models/item/deepslate_redstone_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_redstone_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_tile_slab.json b/assets/minecraft/models/item/deepslate_tile_slab.json deleted file mode 100644 index f0979640..00000000 --- a/assets/minecraft/models/item/deepslate_tile_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_tile_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_tile_stairs.json b/assets/minecraft/models/item/deepslate_tile_stairs.json deleted file mode 100644 index 2a7ec05e..00000000 --- a/assets/minecraft/models/item/deepslate_tile_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_tile_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_tile_wall.json b/assets/minecraft/models/item/deepslate_tile_wall.json deleted file mode 100644 index 226fa452..00000000 --- a/assets/minecraft/models/item/deepslate_tile_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_tile_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/deepslate_tiles.json b/assets/minecraft/models/item/deepslate_tiles.json deleted file mode 100644 index bdaaaec5..00000000 --- a/assets/minecraft/models/item/deepslate_tiles.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate_tiles" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_block.json b/assets/minecraft/models/item/diamond_block.json deleted file mode 100644 index 48d351c4..00000000 --- a/assets/minecraft/models/item/diamond_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diamond_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_boots.json b/assets/minecraft/models/item/diamond_boots.json index 2badf8fd..d3257821 100644 --- a/assets/minecraft/models/item/diamond_boots.json +++ b/assets/minecraft/models/item/diamond_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/diamond_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/diamond_boots_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/diamond_boots_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/diamond_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/diamond_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/diamond_boots_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/diamond_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/diamond_boots_diamond_darker_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/diamond_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/diamond_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/diamond_boots" } diff --git a/assets/minecraft/models/item/diamond_boots_diamond_darker_trim.json b/assets/minecraft/models/item/diamond_boots_diamond_trim.json similarity index 100% rename from assets/minecraft/models/item/diamond_boots_diamond_darker_trim.json rename to assets/minecraft/models/item/diamond_boots_diamond_trim.json diff --git a/assets/minecraft/models/item/diamond_boots_resin_trim.json b/assets/minecraft/models/item/diamond_boots_resin_trim.json new file mode 100644 index 00000000..ffe193dc --- /dev/null +++ b/assets/minecraft/models/item/diamond_boots_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/diamond_boots", + "layer1": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_chestplate.json b/assets/minecraft/models/item/diamond_chestplate.json index b87eb4b5..2ca3222a 100644 --- a/assets/minecraft/models/item/diamond_chestplate.json +++ b/assets/minecraft/models/item/diamond_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/diamond_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/diamond_chestplate_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/diamond_chestplate_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/diamond_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/diamond_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/diamond_chestplate_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/diamond_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/diamond_chestplate_diamond_darker_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/diamond_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/diamond_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/diamond_chestplate" } diff --git a/assets/minecraft/models/item/diamond_chestplate_diamond_darker_trim.json b/assets/minecraft/models/item/diamond_chestplate_diamond_trim.json similarity index 100% rename from assets/minecraft/models/item/diamond_chestplate_diamond_darker_trim.json rename to assets/minecraft/models/item/diamond_chestplate_diamond_trim.json diff --git a/assets/minecraft/models/item/diamond_chestplate_resin_trim.json b/assets/minecraft/models/item/diamond_chestplate_resin_trim.json new file mode 100644 index 00000000..5c70bed5 --- /dev/null +++ b/assets/minecraft/models/item/diamond_chestplate_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/diamond_chestplate", + "layer1": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_helmet.json b/assets/minecraft/models/item/diamond_helmet.json index 982a1110..8ab9fc02 100644 --- a/assets/minecraft/models/item/diamond_helmet.json +++ b/assets/minecraft/models/item/diamond_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/diamond_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/diamond_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/diamond_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/diamond_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/diamond_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/diamond_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/diamond_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/diamond_helmet_diamond_darker_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/diamond_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/diamond_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/diamond_helmet" } diff --git a/assets/minecraft/models/item/diamond_helmet_diamond_darker_trim.json b/assets/minecraft/models/item/diamond_helmet_diamond_trim.json similarity index 100% rename from assets/minecraft/models/item/diamond_helmet_diamond_darker_trim.json rename to assets/minecraft/models/item/diamond_helmet_diamond_trim.json diff --git a/assets/minecraft/models/item/diamond_helmet_resin_trim.json b/assets/minecraft/models/item/diamond_helmet_resin_trim.json new file mode 100644 index 00000000..3acc4297 --- /dev/null +++ b/assets/minecraft/models/item/diamond_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/diamond_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_leggings.json b/assets/minecraft/models/item/diamond_leggings.json index fdc94914..11622ca5 100644 --- a/assets/minecraft/models/item/diamond_leggings.json +++ b/assets/minecraft/models/item/diamond_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/diamond_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/diamond_leggings_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/diamond_leggings_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/diamond_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/diamond_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/diamond_leggings_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/diamond_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/diamond_leggings_diamond_darker_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/diamond_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/diamond_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/diamond_leggings" } diff --git a/assets/minecraft/models/item/diamond_leggings_diamond_darker_trim.json b/assets/minecraft/models/item/diamond_leggings_diamond_trim.json similarity index 100% rename from assets/minecraft/models/item/diamond_leggings_diamond_darker_trim.json rename to assets/minecraft/models/item/diamond_leggings_diamond_trim.json diff --git a/assets/minecraft/models/item/diamond_leggings_resin_trim.json b/assets/minecraft/models/item/diamond_leggings_resin_trim.json new file mode 100644 index 00000000..bf555e5d --- /dev/null +++ b/assets/minecraft/models/item/diamond_leggings_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/diamond_leggings", + "layer1": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/diamond_ore.json b/assets/minecraft/models/item/diamond_ore.json deleted file mode 100644 index da18313d..00000000 --- a/assets/minecraft/models/item/diamond_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diamond_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diorite.json b/assets/minecraft/models/item/diorite.json deleted file mode 100644 index f9d3f6b4..00000000 --- a/assets/minecraft/models/item/diorite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diorite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diorite_slab.json b/assets/minecraft/models/item/diorite_slab.json deleted file mode 100644 index fbfbc7a6..00000000 --- a/assets/minecraft/models/item/diorite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diorite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diorite_stairs.json b/assets/minecraft/models/item/diorite_stairs.json deleted file mode 100644 index fdfa11ab..00000000 --- a/assets/minecraft/models/item/diorite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diorite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/diorite_wall.json b/assets/minecraft/models/item/diorite_wall.json deleted file mode 100644 index 192d7282..00000000 --- a/assets/minecraft/models/item/diorite_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/diorite_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dirt.json b/assets/minecraft/models/item/dirt.json deleted file mode 100644 index 8f9dbab5..00000000 --- a/assets/minecraft/models/item/dirt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dirt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dirt_path.json b/assets/minecraft/models/item/dirt_path.json deleted file mode 100644 index e60515e4..00000000 --- a/assets/minecraft/models/item/dirt_path.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dirt_path" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dispenser.json b/assets/minecraft/models/item/dispenser.json deleted file mode 100644 index b88156bc..00000000 --- a/assets/minecraft/models/item/dispenser.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dispenser" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dolphin_spawn_egg.json b/assets/minecraft/models/item/dolphin_spawn_egg.json index d1aaa9d6..91e8a5df 100644 --- a/assets/minecraft/models/item/dolphin_spawn_egg.json +++ b/assets/minecraft/models/item/dolphin_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/dolphin_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/donkey_spawn_egg.json b/assets/minecraft/models/item/donkey_spawn_egg.json index d1aaa9d6..77caa043 100644 --- a/assets/minecraft/models/item/donkey_spawn_egg.json +++ b/assets/minecraft/models/item/donkey_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/donkey_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/dragon_egg.json b/assets/minecraft/models/item/dragon_egg.json deleted file mode 100644 index 1570a78a..00000000 --- a/assets/minecraft/models/item/dragon_egg.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dragon_egg" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dried_kelp_block.json b/assets/minecraft/models/item/dried_kelp_block.json deleted file mode 100644 index 2f3f1c32..00000000 --- a/assets/minecraft/models/item/dried_kelp_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dried_kelp_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dripstone_block.json b/assets/minecraft/models/item/dripstone_block.json deleted file mode 100644 index d6d9c09d..00000000 --- a/assets/minecraft/models/item/dripstone_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dripstone_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/dropper.json b/assets/minecraft/models/item/dropper.json deleted file mode 100644 index a8b40e59..00000000 --- a/assets/minecraft/models/item/dropper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/dropper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/drowned_spawn_egg.json b/assets/minecraft/models/item/drowned_spawn_egg.json index d1aaa9d6..c1ec4250 100644 --- a/assets/minecraft/models/item/drowned_spawn_egg.json +++ b/assets/minecraft/models/item/drowned_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/drowned_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/elder_guardian_spawn_egg.json b/assets/minecraft/models/item/elder_guardian_spawn_egg.json index d1aaa9d6..8d432b66 100644 --- a/assets/minecraft/models/item/elder_guardian_spawn_egg.json +++ b/assets/minecraft/models/item/elder_guardian_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/elder_guardian_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/elytra.json b/assets/minecraft/models/item/elytra.json index 3909ded5..2f1789e6 100644 --- a/assets/minecraft/models/item/elytra.json +++ b/assets/minecraft/models/item/elytra.json @@ -1,14 +1,6 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/elytra" - }, - "overrides": [ - { - "predicate": { - "broken": 1 - }, - "model": "item/broken_elytra" - } - ] -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/elytra" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/elytra_broken.json b/assets/minecraft/models/item/elytra_broken.json new file mode 100644 index 00000000..6751976a --- /dev/null +++ b/assets/minecraft/models/item/elytra_broken.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/elytra_broken" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/emerald_block.json b/assets/minecraft/models/item/emerald_block.json deleted file mode 100644 index 27c3713a..00000000 --- a/assets/minecraft/models/item/emerald_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/emerald_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/emerald_ore.json b/assets/minecraft/models/item/emerald_ore.json deleted file mode 100644 index 3569bde1..00000000 --- a/assets/minecraft/models/item/emerald_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/emerald_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/enchanting_table.json b/assets/minecraft/models/item/enchanting_table.json deleted file mode 100644 index 9f76fca2..00000000 --- a/assets/minecraft/models/item/enchanting_table.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/enchanting_table" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_portal_frame.json b/assets/minecraft/models/item/end_portal_frame.json deleted file mode 100644 index 718814c2..00000000 --- a/assets/minecraft/models/item/end_portal_frame.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_portal_frame" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_rod.json b/assets/minecraft/models/item/end_rod.json deleted file mode 100644 index 809dec3f..00000000 --- a/assets/minecraft/models/item/end_rod.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_rod" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_stone.json b/assets/minecraft/models/item/end_stone.json deleted file mode 100644 index fc4cf92a..00000000 --- a/assets/minecraft/models/item/end_stone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_stone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_stone_brick_slab.json b/assets/minecraft/models/item/end_stone_brick_slab.json deleted file mode 100644 index 3daf7072..00000000 --- a/assets/minecraft/models/item/end_stone_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_stone_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_stone_brick_stairs.json b/assets/minecraft/models/item/end_stone_brick_stairs.json deleted file mode 100644 index b43fdfe6..00000000 --- a/assets/minecraft/models/item/end_stone_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_stone_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_stone_brick_wall.json b/assets/minecraft/models/item/end_stone_brick_wall.json deleted file mode 100644 index a0a4f843..00000000 --- a/assets/minecraft/models/item/end_stone_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_stone_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/end_stone_bricks.json b/assets/minecraft/models/item/end_stone_bricks.json deleted file mode 100644 index a0bb1b98..00000000 --- a/assets/minecraft/models/item/end_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/end_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/ender_chest.json b/assets/minecraft/models/item/ender_chest.json index 58aba338..31a5c7d7 100644 --- a/assets/minecraft/models/item/ender_chest.json +++ b/assets/minecraft/models/item/ender_chest.json @@ -1,6 +1,6 @@ { - "parent": "item/chest", - "textures": { - "particle": "block/obsidian" - } -} + "parent": "minecraft:item/template_chest", + "textures": { + "particle": "minecraft:block/obsidian" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/ender_dragon_spawn_egg.json b/assets/minecraft/models/item/ender_dragon_spawn_egg.json index d1aaa9d6..d0a2206d 100644 --- a/assets/minecraft/models/item/ender_dragon_spawn_egg.json +++ b/assets/minecraft/models/item/ender_dragon_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/ender_dragon_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/enderman_spawn_egg.json b/assets/minecraft/models/item/enderman_spawn_egg.json index d1aaa9d6..6ea7d688 100644 --- a/assets/minecraft/models/item/enderman_spawn_egg.json +++ b/assets/minecraft/models/item/enderman_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/enderman_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/endermite_spawn_egg.json b/assets/minecraft/models/item/endermite_spawn_egg.json index d1aaa9d6..775b5e8a 100644 --- a/assets/minecraft/models/item/endermite_spawn_egg.json +++ b/assets/minecraft/models/item/endermite_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/endermite_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/evoker_spawn_egg.json b/assets/minecraft/models/item/evoker_spawn_egg.json index d1aaa9d6..4b120124 100644 --- a/assets/minecraft/models/item/evoker_spawn_egg.json +++ b/assets/minecraft/models/item/evoker_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/evoker_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_chiseled_copper.json b/assets/minecraft/models/item/exposed_chiseled_copper.json deleted file mode 100644 index 11278b6a..00000000 --- a/assets/minecraft/models/item/exposed_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_copper.json b/assets/minecraft/models/item/exposed_copper.json deleted file mode 100644 index 5881fd7b..00000000 --- a/assets/minecraft/models/item/exposed_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_copper_bulb.json b/assets/minecraft/models/item/exposed_copper_bulb.json deleted file mode 100644 index 6ddcba9a..00000000 --- a/assets/minecraft/models/item/exposed_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_copper_grate.json b/assets/minecraft/models/item/exposed_copper_grate.json deleted file mode 100644 index b7a3c78e..00000000 --- a/assets/minecraft/models/item/exposed_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_copper_trapdoor.json b/assets/minecraft/models/item/exposed_copper_trapdoor.json deleted file mode 100644 index 7546ce3c..00000000 --- a/assets/minecraft/models/item/exposed_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_cut_copper.json b/assets/minecraft/models/item/exposed_cut_copper.json deleted file mode 100644 index b5c7d8f0..00000000 --- a/assets/minecraft/models/item/exposed_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_cut_copper_slab.json b/assets/minecraft/models/item/exposed_cut_copper_slab.json deleted file mode 100644 index 29ce4723..00000000 --- a/assets/minecraft/models/item/exposed_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/exposed_cut_copper_stairs.json b/assets/minecraft/models/item/exposed_cut_copper_stairs.json deleted file mode 100644 index 24bdd285..00000000 --- a/assets/minecraft/models/item/exposed_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/farmland.json b/assets/minecraft/models/item/farmland.json deleted file mode 100644 index 1c5eceae..00000000 --- a/assets/minecraft/models/item/farmland.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/farmland" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/filled_map.json b/assets/minecraft/models/item/filled_map.json index 077d2530..2d681387 100644 --- a/assets/minecraft/models/item/filled_map.json +++ b/assets/minecraft/models/item/filled_map.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/filled_map", - "layer1": "item/filled_map_markings" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/filled_map", + "layer1": "minecraft:item/filled_map_markings" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/fire_coral_block.json b/assets/minecraft/models/item/fire_coral_block.json deleted file mode 100644 index eebe05e1..00000000 --- a/assets/minecraft/models/item/fire_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/fire_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/firefly_bush.json b/assets/minecraft/models/item/firefly_bush.json new file mode 100644 index 00000000..e166c357 --- /dev/null +++ b/assets/minecraft/models/item/firefly_bush.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/firefly_bush" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/firework_star.json b/assets/minecraft/models/item/firework_star.json index 4e2e9fe8..b54ca29d 100644 --- a/assets/minecraft/models/item/firework_star.json +++ b/assets/minecraft/models/item/firework_star.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/firework_star", - "layer1": "item/firework_star_overlay" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/firework_star", + "layer1": "minecraft:item/firework_star_overlay" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/fishing_rod.json b/assets/minecraft/models/item/fishing_rod.json index 6d52bb97..32143f32 100644 --- a/assets/minecraft/models/item/fishing_rod.json +++ b/assets/minecraft/models/item/fishing_rod.json @@ -1,14 +1,6 @@ { - "parent": "item/handheld_rod", - "textures": { - "layer0": "item/fishing_rod" - }, - "overrides": [ - { - "predicate": { - "cast": 1 - }, - "model": "item/fishing_rod_cast" - } - ] -} + "parent": "minecraft:item/handheld_rod", + "textures": { + "layer0": "minecraft:item/fishing_rod" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/fishing_rod_cast.json b/assets/minecraft/models/item/fishing_rod_cast.json index 55c2a525..63190afc 100644 --- a/assets/minecraft/models/item/fishing_rod_cast.json +++ b/assets/minecraft/models/item/fishing_rod_cast.json @@ -1,6 +1,6 @@ { - "parent": "item/fishing_rod", - "textures": { - "layer0": "item/fishing_rod_cast" - } -} + "parent": "minecraft:item/handheld_rod", + "textures": { + "layer0": "minecraft:item/fishing_rod_cast" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/fletching_table.json b/assets/minecraft/models/item/fletching_table.json deleted file mode 100644 index bc2b1bdc..00000000 --- a/assets/minecraft/models/item/fletching_table.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/fletching_table" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/flowering_azalea.json b/assets/minecraft/models/item/flowering_azalea.json deleted file mode 100644 index e5f437e8..00000000 --- a/assets/minecraft/models/item/flowering_azalea.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/flowering_azalea" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/flowering_azalea_leaves.json b/assets/minecraft/models/item/flowering_azalea_leaves.json deleted file mode 100644 index c3ecf6e7..00000000 --- a/assets/minecraft/models/item/flowering_azalea_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/flowering_azalea_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/fox_spawn_egg.json b/assets/minecraft/models/item/fox_spawn_egg.json index d1aaa9d6..3a3fd8d4 100644 --- a/assets/minecraft/models/item/fox_spawn_egg.json +++ b/assets/minecraft/models/item/fox_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/fox_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/frog_spawn_egg.json b/assets/minecraft/models/item/frog_spawn_egg.json index d1aaa9d6..08e60641 100644 --- a/assets/minecraft/models/item/frog_spawn_egg.json +++ b/assets/minecraft/models/item/frog_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/frog_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/furnace.json b/assets/minecraft/models/item/furnace.json deleted file mode 100644 index 593027e9..00000000 --- a/assets/minecraft/models/item/furnace.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/furnace" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/ghast_spawn_egg.json b/assets/minecraft/models/item/ghast_spawn_egg.json index d1aaa9d6..727230af 100644 --- a/assets/minecraft/models/item/ghast_spawn_egg.json +++ b/assets/minecraft/models/item/ghast_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/ghast_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/gilded_blackstone.json b/assets/minecraft/models/item/gilded_blackstone.json deleted file mode 100644 index a0779ccd..00000000 --- a/assets/minecraft/models/item/gilded_blackstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gilded_blackstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/glass.json b/assets/minecraft/models/item/glass.json deleted file mode 100644 index 65825434..00000000 --- a/assets/minecraft/models/item/glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/glow_squid_spawn_egg.json b/assets/minecraft/models/item/glow_squid_spawn_egg.json index d1aaa9d6..1cfe9f30 100644 --- a/assets/minecraft/models/item/glow_squid_spawn_egg.json +++ b/assets/minecraft/models/item/glow_squid_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/glow_squid_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/glowstone.json b/assets/minecraft/models/item/glowstone.json deleted file mode 100644 index 5567a887..00000000 --- a/assets/minecraft/models/item/glowstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/glowstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/goat_horn.json b/assets/minecraft/models/item/goat_horn.json index eb549504..d2632890 100644 --- a/assets/minecraft/models/item/goat_horn.json +++ b/assets/minecraft/models/item/goat_horn.json @@ -24,13 +24,5 @@ "translation": [ 1.13, 3.2, 1.13 ], "scale": [ 0.68, 0.68, 0.68 ] } - }, - "overrides": [ - { - "predicate": { - "tooting": 1 - }, - "model": "item/tooting_goat_horn" - } - ] + } } diff --git a/assets/minecraft/models/item/goat_spawn_egg.json b/assets/minecraft/models/item/goat_spawn_egg.json index d1aaa9d6..145421ec 100644 --- a/assets/minecraft/models/item/goat_spawn_egg.json +++ b/assets/minecraft/models/item/goat_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/goat_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/gold_block.json b/assets/minecraft/models/item/gold_block.json deleted file mode 100644 index f9cefd04..00000000 --- a/assets/minecraft/models/item/gold_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gold_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gold_ore.json b/assets/minecraft/models/item/gold_ore.json deleted file mode 100644 index 64c16453..00000000 --- a/assets/minecraft/models/item/gold_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gold_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/golden_boots.json b/assets/minecraft/models/item/golden_boots.json index 427896c3..24f3c587 100644 --- a/assets/minecraft/models/item/golden_boots.json +++ b/assets/minecraft/models/item/golden_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/golden_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/golden_boots_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/golden_boots_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/golden_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/golden_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/golden_boots_gold_darker_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/golden_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/golden_boots_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/golden_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/golden_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/golden_boots" } diff --git a/assets/minecraft/models/item/golden_boots_gold_darker_trim.json b/assets/minecraft/models/item/golden_boots_gold_trim.json similarity index 100% rename from assets/minecraft/models/item/golden_boots_gold_darker_trim.json rename to assets/minecraft/models/item/golden_boots_gold_trim.json diff --git a/assets/minecraft/models/item/golden_boots_resin_trim.json b/assets/minecraft/models/item/golden_boots_resin_trim.json new file mode 100644 index 00000000..3bf3bb8e --- /dev/null +++ b/assets/minecraft/models/item/golden_boots_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/golden_boots", + "layer1": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/golden_chestplate.json b/assets/minecraft/models/item/golden_chestplate.json index b828f032..8c7b0bbf 100644 --- a/assets/minecraft/models/item/golden_chestplate.json +++ b/assets/minecraft/models/item/golden_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/golden_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/golden_chestplate_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/golden_chestplate_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/golden_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/golden_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/golden_chestplate_gold_darker_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/golden_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/golden_chestplate_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/golden_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/golden_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/golden_chestplate" } diff --git a/assets/minecraft/models/item/golden_chestplate_gold_darker_trim.json b/assets/minecraft/models/item/golden_chestplate_gold_trim.json similarity index 100% rename from assets/minecraft/models/item/golden_chestplate_gold_darker_trim.json rename to assets/minecraft/models/item/golden_chestplate_gold_trim.json diff --git a/assets/minecraft/models/item/golden_chestplate_resin_trim.json b/assets/minecraft/models/item/golden_chestplate_resin_trim.json new file mode 100644 index 00000000..98f609a0 --- /dev/null +++ b/assets/minecraft/models/item/golden_chestplate_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/golden_chestplate", + "layer1": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/golden_helmet.json b/assets/minecraft/models/item/golden_helmet.json index 114e5693..d0c08156 100644 --- a/assets/minecraft/models/item/golden_helmet.json +++ b/assets/minecraft/models/item/golden_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/golden_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/golden_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/golden_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/golden_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/golden_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/golden_helmet_gold_darker_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/golden_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/golden_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/golden_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/golden_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/golden_helmet" } diff --git a/assets/minecraft/models/item/golden_helmet_gold_darker_trim.json b/assets/minecraft/models/item/golden_helmet_gold_trim.json similarity index 100% rename from assets/minecraft/models/item/golden_helmet_gold_darker_trim.json rename to assets/minecraft/models/item/golden_helmet_gold_trim.json diff --git a/assets/minecraft/models/item/golden_helmet_resin_trim.json b/assets/minecraft/models/item/golden_helmet_resin_trim.json new file mode 100644 index 00000000..d9d23f2e --- /dev/null +++ b/assets/minecraft/models/item/golden_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/golden_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/golden_leggings.json b/assets/minecraft/models/item/golden_leggings.json index 285ffb0d..cb5bd0e6 100644 --- a/assets/minecraft/models/item/golden_leggings.json +++ b/assets/minecraft/models/item/golden_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/golden_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/golden_leggings_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/golden_leggings_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/golden_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/golden_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/golden_leggings_gold_darker_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/golden_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/golden_leggings_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/golden_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/golden_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/golden_leggings" } diff --git a/assets/minecraft/models/item/golden_leggings_gold_darker_trim.json b/assets/minecraft/models/item/golden_leggings_gold_trim.json similarity index 100% rename from assets/minecraft/models/item/golden_leggings_gold_darker_trim.json rename to assets/minecraft/models/item/golden_leggings_gold_trim.json diff --git a/assets/minecraft/models/item/golden_leggings_resin_trim.json b/assets/minecraft/models/item/golden_leggings_resin_trim.json new file mode 100644 index 00000000..b685dc67 --- /dev/null +++ b/assets/minecraft/models/item/golden_leggings_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/golden_leggings", + "layer1": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/granite.json b/assets/minecraft/models/item/granite.json deleted file mode 100644 index 4dd54d02..00000000 --- a/assets/minecraft/models/item/granite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/granite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/granite_slab.json b/assets/minecraft/models/item/granite_slab.json deleted file mode 100644 index 95ee6109..00000000 --- a/assets/minecraft/models/item/granite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/granite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/granite_stairs.json b/assets/minecraft/models/item/granite_stairs.json deleted file mode 100644 index 68b4e669..00000000 --- a/assets/minecraft/models/item/granite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/granite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/granite_wall.json b/assets/minecraft/models/item/granite_wall.json deleted file mode 100644 index de494270..00000000 --- a/assets/minecraft/models/item/granite_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/granite_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/grass_block.json b/assets/minecraft/models/item/grass_block.json deleted file mode 100644 index f54d345a..00000000 --- a/assets/minecraft/models/item/grass_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/grass_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gravel.json b/assets/minecraft/models/item/gravel.json deleted file mode 100644 index ee8cbc03..00000000 --- a/assets/minecraft/models/item/gravel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gravel" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_banner.json b/assets/minecraft/models/item/gray_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/gray_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_bundle_open_back.json b/assets/minecraft/models/item/gray_bundle_open_back.json index 7b4a9a7d..f27e9553 100644 --- a/assets/minecraft/models/item/gray_bundle_open_back.json +++ b/assets/minecraft/models/item/gray_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/gray_bundle_open_back" + "layer0": "minecraft:item/gray_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_bundle_open_front.json b/assets/minecraft/models/item/gray_bundle_open_front.json index cbcccfec..9c7bb376 100644 --- a/assets/minecraft/models/item/gray_bundle_open_front.json +++ b/assets/minecraft/models/item/gray_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/gray_bundle_open_front" + "layer0": "minecraft:item/gray_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_carpet.json b/assets/minecraft/models/item/gray_carpet.json deleted file mode 100644 index 5fe85f09..00000000 --- a/assets/minecraft/models/item/gray_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_concrete.json b/assets/minecraft/models/item/gray_concrete.json deleted file mode 100644 index 9b89dd7b..00000000 --- a/assets/minecraft/models/item/gray_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_concrete_powder.json b/assets/minecraft/models/item/gray_concrete_powder.json deleted file mode 100644 index 47d3dd50..00000000 --- a/assets/minecraft/models/item/gray_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_glazed_terracotta.json b/assets/minecraft/models/item/gray_glazed_terracotta.json deleted file mode 100644 index d58bce8a..00000000 --- a/assets/minecraft/models/item/gray_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_stained_glass.json b/assets/minecraft/models/item/gray_stained_glass.json deleted file mode 100644 index 34c0fa6c..00000000 --- a/assets/minecraft/models/item/gray_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_terracotta.json b/assets/minecraft/models/item/gray_terracotta.json deleted file mode 100644 index 6c415c03..00000000 --- a/assets/minecraft/models/item/gray_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/gray_wool.json b/assets/minecraft/models/item/gray_wool.json deleted file mode 100644 index 88c930a6..00000000 --- a/assets/minecraft/models/item/gray_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/gray_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_banner.json b/assets/minecraft/models/item/green_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/green_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_bundle_open_back.json b/assets/minecraft/models/item/green_bundle_open_back.json index a0b9c2a7..81ffde32 100644 --- a/assets/minecraft/models/item/green_bundle_open_back.json +++ b/assets/minecraft/models/item/green_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/green_bundle_open_back" + "layer0": "minecraft:item/green_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_bundle_open_front.json b/assets/minecraft/models/item/green_bundle_open_front.json index 23dd6989..a188a6a1 100644 --- a/assets/minecraft/models/item/green_bundle_open_front.json +++ b/assets/minecraft/models/item/green_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/green_bundle_open_front" + "layer0": "minecraft:item/green_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_carpet.json b/assets/minecraft/models/item/green_carpet.json deleted file mode 100644 index 772c294f..00000000 --- a/assets/minecraft/models/item/green_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_concrete.json b/assets/minecraft/models/item/green_concrete.json deleted file mode 100644 index 0e3b0f95..00000000 --- a/assets/minecraft/models/item/green_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_concrete_powder.json b/assets/minecraft/models/item/green_concrete_powder.json deleted file mode 100644 index 4c9c70f0..00000000 --- a/assets/minecraft/models/item/green_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_glazed_terracotta.json b/assets/minecraft/models/item/green_glazed_terracotta.json deleted file mode 100644 index 68333f84..00000000 --- a/assets/minecraft/models/item/green_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_stained_glass.json b/assets/minecraft/models/item/green_stained_glass.json deleted file mode 100644 index e10e37a8..00000000 --- a/assets/minecraft/models/item/green_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_terracotta.json b/assets/minecraft/models/item/green_terracotta.json deleted file mode 100644 index bf20f272..00000000 --- a/assets/minecraft/models/item/green_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/green_wool.json b/assets/minecraft/models/item/green_wool.json deleted file mode 100644 index a8cfdf47..00000000 --- a/assets/minecraft/models/item/green_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/green_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/grindstone.json b/assets/minecraft/models/item/grindstone.json deleted file mode 100644 index 2faa8ae8..00000000 --- a/assets/minecraft/models/item/grindstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/grindstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/guardian_spawn_egg.json b/assets/minecraft/models/item/guardian_spawn_egg.json index d1aaa9d6..da7bdc47 100644 --- a/assets/minecraft/models/item/guardian_spawn_egg.json +++ b/assets/minecraft/models/item/guardian_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/guardian_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/hay_block.json b/assets/minecraft/models/item/hay_block.json deleted file mode 100644 index 6c92e25d..00000000 --- a/assets/minecraft/models/item/hay_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/hay_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/heavy_core.json b/assets/minecraft/models/item/heavy_core.json deleted file mode 100644 index aed92e07..00000000 --- a/assets/minecraft/models/item/heavy_core.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/heavy_core" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/heavy_weighted_pressure_plate.json b/assets/minecraft/models/item/heavy_weighted_pressure_plate.json deleted file mode 100644 index ef384772..00000000 --- a/assets/minecraft/models/item/heavy_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/heavy_weighted_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/hoglin_spawn_egg.json b/assets/minecraft/models/item/hoglin_spawn_egg.json index d1aaa9d6..f70b2420 100644 --- a/assets/minecraft/models/item/hoglin_spawn_egg.json +++ b/assets/minecraft/models/item/hoglin_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/hoglin_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/honey_block.json b/assets/minecraft/models/item/honey_block.json deleted file mode 100644 index 29818ade..00000000 --- a/assets/minecraft/models/item/honey_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/honey_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/honeycomb_block.json b/assets/minecraft/models/item/honeycomb_block.json deleted file mode 100644 index 0a2c9541..00000000 --- a/assets/minecraft/models/item/honeycomb_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/honeycomb_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/horn_coral_block.json b/assets/minecraft/models/item/horn_coral_block.json deleted file mode 100644 index ba702d24..00000000 --- a/assets/minecraft/models/item/horn_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/horn_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/horse_spawn_egg.json b/assets/minecraft/models/item/horse_spawn_egg.json index d1aaa9d6..acd1d7e3 100644 --- a/assets/minecraft/models/item/horse_spawn_egg.json +++ b/assets/minecraft/models/item/horse_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/horse_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/husk_spawn_egg.json b/assets/minecraft/models/item/husk_spawn_egg.json index d1aaa9d6..67e1acb1 100644 --- a/assets/minecraft/models/item/husk_spawn_egg.json +++ b/assets/minecraft/models/item/husk_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/husk_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/ice.json b/assets/minecraft/models/item/ice.json deleted file mode 100644 index 1ec90d77..00000000 --- a/assets/minecraft/models/item/ice.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/ice" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_chiseled_stone_bricks.json b/assets/minecraft/models/item/infested_chiseled_stone_bricks.json deleted file mode 100644 index ac7e5e66..00000000 --- a/assets/minecraft/models/item/infested_chiseled_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_cobblestone.json b/assets/minecraft/models/item/infested_cobblestone.json deleted file mode 100644 index 35e828df..00000000 --- a/assets/minecraft/models/item/infested_cobblestone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cobblestone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_cracked_stone_bricks.json b/assets/minecraft/models/item/infested_cracked_stone_bricks.json deleted file mode 100644 index 46802074..00000000 --- a/assets/minecraft/models/item/infested_cracked_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cracked_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_deepslate.json b/assets/minecraft/models/item/infested_deepslate.json deleted file mode 100644 index 13980a84..00000000 --- a/assets/minecraft/models/item/infested_deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_mossy_stone_bricks.json b/assets/minecraft/models/item/infested_mossy_stone_bricks.json deleted file mode 100644 index a9fe750f..00000000 --- a/assets/minecraft/models/item/infested_mossy_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_stone.json b/assets/minecraft/models/item/infested_stone.json deleted file mode 100644 index 37f27f10..00000000 --- a/assets/minecraft/models/item/infested_stone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/infested_stone_bricks.json b/assets/minecraft/models/item/infested_stone_bricks.json deleted file mode 100644 index 51de871c..00000000 --- a/assets/minecraft/models/item/infested_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_block.json b/assets/minecraft/models/item/iron_block.json deleted file mode 100644 index acac52ca..00000000 --- a/assets/minecraft/models/item/iron_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/iron_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_boots.json b/assets/minecraft/models/item/iron_boots.json index a1f2a4fc..ee127da2 100644 --- a/assets/minecraft/models/item/iron_boots.json +++ b/assets/minecraft/models/item/iron_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/iron_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/iron_boots_iron_darker_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/iron_boots_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/iron_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/iron_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/iron_boots_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/iron_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/iron_boots_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/iron_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/iron_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/iron_boots" } diff --git a/assets/minecraft/models/item/iron_boots_iron_darker_trim.json b/assets/minecraft/models/item/iron_boots_iron_trim.json similarity index 100% rename from assets/minecraft/models/item/iron_boots_iron_darker_trim.json rename to assets/minecraft/models/item/iron_boots_iron_trim.json diff --git a/assets/minecraft/models/item/iron_boots_resin_trim.json b/assets/minecraft/models/item/iron_boots_resin_trim.json new file mode 100644 index 00000000..50976be4 --- /dev/null +++ b/assets/minecraft/models/item/iron_boots_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/iron_boots", + "layer1": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_chestplate.json b/assets/minecraft/models/item/iron_chestplate.json index a0385c25..2c52d1bd 100644 --- a/assets/minecraft/models/item/iron_chestplate.json +++ b/assets/minecraft/models/item/iron_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/iron_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/iron_chestplate_iron_darker_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/iron_chestplate_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/iron_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/iron_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/iron_chestplate_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/iron_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/iron_chestplate_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/iron_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/iron_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/iron_chestplate" } diff --git a/assets/minecraft/models/item/iron_chestplate_iron_darker_trim.json b/assets/minecraft/models/item/iron_chestplate_iron_trim.json similarity index 100% rename from assets/minecraft/models/item/iron_chestplate_iron_darker_trim.json rename to assets/minecraft/models/item/iron_chestplate_iron_trim.json diff --git a/assets/minecraft/models/item/iron_chestplate_resin_trim.json b/assets/minecraft/models/item/iron_chestplate_resin_trim.json new file mode 100644 index 00000000..2b877534 --- /dev/null +++ b/assets/minecraft/models/item/iron_chestplate_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/iron_chestplate", + "layer1": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_golem_spawn_egg.json b/assets/minecraft/models/item/iron_golem_spawn_egg.json index d1aaa9d6..833cd364 100644 --- a/assets/minecraft/models/item/iron_golem_spawn_egg.json +++ b/assets/minecraft/models/item/iron_golem_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/iron_golem_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_helmet.json b/assets/minecraft/models/item/iron_helmet.json index a2e575f9..8203b8a5 100644 --- a/assets/minecraft/models/item/iron_helmet.json +++ b/assets/minecraft/models/item/iron_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/iron_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/iron_helmet_iron_darker_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/iron_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/iron_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/iron_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/iron_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/iron_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/iron_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/iron_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/iron_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/iron_helmet" } diff --git a/assets/minecraft/models/item/iron_helmet_iron_darker_trim.json b/assets/minecraft/models/item/iron_helmet_iron_trim.json similarity index 100% rename from assets/minecraft/models/item/iron_helmet_iron_darker_trim.json rename to assets/minecraft/models/item/iron_helmet_iron_trim.json diff --git a/assets/minecraft/models/item/iron_helmet_resin_trim.json b/assets/minecraft/models/item/iron_helmet_resin_trim.json new file mode 100644 index 00000000..0292053d --- /dev/null +++ b/assets/minecraft/models/item/iron_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/iron_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_leggings.json b/assets/minecraft/models/item/iron_leggings.json index 826c4f73..324b71c1 100644 --- a/assets/minecraft/models/item/iron_leggings.json +++ b/assets/minecraft/models/item/iron_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/iron_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/iron_leggings_iron_darker_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/iron_leggings_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/iron_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/iron_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/iron_leggings_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/iron_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/iron_leggings_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/iron_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/iron_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/iron_leggings" } diff --git a/assets/minecraft/models/item/iron_leggings_iron_darker_trim.json b/assets/minecraft/models/item/iron_leggings_iron_trim.json similarity index 100% rename from assets/minecraft/models/item/iron_leggings_iron_darker_trim.json rename to assets/minecraft/models/item/iron_leggings_iron_trim.json diff --git a/assets/minecraft/models/item/iron_leggings_resin_trim.json b/assets/minecraft/models/item/iron_leggings_resin_trim.json new file mode 100644 index 00000000..11dba3be --- /dev/null +++ b/assets/minecraft/models/item/iron_leggings_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/iron_leggings", + "layer1": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_ore.json b/assets/minecraft/models/item/iron_ore.json deleted file mode 100644 index 5a356139..00000000 --- a/assets/minecraft/models/item/iron_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/iron_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/iron_trapdoor.json b/assets/minecraft/models/item/iron_trapdoor.json deleted file mode 100644 index b3a30b76..00000000 --- a/assets/minecraft/models/item/iron_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/iron_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jack_o_lantern.json b/assets/minecraft/models/item/jack_o_lantern.json deleted file mode 100644 index d2307203..00000000 --- a/assets/minecraft/models/item/jack_o_lantern.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jack_o_lantern" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jigsaw.json b/assets/minecraft/models/item/jigsaw.json deleted file mode 100644 index b0c47630..00000000 --- a/assets/minecraft/models/item/jigsaw.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jigsaw" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jukebox.json b/assets/minecraft/models/item/jukebox.json deleted file mode 100644 index 4d2923ac..00000000 --- a/assets/minecraft/models/item/jukebox.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jukebox" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_button.json b/assets/minecraft/models/item/jungle_button.json deleted file mode 100644 index 360738a3..00000000 --- a/assets/minecraft/models/item/jungle_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_fence.json b/assets/minecraft/models/item/jungle_fence.json deleted file mode 100644 index c5e6b2aa..00000000 --- a/assets/minecraft/models/item/jungle_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_fence_gate.json b/assets/minecraft/models/item/jungle_fence_gate.json deleted file mode 100644 index 8612c91d..00000000 --- a/assets/minecraft/models/item/jungle_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_leaves.json b/assets/minecraft/models/item/jungle_leaves.json deleted file mode 100644 index 4be7c1ad..00000000 --- a/assets/minecraft/models/item/jungle_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_log.json b/assets/minecraft/models/item/jungle_log.json deleted file mode 100644 index 2e6c371b..00000000 --- a/assets/minecraft/models/item/jungle_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_planks.json b/assets/minecraft/models/item/jungle_planks.json deleted file mode 100644 index 03f6926a..00000000 --- a/assets/minecraft/models/item/jungle_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_pressure_plate.json b/assets/minecraft/models/item/jungle_pressure_plate.json deleted file mode 100644 index 18a6d0f5..00000000 --- a/assets/minecraft/models/item/jungle_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_slab.json b/assets/minecraft/models/item/jungle_slab.json deleted file mode 100644 index ed5a4321..00000000 --- a/assets/minecraft/models/item/jungle_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_stairs.json b/assets/minecraft/models/item/jungle_stairs.json deleted file mode 100644 index 87e9264c..00000000 --- a/assets/minecraft/models/item/jungle_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_trapdoor.json b/assets/minecraft/models/item/jungle_trapdoor.json deleted file mode 100644 index 996f2808..00000000 --- a/assets/minecraft/models/item/jungle_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/jungle_wood.json b/assets/minecraft/models/item/jungle_wood.json deleted file mode 100644 index c993caea..00000000 --- a/assets/minecraft/models/item/jungle_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/jungle_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lapis_block.json b/assets/minecraft/models/item/lapis_block.json deleted file mode 100644 index 1dcdaf6e..00000000 --- a/assets/minecraft/models/item/lapis_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lapis_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lapis_ore.json b/assets/minecraft/models/item/lapis_ore.json deleted file mode 100644 index 87cec1e4..00000000 --- a/assets/minecraft/models/item/lapis_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lapis_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/leaf_litter.json b/assets/minecraft/models/item/leaf_litter.json new file mode 100644 index 00000000..3c03d48c --- /dev/null +++ b/assets/minecraft/models/item/leaf_litter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/leaf_litter" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/leather_boots.json b/assets/minecraft/models/item/leather_boots.json index fcba9da9..54bdcdbf 100644 --- a/assets/minecraft/models/item/leather_boots.json +++ b/assets/minecraft/models/item/leather_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/leather_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/leather_boots_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/leather_boots_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/leather_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/leather_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/leather_boots_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/leather_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/leather_boots_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/leather_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/leather_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/leather_boots", "layer1": "minecraft:item/leather_boots_overlay" diff --git a/assets/minecraft/models/item/leather_boots_resin_trim.json b/assets/minecraft/models/item/leather_boots_resin_trim.json new file mode 100644 index 00000000..43fcb574 --- /dev/null +++ b/assets/minecraft/models/item/leather_boots_resin_trim.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/leather_boots", + "layer1": "minecraft:item/leather_boots_overlay", + "layer2": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/leather_chestplate.json b/assets/minecraft/models/item/leather_chestplate.json index 93976e78..4628d113 100644 --- a/assets/minecraft/models/item/leather_chestplate.json +++ b/assets/minecraft/models/item/leather_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/leather_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/leather_chestplate_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/leather_chestplate_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/leather_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/leather_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/leather_chestplate_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/leather_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/leather_chestplate_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/leather_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/leather_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/leather_chestplate", "layer1": "minecraft:item/leather_chestplate_overlay" diff --git a/assets/minecraft/models/item/leather_chestplate_resin_trim.json b/assets/minecraft/models/item/leather_chestplate_resin_trim.json new file mode 100644 index 00000000..41205308 --- /dev/null +++ b/assets/minecraft/models/item/leather_chestplate_resin_trim.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/leather_chestplate", + "layer1": "minecraft:item/leather_chestplate_overlay", + "layer2": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/leather_helmet.json b/assets/minecraft/models/item/leather_helmet.json index 616e6ebd..74041e7c 100644 --- a/assets/minecraft/models/item/leather_helmet.json +++ b/assets/minecraft/models/item/leather_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/leather_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/leather_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/leather_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/leather_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/leather_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/leather_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/leather_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/leather_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/leather_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/leather_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/leather_helmet", "layer1": "minecraft:item/leather_helmet_overlay" diff --git a/assets/minecraft/models/item/leather_helmet_resin_trim.json b/assets/minecraft/models/item/leather_helmet_resin_trim.json new file mode 100644 index 00000000..1812bdd3 --- /dev/null +++ b/assets/minecraft/models/item/leather_helmet_resin_trim.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/leather_helmet", + "layer1": "minecraft:item/leather_helmet_overlay", + "layer2": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/leather_leggings.json b/assets/minecraft/models/item/leather_leggings.json index dcf68e17..0d101f4e 100644 --- a/assets/minecraft/models/item/leather_leggings.json +++ b/assets/minecraft/models/item/leather_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/leather_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/leather_leggings_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/leather_leggings_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/leather_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/leather_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/leather_leggings_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/leather_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/leather_leggings_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/leather_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/leather_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/leather_leggings", "layer1": "minecraft:item/leather_leggings_overlay" diff --git a/assets/minecraft/models/item/leather_leggings_resin_trim.json b/assets/minecraft/models/item/leather_leggings_resin_trim.json new file mode 100644 index 00000000..73cde2c4 --- /dev/null +++ b/assets/minecraft/models/item/leather_leggings_resin_trim.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/leather_leggings", + "layer1": "minecraft:item/leather_leggings_overlay", + "layer2": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/lectern.json b/assets/minecraft/models/item/lectern.json deleted file mode 100644 index 4f2c887a..00000000 --- a/assets/minecraft/models/item/lectern.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lectern" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light.json b/assets/minecraft/models/item/light.json index f53de1b5..9afb5f2d 100644 --- a/assets/minecraft/models/item/light.json +++ b/assets/minecraft/models/item/light.json @@ -2,23 +2,5 @@ "parent": "minecraft:item/generated", "textures": { "layer0": "minecraft:item/light" - }, - "overrides": [ - { "predicate": { "level": 0.0000 }, "model": "item/light_00" }, - { "predicate": { "level": 0.0625 }, "model": "item/light_01" }, - { "predicate": { "level": 0.1250 }, "model": "item/light_02" }, - { "predicate": { "level": 0.1875 }, "model": "item/light_03" }, - { "predicate": { "level": 0.2500 }, "model": "item/light_04" }, - { "predicate": { "level": 0.3125 }, "model": "item/light_05" }, - { "predicate": { "level": 0.3750 }, "model": "item/light_06" }, - { "predicate": { "level": 0.4375 }, "model": "item/light_07" }, - { "predicate": { "level": 0.5000 }, "model": "item/light_08" }, - { "predicate": { "level": 0.5625 }, "model": "item/light_09" }, - { "predicate": { "level": 0.6250 }, "model": "item/light_10" }, - { "predicate": { "level": 0.6875 }, "model": "item/light_11" }, - { "predicate": { "level": 0.7500 }, "model": "item/light_12" }, - { "predicate": { "level": 0.8125 }, "model": "item/light_13" }, - { "predicate": { "level": 0.8750 }, "model": "item/light_14" }, - { "predicate": { "level": 0.9375 }, "model": "item/light_15" } - ] -} + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_banner.json b/assets/minecraft/models/item/light_blue_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/light_blue_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_bundle_open_back.json b/assets/minecraft/models/item/light_blue_bundle_open_back.json index 3a0cfc26..e5a589c9 100644 --- a/assets/minecraft/models/item/light_blue_bundle_open_back.json +++ b/assets/minecraft/models/item/light_blue_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/light_blue_bundle_open_back" + "layer0": "minecraft:item/light_blue_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_bundle_open_front.json b/assets/minecraft/models/item/light_blue_bundle_open_front.json index 824e3ccd..02e93921 100644 --- a/assets/minecraft/models/item/light_blue_bundle_open_front.json +++ b/assets/minecraft/models/item/light_blue_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/light_blue_bundle_open_front" + "layer0": "minecraft:item/light_blue_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_carpet.json b/assets/minecraft/models/item/light_blue_carpet.json deleted file mode 100644 index 9f199e5c..00000000 --- a/assets/minecraft/models/item/light_blue_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_concrete.json b/assets/minecraft/models/item/light_blue_concrete.json deleted file mode 100644 index 68a0890f..00000000 --- a/assets/minecraft/models/item/light_blue_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_concrete_powder.json b/assets/minecraft/models/item/light_blue_concrete_powder.json deleted file mode 100644 index 22ec71d5..00000000 --- a/assets/minecraft/models/item/light_blue_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_glazed_terracotta.json b/assets/minecraft/models/item/light_blue_glazed_terracotta.json deleted file mode 100644 index 3d2b3bd7..00000000 --- a/assets/minecraft/models/item/light_blue_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_stained_glass.json b/assets/minecraft/models/item/light_blue_stained_glass.json deleted file mode 100644 index 0aef7a92..00000000 --- a/assets/minecraft/models/item/light_blue_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_terracotta.json b/assets/minecraft/models/item/light_blue_terracotta.json deleted file mode 100644 index 06294ea2..00000000 --- a/assets/minecraft/models/item/light_blue_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_blue_wool.json b/assets/minecraft/models/item/light_blue_wool.json deleted file mode 100644 index 4f7bd4de..00000000 --- a/assets/minecraft/models/item/light_blue_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_blue_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_banner.json b/assets/minecraft/models/item/light_gray_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/light_gray_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_bundle_open_back.json b/assets/minecraft/models/item/light_gray_bundle_open_back.json index cbeab629..91f04e7c 100644 --- a/assets/minecraft/models/item/light_gray_bundle_open_back.json +++ b/assets/minecraft/models/item/light_gray_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/light_gray_bundle_open_back" + "layer0": "minecraft:item/light_gray_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_bundle_open_front.json b/assets/minecraft/models/item/light_gray_bundle_open_front.json index bb274a9b..3887d1bb 100644 --- a/assets/minecraft/models/item/light_gray_bundle_open_front.json +++ b/assets/minecraft/models/item/light_gray_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/light_gray_bundle_open_front" + "layer0": "minecraft:item/light_gray_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_carpet.json b/assets/minecraft/models/item/light_gray_carpet.json deleted file mode 100644 index f603263e..00000000 --- a/assets/minecraft/models/item/light_gray_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_concrete.json b/assets/minecraft/models/item/light_gray_concrete.json deleted file mode 100644 index 9a4e67de..00000000 --- a/assets/minecraft/models/item/light_gray_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_concrete_powder.json b/assets/minecraft/models/item/light_gray_concrete_powder.json deleted file mode 100644 index 6726d569..00000000 --- a/assets/minecraft/models/item/light_gray_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_glazed_terracotta.json b/assets/minecraft/models/item/light_gray_glazed_terracotta.json deleted file mode 100644 index 46b9f176..00000000 --- a/assets/minecraft/models/item/light_gray_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_stained_glass.json b/assets/minecraft/models/item/light_gray_stained_glass.json deleted file mode 100644 index e05c7e8d..00000000 --- a/assets/minecraft/models/item/light_gray_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_terracotta.json b/assets/minecraft/models/item/light_gray_terracotta.json deleted file mode 100644 index a6cbc241..00000000 --- a/assets/minecraft/models/item/light_gray_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_gray_wool.json b/assets/minecraft/models/item/light_gray_wool.json deleted file mode 100644 index 0bdc80f4..00000000 --- a/assets/minecraft/models/item/light_gray_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_gray_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/light_weighted_pressure_plate.json b/assets/minecraft/models/item/light_weighted_pressure_plate.json deleted file mode 100644 index 0922c670..00000000 --- a/assets/minecraft/models/item/light_weighted_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/light_weighted_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lightning_rod.json b/assets/minecraft/models/item/lightning_rod.json deleted file mode 100644 index d701601a..00000000 --- a/assets/minecraft/models/item/lightning_rod.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lightning_rod" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_banner.json b/assets/minecraft/models/item/lime_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/lime_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_bundle_open_back.json b/assets/minecraft/models/item/lime_bundle_open_back.json index 5516ba15..c4aae642 100644 --- a/assets/minecraft/models/item/lime_bundle_open_back.json +++ b/assets/minecraft/models/item/lime_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/lime_bundle_open_back" + "layer0": "minecraft:item/lime_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_bundle_open_front.json b/assets/minecraft/models/item/lime_bundle_open_front.json index 2179105a..a7917184 100644 --- a/assets/minecraft/models/item/lime_bundle_open_front.json +++ b/assets/minecraft/models/item/lime_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/lime_bundle_open_front" + "layer0": "minecraft:item/lime_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_carpet.json b/assets/minecraft/models/item/lime_carpet.json deleted file mode 100644 index b6f18c0a..00000000 --- a/assets/minecraft/models/item/lime_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_concrete.json b/assets/minecraft/models/item/lime_concrete.json deleted file mode 100644 index 6becad9d..00000000 --- a/assets/minecraft/models/item/lime_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_concrete_powder.json b/assets/minecraft/models/item/lime_concrete_powder.json deleted file mode 100644 index a74380d0..00000000 --- a/assets/minecraft/models/item/lime_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_glazed_terracotta.json b/assets/minecraft/models/item/lime_glazed_terracotta.json deleted file mode 100644 index 14b5723d..00000000 --- a/assets/minecraft/models/item/lime_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_stained_glass.json b/assets/minecraft/models/item/lime_stained_glass.json deleted file mode 100644 index becc3296..00000000 --- a/assets/minecraft/models/item/lime_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_terracotta.json b/assets/minecraft/models/item/lime_terracotta.json deleted file mode 100644 index e6123030..00000000 --- a/assets/minecraft/models/item/lime_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lime_wool.json b/assets/minecraft/models/item/lime_wool.json deleted file mode 100644 index e6600fa8..00000000 --- a/assets/minecraft/models/item/lime_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lime_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/lingering_potion.json b/assets/minecraft/models/item/lingering_potion.json index 35ce5d79..a786fc0a 100644 --- a/assets/minecraft/models/item/lingering_potion.json +++ b/assets/minecraft/models/item/lingering_potion.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/potion_overlay", - "layer1": "item/lingering_potion" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/potion_overlay", + "layer1": "minecraft:item/lingering_potion" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/llama_spawn_egg.json b/assets/minecraft/models/item/llama_spawn_egg.json index d1aaa9d6..4950af13 100644 --- a/assets/minecraft/models/item/llama_spawn_egg.json +++ b/assets/minecraft/models/item/llama_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/llama_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/lodestone.json b/assets/minecraft/models/item/lodestone.json deleted file mode 100644 index f926ec2e..00000000 --- a/assets/minecraft/models/item/lodestone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/lodestone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/loom.json b/assets/minecraft/models/item/loom.json deleted file mode 100644 index 0fe6a7fa..00000000 --- a/assets/minecraft/models/item/loom.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/loom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_banner.json b/assets/minecraft/models/item/magenta_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/magenta_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_bundle_open_back.json b/assets/minecraft/models/item/magenta_bundle_open_back.json index 6d8ed84d..2cb31ce2 100644 --- a/assets/minecraft/models/item/magenta_bundle_open_back.json +++ b/assets/minecraft/models/item/magenta_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/magenta_bundle_open_back" + "layer0": "minecraft:item/magenta_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_bundle_open_front.json b/assets/minecraft/models/item/magenta_bundle_open_front.json index 89b5a622..925f1c1c 100644 --- a/assets/minecraft/models/item/magenta_bundle_open_front.json +++ b/assets/minecraft/models/item/magenta_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/magenta_bundle_open_front" + "layer0": "minecraft:item/magenta_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_carpet.json b/assets/minecraft/models/item/magenta_carpet.json deleted file mode 100644 index 386f8fcc..00000000 --- a/assets/minecraft/models/item/magenta_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_concrete.json b/assets/minecraft/models/item/magenta_concrete.json deleted file mode 100644 index 8dce5e8f..00000000 --- a/assets/minecraft/models/item/magenta_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_concrete_powder.json b/assets/minecraft/models/item/magenta_concrete_powder.json deleted file mode 100644 index e221911b..00000000 --- a/assets/minecraft/models/item/magenta_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_glazed_terracotta.json b/assets/minecraft/models/item/magenta_glazed_terracotta.json deleted file mode 100644 index 45b94ea3..00000000 --- a/assets/minecraft/models/item/magenta_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_stained_glass.json b/assets/minecraft/models/item/magenta_stained_glass.json deleted file mode 100644 index 62ff86a5..00000000 --- a/assets/minecraft/models/item/magenta_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_terracotta.json b/assets/minecraft/models/item/magenta_terracotta.json deleted file mode 100644 index 07d44199..00000000 --- a/assets/minecraft/models/item/magenta_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magenta_wool.json b/assets/minecraft/models/item/magenta_wool.json deleted file mode 100644 index e3ef178b..00000000 --- a/assets/minecraft/models/item/magenta_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magenta_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magma_block.json b/assets/minecraft/models/item/magma_block.json deleted file mode 100644 index ac1aa2f4..00000000 --- a/assets/minecraft/models/item/magma_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/magma_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/magma_cube_spawn_egg.json b/assets/minecraft/models/item/magma_cube_spawn_egg.json index d1aaa9d6..5fd646c6 100644 --- a/assets/minecraft/models/item/magma_cube_spawn_egg.json +++ b/assets/minecraft/models/item/magma_cube_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/magma_cube_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_button.json b/assets/minecraft/models/item/mangrove_button.json deleted file mode 100644 index 4bab5228..00000000 --- a/assets/minecraft/models/item/mangrove_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_fence.json b/assets/minecraft/models/item/mangrove_fence.json deleted file mode 100644 index b0d4d8c4..00000000 --- a/assets/minecraft/models/item/mangrove_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_fence_gate.json b/assets/minecraft/models/item/mangrove_fence_gate.json deleted file mode 100644 index 7eddb339..00000000 --- a/assets/minecraft/models/item/mangrove_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_leaves.json b/assets/minecraft/models/item/mangrove_leaves.json deleted file mode 100644 index be1fca78..00000000 --- a/assets/minecraft/models/item/mangrove_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_log.json b/assets/minecraft/models/item/mangrove_log.json deleted file mode 100644 index 9dbddf08..00000000 --- a/assets/minecraft/models/item/mangrove_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_planks.json b/assets/minecraft/models/item/mangrove_planks.json deleted file mode 100644 index 4c4f23bc..00000000 --- a/assets/minecraft/models/item/mangrove_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_pressure_plate.json b/assets/minecraft/models/item/mangrove_pressure_plate.json deleted file mode 100644 index 90b728fe..00000000 --- a/assets/minecraft/models/item/mangrove_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_roots.json b/assets/minecraft/models/item/mangrove_roots.json deleted file mode 100644 index 39131b24..00000000 --- a/assets/minecraft/models/item/mangrove_roots.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_roots" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_slab.json b/assets/minecraft/models/item/mangrove_slab.json deleted file mode 100644 index 036a10f7..00000000 --- a/assets/minecraft/models/item/mangrove_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_stairs.json b/assets/minecraft/models/item/mangrove_stairs.json deleted file mode 100644 index 281b61b5..00000000 --- a/assets/minecraft/models/item/mangrove_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_trapdoor.json b/assets/minecraft/models/item/mangrove_trapdoor.json deleted file mode 100644 index dec13fde..00000000 --- a/assets/minecraft/models/item/mangrove_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mangrove_wood.json b/assets/minecraft/models/item/mangrove_wood.json deleted file mode 100644 index 99e25bc7..00000000 --- a/assets/minecraft/models/item/mangrove_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mangrove_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/melon.json b/assets/minecraft/models/item/melon.json deleted file mode 100644 index f0bcf44e..00000000 --- a/assets/minecraft/models/item/melon.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/melon" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mooshroom_spawn_egg.json b/assets/minecraft/models/item/mooshroom_spawn_egg.json index d1aaa9d6..9b53bf4e 100644 --- a/assets/minecraft/models/item/mooshroom_spawn_egg.json +++ b/assets/minecraft/models/item/mooshroom_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/mooshroom_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/moss_block.json b/assets/minecraft/models/item/moss_block.json deleted file mode 100644 index 14bf2a81..00000000 --- a/assets/minecraft/models/item/moss_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/moss_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/moss_carpet.json b/assets/minecraft/models/item/moss_carpet.json deleted file mode 100644 index 86a4dfd8..00000000 --- a/assets/minecraft/models/item/moss_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/moss_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_cobblestone.json b/assets/minecraft/models/item/mossy_cobblestone.json deleted file mode 100644 index e865e8fc..00000000 --- a/assets/minecraft/models/item/mossy_cobblestone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_cobblestone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_cobblestone_slab.json b/assets/minecraft/models/item/mossy_cobblestone_slab.json deleted file mode 100644 index 814e6a7a..00000000 --- a/assets/minecraft/models/item/mossy_cobblestone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_cobblestone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_cobblestone_stairs.json b/assets/minecraft/models/item/mossy_cobblestone_stairs.json deleted file mode 100644 index bc2712d2..00000000 --- a/assets/minecraft/models/item/mossy_cobblestone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_cobblestone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_cobblestone_wall.json b/assets/minecraft/models/item/mossy_cobblestone_wall.json deleted file mode 100644 index 8baaff2b..00000000 --- a/assets/minecraft/models/item/mossy_cobblestone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_cobblestone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_stone_brick_slab.json b/assets/minecraft/models/item/mossy_stone_brick_slab.json deleted file mode 100644 index 539b7424..00000000 --- a/assets/minecraft/models/item/mossy_stone_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_stone_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_stone_brick_stairs.json b/assets/minecraft/models/item/mossy_stone_brick_stairs.json deleted file mode 100644 index 2366348b..00000000 --- a/assets/minecraft/models/item/mossy_stone_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_stone_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_stone_brick_wall.json b/assets/minecraft/models/item/mossy_stone_brick_wall.json deleted file mode 100644 index 185b158a..00000000 --- a/assets/minecraft/models/item/mossy_stone_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_stone_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mossy_stone_bricks.json b/assets/minecraft/models/item/mossy_stone_bricks.json deleted file mode 100644 index a9fe750f..00000000 --- a/assets/minecraft/models/item/mossy_stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mossy_stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mud.json b/assets/minecraft/models/item/mud.json deleted file mode 100644 index bee0b1b0..00000000 --- a/assets/minecraft/models/item/mud.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mud" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mud_brick_slab.json b/assets/minecraft/models/item/mud_brick_slab.json deleted file mode 100644 index 06e29291..00000000 --- a/assets/minecraft/models/item/mud_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mud_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mud_brick_stairs.json b/assets/minecraft/models/item/mud_brick_stairs.json deleted file mode 100644 index f6d908dd..00000000 --- a/assets/minecraft/models/item/mud_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mud_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mud_brick_wall.json b/assets/minecraft/models/item/mud_brick_wall.json deleted file mode 100644 index 1679aa63..00000000 --- a/assets/minecraft/models/item/mud_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mud_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mud_bricks.json b/assets/minecraft/models/item/mud_bricks.json deleted file mode 100644 index 4ff42f1c..00000000 --- a/assets/minecraft/models/item/mud_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mud_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/muddy_mangrove_roots.json b/assets/minecraft/models/item/muddy_mangrove_roots.json deleted file mode 100644 index a23b27d1..00000000 --- a/assets/minecraft/models/item/muddy_mangrove_roots.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/muddy_mangrove_roots" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mule_spawn_egg.json b/assets/minecraft/models/item/mule_spawn_egg.json index d1aaa9d6..1b73ff67 100644 --- a/assets/minecraft/models/item/mule_spawn_egg.json +++ b/assets/minecraft/models/item/mule_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/mule_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/mushroom_stem.json b/assets/minecraft/models/item/mushroom_stem.json deleted file mode 100644 index b791415f..00000000 --- a/assets/minecraft/models/item/mushroom_stem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mushroom_stem_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/mycelium.json b/assets/minecraft/models/item/mycelium.json deleted file mode 100644 index c97f2ec0..00000000 --- a/assets/minecraft/models/item/mycelium.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/mycelium" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_brick_fence.json b/assets/minecraft/models/item/nether_brick_fence.json deleted file mode 100644 index 5a72d31a..00000000 --- a/assets/minecraft/models/item/nether_brick_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_brick_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_brick_slab.json b/assets/minecraft/models/item/nether_brick_slab.json deleted file mode 100644 index dc7b2097..00000000 --- a/assets/minecraft/models/item/nether_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_brick_stairs.json b/assets/minecraft/models/item/nether_brick_stairs.json deleted file mode 100644 index c0669dfe..00000000 --- a/assets/minecraft/models/item/nether_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_brick_wall.json b/assets/minecraft/models/item/nether_brick_wall.json deleted file mode 100644 index e01270d4..00000000 --- a/assets/minecraft/models/item/nether_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_bricks.json b/assets/minecraft/models/item/nether_bricks.json deleted file mode 100644 index ada571f6..00000000 --- a/assets/minecraft/models/item/nether_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_gold_ore.json b/assets/minecraft/models/item/nether_gold_ore.json deleted file mode 100644 index ca989c79..00000000 --- a/assets/minecraft/models/item/nether_gold_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_gold_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_quartz_ore.json b/assets/minecraft/models/item/nether_quartz_ore.json deleted file mode 100644 index 4c6d1bf7..00000000 --- a/assets/minecraft/models/item/nether_quartz_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_quartz_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/nether_wart_block.json b/assets/minecraft/models/item/nether_wart_block.json deleted file mode 100644 index a66f9a27..00000000 --- a/assets/minecraft/models/item/nether_wart_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/nether_wart_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherite_block.json b/assets/minecraft/models/item/netherite_block.json deleted file mode 100644 index 828da634..00000000 --- a/assets/minecraft/models/item/netherite_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/netherite_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherite_boots.json b/assets/minecraft/models/item/netherite_boots.json index 6aa46fb3..c7dae902 100644 --- a/assets/minecraft/models/item/netherite_boots.json +++ b/assets/minecraft/models/item/netherite_boots.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/netherite_boots_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/netherite_boots_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/netherite_boots_netherite_darker_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/netherite_boots_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/netherite_boots_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/netherite_boots_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/netherite_boots_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/netherite_boots_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/netherite_boots_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/netherite_boots_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/netherite_boots" } diff --git a/assets/minecraft/models/item/netherite_boots_netherite_darker_trim.json b/assets/minecraft/models/item/netherite_boots_netherite_trim.json similarity index 100% rename from assets/minecraft/models/item/netherite_boots_netherite_darker_trim.json rename to assets/minecraft/models/item/netherite_boots_netherite_trim.json diff --git a/assets/minecraft/models/item/netherite_boots_resin_trim.json b/assets/minecraft/models/item/netherite_boots_resin_trim.json new file mode 100644 index 00000000..a6395da1 --- /dev/null +++ b/assets/minecraft/models/item/netherite_boots_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/netherite_boots", + "layer1": "minecraft:trims/items/boots_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherite_chestplate.json b/assets/minecraft/models/item/netherite_chestplate.json index 64e84e2a..61d2982a 100644 --- a/assets/minecraft/models/item/netherite_chestplate.json +++ b/assets/minecraft/models/item/netherite_chestplate.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/netherite_chestplate_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/netherite_chestplate_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/netherite_chestplate_netherite_darker_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/netherite_chestplate_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/netherite_chestplate_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/netherite_chestplate_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/netherite_chestplate_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/netherite_chestplate_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/netherite_chestplate_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/netherite_chestplate_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/netherite_chestplate" } diff --git a/assets/minecraft/models/item/netherite_chestplate_netherite_darker_trim.json b/assets/minecraft/models/item/netherite_chestplate_netherite_trim.json similarity index 100% rename from assets/minecraft/models/item/netherite_chestplate_netherite_darker_trim.json rename to assets/minecraft/models/item/netherite_chestplate_netherite_trim.json diff --git a/assets/minecraft/models/item/netherite_chestplate_resin_trim.json b/assets/minecraft/models/item/netherite_chestplate_resin_trim.json new file mode 100644 index 00000000..b352e3be --- /dev/null +++ b/assets/minecraft/models/item/netherite_chestplate_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/netherite_chestplate", + "layer1": "minecraft:trims/items/chestplate_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherite_helmet.json b/assets/minecraft/models/item/netherite_helmet.json index a39c9484..4df20a59 100644 --- a/assets/minecraft/models/item/netherite_helmet.json +++ b/assets/minecraft/models/item/netherite_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/netherite_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/netherite_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/netherite_helmet_netherite_darker_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/netherite_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/netherite_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/netherite_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/netherite_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/netherite_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/netherite_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/netherite_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/netherite_helmet" } diff --git a/assets/minecraft/models/item/netherite_helmet_netherite_darker_trim.json b/assets/minecraft/models/item/netherite_helmet_netherite_trim.json similarity index 100% rename from assets/minecraft/models/item/netherite_helmet_netherite_darker_trim.json rename to assets/minecraft/models/item/netherite_helmet_netherite_trim.json diff --git a/assets/minecraft/models/item/netherite_helmet_resin_trim.json b/assets/minecraft/models/item/netherite_helmet_resin_trim.json new file mode 100644 index 00000000..07e5f3e5 --- /dev/null +++ b/assets/minecraft/models/item/netherite_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/netherite_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherite_leggings.json b/assets/minecraft/models/item/netherite_leggings.json index eb732807..e3e889cc 100644 --- a/assets/minecraft/models/item/netherite_leggings.json +++ b/assets/minecraft/models/item/netherite_leggings.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/netherite_leggings_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/netherite_leggings_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/netherite_leggings_netherite_darker_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/netherite_leggings_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/netherite_leggings_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/netherite_leggings_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/netherite_leggings_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/netherite_leggings_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/netherite_leggings_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/netherite_leggings_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/netherite_leggings" } diff --git a/assets/minecraft/models/item/netherite_leggings_netherite_darker_trim.json b/assets/minecraft/models/item/netherite_leggings_netherite_trim.json similarity index 100% rename from assets/minecraft/models/item/netherite_leggings_netherite_darker_trim.json rename to assets/minecraft/models/item/netherite_leggings_netherite_trim.json diff --git a/assets/minecraft/models/item/netherite_leggings_resin_trim.json b/assets/minecraft/models/item/netherite_leggings_resin_trim.json new file mode 100644 index 00000000..46652a0d --- /dev/null +++ b/assets/minecraft/models/item/netherite_leggings_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/netherite_leggings", + "layer1": "minecraft:trims/items/leggings_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/netherrack.json b/assets/minecraft/models/item/netherrack.json deleted file mode 100644 index 39d75ee8..00000000 --- a/assets/minecraft/models/item/netherrack.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/netherrack" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/note_block.json b/assets/minecraft/models/item/note_block.json deleted file mode 100644 index dd873344..00000000 --- a/assets/minecraft/models/item/note_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/note_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_button.json b/assets/minecraft/models/item/oak_button.json deleted file mode 100644 index 7e99608e..00000000 --- a/assets/minecraft/models/item/oak_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_fence.json b/assets/minecraft/models/item/oak_fence.json deleted file mode 100644 index 039fd914..00000000 --- a/assets/minecraft/models/item/oak_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_fence_gate.json b/assets/minecraft/models/item/oak_fence_gate.json deleted file mode 100644 index 04dee087..00000000 --- a/assets/minecraft/models/item/oak_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_leaves.json b/assets/minecraft/models/item/oak_leaves.json deleted file mode 100644 index a54fc8a7..00000000 --- a/assets/minecraft/models/item/oak_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_log.json b/assets/minecraft/models/item/oak_log.json deleted file mode 100644 index b450f38f..00000000 --- a/assets/minecraft/models/item/oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_planks.json b/assets/minecraft/models/item/oak_planks.json deleted file mode 100644 index a0351753..00000000 --- a/assets/minecraft/models/item/oak_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_pressure_plate.json b/assets/minecraft/models/item/oak_pressure_plate.json deleted file mode 100644 index ec3f4456..00000000 --- a/assets/minecraft/models/item/oak_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_slab.json b/assets/minecraft/models/item/oak_slab.json deleted file mode 100644 index 263d7d00..00000000 --- a/assets/minecraft/models/item/oak_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_stairs.json b/assets/minecraft/models/item/oak_stairs.json deleted file mode 100644 index 282b4310..00000000 --- a/assets/minecraft/models/item/oak_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_trapdoor.json b/assets/minecraft/models/item/oak_trapdoor.json deleted file mode 100644 index a041a5b4..00000000 --- a/assets/minecraft/models/item/oak_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oak_wood.json b/assets/minecraft/models/item/oak_wood.json deleted file mode 100644 index a51270ef..00000000 --- a/assets/minecraft/models/item/oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/observer.json b/assets/minecraft/models/item/observer.json deleted file mode 100644 index c1e1ddfe..00000000 --- a/assets/minecraft/models/item/observer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/observer" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/obsidian.json b/assets/minecraft/models/item/obsidian.json deleted file mode 100644 index 0c124ed6..00000000 --- a/assets/minecraft/models/item/obsidian.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/obsidian" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/ocelot_spawn_egg.json b/assets/minecraft/models/item/ocelot_spawn_egg.json index d1aaa9d6..4adda930 100644 --- a/assets/minecraft/models/item/ocelot_spawn_egg.json +++ b/assets/minecraft/models/item/ocelot_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/ocelot_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/ochre_froglight.json b/assets/minecraft/models/item/ochre_froglight.json deleted file mode 100644 index d5bf2ba4..00000000 --- a/assets/minecraft/models/item/ochre_froglight.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/ochre_froglight" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/open_eyeblossom.json b/assets/minecraft/models/item/open_eyeblossom.json new file mode 100644 index 00000000..ac735ccd --- /dev/null +++ b/assets/minecraft/models/item/open_eyeblossom.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/open_eyeblossom", + "layer1": "minecraft:block/open_eyeblossom_emissive" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_banner.json b/assets/minecraft/models/item/orange_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/orange_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_bundle_open_back.json b/assets/minecraft/models/item/orange_bundle_open_back.json index f9980720..b484ed1f 100644 --- a/assets/minecraft/models/item/orange_bundle_open_back.json +++ b/assets/minecraft/models/item/orange_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/orange_bundle_open_back" + "layer0": "minecraft:item/orange_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_bundle_open_front.json b/assets/minecraft/models/item/orange_bundle_open_front.json index 4387fded..7f55075b 100644 --- a/assets/minecraft/models/item/orange_bundle_open_front.json +++ b/assets/minecraft/models/item/orange_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/orange_bundle_open_front" + "layer0": "minecraft:item/orange_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_carpet.json b/assets/minecraft/models/item/orange_carpet.json deleted file mode 100644 index f1421e23..00000000 --- a/assets/minecraft/models/item/orange_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_concrete.json b/assets/minecraft/models/item/orange_concrete.json deleted file mode 100644 index 6238369f..00000000 --- a/assets/minecraft/models/item/orange_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_concrete_powder.json b/assets/minecraft/models/item/orange_concrete_powder.json deleted file mode 100644 index 3c854fe1..00000000 --- a/assets/minecraft/models/item/orange_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_glazed_terracotta.json b/assets/minecraft/models/item/orange_glazed_terracotta.json deleted file mode 100644 index 9a67ff62..00000000 --- a/assets/minecraft/models/item/orange_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_stained_glass.json b/assets/minecraft/models/item/orange_stained_glass.json deleted file mode 100644 index b00fed28..00000000 --- a/assets/minecraft/models/item/orange_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_terracotta.json b/assets/minecraft/models/item/orange_terracotta.json deleted file mode 100644 index 6d399783..00000000 --- a/assets/minecraft/models/item/orange_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/orange_wool.json b/assets/minecraft/models/item/orange_wool.json deleted file mode 100644 index e7c54f33..00000000 --- a/assets/minecraft/models/item/orange_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/orange_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_chiseled_copper.json b/assets/minecraft/models/item/oxidized_chiseled_copper.json deleted file mode 100644 index 72020427..00000000 --- a/assets/minecraft/models/item/oxidized_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_copper.json b/assets/minecraft/models/item/oxidized_copper.json deleted file mode 100644 index 63a0dabe..00000000 --- a/assets/minecraft/models/item/oxidized_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_copper_bulb.json b/assets/minecraft/models/item/oxidized_copper_bulb.json deleted file mode 100644 index 1624fe6e..00000000 --- a/assets/minecraft/models/item/oxidized_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_copper_grate.json b/assets/minecraft/models/item/oxidized_copper_grate.json deleted file mode 100644 index e2521c38..00000000 --- a/assets/minecraft/models/item/oxidized_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_copper_trapdoor.json b/assets/minecraft/models/item/oxidized_copper_trapdoor.json deleted file mode 100644 index 3685e9b2..00000000 --- a/assets/minecraft/models/item/oxidized_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_cut_copper.json b/assets/minecraft/models/item/oxidized_cut_copper.json deleted file mode 100644 index 36dfa030..00000000 --- a/assets/minecraft/models/item/oxidized_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_cut_copper_slab.json b/assets/minecraft/models/item/oxidized_cut_copper_slab.json deleted file mode 100644 index a3d02242..00000000 --- a/assets/minecraft/models/item/oxidized_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/oxidized_cut_copper_stairs.json b/assets/minecraft/models/item/oxidized_cut_copper_stairs.json deleted file mode 100644 index fd8af1aa..00000000 --- a/assets/minecraft/models/item/oxidized_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/packed_ice.json b/assets/minecraft/models/item/packed_ice.json deleted file mode 100644 index bada5d8e..00000000 --- a/assets/minecraft/models/item/packed_ice.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/packed_ice" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/packed_mud.json b/assets/minecraft/models/item/packed_mud.json deleted file mode 100644 index 8ac65758..00000000 --- a/assets/minecraft/models/item/packed_mud.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/packed_mud" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_moss_block.json b/assets/minecraft/models/item/pale_moss_block.json deleted file mode 100644 index 89a69ea6..00000000 --- a/assets/minecraft/models/item/pale_moss_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_moss_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_moss_carpet.json b/assets/minecraft/models/item/pale_moss_carpet.json deleted file mode 100644 index 26f94ad4..00000000 --- a/assets/minecraft/models/item/pale_moss_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_moss_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_button.json b/assets/minecraft/models/item/pale_oak_button.json deleted file mode 100644 index cdad389a..00000000 --- a/assets/minecraft/models/item/pale_oak_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_fence.json b/assets/minecraft/models/item/pale_oak_fence.json deleted file mode 100644 index b5b71354..00000000 --- a/assets/minecraft/models/item/pale_oak_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_fence_gate.json b/assets/minecraft/models/item/pale_oak_fence_gate.json deleted file mode 100644 index 1c5a842a..00000000 --- a/assets/minecraft/models/item/pale_oak_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_leaves.json b/assets/minecraft/models/item/pale_oak_leaves.json deleted file mode 100644 index 5b7e1362..00000000 --- a/assets/minecraft/models/item/pale_oak_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_log.json b/assets/minecraft/models/item/pale_oak_log.json deleted file mode 100644 index 0eb844ba..00000000 --- a/assets/minecraft/models/item/pale_oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_planks.json b/assets/minecraft/models/item/pale_oak_planks.json deleted file mode 100644 index d797221c..00000000 --- a/assets/minecraft/models/item/pale_oak_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_pressure_plate.json b/assets/minecraft/models/item/pale_oak_pressure_plate.json deleted file mode 100644 index 4cd5b4f2..00000000 --- a/assets/minecraft/models/item/pale_oak_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_slab.json b/assets/minecraft/models/item/pale_oak_slab.json deleted file mode 100644 index bcd617ec..00000000 --- a/assets/minecraft/models/item/pale_oak_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_stairs.json b/assets/minecraft/models/item/pale_oak_stairs.json deleted file mode 100644 index 6b682772..00000000 --- a/assets/minecraft/models/item/pale_oak_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_trapdoor.json b/assets/minecraft/models/item/pale_oak_trapdoor.json deleted file mode 100644 index 4da9662e..00000000 --- a/assets/minecraft/models/item/pale_oak_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pale_oak_wood.json b/assets/minecraft/models/item/pale_oak_wood.json deleted file mode 100644 index 60be9f58..00000000 --- a/assets/minecraft/models/item/pale_oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pale_oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/panda_spawn_egg.json b/assets/minecraft/models/item/panda_spawn_egg.json index d1aaa9d6..e18ff722 100644 --- a/assets/minecraft/models/item/panda_spawn_egg.json +++ b/assets/minecraft/models/item/panda_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/panda_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/parrot_spawn_egg.json b/assets/minecraft/models/item/parrot_spawn_egg.json index d1aaa9d6..dbda1d12 100644 --- a/assets/minecraft/models/item/parrot_spawn_egg.json +++ b/assets/minecraft/models/item/parrot_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/parrot_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/pearlescent_froglight.json b/assets/minecraft/models/item/pearlescent_froglight.json deleted file mode 100644 index 3a9d87f4..00000000 --- a/assets/minecraft/models/item/pearlescent_froglight.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pearlescent_froglight" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/petrified_oak_slab.json b/assets/minecraft/models/item/petrified_oak_slab.json deleted file mode 100644 index 36ecfd7c..00000000 --- a/assets/minecraft/models/item/petrified_oak_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/petrified_oak_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/phantom_spawn_egg.json b/assets/minecraft/models/item/phantom_spawn_egg.json index d1aaa9d6..0e9a8784 100644 --- a/assets/minecraft/models/item/phantom_spawn_egg.json +++ b/assets/minecraft/models/item/phantom_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/phantom_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/pig_spawn_egg.json b/assets/minecraft/models/item/pig_spawn_egg.json index d1aaa9d6..c9f75608 100644 --- a/assets/minecraft/models/item/pig_spawn_egg.json +++ b/assets/minecraft/models/item/pig_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/pig_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/piglin_brute_spawn_egg.json b/assets/minecraft/models/item/piglin_brute_spawn_egg.json index d1aaa9d6..040d3224 100644 --- a/assets/minecraft/models/item/piglin_brute_spawn_egg.json +++ b/assets/minecraft/models/item/piglin_brute_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/piglin_brute_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/piglin_head.json b/assets/minecraft/models/item/piglin_head.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/piglin_head.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/piglin_spawn_egg.json b/assets/minecraft/models/item/piglin_spawn_egg.json index d1aaa9d6..79439547 100644 --- a/assets/minecraft/models/item/piglin_spawn_egg.json +++ b/assets/minecraft/models/item/piglin_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/piglin_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/pillager_spawn_egg.json b/assets/minecraft/models/item/pillager_spawn_egg.json index d1aaa9d6..54ab4a3f 100644 --- a/assets/minecraft/models/item/pillager_spawn_egg.json +++ b/assets/minecraft/models/item/pillager_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/pillager_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_banner.json b/assets/minecraft/models/item/pink_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/pink_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_bundle_open_back.json b/assets/minecraft/models/item/pink_bundle_open_back.json index c30768bb..a99ca47f 100644 --- a/assets/minecraft/models/item/pink_bundle_open_back.json +++ b/assets/minecraft/models/item/pink_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/pink_bundle_open_back" + "layer0": "minecraft:item/pink_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_bundle_open_front.json b/assets/minecraft/models/item/pink_bundle_open_front.json index 26d8f26d..4f7b5fb4 100644 --- a/assets/minecraft/models/item/pink_bundle_open_front.json +++ b/assets/minecraft/models/item/pink_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/pink_bundle_open_front" + "layer0": "minecraft:item/pink_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_carpet.json b/assets/minecraft/models/item/pink_carpet.json deleted file mode 100644 index b2709108..00000000 --- a/assets/minecraft/models/item/pink_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_concrete.json b/assets/minecraft/models/item/pink_concrete.json deleted file mode 100644 index 770e1feb..00000000 --- a/assets/minecraft/models/item/pink_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_concrete_powder.json b/assets/minecraft/models/item/pink_concrete_powder.json deleted file mode 100644 index 29803f66..00000000 --- a/assets/minecraft/models/item/pink_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_glazed_terracotta.json b/assets/minecraft/models/item/pink_glazed_terracotta.json deleted file mode 100644 index c8ea2b25..00000000 --- a/assets/minecraft/models/item/pink_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_stained_glass.json b/assets/minecraft/models/item/pink_stained_glass.json deleted file mode 100644 index b0bc8968..00000000 --- a/assets/minecraft/models/item/pink_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_terracotta.json b/assets/minecraft/models/item/pink_terracotta.json deleted file mode 100644 index 2e558749..00000000 --- a/assets/minecraft/models/item/pink_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pink_wool.json b/assets/minecraft/models/item/pink_wool.json deleted file mode 100644 index 9f1e510f..00000000 --- a/assets/minecraft/models/item/pink_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pink_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/piston.json b/assets/minecraft/models/item/piston.json deleted file mode 100644 index 669d1c40..00000000 --- a/assets/minecraft/models/item/piston.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/piston_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/player_head.json b/assets/minecraft/models/item/player_head.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/player_head.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/podzol.json b/assets/minecraft/models/item/podzol.json deleted file mode 100644 index ec047498..00000000 --- a/assets/minecraft/models/item/podzol.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/podzol" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polar_bear_spawn_egg.json b/assets/minecraft/models/item/polar_bear_spawn_egg.json index d1aaa9d6..01d5fd1a 100644 --- a/assets/minecraft/models/item/polar_bear_spawn_egg.json +++ b/assets/minecraft/models/item/polar_bear_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/polar_bear_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_andesite.json b/assets/minecraft/models/item/polished_andesite.json deleted file mode 100644 index 4968aa47..00000000 --- a/assets/minecraft/models/item/polished_andesite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_andesite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_andesite_slab.json b/assets/minecraft/models/item/polished_andesite_slab.json deleted file mode 100644 index dbaf20ca..00000000 --- a/assets/minecraft/models/item/polished_andesite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_andesite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_andesite_stairs.json b/assets/minecraft/models/item/polished_andesite_stairs.json deleted file mode 100644 index 0695848c..00000000 --- a/assets/minecraft/models/item/polished_andesite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_andesite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_basalt.json b/assets/minecraft/models/item/polished_basalt.json deleted file mode 100644 index 00d0a8ab..00000000 --- a/assets/minecraft/models/item/polished_basalt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_basalt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone.json b/assets/minecraft/models/item/polished_blackstone.json deleted file mode 100644 index b60255af..00000000 --- a/assets/minecraft/models/item/polished_blackstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_brick_slab.json b/assets/minecraft/models/item/polished_blackstone_brick_slab.json deleted file mode 100644 index 35a5786c..00000000 --- a/assets/minecraft/models/item/polished_blackstone_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_brick_stairs.json b/assets/minecraft/models/item/polished_blackstone_brick_stairs.json deleted file mode 100644 index bfdf49c1..00000000 --- a/assets/minecraft/models/item/polished_blackstone_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_brick_wall.json b/assets/minecraft/models/item/polished_blackstone_brick_wall.json deleted file mode 100644 index 58262eed..00000000 --- a/assets/minecraft/models/item/polished_blackstone_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_bricks.json b/assets/minecraft/models/item/polished_blackstone_bricks.json deleted file mode 100644 index 2c7c6530..00000000 --- a/assets/minecraft/models/item/polished_blackstone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_button.json b/assets/minecraft/models/item/polished_blackstone_button.json deleted file mode 100644 index e815336b..00000000 --- a/assets/minecraft/models/item/polished_blackstone_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_pressure_plate.json b/assets/minecraft/models/item/polished_blackstone_pressure_plate.json deleted file mode 100644 index 766e8c66..00000000 --- a/assets/minecraft/models/item/polished_blackstone_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_slab.json b/assets/minecraft/models/item/polished_blackstone_slab.json deleted file mode 100644 index ab598bb6..00000000 --- a/assets/minecraft/models/item/polished_blackstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_stairs.json b/assets/minecraft/models/item/polished_blackstone_stairs.json deleted file mode 100644 index a21c5771..00000000 --- a/assets/minecraft/models/item/polished_blackstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_blackstone_wall.json b/assets/minecraft/models/item/polished_blackstone_wall.json deleted file mode 100644 index 23e2c0d4..00000000 --- a/assets/minecraft/models/item/polished_blackstone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_blackstone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_deepslate.json b/assets/minecraft/models/item/polished_deepslate.json deleted file mode 100644 index a2e3fde1..00000000 --- a/assets/minecraft/models/item/polished_deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_deepslate_slab.json b/assets/minecraft/models/item/polished_deepslate_slab.json deleted file mode 100644 index 0bb03241..00000000 --- a/assets/minecraft/models/item/polished_deepslate_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_deepslate_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_deepslate_stairs.json b/assets/minecraft/models/item/polished_deepslate_stairs.json deleted file mode 100644 index 06f41f9f..00000000 --- a/assets/minecraft/models/item/polished_deepslate_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_deepslate_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_deepslate_wall.json b/assets/minecraft/models/item/polished_deepslate_wall.json deleted file mode 100644 index 1d05cf88..00000000 --- a/assets/minecraft/models/item/polished_deepslate_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_deepslate_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_diorite.json b/assets/minecraft/models/item/polished_diorite.json deleted file mode 100644 index aed47750..00000000 --- a/assets/minecraft/models/item/polished_diorite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_diorite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_diorite_slab.json b/assets/minecraft/models/item/polished_diorite_slab.json deleted file mode 100644 index 2fd79e18..00000000 --- a/assets/minecraft/models/item/polished_diorite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_diorite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_diorite_stairs.json b/assets/minecraft/models/item/polished_diorite_stairs.json deleted file mode 100644 index 0ec5d5a6..00000000 --- a/assets/minecraft/models/item/polished_diorite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_diorite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_granite.json b/assets/minecraft/models/item/polished_granite.json deleted file mode 100644 index 11ee51c4..00000000 --- a/assets/minecraft/models/item/polished_granite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_granite" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_granite_slab.json b/assets/minecraft/models/item/polished_granite_slab.json deleted file mode 100644 index add758b6..00000000 --- a/assets/minecraft/models/item/polished_granite_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_granite_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_granite_stairs.json b/assets/minecraft/models/item/polished_granite_stairs.json deleted file mode 100644 index 083d71c8..00000000 --- a/assets/minecraft/models/item/polished_granite_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_granite_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_tuff.json b/assets/minecraft/models/item/polished_tuff.json deleted file mode 100644 index a34c7b0a..00000000 --- a/assets/minecraft/models/item/polished_tuff.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_tuff" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_tuff_slab.json b/assets/minecraft/models/item/polished_tuff_slab.json deleted file mode 100644 index 948607bf..00000000 --- a/assets/minecraft/models/item/polished_tuff_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_tuff_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_tuff_stairs.json b/assets/minecraft/models/item/polished_tuff_stairs.json deleted file mode 100644 index 98b91c00..00000000 --- a/assets/minecraft/models/item/polished_tuff_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_tuff_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/polished_tuff_wall.json b/assets/minecraft/models/item/polished_tuff_wall.json deleted file mode 100644 index c0a8bed6..00000000 --- a/assets/minecraft/models/item/polished_tuff_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/polished_tuff_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/potion.json b/assets/minecraft/models/item/potion.json index 73c2a578..b4ae02ba 100644 --- a/assets/minecraft/models/item/potion.json +++ b/assets/minecraft/models/item/potion.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/potion_overlay", - "layer1": "item/potion" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/potion_overlay", + "layer1": "minecraft:item/potion" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine.json b/assets/minecraft/models/item/prismarine.json deleted file mode 100644 index 052a4159..00000000 --- a/assets/minecraft/models/item/prismarine.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_brick_slab.json b/assets/minecraft/models/item/prismarine_brick_slab.json deleted file mode 100644 index 905e4429..00000000 --- a/assets/minecraft/models/item/prismarine_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_brick_stairs.json b/assets/minecraft/models/item/prismarine_brick_stairs.json deleted file mode 100644 index e5f6c0f4..00000000 --- a/assets/minecraft/models/item/prismarine_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_bricks.json b/assets/minecraft/models/item/prismarine_bricks.json deleted file mode 100644 index dfe1634f..00000000 --- a/assets/minecraft/models/item/prismarine_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_slab.json b/assets/minecraft/models/item/prismarine_slab.json deleted file mode 100644 index 9894ef18..00000000 --- a/assets/minecraft/models/item/prismarine_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_stairs.json b/assets/minecraft/models/item/prismarine_stairs.json deleted file mode 100644 index 356abf59..00000000 --- a/assets/minecraft/models/item/prismarine_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/prismarine_wall.json b/assets/minecraft/models/item/prismarine_wall.json deleted file mode 100644 index 16dec992..00000000 --- a/assets/minecraft/models/item/prismarine_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/prismarine_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/pufferfish_spawn_egg.json b/assets/minecraft/models/item/pufferfish_spawn_egg.json index d1aaa9d6..f1e839df 100644 --- a/assets/minecraft/models/item/pufferfish_spawn_egg.json +++ b/assets/minecraft/models/item/pufferfish_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/pufferfish_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/pumpkin.json b/assets/minecraft/models/item/pumpkin.json deleted file mode 100644 index f725b476..00000000 --- a/assets/minecraft/models/item/pumpkin.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/pumpkin" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_banner.json b/assets/minecraft/models/item/purple_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/purple_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_bundle_open_back.json b/assets/minecraft/models/item/purple_bundle_open_back.json index 17cf859e..51c7f27f 100644 --- a/assets/minecraft/models/item/purple_bundle_open_back.json +++ b/assets/minecraft/models/item/purple_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/purple_bundle_open_back" + "layer0": "minecraft:item/purple_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_bundle_open_front.json b/assets/minecraft/models/item/purple_bundle_open_front.json index 6ac61497..55a80b56 100644 --- a/assets/minecraft/models/item/purple_bundle_open_front.json +++ b/assets/minecraft/models/item/purple_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/purple_bundle_open_front" + "layer0": "minecraft:item/purple_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_carpet.json b/assets/minecraft/models/item/purple_carpet.json deleted file mode 100644 index 94ffd9f4..00000000 --- a/assets/minecraft/models/item/purple_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_concrete.json b/assets/minecraft/models/item/purple_concrete.json deleted file mode 100644 index 437f58fc..00000000 --- a/assets/minecraft/models/item/purple_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_concrete_powder.json b/assets/minecraft/models/item/purple_concrete_powder.json deleted file mode 100644 index 77dba432..00000000 --- a/assets/minecraft/models/item/purple_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_glazed_terracotta.json b/assets/minecraft/models/item/purple_glazed_terracotta.json deleted file mode 100644 index be42ab1a..00000000 --- a/assets/minecraft/models/item/purple_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_stained_glass.json b/assets/minecraft/models/item/purple_stained_glass.json deleted file mode 100644 index cf2ee673..00000000 --- a/assets/minecraft/models/item/purple_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_terracotta.json b/assets/minecraft/models/item/purple_terracotta.json deleted file mode 100644 index a69670d8..00000000 --- a/assets/minecraft/models/item/purple_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purple_wool.json b/assets/minecraft/models/item/purple_wool.json deleted file mode 100644 index 71160d26..00000000 --- a/assets/minecraft/models/item/purple_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purple_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purpur_block.json b/assets/minecraft/models/item/purpur_block.json deleted file mode 100644 index 3e7dfa5a..00000000 --- a/assets/minecraft/models/item/purpur_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purpur_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purpur_pillar.json b/assets/minecraft/models/item/purpur_pillar.json deleted file mode 100644 index 2cb1ab30..00000000 --- a/assets/minecraft/models/item/purpur_pillar.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purpur_pillar" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purpur_slab.json b/assets/minecraft/models/item/purpur_slab.json deleted file mode 100644 index 385a03be..00000000 --- a/assets/minecraft/models/item/purpur_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purpur_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/purpur_stairs.json b/assets/minecraft/models/item/purpur_stairs.json deleted file mode 100644 index 4f881026..00000000 --- a/assets/minecraft/models/item/purpur_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/purpur_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/quartz_block.json b/assets/minecraft/models/item/quartz_block.json deleted file mode 100644 index f0966126..00000000 --- a/assets/minecraft/models/item/quartz_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/quartz_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/quartz_bricks.json b/assets/minecraft/models/item/quartz_bricks.json deleted file mode 100644 index d2d45cf7..00000000 --- a/assets/minecraft/models/item/quartz_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/quartz_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/quartz_pillar.json b/assets/minecraft/models/item/quartz_pillar.json deleted file mode 100644 index 52905d11..00000000 --- a/assets/minecraft/models/item/quartz_pillar.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/quartz_pillar" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/quartz_slab.json b/assets/minecraft/models/item/quartz_slab.json deleted file mode 100644 index 9cd0ebe7..00000000 --- a/assets/minecraft/models/item/quartz_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/quartz_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/quartz_stairs.json b/assets/minecraft/models/item/quartz_stairs.json deleted file mode 100644 index 4126d6e4..00000000 --- a/assets/minecraft/models/item/quartz_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/quartz_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/rabbit_spawn_egg.json b/assets/minecraft/models/item/rabbit_spawn_egg.json index d1aaa9d6..df2a0fec 100644 --- a/assets/minecraft/models/item/rabbit_spawn_egg.json +++ b/assets/minecraft/models/item/rabbit_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/rabbit_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/ravager_spawn_egg.json b/assets/minecraft/models/item/ravager_spawn_egg.json index d1aaa9d6..8f1f906d 100644 --- a/assets/minecraft/models/item/ravager_spawn_egg.json +++ b/assets/minecraft/models/item/ravager_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/ravager_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/raw_copper_block.json b/assets/minecraft/models/item/raw_copper_block.json deleted file mode 100644 index d24df466..00000000 --- a/assets/minecraft/models/item/raw_copper_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/raw_copper_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/raw_gold_block.json b/assets/minecraft/models/item/raw_gold_block.json deleted file mode 100644 index 915e94b9..00000000 --- a/assets/minecraft/models/item/raw_gold_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/raw_gold_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/raw_iron_block.json b/assets/minecraft/models/item/raw_iron_block.json deleted file mode 100644 index b6e6e032..00000000 --- a/assets/minecraft/models/item/raw_iron_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/raw_iron_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/recovery_compass.json b/assets/minecraft/models/item/recovery_compass.json deleted file mode 100644 index 91fb13b8..00000000 --- a/assets/minecraft/models/item/recovery_compass.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "item/recovery_compass_16" - }, - "overrides": [ - { "predicate": { "angle": 0.000000 }, "model": "item/recovery_compass" }, - { "predicate": { "angle": 0.015625 }, "model": "item/recovery_compass_17" }, - { "predicate": { "angle": 0.046875 }, "model": "item/recovery_compass_18" }, - { "predicate": { "angle": 0.078125 }, "model": "item/recovery_compass_19" }, - { "predicate": { "angle": 0.109375 }, "model": "item/recovery_compass_20" }, - { "predicate": { "angle": 0.140625 }, "model": "item/recovery_compass_21" }, - { "predicate": { "angle": 0.171875 }, "model": "item/recovery_compass_22" }, - { "predicate": { "angle": 0.203125 }, "model": "item/recovery_compass_23" }, - { "predicate": { "angle": 0.234375 }, "model": "item/recovery_compass_24" }, - { "predicate": { "angle": 0.265625 }, "model": "item/recovery_compass_25" }, - { "predicate": { "angle": 0.296875 }, "model": "item/recovery_compass_26" }, - { "predicate": { "angle": 0.328125 }, "model": "item/recovery_compass_27" }, - { "predicate": { "angle": 0.359375 }, "model": "item/recovery_compass_28" }, - { "predicate": { "angle": 0.390625 }, "model": "item/recovery_compass_29" }, - { "predicate": { "angle": 0.421875 }, "model": "item/recovery_compass_30" }, - { "predicate": { "angle": 0.453125 }, "model": "item/recovery_compass_31" }, - { "predicate": { "angle": 0.484375 }, "model": "item/recovery_compass_00" }, - { "predicate": { "angle": 0.515625 }, "model": "item/recovery_compass_01" }, - { "predicate": { "angle": 0.546875 }, "model": "item/recovery_compass_02" }, - { "predicate": { "angle": 0.578125 }, "model": "item/recovery_compass_03" }, - { "predicate": { "angle": 0.609375 }, "model": "item/recovery_compass_04" }, - { "predicate": { "angle": 0.640625 }, "model": "item/recovery_compass_05" }, - { "predicate": { "angle": 0.671875 }, "model": "item/recovery_compass_06" }, - { "predicate": { "angle": 0.703125 }, "model": "item/recovery_compass_07" }, - { "predicate": { "angle": 0.734375 }, "model": "item/recovery_compass_08" }, - { "predicate": { "angle": 0.765625 }, "model": "item/recovery_compass_09" }, - { "predicate": { "angle": 0.796875 }, "model": "item/recovery_compass_10" }, - { "predicate": { "angle": 0.828125 }, "model": "item/recovery_compass_11" }, - { "predicate": { "angle": 0.859375 }, "model": "item/recovery_compass_12" }, - { "predicate": { "angle": 0.890625 }, "model": "item/recovery_compass_13" }, - { "predicate": { "angle": 0.921875 }, "model": "item/recovery_compass_14" }, - { "predicate": { "angle": 0.953125 }, "model": "item/recovery_compass_15" }, - { "predicate": { "angle": 0.984375 }, "model": "item/recovery_compass" } - ] -} diff --git a/assets/minecraft/models/item/recovery_compass_16.json b/assets/minecraft/models/item/recovery_compass_16.json new file mode 100644 index 00000000..ff17fc8e --- /dev/null +++ b/assets/minecraft/models/item/recovery_compass_16.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/recovery_compass_16" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_banner.json b/assets/minecraft/models/item/red_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/red_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_bundle_open_back.json b/assets/minecraft/models/item/red_bundle_open_back.json index 1ff1d08e..8d01e6cd 100644 --- a/assets/minecraft/models/item/red_bundle_open_back.json +++ b/assets/minecraft/models/item/red_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/red_bundle_open_back" + "layer0": "minecraft:item/red_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_bundle_open_front.json b/assets/minecraft/models/item/red_bundle_open_front.json index b8fe9c32..502fe44a 100644 --- a/assets/minecraft/models/item/red_bundle_open_front.json +++ b/assets/minecraft/models/item/red_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/red_bundle_open_front" + "layer0": "minecraft:item/red_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_carpet.json b/assets/minecraft/models/item/red_carpet.json deleted file mode 100644 index 18e4d52e..00000000 --- a/assets/minecraft/models/item/red_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_concrete.json b/assets/minecraft/models/item/red_concrete.json deleted file mode 100644 index 34a0630b..00000000 --- a/assets/minecraft/models/item/red_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_concrete_powder.json b/assets/minecraft/models/item/red_concrete_powder.json deleted file mode 100644 index 36e0ede7..00000000 --- a/assets/minecraft/models/item/red_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_glazed_terracotta.json b/assets/minecraft/models/item/red_glazed_terracotta.json deleted file mode 100644 index 3870bc2c..00000000 --- a/assets/minecraft/models/item/red_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_mushroom_block.json b/assets/minecraft/models/item/red_mushroom_block.json deleted file mode 100644 index 5ed44fb4..00000000 --- a/assets/minecraft/models/item/red_mushroom_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_mushroom_block_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_nether_brick_slab.json b/assets/minecraft/models/item/red_nether_brick_slab.json deleted file mode 100644 index 73ba1684..00000000 --- a/assets/minecraft/models/item/red_nether_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_nether_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_nether_brick_stairs.json b/assets/minecraft/models/item/red_nether_brick_stairs.json deleted file mode 100644 index 98d716be..00000000 --- a/assets/minecraft/models/item/red_nether_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_nether_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_nether_brick_wall.json b/assets/minecraft/models/item/red_nether_brick_wall.json deleted file mode 100644 index 48f50a64..00000000 --- a/assets/minecraft/models/item/red_nether_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_nether_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_nether_bricks.json b/assets/minecraft/models/item/red_nether_bricks.json deleted file mode 100644 index 51d3d11c..00000000 --- a/assets/minecraft/models/item/red_nether_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_nether_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_sand.json b/assets/minecraft/models/item/red_sand.json deleted file mode 100644 index f3459a82..00000000 --- a/assets/minecraft/models/item/red_sand.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_sand" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_sandstone.json b/assets/minecraft/models/item/red_sandstone.json deleted file mode 100644 index 305751fa..00000000 --- a/assets/minecraft/models/item/red_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_sandstone_slab.json b/assets/minecraft/models/item/red_sandstone_slab.json deleted file mode 100644 index c7473565..00000000 --- a/assets/minecraft/models/item/red_sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_sandstone_stairs.json b/assets/minecraft/models/item/red_sandstone_stairs.json deleted file mode 100644 index 6c0f1c52..00000000 --- a/assets/minecraft/models/item/red_sandstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_sandstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_sandstone_wall.json b/assets/minecraft/models/item/red_sandstone_wall.json deleted file mode 100644 index 7dc10d93..00000000 --- a/assets/minecraft/models/item/red_sandstone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_sandstone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_stained_glass.json b/assets/minecraft/models/item/red_stained_glass.json deleted file mode 100644 index 235d35da..00000000 --- a/assets/minecraft/models/item/red_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_terracotta.json b/assets/minecraft/models/item/red_terracotta.json deleted file mode 100644 index 2ded3a9d..00000000 --- a/assets/minecraft/models/item/red_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/red_wool.json b/assets/minecraft/models/item/red_wool.json deleted file mode 100644 index b0dd8dd6..00000000 --- a/assets/minecraft/models/item/red_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/red_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/redstone_block.json b/assets/minecraft/models/item/redstone_block.json deleted file mode 100644 index 71d9d176..00000000 --- a/assets/minecraft/models/item/redstone_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/redstone_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/redstone_lamp.json b/assets/minecraft/models/item/redstone_lamp.json deleted file mode 100644 index 47f36c43..00000000 --- a/assets/minecraft/models/item/redstone_lamp.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/redstone_lamp" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/redstone_ore.json b/assets/minecraft/models/item/redstone_ore.json deleted file mode 100644 index 503fed06..00000000 --- a/assets/minecraft/models/item/redstone_ore.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/redstone_ore" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/reinforced_deepslate.json b/assets/minecraft/models/item/reinforced_deepslate.json deleted file mode 100644 index 624fd3c4..00000000 --- a/assets/minecraft/models/item/reinforced_deepslate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/reinforced_deepslate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/repeating_command_block.json b/assets/minecraft/models/item/repeating_command_block.json deleted file mode 100644 index 75492a4b..00000000 --- a/assets/minecraft/models/item/repeating_command_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/repeating_command_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/resin_brick.json b/assets/minecraft/models/item/resin_brick.json new file mode 100644 index 00000000..4b91fc38 --- /dev/null +++ b/assets/minecraft/models/item/resin_brick.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/resin_brick" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/resin_clump.json b/assets/minecraft/models/item/resin_clump.json new file mode 100644 index 00000000..edfacb65 --- /dev/null +++ b/assets/minecraft/models/item/resin_clump.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/resin_clump" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/respawn_anchor.json b/assets/minecraft/models/item/respawn_anchor.json deleted file mode 100644 index 7fa102a3..00000000 --- a/assets/minecraft/models/item/respawn_anchor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/respawn_anchor_0" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/rooted_dirt.json b/assets/minecraft/models/item/rooted_dirt.json deleted file mode 100644 index 3d6a9cda..00000000 --- a/assets/minecraft/models/item/rooted_dirt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/rooted_dirt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/salmon_spawn_egg.json b/assets/minecraft/models/item/salmon_spawn_egg.json index d1aaa9d6..c5c93b26 100644 --- a/assets/minecraft/models/item/salmon_spawn_egg.json +++ b/assets/minecraft/models/item/salmon_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/salmon_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/sand.json b/assets/minecraft/models/item/sand.json deleted file mode 100644 index 96c1d00d..00000000 --- a/assets/minecraft/models/item/sand.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sand" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sandstone.json b/assets/minecraft/models/item/sandstone.json deleted file mode 100644 index 474b0ddb..00000000 --- a/assets/minecraft/models/item/sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sandstone_slab.json b/assets/minecraft/models/item/sandstone_slab.json deleted file mode 100644 index 7b8fc6bd..00000000 --- a/assets/minecraft/models/item/sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sandstone_stairs.json b/assets/minecraft/models/item/sandstone_stairs.json deleted file mode 100644 index 989e41ff..00000000 --- a/assets/minecraft/models/item/sandstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sandstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sandstone_wall.json b/assets/minecraft/models/item/sandstone_wall.json deleted file mode 100644 index b4f2149b..00000000 --- a/assets/minecraft/models/item/sandstone_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sandstone_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/scaffolding.json b/assets/minecraft/models/item/scaffolding.json deleted file mode 100644 index 1946d80f..00000000 --- a/assets/minecraft/models/item/scaffolding.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/scaffolding_stable" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sculk.json b/assets/minecraft/models/item/sculk.json deleted file mode 100644 index 12d25d5f..00000000 --- a/assets/minecraft/models/item/sculk.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sculk" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sculk_catalyst.json b/assets/minecraft/models/item/sculk_catalyst.json deleted file mode 100644 index 89e0b5f7..00000000 --- a/assets/minecraft/models/item/sculk_catalyst.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sculk_catalyst" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sculk_sensor.json b/assets/minecraft/models/item/sculk_sensor.json deleted file mode 100644 index a2b8a77d..00000000 --- a/assets/minecraft/models/item/sculk_sensor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sculk_sensor_inactive" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sculk_shrieker.json b/assets/minecraft/models/item/sculk_shrieker.json deleted file mode 100644 index a6c19ae0..00000000 --- a/assets/minecraft/models/item/sculk_shrieker.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sculk_shrieker" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sea_lantern.json b/assets/minecraft/models/item/sea_lantern.json deleted file mode 100644 index 72561fc0..00000000 --- a/assets/minecraft/models/item/sea_lantern.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sea_lantern" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sheep_spawn_egg.json b/assets/minecraft/models/item/sheep_spawn_egg.json index d1aaa9d6..89c13e31 100644 --- a/assets/minecraft/models/item/sheep_spawn_egg.json +++ b/assets/minecraft/models/item/sheep_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/sheep_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/shield.json b/assets/minecraft/models/item/shield.json index dbfc1938..c9ec6c76 100644 --- a/assets/minecraft/models/item/shield.json +++ b/assets/minecraft/models/item/shield.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "block/dark_oak_planks" @@ -40,13 +39,5 @@ "translation": [ 2, 4, 2], "scale":[ 0.25, 0.25, 0.25] } - }, - "overrides": [ - { - "predicate": { - "blocking": 1 - }, - "model": "item/shield_blocking" - } - ] + } } diff --git a/assets/minecraft/models/item/shield_blocking.json b/assets/minecraft/models/item/shield_blocking.json index c68d1cf3..c688ef03 100644 --- a/assets/minecraft/models/item/shield_blocking.json +++ b/assets/minecraft/models/item/shield_blocking.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "block/dark_oak_planks" diff --git a/assets/minecraft/models/item/short_dry_grass.json b/assets/minecraft/models/item/short_dry_grass.json new file mode 100644 index 00000000..9f128fa5 --- /dev/null +++ b/assets/minecraft/models/item/short_dry_grass.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/short_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/shroomlight.json b/assets/minecraft/models/item/shroomlight.json deleted file mode 100644 index 5d8aef63..00000000 --- a/assets/minecraft/models/item/shroomlight.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/shroomlight" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/shulker_spawn_egg.json b/assets/minecraft/models/item/shulker_spawn_egg.json index d1aaa9d6..d7311177 100644 --- a/assets/minecraft/models/item/shulker_spawn_egg.json +++ b/assets/minecraft/models/item/shulker_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/shulker_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/silverfish_spawn_egg.json b/assets/minecraft/models/item/silverfish_spawn_egg.json index d1aaa9d6..1d4c065e 100644 --- a/assets/minecraft/models/item/silverfish_spawn_egg.json +++ b/assets/minecraft/models/item/silverfish_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/silverfish_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/skeleton_horse_spawn_egg.json b/assets/minecraft/models/item/skeleton_horse_spawn_egg.json index d1aaa9d6..64813700 100644 --- a/assets/minecraft/models/item/skeleton_horse_spawn_egg.json +++ b/assets/minecraft/models/item/skeleton_horse_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/skeleton_horse_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/skeleton_skull.json b/assets/minecraft/models/item/skeleton_skull.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/skeleton_skull.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/skeleton_spawn_egg.json b/assets/minecraft/models/item/skeleton_spawn_egg.json index d1aaa9d6..7913cb6d 100644 --- a/assets/minecraft/models/item/skeleton_spawn_egg.json +++ b/assets/minecraft/models/item/skeleton_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/skeleton_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/slime_block.json b/assets/minecraft/models/item/slime_block.json deleted file mode 100644 index 848fbdaf..00000000 --- a/assets/minecraft/models/item/slime_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/slime_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/slime_spawn_egg.json b/assets/minecraft/models/item/slime_spawn_egg.json index d1aaa9d6..3f86521f 100644 --- a/assets/minecraft/models/item/slime_spawn_egg.json +++ b/assets/minecraft/models/item/slime_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/slime_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/smithing_table.json b/assets/minecraft/models/item/smithing_table.json deleted file mode 100644 index 3028d70f..00000000 --- a/assets/minecraft/models/item/smithing_table.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smithing_table" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smoker.json b/assets/minecraft/models/item/smoker.json deleted file mode 100644 index 7d274018..00000000 --- a/assets/minecraft/models/item/smoker.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smoker" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_basalt.json b/assets/minecraft/models/item/smooth_basalt.json deleted file mode 100644 index 327e0054..00000000 --- a/assets/minecraft/models/item/smooth_basalt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_basalt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_quartz.json b/assets/minecraft/models/item/smooth_quartz.json deleted file mode 100644 index b2047c83..00000000 --- a/assets/minecraft/models/item/smooth_quartz.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_quartz" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_quartz_slab.json b/assets/minecraft/models/item/smooth_quartz_slab.json deleted file mode 100644 index 55c15fa9..00000000 --- a/assets/minecraft/models/item/smooth_quartz_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_quartz_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_quartz_stairs.json b/assets/minecraft/models/item/smooth_quartz_stairs.json deleted file mode 100644 index bddcd1cc..00000000 --- a/assets/minecraft/models/item/smooth_quartz_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_quartz_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_red_sandstone.json b/assets/minecraft/models/item/smooth_red_sandstone.json deleted file mode 100644 index 3e8943e4..00000000 --- a/assets/minecraft/models/item/smooth_red_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_red_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_red_sandstone_slab.json b/assets/minecraft/models/item/smooth_red_sandstone_slab.json deleted file mode 100644 index cae67922..00000000 --- a/assets/minecraft/models/item/smooth_red_sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_red_sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_red_sandstone_stairs.json b/assets/minecraft/models/item/smooth_red_sandstone_stairs.json deleted file mode 100644 index 1ba4dd5e..00000000 --- a/assets/minecraft/models/item/smooth_red_sandstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_red_sandstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_sandstone.json b/assets/minecraft/models/item/smooth_sandstone.json deleted file mode 100644 index d702d287..00000000 --- a/assets/minecraft/models/item/smooth_sandstone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_sandstone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_sandstone_slab.json b/assets/minecraft/models/item/smooth_sandstone_slab.json deleted file mode 100644 index 934c7ada..00000000 --- a/assets/minecraft/models/item/smooth_sandstone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_sandstone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_sandstone_stairs.json b/assets/minecraft/models/item/smooth_sandstone_stairs.json deleted file mode 100644 index 74ab5a1a..00000000 --- a/assets/minecraft/models/item/smooth_sandstone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_sandstone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_stone.json b/assets/minecraft/models/item/smooth_stone.json deleted file mode 100644 index 393605bd..00000000 --- a/assets/minecraft/models/item/smooth_stone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_stone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/smooth_stone_slab.json b/assets/minecraft/models/item/smooth_stone_slab.json deleted file mode 100644 index e33dcb4c..00000000 --- a/assets/minecraft/models/item/smooth_stone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/smooth_stone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/sniffer_spawn_egg.json b/assets/minecraft/models/item/sniffer_spawn_egg.json index d1aaa9d6..046de317 100644 --- a/assets/minecraft/models/item/sniffer_spawn_egg.json +++ b/assets/minecraft/models/item/sniffer_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/sniffer_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/snow.json b/assets/minecraft/models/item/snow.json deleted file mode 100644 index a4d1c989..00000000 --- a/assets/minecraft/models/item/snow.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/snow_height2" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/snow_block.json b/assets/minecraft/models/item/snow_block.json deleted file mode 100644 index 1564e775..00000000 --- a/assets/minecraft/models/item/snow_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/snow_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/snow_golem_spawn_egg.json b/assets/minecraft/models/item/snow_golem_spawn_egg.json index d1aaa9d6..9c3f1221 100644 --- a/assets/minecraft/models/item/snow_golem_spawn_egg.json +++ b/assets/minecraft/models/item/snow_golem_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/snow_golem_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/soul_sand.json b/assets/minecraft/models/item/soul_sand.json deleted file mode 100644 index 50df79cf..00000000 --- a/assets/minecraft/models/item/soul_sand.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/soul_sand" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/soul_soil.json b/assets/minecraft/models/item/soul_soil.json deleted file mode 100644 index c8c62d36..00000000 --- a/assets/minecraft/models/item/soul_soil.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/soul_soil" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spawner.json b/assets/minecraft/models/item/spawner.json deleted file mode 100644 index f54a94f6..00000000 --- a/assets/minecraft/models/item/spawner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spawner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spider_spawn_egg.json b/assets/minecraft/models/item/spider_spawn_egg.json index d1aaa9d6..0d254292 100644 --- a/assets/minecraft/models/item/spider_spawn_egg.json +++ b/assets/minecraft/models/item/spider_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/spider_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/splash_potion.json b/assets/minecraft/models/item/splash_potion.json index d9aaa6b8..626ccc0f 100644 --- a/assets/minecraft/models/item/splash_potion.json +++ b/assets/minecraft/models/item/splash_potion.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/potion_overlay", - "layer1": "item/splash_potion" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/potion_overlay", + "layer1": "minecraft:item/splash_potion" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/sponge.json b/assets/minecraft/models/item/sponge.json deleted file mode 100644 index 4e456fd9..00000000 --- a/assets/minecraft/models/item/sponge.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sponge" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spore_blossom.json b/assets/minecraft/models/item/spore_blossom.json deleted file mode 100644 index 3eb054c8..00000000 --- a/assets/minecraft/models/item/spore_blossom.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spore_blossom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_button.json b/assets/minecraft/models/item/spruce_button.json deleted file mode 100644 index 91d8bc03..00000000 --- a/assets/minecraft/models/item/spruce_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_fence.json b/assets/minecraft/models/item/spruce_fence.json deleted file mode 100644 index e2c37840..00000000 --- a/assets/minecraft/models/item/spruce_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_fence_gate.json b/assets/minecraft/models/item/spruce_fence_gate.json deleted file mode 100644 index 6f4473e4..00000000 --- a/assets/minecraft/models/item/spruce_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_leaves.json b/assets/minecraft/models/item/spruce_leaves.json deleted file mode 100644 index 6c64eda5..00000000 --- a/assets/minecraft/models/item/spruce_leaves.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_leaves" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_log.json b/assets/minecraft/models/item/spruce_log.json deleted file mode 100644 index 84bd7dc3..00000000 --- a/assets/minecraft/models/item/spruce_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_planks.json b/assets/minecraft/models/item/spruce_planks.json deleted file mode 100644 index d87b1720..00000000 --- a/assets/minecraft/models/item/spruce_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_pressure_plate.json b/assets/minecraft/models/item/spruce_pressure_plate.json deleted file mode 100644 index b0de0787..00000000 --- a/assets/minecraft/models/item/spruce_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_slab.json b/assets/minecraft/models/item/spruce_slab.json deleted file mode 100644 index d5fa4c0f..00000000 --- a/assets/minecraft/models/item/spruce_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_stairs.json b/assets/minecraft/models/item/spruce_stairs.json deleted file mode 100644 index 7957a5a1..00000000 --- a/assets/minecraft/models/item/spruce_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_trapdoor.json b/assets/minecraft/models/item/spruce_trapdoor.json deleted file mode 100644 index 0eb91e4a..00000000 --- a/assets/minecraft/models/item/spruce_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spruce_wood.json b/assets/minecraft/models/item/spruce_wood.json deleted file mode 100644 index 593e4ec8..00000000 --- a/assets/minecraft/models/item/spruce_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/spruce_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/spyglass_in_hand.json b/assets/minecraft/models/item/spyglass_in_hand.json index 073bfd29..1baca0ea 100644 --- a/assets/minecraft/models/item/spyglass_in_hand.json +++ b/assets/minecraft/models/item/spyglass_in_hand.json @@ -1,6 +1,7 @@ { "textures": { - "spyglass": "item/spyglass_model" + "spyglass": "item/spyglass_model", + "particle": "#spyglass" }, "elements": [ { diff --git a/assets/minecraft/models/item/squid_spawn_egg.json b/assets/minecraft/models/item/squid_spawn_egg.json index d1aaa9d6..23102e77 100644 --- a/assets/minecraft/models/item/squid_spawn_egg.json +++ b/assets/minecraft/models/item/squid_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/squid_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/sticky_piston.json b/assets/minecraft/models/item/sticky_piston.json deleted file mode 100644 index 69bfdc94..00000000 --- a/assets/minecraft/models/item/sticky_piston.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/sticky_piston_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone.json b/assets/minecraft/models/item/stone.json deleted file mode 100644 index 37f27f10..00000000 --- a/assets/minecraft/models/item/stone.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_brick_slab.json b/assets/minecraft/models/item/stone_brick_slab.json deleted file mode 100644 index 9dd874ac..00000000 --- a/assets/minecraft/models/item/stone_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_brick_stairs.json b/assets/minecraft/models/item/stone_brick_stairs.json deleted file mode 100644 index d62eb4b3..00000000 --- a/assets/minecraft/models/item/stone_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_brick_wall.json b/assets/minecraft/models/item/stone_brick_wall.json deleted file mode 100644 index 929da51f..00000000 --- a/assets/minecraft/models/item/stone_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_bricks.json b/assets/minecraft/models/item/stone_bricks.json deleted file mode 100644 index 51de871c..00000000 --- a/assets/minecraft/models/item/stone_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_button.json b/assets/minecraft/models/item/stone_button.json deleted file mode 100644 index 8802ddfb..00000000 --- a/assets/minecraft/models/item/stone_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_pressure_plate.json b/assets/minecraft/models/item/stone_pressure_plate.json deleted file mode 100644 index bcb76d79..00000000 --- a/assets/minecraft/models/item/stone_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_slab.json b/assets/minecraft/models/item/stone_slab.json deleted file mode 100644 index 63de5381..00000000 --- a/assets/minecraft/models/item/stone_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stone_stairs.json b/assets/minecraft/models/item/stone_stairs.json deleted file mode 100644 index 7b9a82a9..00000000 --- a/assets/minecraft/models/item/stone_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stone_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stonecutter.json b/assets/minecraft/models/item/stonecutter.json deleted file mode 100644 index 54ffedeb..00000000 --- a/assets/minecraft/models/item/stonecutter.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stonecutter" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stray_spawn_egg.json b/assets/minecraft/models/item/stray_spawn_egg.json index d1aaa9d6..87bbb174 100644 --- a/assets/minecraft/models/item/stray_spawn_egg.json +++ b/assets/minecraft/models/item/stray_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/stray_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/strider_spawn_egg.json b/assets/minecraft/models/item/strider_spawn_egg.json index d1aaa9d6..424df94f 100644 --- a/assets/minecraft/models/item/strider_spawn_egg.json +++ b/assets/minecraft/models/item/strider_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/strider_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_acacia_log.json b/assets/minecraft/models/item/stripped_acacia_log.json deleted file mode 100644 index d9a3ce1f..00000000 --- a/assets/minecraft/models/item/stripped_acacia_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_acacia_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_acacia_wood.json b/assets/minecraft/models/item/stripped_acacia_wood.json deleted file mode 100644 index 4c653723..00000000 --- a/assets/minecraft/models/item/stripped_acacia_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_acacia_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_bamboo_block.json b/assets/minecraft/models/item/stripped_bamboo_block.json deleted file mode 100644 index 38c93f32..00000000 --- a/assets/minecraft/models/item/stripped_bamboo_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_bamboo_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_birch_log.json b/assets/minecraft/models/item/stripped_birch_log.json deleted file mode 100644 index d984bf7d..00000000 --- a/assets/minecraft/models/item/stripped_birch_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_birch_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_birch_wood.json b/assets/minecraft/models/item/stripped_birch_wood.json deleted file mode 100644 index dc0b6698..00000000 --- a/assets/minecraft/models/item/stripped_birch_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_birch_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_cherry_log.json b/assets/minecraft/models/item/stripped_cherry_log.json deleted file mode 100644 index 6fb61fed..00000000 --- a/assets/minecraft/models/item/stripped_cherry_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_cherry_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_cherry_wood.json b/assets/minecraft/models/item/stripped_cherry_wood.json deleted file mode 100644 index 73a11cdc..00000000 --- a/assets/minecraft/models/item/stripped_cherry_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_cherry_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_crimson_hyphae.json b/assets/minecraft/models/item/stripped_crimson_hyphae.json deleted file mode 100644 index 254d5515..00000000 --- a/assets/minecraft/models/item/stripped_crimson_hyphae.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_crimson_hyphae" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_crimson_stem.json b/assets/minecraft/models/item/stripped_crimson_stem.json deleted file mode 100644 index 701f5670..00000000 --- a/assets/minecraft/models/item/stripped_crimson_stem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_crimson_stem" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_dark_oak_log.json b/assets/minecraft/models/item/stripped_dark_oak_log.json deleted file mode 100644 index d193f5f0..00000000 --- a/assets/minecraft/models/item/stripped_dark_oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_dark_oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_dark_oak_wood.json b/assets/minecraft/models/item/stripped_dark_oak_wood.json deleted file mode 100644 index 683446da..00000000 --- a/assets/minecraft/models/item/stripped_dark_oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_dark_oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_jungle_log.json b/assets/minecraft/models/item/stripped_jungle_log.json deleted file mode 100644 index 1c6cf473..00000000 --- a/assets/minecraft/models/item/stripped_jungle_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_jungle_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_jungle_wood.json b/assets/minecraft/models/item/stripped_jungle_wood.json deleted file mode 100644 index ed78aec7..00000000 --- a/assets/minecraft/models/item/stripped_jungle_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_jungle_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_mangrove_log.json b/assets/minecraft/models/item/stripped_mangrove_log.json deleted file mode 100644 index 4155be18..00000000 --- a/assets/minecraft/models/item/stripped_mangrove_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_mangrove_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_mangrove_wood.json b/assets/minecraft/models/item/stripped_mangrove_wood.json deleted file mode 100644 index 159d89d9..00000000 --- a/assets/minecraft/models/item/stripped_mangrove_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_mangrove_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_oak_log.json b/assets/minecraft/models/item/stripped_oak_log.json deleted file mode 100644 index bb3cafbe..00000000 --- a/assets/minecraft/models/item/stripped_oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_oak_wood.json b/assets/minecraft/models/item/stripped_oak_wood.json deleted file mode 100644 index 9ba3fb2a..00000000 --- a/assets/minecraft/models/item/stripped_oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_pale_oak_log.json b/assets/minecraft/models/item/stripped_pale_oak_log.json deleted file mode 100644 index 3021c285..00000000 --- a/assets/minecraft/models/item/stripped_pale_oak_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_pale_oak_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_pale_oak_wood.json b/assets/minecraft/models/item/stripped_pale_oak_wood.json deleted file mode 100644 index c55c0a6a..00000000 --- a/assets/minecraft/models/item/stripped_pale_oak_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_pale_oak_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_spruce_log.json b/assets/minecraft/models/item/stripped_spruce_log.json deleted file mode 100644 index e110cdf5..00000000 --- a/assets/minecraft/models/item/stripped_spruce_log.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_spruce_log" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_spruce_wood.json b/assets/minecraft/models/item/stripped_spruce_wood.json deleted file mode 100644 index 658f768b..00000000 --- a/assets/minecraft/models/item/stripped_spruce_wood.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_spruce_wood" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_warped_hyphae.json b/assets/minecraft/models/item/stripped_warped_hyphae.json deleted file mode 100644 index 0ebe2320..00000000 --- a/assets/minecraft/models/item/stripped_warped_hyphae.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_warped_hyphae" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/stripped_warped_stem.json b/assets/minecraft/models/item/stripped_warped_stem.json deleted file mode 100644 index 6147725d..00000000 --- a/assets/minecraft/models/item/stripped_warped_stem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/stripped_warped_stem" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/structure_block.json b/assets/minecraft/models/item/structure_block.json deleted file mode 100644 index 1325f770..00000000 --- a/assets/minecraft/models/item/structure_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/structure_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/suspicious_gravel.json b/assets/minecraft/models/item/suspicious_gravel.json deleted file mode 100644 index dd5bed5f..00000000 --- a/assets/minecraft/models/item/suspicious_gravel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/suspicious_gravel_0" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/suspicious_sand.json b/assets/minecraft/models/item/suspicious_sand.json deleted file mode 100644 index c8a0dcb0..00000000 --- a/assets/minecraft/models/item/suspicious_sand.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/suspicious_sand_0" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tadpole_spawn_egg.json b/assets/minecraft/models/item/tadpole_spawn_egg.json index d1aaa9d6..2e6fb446 100644 --- a/assets/minecraft/models/item/tadpole_spawn_egg.json +++ b/assets/minecraft/models/item/tadpole_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/tadpole_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/tall_dry_grass.json b/assets/minecraft/models/item/tall_dry_grass.json new file mode 100644 index 00000000..6b11a1fd --- /dev/null +++ b/assets/minecraft/models/item/tall_dry_grass.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:block/tall_dry_grass" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/target.json b/assets/minecraft/models/item/target.json deleted file mode 100644 index 0e4e696b..00000000 --- a/assets/minecraft/models/item/target.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/target" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/template_banner.json b/assets/minecraft/models/item/template_banner.json index d5987555..14b25dcc 100644 --- a/assets/minecraft/models/item/template_banner.json +++ b/assets/minecraft/models/item/template_banner.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "block/oak_planks" diff --git a/assets/minecraft/models/item/template_bed.json b/assets/minecraft/models/item/template_bed.json index 2f5d6979..c8e39749 100644 --- a/assets/minecraft/models/item/template_bed.json +++ b/assets/minecraft/models/item/template_bed.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "display": { "thirdperson_righthand": { "rotation": [ 30, 160, 0 ], diff --git a/assets/minecraft/models/item/template_bundle_open_back.json b/assets/minecraft/models/item/template_bundle_open_back.json new file mode 100644 index 00000000..a710db4d --- /dev/null +++ b/assets/minecraft/models/item/template_bundle_open_back.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "gui": { + "translation": [ 0, 0, -16 ] + } + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/template_bundle_open_front.json b/assets/minecraft/models/item/template_bundle_open_front.json new file mode 100644 index 00000000..51442b45 --- /dev/null +++ b/assets/minecraft/models/item/template_bundle_open_front.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "gui": { + "translation": [ 0, 0, 16 ] + } + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/template_chest.json b/assets/minecraft/models/item/template_chest.json new file mode 100644 index 00000000..455c5427 --- /dev/null +++ b/assets/minecraft/models/item/template_chest.json @@ -0,0 +1,34 @@ +{ + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/assets/minecraft/models/item/template_shulker_box.json b/assets/minecraft/models/item/template_shulker_box.json index 7bfe2e69..455c5427 100644 --- a/assets/minecraft/models/item/template_shulker_box.json +++ b/assets/minecraft/models/item/template_shulker_box.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "display": { "gui": { "rotation": [ 30, 45, 0 ], diff --git a/assets/minecraft/models/item/template_skull.json b/assets/minecraft/models/item/template_skull.json index 232416fc..4ec347ad 100644 --- a/assets/minecraft/models/item/template_skull.json +++ b/assets/minecraft/models/item/template_skull.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "textures": { "particle": "block/soul_sand" }, diff --git a/assets/minecraft/models/item/template_spawn_egg.json b/assets/minecraft/models/item/template_spawn_egg.json deleted file mode 100644 index 4ae4b4c2..00000000 --- a/assets/minecraft/models/item/template_spawn_egg.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "item/spawn_egg", - "layer1": "item/spawn_egg_overlay" - } -} diff --git a/assets/minecraft/models/item/terracotta.json b/assets/minecraft/models/item/terracotta.json deleted file mode 100644 index c443c890..00000000 --- a/assets/minecraft/models/item/terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tinted_glass.json b/assets/minecraft/models/item/tinted_glass.json deleted file mode 100644 index 18f610b8..00000000 --- a/assets/minecraft/models/item/tinted_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tinted_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tipped_arrow.json b/assets/minecraft/models/item/tipped_arrow.json index 578defec..0b124105 100644 --- a/assets/minecraft/models/item/tipped_arrow.json +++ b/assets/minecraft/models/item/tipped_arrow.json @@ -1,7 +1,7 @@ { - "parent": "item/generated", - "textures": { - "layer0": "item/tipped_arrow_head", - "layer1": "item/tipped_arrow_base" - } -} + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/tipped_arrow_head", + "layer1": "minecraft:item/tipped_arrow_base" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/tnt.json b/assets/minecraft/models/item/tnt.json deleted file mode 100644 index 688d3f95..00000000 --- a/assets/minecraft/models/item/tnt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tnt" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/trader_llama_spawn_egg.json b/assets/minecraft/models/item/trader_llama_spawn_egg.json index d1aaa9d6..dd644cb8 100644 --- a/assets/minecraft/models/item/trader_llama_spawn_egg.json +++ b/assets/minecraft/models/item/trader_llama_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/trader_llama_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/trapped_chest.json b/assets/minecraft/models/item/trapped_chest.json index c7435714..fb1b4c69 100644 --- a/assets/minecraft/models/item/trapped_chest.json +++ b/assets/minecraft/models/item/trapped_chest.json @@ -1,3 +1,6 @@ { - "parent": "item/chest" -} + "parent": "minecraft:item/template_chest", + "textures": { + "particle": "minecraft:block/oak_planks" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/trial_spawner.json b/assets/minecraft/models/item/trial_spawner.json deleted file mode 100644 index 22e70fe9..00000000 --- a/assets/minecraft/models/item/trial_spawner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/trial_spawner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/trident_in_hand.json b/assets/minecraft/models/item/trident_in_hand.json index 6685dcca..e7562b4a 100644 --- a/assets/minecraft/models/item/trident_in_hand.json +++ b/assets/minecraft/models/item/trident_in_hand.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "item/trident" @@ -40,13 +39,5 @@ "translation": [ 4, 4, 2], "scale":[ 0.25, 0.25, 0.25] } - }, - "overrides": [ - { - "predicate": { - "throwing": 1 - }, - "model": "item/trident_throwing" - } - ] + } } diff --git a/assets/minecraft/models/item/trident_throwing.json b/assets/minecraft/models/item/trident_throwing.json index fb8e96a3..0749afcd 100644 --- a/assets/minecraft/models/item/trident_throwing.json +++ b/assets/minecraft/models/item/trident_throwing.json @@ -1,5 +1,4 @@ { - "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "item/trident" diff --git a/assets/minecraft/models/item/tropical_fish_spawn_egg.json b/assets/minecraft/models/item/tropical_fish_spawn_egg.json index d1aaa9d6..f3503993 100644 --- a/assets/minecraft/models/item/tropical_fish_spawn_egg.json +++ b/assets/minecraft/models/item/tropical_fish_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/tropical_fish_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/tube_coral_block.json b/assets/minecraft/models/item/tube_coral_block.json deleted file mode 100644 index 14e2d576..00000000 --- a/assets/minecraft/models/item/tube_coral_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tube_coral_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff.json b/assets/minecraft/models/item/tuff.json deleted file mode 100644 index 187958d9..00000000 --- a/assets/minecraft/models/item/tuff.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_brick_slab.json b/assets/minecraft/models/item/tuff_brick_slab.json deleted file mode 100644 index b793fc27..00000000 --- a/assets/minecraft/models/item/tuff_brick_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_brick_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_brick_stairs.json b/assets/minecraft/models/item/tuff_brick_stairs.json deleted file mode 100644 index d5156694..00000000 --- a/assets/minecraft/models/item/tuff_brick_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_brick_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_brick_wall.json b/assets/minecraft/models/item/tuff_brick_wall.json deleted file mode 100644 index bfb8d8b5..00000000 --- a/assets/minecraft/models/item/tuff_brick_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_brick_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_bricks.json b/assets/minecraft/models/item/tuff_bricks.json deleted file mode 100644 index d13c6e5a..00000000 --- a/assets/minecraft/models/item/tuff_bricks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_bricks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_slab.json b/assets/minecraft/models/item/tuff_slab.json deleted file mode 100644 index 5f037430..00000000 --- a/assets/minecraft/models/item/tuff_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_stairs.json b/assets/minecraft/models/item/tuff_stairs.json deleted file mode 100644 index eacc1e5e..00000000 --- a/assets/minecraft/models/item/tuff_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/tuff_wall.json b/assets/minecraft/models/item/tuff_wall.json deleted file mode 100644 index 91a87f52..00000000 --- a/assets/minecraft/models/item/tuff_wall.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/tuff_wall_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/turtle_helmet.json b/assets/minecraft/models/item/turtle_helmet.json index e61aa3c8..60d78346 100644 --- a/assets/minecraft/models/item/turtle_helmet.json +++ b/assets/minecraft/models/item/turtle_helmet.json @@ -1,67 +1,5 @@ { "parent": "minecraft:item/generated", - "overrides": [ - { - "model": "minecraft:item/turtle_helmet_quartz_trim", - "predicate": { - "trim_type": 0.1 - } - }, - { - "model": "minecraft:item/turtle_helmet_iron_trim", - "predicate": { - "trim_type": 0.2 - } - }, - { - "model": "minecraft:item/turtle_helmet_netherite_trim", - "predicate": { - "trim_type": 0.3 - } - }, - { - "model": "minecraft:item/turtle_helmet_redstone_trim", - "predicate": { - "trim_type": 0.4 - } - }, - { - "model": "minecraft:item/turtle_helmet_copper_trim", - "predicate": { - "trim_type": 0.5 - } - }, - { - "model": "minecraft:item/turtle_helmet_gold_trim", - "predicate": { - "trim_type": 0.6 - } - }, - { - "model": "minecraft:item/turtle_helmet_emerald_trim", - "predicate": { - "trim_type": 0.7 - } - }, - { - "model": "minecraft:item/turtle_helmet_diamond_trim", - "predicate": { - "trim_type": 0.8 - } - }, - { - "model": "minecraft:item/turtle_helmet_lapis_trim", - "predicate": { - "trim_type": 0.9 - } - }, - { - "model": "minecraft:item/turtle_helmet_amethyst_trim", - "predicate": { - "trim_type": 1.0 - } - } - ], "textures": { "layer0": "minecraft:item/turtle_helmet" } diff --git a/assets/minecraft/models/item/turtle_helmet_resin_trim.json b/assets/minecraft/models/item/turtle_helmet_resin_trim.json new file mode 100644 index 00000000..64adf32e --- /dev/null +++ b/assets/minecraft/models/item/turtle_helmet_resin_trim.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/turtle_helmet", + "layer1": "minecraft:trims/items/helmet_trim_resin" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/turtle_spawn_egg.json b/assets/minecraft/models/item/turtle_spawn_egg.json index d1aaa9d6..559691cf 100644 --- a/assets/minecraft/models/item/turtle_spawn_egg.json +++ b/assets/minecraft/models/item/turtle_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/turtle_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/vault.json b/assets/minecraft/models/item/vault.json deleted file mode 100644 index 848fa309..00000000 --- a/assets/minecraft/models/item/vault.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/vault" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/verdant_froglight.json b/assets/minecraft/models/item/verdant_froglight.json deleted file mode 100644 index 6b9f7d21..00000000 --- a/assets/minecraft/models/item/verdant_froglight.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/verdant_froglight" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/vex_spawn_egg.json b/assets/minecraft/models/item/vex_spawn_egg.json index d1aaa9d6..8ad861c6 100644 --- a/assets/minecraft/models/item/vex_spawn_egg.json +++ b/assets/minecraft/models/item/vex_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/vex_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/villager_spawn_egg.json b/assets/minecraft/models/item/villager_spawn_egg.json index d1aaa9d6..3c69426a 100644 --- a/assets/minecraft/models/item/villager_spawn_egg.json +++ b/assets/minecraft/models/item/villager_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/villager_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/vindicator_spawn_egg.json b/assets/minecraft/models/item/vindicator_spawn_egg.json index d1aaa9d6..371c13f7 100644 --- a/assets/minecraft/models/item/vindicator_spawn_egg.json +++ b/assets/minecraft/models/item/vindicator_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/vindicator_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/wandering_trader_spawn_egg.json b/assets/minecraft/models/item/wandering_trader_spawn_egg.json index d1aaa9d6..54a52c05 100644 --- a/assets/minecraft/models/item/wandering_trader_spawn_egg.json +++ b/assets/minecraft/models/item/wandering_trader_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wandering_trader_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/warden_spawn_egg.json b/assets/minecraft/models/item/warden_spawn_egg.json index d1aaa9d6..a26c8a56 100644 --- a/assets/minecraft/models/item/warden_spawn_egg.json +++ b/assets/minecraft/models/item/warden_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/warden_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_button.json b/assets/minecraft/models/item/warped_button.json deleted file mode 100644 index 182a0ac6..00000000 --- a/assets/minecraft/models/item/warped_button.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_button_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_fence.json b/assets/minecraft/models/item/warped_fence.json deleted file mode 100644 index d45dd46d..00000000 --- a/assets/minecraft/models/item/warped_fence.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_fence_inventory" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_fence_gate.json b/assets/minecraft/models/item/warped_fence_gate.json deleted file mode 100644 index 1f521bc7..00000000 --- a/assets/minecraft/models/item/warped_fence_gate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_fence_gate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_hyphae.json b/assets/minecraft/models/item/warped_hyphae.json deleted file mode 100644 index 6cc4c5a4..00000000 --- a/assets/minecraft/models/item/warped_hyphae.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_hyphae" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_nylium.json b/assets/minecraft/models/item/warped_nylium.json deleted file mode 100644 index 20309492..00000000 --- a/assets/minecraft/models/item/warped_nylium.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_nylium" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_planks.json b/assets/minecraft/models/item/warped_planks.json deleted file mode 100644 index 92cfb4ca..00000000 --- a/assets/minecraft/models/item/warped_planks.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_planks" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_pressure_plate.json b/assets/minecraft/models/item/warped_pressure_plate.json deleted file mode 100644 index 58d9b443..00000000 --- a/assets/minecraft/models/item/warped_pressure_plate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_pressure_plate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_slab.json b/assets/minecraft/models/item/warped_slab.json deleted file mode 100644 index ce7153c4..00000000 --- a/assets/minecraft/models/item/warped_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_stairs.json b/assets/minecraft/models/item/warped_stairs.json deleted file mode 100644 index 08260fdd..00000000 --- a/assets/minecraft/models/item/warped_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_stem.json b/assets/minecraft/models/item/warped_stem.json deleted file mode 100644 index 0bab3df6..00000000 --- a/assets/minecraft/models/item/warped_stem.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_stem" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_trapdoor.json b/assets/minecraft/models/item/warped_trapdoor.json deleted file mode 100644 index c716c468..00000000 --- a/assets/minecraft/models/item/warped_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/warped_wart_block.json b/assets/minecraft/models/item/warped_wart_block.json deleted file mode 100644 index 754439ab..00000000 --- a/assets/minecraft/models/item/warped_wart_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/warped_wart_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_chiseled_copper.json b/assets/minecraft/models/item/waxed_chiseled_copper.json deleted file mode 100644 index b88e810b..00000000 --- a/assets/minecraft/models/item/waxed_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_copper_block.json b/assets/minecraft/models/item/waxed_copper_block.json deleted file mode 100644 index 7bc2c018..00000000 --- a/assets/minecraft/models/item/waxed_copper_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_block" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_copper_bulb.json b/assets/minecraft/models/item/waxed_copper_bulb.json deleted file mode 100644 index 08e49a53..00000000 --- a/assets/minecraft/models/item/waxed_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_copper_door.json b/assets/minecraft/models/item/waxed_copper_door.json deleted file mode 100644 index 4466e7a3..00000000 --- a/assets/minecraft/models/item/waxed_copper_door.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/copper_door" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_copper_grate.json b/assets/minecraft/models/item/waxed_copper_grate.json deleted file mode 100644 index f4cff513..00000000 --- a/assets/minecraft/models/item/waxed_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_copper_trapdoor.json b/assets/minecraft/models/item/waxed_copper_trapdoor.json deleted file mode 100644 index 87df71b2..00000000 --- a/assets/minecraft/models/item/waxed_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/copper_trapdoor" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_cut_copper.json b/assets/minecraft/models/item/waxed_cut_copper.json deleted file mode 100644 index ce1ec597..00000000 --- a/assets/minecraft/models/item/waxed_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_cut_copper_slab.json b/assets/minecraft/models/item/waxed_cut_copper_slab.json deleted file mode 100644 index b6b05101..00000000 --- a/assets/minecraft/models/item/waxed_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_cut_copper_stairs.json b/assets/minecraft/models/item/waxed_cut_copper_stairs.json deleted file mode 100644 index 7376f52c..00000000 --- a/assets/minecraft/models/item/waxed_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_chiseled_copper.json b/assets/minecraft/models/item/waxed_exposed_chiseled_copper.json deleted file mode 100644 index 11278b6a..00000000 --- a/assets/minecraft/models/item/waxed_exposed_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_copper.json b/assets/minecraft/models/item/waxed_exposed_copper.json deleted file mode 100644 index 5881fd7b..00000000 --- a/assets/minecraft/models/item/waxed_exposed_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_copper_bulb.json b/assets/minecraft/models/item/waxed_exposed_copper_bulb.json deleted file mode 100644 index efd8e9d9..00000000 --- a/assets/minecraft/models/item/waxed_exposed_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/exposed_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_copper_door.json b/assets/minecraft/models/item/waxed_exposed_copper_door.json deleted file mode 100644 index 7e3a7045..00000000 --- a/assets/minecraft/models/item/waxed_exposed_copper_door.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/exposed_copper_door" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_copper_grate.json b/assets/minecraft/models/item/waxed_exposed_copper_grate.json deleted file mode 100644 index b7a3c78e..00000000 --- a/assets/minecraft/models/item/waxed_exposed_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_copper_trapdoor.json b/assets/minecraft/models/item/waxed_exposed_copper_trapdoor.json deleted file mode 100644 index e3f5e9ad..00000000 --- a/assets/minecraft/models/item/waxed_exposed_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/exposed_copper_trapdoor" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_cut_copper.json b/assets/minecraft/models/item/waxed_exposed_cut_copper.json deleted file mode 100644 index b5c7d8f0..00000000 --- a/assets/minecraft/models/item/waxed_exposed_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_cut_copper_slab.json b/assets/minecraft/models/item/waxed_exposed_cut_copper_slab.json deleted file mode 100644 index 29ce4723..00000000 --- a/assets/minecraft/models/item/waxed_exposed_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_exposed_cut_copper_stairs.json b/assets/minecraft/models/item/waxed_exposed_cut_copper_stairs.json deleted file mode 100644 index 24bdd285..00000000 --- a/assets/minecraft/models/item/waxed_exposed_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/exposed_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_chiseled_copper.json b/assets/minecraft/models/item/waxed_oxidized_chiseled_copper.json deleted file mode 100644 index 72020427..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_copper.json b/assets/minecraft/models/item/waxed_oxidized_copper.json deleted file mode 100644 index 63a0dabe..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_copper_bulb.json b/assets/minecraft/models/item/waxed_oxidized_copper_bulb.json deleted file mode 100644 index 59b8fb7b..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/oxidized_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_copper_door.json b/assets/minecraft/models/item/waxed_oxidized_copper_door.json deleted file mode 100644 index 313143e1..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_copper_door.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/oxidized_copper_door" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_copper_grate.json b/assets/minecraft/models/item/waxed_oxidized_copper_grate.json deleted file mode 100644 index e2521c38..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_copper_trapdoor.json b/assets/minecraft/models/item/waxed_oxidized_copper_trapdoor.json deleted file mode 100644 index 9d3a8bee..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/oxidized_copper_trapdoor" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_cut_copper.json b/assets/minecraft/models/item/waxed_oxidized_cut_copper.json deleted file mode 100644 index 36dfa030..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_cut_copper_slab.json b/assets/minecraft/models/item/waxed_oxidized_cut_copper_slab.json deleted file mode 100644 index a3d02242..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_oxidized_cut_copper_stairs.json b/assets/minecraft/models/item/waxed_oxidized_cut_copper_stairs.json deleted file mode 100644 index fd8af1aa..00000000 --- a/assets/minecraft/models/item/waxed_oxidized_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/oxidized_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_chiseled_copper.json b/assets/minecraft/models/item/waxed_weathered_chiseled_copper.json deleted file mode 100644 index c27086d6..00000000 --- a/assets/minecraft/models/item/waxed_weathered_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_copper.json b/assets/minecraft/models/item/waxed_weathered_copper.json deleted file mode 100644 index 743af49a..00000000 --- a/assets/minecraft/models/item/waxed_weathered_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_copper_bulb.json b/assets/minecraft/models/item/waxed_weathered_copper_bulb.json deleted file mode 100644 index 6e29d291..00000000 --- a/assets/minecraft/models/item/waxed_weathered_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/weathered_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_copper_door.json b/assets/minecraft/models/item/waxed_weathered_copper_door.json deleted file mode 100644 index 409c8efa..00000000 --- a/assets/minecraft/models/item/waxed_weathered_copper_door.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/weathered_copper_door" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_copper_grate.json b/assets/minecraft/models/item/waxed_weathered_copper_grate.json deleted file mode 100644 index 17430d64..00000000 --- a/assets/minecraft/models/item/waxed_weathered_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_copper_trapdoor.json b/assets/minecraft/models/item/waxed_weathered_copper_trapdoor.json deleted file mode 100644 index 7c3335de..00000000 --- a/assets/minecraft/models/item/waxed_weathered_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/weathered_copper_trapdoor" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_cut_copper.json b/assets/minecraft/models/item/waxed_weathered_cut_copper.json deleted file mode 100644 index e49a231b..00000000 --- a/assets/minecraft/models/item/waxed_weathered_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_cut_copper_slab.json b/assets/minecraft/models/item/waxed_weathered_cut_copper_slab.json deleted file mode 100644 index acda09e0..00000000 --- a/assets/minecraft/models/item/waxed_weathered_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/waxed_weathered_cut_copper_stairs.json b/assets/minecraft/models/item/waxed_weathered_cut_copper_stairs.json deleted file mode 100644 index 01ce5972..00000000 --- a/assets/minecraft/models/item/waxed_weathered_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_chiseled_copper.json b/assets/minecraft/models/item/weathered_chiseled_copper.json deleted file mode 100644 index c27086d6..00000000 --- a/assets/minecraft/models/item/weathered_chiseled_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_chiseled_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_copper.json b/assets/minecraft/models/item/weathered_copper.json deleted file mode 100644 index 743af49a..00000000 --- a/assets/minecraft/models/item/weathered_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_copper_bulb.json b/assets/minecraft/models/item/weathered_copper_bulb.json deleted file mode 100644 index 276559f8..00000000 --- a/assets/minecraft/models/item/weathered_copper_bulb.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper_bulb" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_copper_grate.json b/assets/minecraft/models/item/weathered_copper_grate.json deleted file mode 100644 index 17430d64..00000000 --- a/assets/minecraft/models/item/weathered_copper_grate.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper_grate" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_copper_trapdoor.json b/assets/minecraft/models/item/weathered_copper_trapdoor.json deleted file mode 100644 index 7b067302..00000000 --- a/assets/minecraft/models/item/weathered_copper_trapdoor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_copper_trapdoor_bottom" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_cut_copper.json b/assets/minecraft/models/item/weathered_cut_copper.json deleted file mode 100644 index e49a231b..00000000 --- a/assets/minecraft/models/item/weathered_cut_copper.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_cut_copper_slab.json b/assets/minecraft/models/item/weathered_cut_copper_slab.json deleted file mode 100644 index acda09e0..00000000 --- a/assets/minecraft/models/item/weathered_cut_copper_slab.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper_slab" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/weathered_cut_copper_stairs.json b/assets/minecraft/models/item/weathered_cut_copper_stairs.json deleted file mode 100644 index 01ce5972..00000000 --- a/assets/minecraft/models/item/weathered_cut_copper_stairs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/weathered_cut_copper_stairs" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/wet_sponge.json b/assets/minecraft/models/item/wet_sponge.json deleted file mode 100644 index d662daae..00000000 --- a/assets/minecraft/models/item/wet_sponge.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/wet_sponge" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_banner.json b/assets/minecraft/models/item/white_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/white_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_bundle_open_back.json b/assets/minecraft/models/item/white_bundle_open_back.json index 6692dda4..29479f6a 100644 --- a/assets/minecraft/models/item/white_bundle_open_back.json +++ b/assets/minecraft/models/item/white_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/white_bundle_open_back" + "layer0": "minecraft:item/white_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_bundle_open_front.json b/assets/minecraft/models/item/white_bundle_open_front.json index ca14ae3b..0946151a 100644 --- a/assets/minecraft/models/item/white_bundle_open_front.json +++ b/assets/minecraft/models/item/white_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/white_bundle_open_front" + "layer0": "minecraft:item/white_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_carpet.json b/assets/minecraft/models/item/white_carpet.json deleted file mode 100644 index 8ef6f034..00000000 --- a/assets/minecraft/models/item/white_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_concrete.json b/assets/minecraft/models/item/white_concrete.json deleted file mode 100644 index 16475ed4..00000000 --- a/assets/minecraft/models/item/white_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_concrete_powder.json b/assets/minecraft/models/item/white_concrete_powder.json deleted file mode 100644 index c001b383..00000000 --- a/assets/minecraft/models/item/white_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_glazed_terracotta.json b/assets/minecraft/models/item/white_glazed_terracotta.json deleted file mode 100644 index 55881dbc..00000000 --- a/assets/minecraft/models/item/white_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_stained_glass.json b/assets/minecraft/models/item/white_stained_glass.json deleted file mode 100644 index 28c61d95..00000000 --- a/assets/minecraft/models/item/white_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_terracotta.json b/assets/minecraft/models/item/white_terracotta.json deleted file mode 100644 index 973fa966..00000000 --- a/assets/minecraft/models/item/white_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/white_wool.json b/assets/minecraft/models/item/white_wool.json deleted file mode 100644 index 5908f340..00000000 --- a/assets/minecraft/models/item/white_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/white_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/wildflowers.json b/assets/minecraft/models/item/wildflowers.json new file mode 100644 index 00000000..b4e70956 --- /dev/null +++ b/assets/minecraft/models/item/wildflowers.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wildflowers" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/witch_spawn_egg.json b/assets/minecraft/models/item/witch_spawn_egg.json index d1aaa9d6..37486399 100644 --- a/assets/minecraft/models/item/witch_spawn_egg.json +++ b/assets/minecraft/models/item/witch_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/witch_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/wither_skeleton_skull.json b/assets/minecraft/models/item/wither_skeleton_skull.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/wither_skeleton_skull.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/wither_skeleton_spawn_egg.json b/assets/minecraft/models/item/wither_skeleton_spawn_egg.json index d1aaa9d6..b39d9de4 100644 --- a/assets/minecraft/models/item/wither_skeleton_spawn_egg.json +++ b/assets/minecraft/models/item/wither_skeleton_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wither_skeleton_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/wither_spawn_egg.json b/assets/minecraft/models/item/wither_spawn_egg.json index d1aaa9d6..3c16da2d 100644 --- a/assets/minecraft/models/item/wither_spawn_egg.json +++ b/assets/minecraft/models/item/wither_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wither_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/wolf_armor.json b/assets/minecraft/models/item/wolf_armor.json index b08d0829..11f10428 100644 --- a/assets/minecraft/models/item/wolf_armor.json +++ b/assets/minecraft/models/item/wolf_armor.json @@ -1,7 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "minecraft:item/wolf_armor", - "layer1": "minecraft:item/wolf_armor_overlay" + "layer0": "minecraft:item/wolf_armor" } } \ No newline at end of file diff --git a/assets/minecraft/models/item/wolf_armor_dyed.json b/assets/minecraft/models/item/wolf_armor_dyed.json new file mode 100644 index 00000000..b08d0829 --- /dev/null +++ b/assets/minecraft/models/item/wolf_armor_dyed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wolf_armor", + "layer1": "minecraft:item/wolf_armor_overlay" + } +} \ No newline at end of file diff --git a/assets/minecraft/models/item/wolf_spawn_egg.json b/assets/minecraft/models/item/wolf_spawn_egg.json index d1aaa9d6..e2b5ddc0 100644 --- a/assets/minecraft/models/item/wolf_spawn_egg.json +++ b/assets/minecraft/models/item/wolf_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/wolf_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_banner.json b/assets/minecraft/models/item/yellow_banner.json deleted file mode 100644 index 661a106d..00000000 --- a/assets/minecraft/models/item/yellow_banner.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_banner" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_bundle_open_back.json b/assets/minecraft/models/item/yellow_bundle_open_back.json index 9f598be7..04998c2b 100644 --- a/assets/minecraft/models/item/yellow_bundle_open_back.json +++ b/assets/minecraft/models/item/yellow_bundle_open_back.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_back", "textures": { - "layer0": "item/yellow_bundle_open_back" + "layer0": "minecraft:item/yellow_bundle_open_back" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_bundle_open_front.json b/assets/minecraft/models/item/yellow_bundle_open_front.json index 9c3f41e1..a4794d6b 100644 --- a/assets/minecraft/models/item/yellow_bundle_open_front.json +++ b/assets/minecraft/models/item/yellow_bundle_open_front.json @@ -1,6 +1,6 @@ { - "parent": "item/bundle", + "parent": "minecraft:item/template_bundle_open_front", "textures": { - "layer0": "item/yellow_bundle_open_front" + "layer0": "minecraft:item/yellow_bundle_open_front" } -} +} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_carpet.json b/assets/minecraft/models/item/yellow_carpet.json deleted file mode 100644 index c3b3710e..00000000 --- a/assets/minecraft/models/item/yellow_carpet.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_carpet" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_concrete.json b/assets/minecraft/models/item/yellow_concrete.json deleted file mode 100644 index ed8ebe4c..00000000 --- a/assets/minecraft/models/item/yellow_concrete.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_concrete" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_concrete_powder.json b/assets/minecraft/models/item/yellow_concrete_powder.json deleted file mode 100644 index 38bac8bf..00000000 --- a/assets/minecraft/models/item/yellow_concrete_powder.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_concrete_powder" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_glazed_terracotta.json b/assets/minecraft/models/item/yellow_glazed_terracotta.json deleted file mode 100644 index 4d819984..00000000 --- a/assets/minecraft/models/item/yellow_glazed_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_glazed_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_stained_glass.json b/assets/minecraft/models/item/yellow_stained_glass.json deleted file mode 100644 index e102e2d5..00000000 --- a/assets/minecraft/models/item/yellow_stained_glass.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_stained_glass" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_terracotta.json b/assets/minecraft/models/item/yellow_terracotta.json deleted file mode 100644 index 50dfb7ea..00000000 --- a/assets/minecraft/models/item/yellow_terracotta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_terracotta" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/yellow_wool.json b/assets/minecraft/models/item/yellow_wool.json deleted file mode 100644 index e0de4bb8..00000000 --- a/assets/minecraft/models/item/yellow_wool.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:block/yellow_wool" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/zoglin_spawn_egg.json b/assets/minecraft/models/item/zoglin_spawn_egg.json index d1aaa9d6..f8740776 100644 --- a/assets/minecraft/models/item/zoglin_spawn_egg.json +++ b/assets/minecraft/models/item/zoglin_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/zoglin_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/zombie_head.json b/assets/minecraft/models/item/zombie_head.json deleted file mode 100644 index 364b6e65..00000000 --- a/assets/minecraft/models/item/zombie_head.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "minecraft:item/template_skull" -} \ No newline at end of file diff --git a/assets/minecraft/models/item/zombie_horse_spawn_egg.json b/assets/minecraft/models/item/zombie_horse_spawn_egg.json index d1aaa9d6..9d8a4e2f 100644 --- a/assets/minecraft/models/item/zombie_horse_spawn_egg.json +++ b/assets/minecraft/models/item/zombie_horse_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/zombie_horse_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/zombie_spawn_egg.json b/assets/minecraft/models/item/zombie_spawn_egg.json index d1aaa9d6..f0f63d8d 100644 --- a/assets/minecraft/models/item/zombie_spawn_egg.json +++ b/assets/minecraft/models/item/zombie_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/zombie_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/zombie_villager_spawn_egg.json b/assets/minecraft/models/item/zombie_villager_spawn_egg.json index d1aaa9d6..651e67d8 100644 --- a/assets/minecraft/models/item/zombie_villager_spawn_egg.json +++ b/assets/minecraft/models/item/zombie_villager_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/zombie_villager_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/models/item/zombified_piglin_spawn_egg.json b/assets/minecraft/models/item/zombified_piglin_spawn_egg.json index d1aaa9d6..fab7c383 100644 --- a/assets/minecraft/models/item/zombified_piglin_spawn_egg.json +++ b/assets/minecraft/models/item/zombified_piglin_spawn_egg.json @@ -1,3 +1,6 @@ { - "parent": "minecraft:item/template_spawn_egg" + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/zombified_piglin_spawn_egg" + } } \ No newline at end of file diff --git a/assets/minecraft/particles/firefly.json b/assets/minecraft/particles/firefly.json new file mode 100644 index 00000000..592e0f8f --- /dev/null +++ b/assets/minecraft/particles/firefly.json @@ -0,0 +1,5 @@ +{ + "textures": [ + "minecraft:firefly" + ] +} diff --git a/assets/minecraft/particles/pale_oak_leaves.json b/assets/minecraft/particles/pale_oak_leaves.json new file mode 100644 index 00000000..8769866f --- /dev/null +++ b/assets/minecraft/particles/pale_oak_leaves.json @@ -0,0 +1,16 @@ +{ + "textures": [ + "minecraft:pale_oak_0", + "minecraft:pale_oak_1", + "minecraft:pale_oak_2", + "minecraft:pale_oak_3", + "minecraft:pale_oak_4", + "minecraft:pale_oak_5", + "minecraft:pale_oak_6", + "minecraft:pale_oak_7", + "minecraft:pale_oak_8", + "minecraft:pale_oak_9", + "minecraft:pale_oak_10", + "minecraft:pale_oak_11" + ] +} diff --git a/assets/minecraft/particles/tinted_leaves.json b/assets/minecraft/particles/tinted_leaves.json new file mode 100644 index 00000000..ac37a183 --- /dev/null +++ b/assets/minecraft/particles/tinted_leaves.json @@ -0,0 +1,16 @@ +{ + "textures": [ + "minecraft:leaf_0", + "minecraft:leaf_1", + "minecraft:leaf_2", + "minecraft:leaf_3", + "minecraft:leaf_4", + "minecraft:leaf_5", + "minecraft:leaf_6", + "minecraft:leaf_7", + "minecraft:leaf_8", + "minecraft:leaf_9", + "minecraft:leaf_10", + "minecraft:leaf_11" + ] +} diff --git a/assets/minecraft/post_effect/blur.json b/assets/minecraft/post_effect/blur.json index 90aed326..1823c5ec 100644 --- a/assets/minecraft/post_effect/blur.json +++ b/assets/minecraft/post_effect/blur.json @@ -4,7 +4,8 @@ }, "passes": [ { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -16,12 +17,18 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 1.0, 0.0 ] + }, + { + "name": "Radius", + "type": "float" } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -33,11 +40,17 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 0.0, 1.0 ] + }, + { + "name": "Radius", + "type": "float" } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -49,13 +62,18 @@ "uniforms": [ { "name": "BlurDir", - "values": [ 1.0, 0.0 ], - "RadiusMultiplier" : 0.5 + "type": "vec2", + "values": [ 1.0, 0.0 ] + }, + { + "name": "Radius", + "type": "float" } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -67,12 +85,17 @@ "uniforms": [ { "name": "BlurDir", - "values": [ 0.0, 1.0 ], - "RadiusMultiplier" : 0.5 + "type": "vec2", + "values": [ 0.0, 1.0 ] + }, + { + "name": "Radius", + "type": "float" } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -84,13 +107,18 @@ "uniforms": [ { "name": "BlurDir", - "values": [ 1.0, 0.0 ], - "RadiusMultiplier" : 0.25 + "type": "vec2", + "values": [ 1.0, 0.0 ] + }, + { + "name": "Radius", + "type": "float" } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -102,8 +130,12 @@ "uniforms": [ { "name": "BlurDir", - "values": [ 0.0, 1.0 ], - "RadiusMultiplier" : 0.25 + "type": "vec2", + "values": [ 0.0, 1.0 ] + }, + { + "name": "Radius", + "type": "float" } ] } diff --git a/assets/minecraft/post_effect/creeper.json b/assets/minecraft/post_effect/creeper.json index 5e816341..ce02f7ef 100644 --- a/assets/minecraft/post_effect/creeper.json +++ b/assets/minecraft/post_effect/creeper.json @@ -4,7 +4,8 @@ }, "passes": [ { - "program": "minecraft:post/color_convolve", + "vertex_shader": "minecraft:post/sobel", + "fragment_shader": "minecraft:post/color_convolve", "inputs": [ { "sampler_name": "In", @@ -15,20 +16,24 @@ "uniforms": [ { "name": "RedMatrix", + "type": "vec3", "values": [ 0.0, 0.0, 0.0 ] }, { "name": "GreenMatrix", + "type": "vec3", "values": [ 0.3, 0.59, 0.11 ] }, { "name": "BlueMatrix", + "type": "vec3", "values": [ 0.0, 0.0, 0.0 ] } ] }, { - "program": "minecraft:post/bits", + "vertex_shader": "minecraft:post/sobel", + "fragment_shader": "minecraft:post/bits", "inputs": [ { "sampler_name": "In", @@ -39,10 +44,12 @@ "uniforms": [ { "name": "Resolution", + "type": "float", "values": [ 16.0 ] }, { "name": "MosaicSize", + "type": "float", "values": [ 4.0 ] } ] diff --git a/assets/minecraft/post_effect/entity_outline.json b/assets/minecraft/post_effect/entity_outline.json index cbecbdd2..c091ac8d 100644 --- a/assets/minecraft/post_effect/entity_outline.json +++ b/assets/minecraft/post_effect/entity_outline.json @@ -4,7 +4,8 @@ }, "passes": [ { - "program": "minecraft:post/entity_outline", + "vertex_shader": "minecraft:post/sobel", + "fragment_shader": "minecraft:post/entity_sobel", "inputs": [ { "sampler_name": "In", @@ -14,7 +15,8 @@ "output": "swap" }, { - "program": "minecraft:post/entity_outline_box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/entity_outline_box_blur", "inputs": [ { "sampler_name": "In", @@ -26,12 +28,14 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 1.0, 0.0 ] } ] }, { - "program": "minecraft:post/entity_outline_box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/entity_outline_box_blur", "inputs": [ { "sampler_name": "In", @@ -43,18 +47,27 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 0.0, 1.0 ] } ] }, { - "program": "minecraft:post/blit", + "vertex_shader": "minecraft:post/blit", + "fragment_shader": "minecraft:post/blit", "inputs": [ { "sampler_name": "In", "target": "swap" } ], + "uniforms": [ + { + "name": "ColorModulate", + "type": "vec4", + "values": [ 1.0, 1.0, 1.0, 1.0 ] + } + ], "output": "minecraft:entity_outline" } ] diff --git a/assets/minecraft/post_effect/invert.json b/assets/minecraft/post_effect/invert.json index 7ef7355e..a4fa8d23 100644 --- a/assets/minecraft/post_effect/invert.json +++ b/assets/minecraft/post_effect/invert.json @@ -4,7 +4,8 @@ }, "passes": [ { - "program": "minecraft:post/invert", + "vertex_shader": "minecraft:post/blit", + "fragment_shader": "minecraft:post/invert", "inputs": [ { "sampler_name": "In", @@ -15,18 +16,27 @@ "uniforms": [ { "name": "InverseAmount", + "type": "float", "values": [ 0.8 ] } ] }, { - "program": "minecraft:post/blit", + "vertex_shader": "minecraft:post/blit", + "fragment_shader": "minecraft:post/blit", "inputs": [ { "sampler_name": "In", "target": "swap" } ], + "uniforms": [ + { + "name": "ColorModulate", + "type": "vec4", + "values": [ 1.0, 1.0, 1.0, 1.0 ] + } + ], "output": "minecraft:main" } ] diff --git a/assets/minecraft/post_effect/spider.json b/assets/minecraft/post_effect/spider.json index 3eb6ee6b..bbe6eef0 100644 --- a/assets/minecraft/post_effect/spider.json +++ b/assets/minecraft/post_effect/spider.json @@ -7,7 +7,8 @@ }, "passes": [ { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -19,16 +20,19 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 1.0, 0.0 ] }, { "name": "Radius", + "type": "float", "values": [ 15.0 ] } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -40,16 +44,19 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 0.0, 1.0 ] }, { "name": "Radius", + "type": "float", "values": [ 15.0 ] } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -61,16 +68,19 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 1.0, 0.0 ] }, { "name": "Radius", + "type": "float", "values": [ 7.0 ] } ] }, { - "program": "minecraft:post/box_blur", + "vertex_shader": "minecraft:post/blur", + "fragment_shader": "minecraft:post/box_blur", "inputs": [ { "sampler_name": "In", @@ -82,16 +92,19 @@ "uniforms": [ { "name": "BlurDir", + "type": "vec2", "values": [ 0.0, 1.0 ] }, { "name": "Radius", + "type": "float", "values": [ 7.0 ] } ] }, { - "program": "minecraft:post/spider", + "vertex_shader": "minecraft:post/rotscale", + "fragment_shader": "minecraft:post/spiderclip", "inputs": [ { "sampler_name": "In", @@ -106,24 +119,34 @@ "uniforms": [ { "name": "InScale", + "type": "vec2", "values": [ 1.25, 2.0 ] }, { "name": "InOffset", + "type": "vec2", "values": [ -0.125, -0.1 ] }, + { + "name": "InRotation", + "type": "float", + "values": [ 0 ] + }, { "name": "Scissor", + "type": "vec4", "values": [ 0.0, 0.0, 1.0, 1.0 ] }, { "name": "Vignette", + "type": "vec4", "values": [ 0.1, 0.1, 0.9, 0.9 ] } ] }, { - "program": "minecraft:post/spider", + "vertex_shader": "minecraft:post/rotscale", + "fragment_shader": "minecraft:post/spiderclip", "inputs": [ { "sampler_name": "In", @@ -138,28 +161,34 @@ "uniforms": [ { "name": "InScale", + "type": "vec2", "values": [ 2.35, 4.2 ] }, { "name": "InOffset", + "type": "vec2", "values": [ -1.1, -1.5 ] }, { "name": "InRotation", + "type": "float", "values": [ -45.0 ] }, { "name": "Scissor", + "type": "vec4", "values": [ 0.21, 0.0, 0.79, 1.0 ] }, { "name": "Vignette", + "type": "vec4", "values": [ 0.31, 0.1, 0.69, 0.9 ] } ] }, { - "program": "minecraft:post/spider", + "vertex_shader": "minecraft:post/rotscale", + "fragment_shader": "minecraft:post/spiderclip", "inputs": [ { "sampler_name": "In", @@ -174,28 +203,34 @@ "uniforms": [ { "name": "InScale", + "type": "vec2", "values": [ 2.35, 4.2 ] }, { "name": "InOffset", + "type": "vec2", "values": [ 0.45, -4.45 ] }, { "name": "InRotation", + "type": "float", "values": [ 45.0 ] }, { "name": "Scissor", + "type": "vec4", "values": [ 0.21, 0.0, 0.79, 1.0 ] }, { "name": "Vignette", + "type": "vec4", "values": [ 0.31, 0.1, 0.69, 0.9 ] } ] }, { - "program": "minecraft:post/spider", + "vertex_shader": "minecraft:post/rotscale", + "fragment_shader": "minecraft:post/spiderclip", "inputs": [ { "sampler_name": "In", @@ -210,24 +245,34 @@ "uniforms": [ { "name": "InScale", + "type": "vec2", "values": [ 2.35, 2.35 ] }, { "name": "InOffset", + "type": "vec2", "values": [ -0.385, -1.29 ] }, { "name": "InRotation", + "type": "float", "values": [ 0.0 ] }, + { + "name": "Scissor", + "type": "vec4", + "values": [ 0.0, 0.0, 1.0, 1.0 ] + }, { "name": "Vignette", + "type": "vec4", "values": [ 0.31, 0.1, 0.69, 0.9 ] } ] }, { - "program": "minecraft:post/spider", + "vertex_shader": "minecraft:post/rotscale", + "fragment_shader": "minecraft:post/spiderclip", "inputs": [ { "sampler_name": "In", @@ -242,20 +287,34 @@ "uniforms": [ { "name": "InScale", + "type": "vec2", "values": [ 2.35, 2.35 ] }, { "name": "InOffset", + "type": "vec2", "values": [ -0.965, -1.29 ] }, + { + "name": "InRotation", + "type": "float", + "values": [ 0 ] + }, + { + "name": "Scissor", + "type": "vec4", + "values": [ 0.0, 0.0, 1.0, 1.0 ] + }, { "name": "Vignette", + "type": "vec4", "values": [ 0.31, 0.1, 0.69, 0.9 ] } ] }, { - "program": "minecraft:post/blit", + "vertex_shader": "minecraft:post/blit", + "fragment_shader": "minecraft:post/blit", "inputs": [ { "sampler_name": "In", @@ -266,6 +325,7 @@ "uniforms": [ { "name": "ColorModulate", + "type": "vec4", "values": [ 1.0, 0.8, 0.8, 1.0 ] } ] diff --git a/assets/minecraft/post_effect/transparency.json b/assets/minecraft/post_effect/transparency.json index f0e1ea0c..ab38829a 100644 --- a/assets/minecraft/post_effect/transparency.json +++ b/assets/minecraft/post_effect/transparency.json @@ -4,7 +4,8 @@ }, "passes": [ { - "program": "minecraft:post/transparency", + "vertex_shader": "minecraft:post/screenquad", + "fragment_shader": "minecraft:post/transparency", "inputs": [ { "sampler_name": "Main", @@ -64,13 +65,21 @@ "output": "final" }, { - "program": "minecraft:post/blit", + "vertex_shader": "minecraft:post/blit", + "fragment_shader": "minecraft:post/blit", "inputs": [ { "sampler_name": "In", "target": "final" } ], + "uniforms": [ + { + "name": "ColorModulate", + "type": "vec4", + "values": [ 1.0, 1.0, 1.0, 1.0 ] + } + ], "output": "minecraft:main" } ] diff --git a/assets/minecraft/shaders/core/blit_screen.json b/assets/minecraft/shaders/core/blit_screen.json deleted file mode 100644 index 61d51e1f..00000000 --- a/assets/minecraft/shaders/core/blit_screen.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "vertex": "minecraft:core/blit_screen", - "fragment": "minecraft:core/blit_screen", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - ] -} diff --git a/assets/minecraft/shaders/core/lightmap.json b/assets/minecraft/shaders/core/lightmap.json deleted file mode 100644 index 3b90e934..00000000 --- a/assets/minecraft/shaders/core/lightmap.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/blit_screen", - "fragment": "minecraft:core/lightmap", - "samplers": [ - ], - "uniforms": [ - { "name": "AmbientLightFactor", "type": "float", "count": 1, "values": [1.0] }, - { "name": "SkyFactor", "type": "float", "count": 1, "values": [1.0] }, - { "name": "BlockFactor", "type": "float", "count": 1, "values": [1.0] }, - { "name": "UseBrightLightmap", "type": "int", "count": 1, "values": [0] }, - { "name": "SkyLightColor", "type": "float", "count": 3, "values": [1.0] }, - { "name": "NightVisionFactor", "type": "float", "count": 1, "values": [0.0] }, - { "name": "DarknessScale", "type": "float", "count": 1, "values": [0.0] }, - { "name": "DarkenWorldFactor", "type": "float", "count": 1, "values": [0.0] }, - { "name": "BrightnessFactor", "type": "float", "count": 1, "values": [1.0] } - ] -} diff --git a/assets/minecraft/shaders/core/particle.json b/assets/minecraft/shaders/core/particle.json deleted file mode 100644 index 2f334b45..00000000 --- a/assets/minecraft/shaders/core/particle.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/particle", - "fragment": "minecraft:core/particle", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position.json b/assets/minecraft/shaders/core/position.json deleted file mode 100644 index 29b6475f..00000000 --- a/assets/minecraft/shaders/core/position.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "vertex": "minecraft:core/position", - "fragment": "minecraft:core/position", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position_color.json b/assets/minecraft/shaders/core/position_color.json deleted file mode 100644 index 6d715d92..00000000 --- a/assets/minecraft/shaders/core/position_color.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/position_color", - "fragment": "minecraft:core/position_color", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position_color_lightmap.json b/assets/minecraft/shaders/core/position_color_lightmap.json deleted file mode 100644 index d84b26f6..00000000 --- a/assets/minecraft/shaders/core/position_color_lightmap.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/position_color_lightmap", - "fragment": "minecraft:core/position_color_lightmap", - "samplers": [ - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position_color_tex_lightmap.json b/assets/minecraft/shaders/core/position_color_tex_lightmap.json deleted file mode 100644 index f7eb56e0..00000000 --- a/assets/minecraft/shaders/core/position_color_tex_lightmap.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/position_color_tex_lightmap", - "fragment": "minecraft:core/position_color_tex_lightmap", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position_tex.json b/assets/minecraft/shaders/core/position_tex.json deleted file mode 100644 index 9f402324..00000000 --- a/assets/minecraft/shaders/core/position_tex.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/position_tex", - "fragment": "minecraft:core/position_tex", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/position_tex_color.json b/assets/minecraft/shaders/core/position_tex_color.json deleted file mode 100644 index f9454656..00000000 --- a/assets/minecraft/shaders/core/position_tex_color.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/position_tex_color", - "fragment": "minecraft:core/position_tex_color", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.json b/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.json deleted file mode 100644 index 85173fe8..00000000 --- a/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - }, - "flags": [ - "NO_OVERLAY" - ] - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_armor_entity_glint.json b/assets/minecraft/shaders/core/rendertype_armor_entity_glint.json deleted file mode 100644 index c321e633..00000000 --- a/assets/minecraft/shaders/core/rendertype_armor_entity_glint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "vertex": "minecraft:core/glint", - "fragment": "minecraft:core/glint", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_armor_translucent.json b/assets/minecraft/shaders/core/rendertype_armor_translucent.json deleted file mode 100644 index 85173fe8..00000000 --- a/assets/minecraft/shaders/core/rendertype_armor_translucent.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - }, - "flags": [ - "NO_OVERLAY" - ] - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_beacon_beam.json b/assets/minecraft/shaders/core/rendertype_beacon_beam.json deleted file mode 100644 index f34c777d..00000000 --- a/assets/minecraft/shaders/core/rendertype_beacon_beam.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_beacon_beam", - "fragment": "minecraft:core/rendertype_beacon_beam", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_breeze_wind.json b/assets/minecraft/shaders/core/rendertype_breeze_wind.json deleted file mode 100644 index c5aa6a4d..00000000 --- a/assets/minecraft/shaders/core/rendertype_breeze_wind.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - }, - "flags": [ - "APPLY_TEXTURE_MATRIX", - "NO_CARDINAL_LIGHTING", - "NO_OVERLAY" - ] - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_clouds.json b/assets/minecraft/shaders/core/rendertype_clouds.json deleted file mode 100644 index dc7d8c1e..00000000 --- a/assets/minecraft/shaders/core/rendertype_clouds.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_clouds", - "fragment": "minecraft:core/rendertype_clouds", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_crumbling.json b/assets/minecraft/shaders/core/rendertype_crumbling.json deleted file mode 100644 index 9dd3add9..00000000 --- a/assets/minecraft/shaders/core/rendertype_crumbling.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_crumbling", - "fragment": "minecraft:core/rendertype_crumbling", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_cutout.json b/assets/minecraft/shaders/core/rendertype_cutout.json deleted file mode 100644 index ea3a5b05..00000000 --- a/assets/minecraft/shaders/core/rendertype_cutout.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "vertex": "minecraft:core/terrain", - "fragment": "minecraft:core/terrain", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_cutout_mipped.json b/assets/minecraft/shaders/core/rendertype_cutout_mipped.json deleted file mode 100644 index 31880fd5..00000000 --- a/assets/minecraft/shaders/core/rendertype_cutout_mipped.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "vertex": "minecraft:core/terrain", - "fragment": "minecraft:core/terrain", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.5" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_end_gateway.json b/assets/minecraft/shaders/core/rendertype_end_gateway.json deleted file mode 100644 index 1ba8c97c..00000000 --- a/assets/minecraft/shaders/core/rendertype_end_gateway.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_end_portal", - "fragment": "minecraft:core/rendertype_end_portal", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "GameTime", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "EndPortalLayers", "type": "int", "count": 1, "values": [ 16 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_end_portal.fsh b/assets/minecraft/shaders/core/rendertype_end_portal.fsh index 46011dd2..539d33d4 100644 --- a/assets/minecraft/shaders/core/rendertype_end_portal.fsh +++ b/assets/minecraft/shaders/core/rendertype_end_portal.fsh @@ -1,14 +1,18 @@ #version 150 +#moj_import #moj_import uniform sampler2D Sampler0; uniform sampler2D Sampler1; uniform float GameTime; -uniform int EndPortalLayers; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; in vec4 texProj0; +in float vertexDistance; const vec3[] COLORS = vec3[]( vec3(0.022087, 0.098399, 0.110818), @@ -55,8 +59,8 @@ out vec4 fragColor; void main() { vec3 color = textureProj(Sampler0, texProj0).rgb * COLORS[0]; - for (int i = 0; i < EndPortalLayers; i++) { + for (int i = 0; i < PORTAL_LAYERS; i++) { color += textureProj(Sampler1, texProj0 * end_portal_layer(float(i + 1))).rgb * COLORS[i]; } - fragColor = vec4(color, 1.0); + fragColor = linear_fog(vec4(color, 1.0), vertexDistance, FogStart, FogEnd, FogColor); } diff --git a/assets/minecraft/shaders/core/rendertype_end_portal.json b/assets/minecraft/shaders/core/rendertype_end_portal.json deleted file mode 100644 index 5f93d105..00000000 --- a/assets/minecraft/shaders/core/rendertype_end_portal.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_end_portal", - "fragment": "minecraft:core/rendertype_end_portal", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "GameTime", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "EndPortalLayers", "type": "int", "count": 1, "values": [ 15 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_end_portal.vsh b/assets/minecraft/shaders/core/rendertype_end_portal.vsh index a31786cb..37b5d5c1 100644 --- a/assets/minecraft/shaders/core/rendertype_end_portal.vsh +++ b/assets/minecraft/shaders/core/rendertype_end_portal.vsh @@ -1,16 +1,20 @@ #version 150 +#moj_import #moj_import in vec3 Position; uniform mat4 ModelViewMat; uniform mat4 ProjMat; +uniform int FogShape; out vec4 texProj0; +out float vertexDistance; void main() { gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); texProj0 = projection_from_position(gl_Position); + vertexDistance = fog_distance(Position, FogShape); } diff --git a/assets/minecraft/shaders/core/rendertype_energy_swirl.json b/assets/minecraft/shaders/core/rendertype_energy_swirl.json deleted file mode 100644 index f8ad7958..00000000 --- a/assets/minecraft/shaders/core/rendertype_energy_swirl.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - }, - "flags": [ - "APPLY_TEXTURE_MATRIX", - "NO_CARDINAL_LIGHTING", - "NO_OVERLAY", - "EMISSIVE" - ] - }, - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_alpha.json b/assets/minecraft/shaders/core/rendertype_entity_alpha.json deleted file mode 100644 index b1d9f34f..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_alpha.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_entity_alpha", - "fragment": "minecraft:core/rendertype_entity_alpha", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout.json b/assets/minecraft/shaders/core/rendertype_entity_cutout.json deleted file mode 100644 index f1f459b6..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.json b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.json deleted file mode 100644 index f1f459b6..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.json b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.json deleted file mode 100644 index f1f459b6..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_decal.json b/assets/minecraft/shaders/core/rendertype_entity_decal.json deleted file mode 100644 index eeac88a0..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_decal.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_entity_decal", - "fragment": "minecraft:core/rendertype_entity_decal", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_glint.json b/assets/minecraft/shaders/core/rendertype_entity_glint.json deleted file mode 100644 index c560c554..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_glint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/glint", - "fragment": "minecraft:core/glint", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_no_outline.json b/assets/minecraft/shaders/core/rendertype_entity_no_outline.json deleted file mode 100644 index 0598bc5b..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_no_outline.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "flags": [ - "NO_OVERLAY" - ] - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_shadow.json b/assets/minecraft/shaders/core/rendertype_entity_shadow.json deleted file mode 100644 index b9960d06..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_shadow.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_entity_shadow", - "fragment": "minecraft:core/rendertype_entity_shadow", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_smooth_cutout.json b/assets/minecraft/shaders/core/rendertype_entity_smooth_cutout.json deleted file mode 100644 index f1f459b6..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_smooth_cutout.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_solid.json b/assets/minecraft/shaders/core/rendertype_entity_solid.json deleted file mode 100644 index 45bbeb78..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_solid.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_translucent.json b/assets/minecraft/shaders/core/rendertype_entity_translucent.json deleted file mode 100644 index f1f459b6..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_translucent.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_entity_translucent_emissive.json b/assets/minecraft/shaders/core/rendertype_entity_translucent_emissive.json deleted file mode 100644 index 4e6bf9f0..00000000 --- a/assets/minecraft/shaders/core/rendertype_entity_translucent_emissive.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - }, - "flags": [ - "EMISSIVE" - ] - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler1" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_eyes.json b/assets/minecraft/shaders/core/rendertype_eyes.json deleted file mode 100644 index 3af08632..00000000 --- a/assets/minecraft/shaders/core/rendertype_eyes.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "vertex": "minecraft:core/entity", - "fragment": "minecraft:core/entity", - "defines": { - "flags": [ - "EMISSIVE", - "NO_OVERLAY", - "NO_CARDINAL_LIGHTING" - ] - }, - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_glint.json b/assets/minecraft/shaders/core/rendertype_glint.json deleted file mode 100644 index c560c554..00000000 --- a/assets/minecraft/shaders/core/rendertype_glint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/glint", - "fragment": "minecraft:core/glint", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_glint_translucent.json b/assets/minecraft/shaders/core/rendertype_glint_translucent.json deleted file mode 100644 index c560c554..00000000 --- a/assets/minecraft/shaders/core/rendertype_glint_translucent.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/glint", - "fragment": "minecraft:core/glint", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, - { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_gui.json b/assets/minecraft/shaders/core/rendertype_gui.json deleted file mode 100644 index 29060a48..00000000 --- a/assets/minecraft/shaders/core/rendertype_gui.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/gui", - "fragment": "minecraft:core/gui", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_gui_ghost_recipe_overlay.json b/assets/minecraft/shaders/core/rendertype_gui_ghost_recipe_overlay.json deleted file mode 100644 index 29060a48..00000000 --- a/assets/minecraft/shaders/core/rendertype_gui_ghost_recipe_overlay.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/gui", - "fragment": "minecraft:core/gui", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_gui_overlay.json b/assets/minecraft/shaders/core/rendertype_gui_overlay.json deleted file mode 100644 index 29060a48..00000000 --- a/assets/minecraft/shaders/core/rendertype_gui_overlay.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/gui", - "fragment": "minecraft:core/gui", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_gui_text_highlight.json b/assets/minecraft/shaders/core/rendertype_gui_text_highlight.json deleted file mode 100644 index 29060a48..00000000 --- a/assets/minecraft/shaders/core/rendertype_gui_text_highlight.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/gui", - "fragment": "minecraft:core/gui", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.json b/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.json deleted file mode 100644 index dc813b36..00000000 --- a/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_item_entity_translucent_cull", - "fragment": "minecraft:core/rendertype_item_entity_translucent_cull", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_leash.json b/assets/minecraft/shaders/core/rendertype_leash.json deleted file mode 100644 index 0aa90d26..00000000 --- a/assets/minecraft/shaders/core/rendertype_leash.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_leash", - "fragment": "minecraft:core/rendertype_leash", - "samplers": [ - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_lightning.json b/assets/minecraft/shaders/core/rendertype_lightning.json deleted file mode 100644 index 78bf9b5e..00000000 --- a/assets/minecraft/shaders/core/rendertype_lightning.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_lightning", - "fragment": "minecraft:core/rendertype_lightning", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_lines.json b/assets/minecraft/shaders/core/rendertype_lines.json deleted file mode 100644 index 32ce8870..00000000 --- a/assets/minecraft/shaders/core/rendertype_lines.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_lines", - "fragment": "minecraft:core/rendertype_lines", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "LineWidth", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "ScreenSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_outline.json b/assets/minecraft/shaders/core/rendertype_outline.json deleted file mode 100644 index 6e4fb121..00000000 --- a/assets/minecraft/shaders/core/rendertype_outline.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_outline", - "fragment": "minecraft:core/rendertype_outline", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_solid.json b/assets/minecraft/shaders/core/rendertype_solid.json deleted file mode 100644 index ce415faa..00000000 --- a/assets/minecraft/shaders/core/rendertype_solid.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "vertex": "minecraft:core/terrain", - "fragment": "minecraft:core/terrain", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text.json b/assets/minecraft/shaders/core/rendertype_text.json deleted file mode 100644 index 8fff4c6f..00000000 --- a/assets/minecraft/shaders/core/rendertype_text.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text", - "fragment": "minecraft:core/rendertype_text", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text_background.json b/assets/minecraft/shaders/core/rendertype_text_background.json deleted file mode 100644 index 2709bf99..00000000 --- a/assets/minecraft/shaders/core/rendertype_text_background.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text_background", - "fragment": "minecraft:core/rendertype_text_background", - "samplers": [ - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text_background_see_through.json b/assets/minecraft/shaders/core/rendertype_text_background_see_through.json deleted file mode 100644 index 8407a3b3..00000000 --- a/assets/minecraft/shaders/core/rendertype_text_background_see_through.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text_background_see_through", - "fragment": "minecraft:core/rendertype_text_background_see_through", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text_intensity.json b/assets/minecraft/shaders/core/rendertype_text_intensity.json deleted file mode 100644 index 04262bf7..00000000 --- a/assets/minecraft/shaders/core/rendertype_text_intensity.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text_intensity", - "fragment": "minecraft:core/rendertype_text_intensity", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text_intensity_see_through.json b/assets/minecraft/shaders/core/rendertype_text_intensity_see_through.json deleted file mode 100644 index a1479e1e..00000000 --- a/assets/minecraft/shaders/core/rendertype_text_intensity_see_through.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text_intensity_see_through", - "fragment": "minecraft:core/rendertype_text_intensity_see_through", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_text_see_through.json b/assets/minecraft/shaders/core/rendertype_text_see_through.json deleted file mode 100644 index c54dc685..00000000 --- a/assets/minecraft/shaders/core/rendertype_text_see_through.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_text_see_through", - "fragment": "minecraft:core/rendertype_text_see_through", - "samplers": [ - { "name": "Sampler0" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_translucent.json b/assets/minecraft/shaders/core/rendertype_translucent.json deleted file mode 100644 index ce415faa..00000000 --- a/assets/minecraft/shaders/core/rendertype_translucent.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "vertex": "minecraft:core/terrain", - "fragment": "minecraft:core/terrain", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_translucent_moving_block.json b/assets/minecraft/shaders/core/rendertype_translucent_moving_block.json deleted file mode 100644 index 2e2c8401..00000000 --- a/assets/minecraft/shaders/core/rendertype_translucent_moving_block.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_translucent_moving_block", - "fragment": "minecraft:core/rendertype_translucent_moving_block", - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_tripwire.json b/assets/minecraft/shaders/core/rendertype_tripwire.json deleted file mode 100644 index ea3a5b05..00000000 --- a/assets/minecraft/shaders/core/rendertype_tripwire.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "vertex": "minecraft:core/terrain", - "fragment": "minecraft:core/terrain", - "defines": { - "values": { - "ALPHA_CUTOUT": "0.1" - } - }, - "samplers": [ - { "name": "Sampler0" }, - { "name": "Sampler2" } - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ModelOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, - { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_water_mask.json b/assets/minecraft/shaders/core/rendertype_water_mask.json deleted file mode 100644 index 9cb3f074..00000000 --- a/assets/minecraft/shaders/core/rendertype_water_mask.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "vertex": "minecraft:core/rendertype_water_mask", - "fragment": "minecraft:core/rendertype_water_mask", - "samplers": [ - ], - "uniforms": [ - { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/core/rendertype_world_border.fsh b/assets/minecraft/shaders/core/rendertype_world_border.fsh new file mode 100644 index 00000000..ded49d39 --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_world_border.fsh @@ -0,0 +1,17 @@ +#version 150 + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; + +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0); + if (color.a == 0.0) { + discard; + } + fragColor = color * ColorModulator; +} diff --git a/assets/minecraft/shaders/core/rendertype_world_border.vsh b/assets/minecraft/shaders/core/rendertype_world_border.vsh new file mode 100644 index 00000000..61d7f05c --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_world_border.vsh @@ -0,0 +1,18 @@ +#version 150 + +in vec3 Position; +in vec2 UV0; + +uniform mat4 TextureMat; +uniform mat4 ModelViewMat; +uniform mat4 ProjMat; +uniform vec3 ModelOffset; + +out vec2 texCoord0; + +void main() { + vec3 pos = Position + ModelOffset; + gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); + + texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy; +} diff --git a/assets/minecraft/shaders/post/bits.fsh b/assets/minecraft/shaders/post/bits.fsh index 754f8bfc..65338e84 100644 --- a/assets/minecraft/shaders/post/bits.fsh +++ b/assets/minecraft/shaders/post/bits.fsh @@ -8,11 +8,12 @@ in vec2 oneTexel; uniform vec2 InSize; uniform float Resolution; -uniform float Saturation; uniform float MosaicSize; out vec4 fragColor; +const float Saturation = 1.5; + void main() { vec2 mosaicInSize = InSize / MosaicSize; vec2 fractPix = fract(texCoord * mosaicInSize) / mosaicInSize; diff --git a/assets/minecraft/shaders/post/bits.json b/assets/minecraft/shaders/post/bits.json deleted file mode 100644 index 54f9e0b5..00000000 --- a/assets/minecraft/shaders/post/bits.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "vertex": "minecraft:post/sobel", - "fragment": "minecraft:post/bits", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "Resolution", "type": "float", "count": 1, "values": [ 4.0 ] }, - { "name": "Saturation", "type": "float", "count": 1, "values": [ 1.5 ] }, - { "name": "MosaicSize", "type": "float", "count": 1, "values": [ 8.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/blit.json b/assets/minecraft/shaders/post/blit.json deleted file mode 100644 index 9ea94a61..00000000 --- a/assets/minecraft/shaders/post/blit.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:post/blit", - "fragment": "minecraft:post/blit", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "ColorModulate", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/blit.vsh b/assets/minecraft/shaders/post/blit.vsh index 443e1f34..b7f943f5 100644 --- a/assets/minecraft/shaders/post/blit.vsh +++ b/assets/minecraft/shaders/post/blit.vsh @@ -8,8 +8,8 @@ uniform vec2 OutSize; out vec2 texCoord; void main(){ - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); - texCoord = Position.xy / OutSize; + texCoord = Position.xy; } diff --git a/assets/minecraft/shaders/post/blur.vsh b/assets/minecraft/shaders/post/blur.vsh index 5917d86b..31aadb4a 100644 --- a/assets/minecraft/shaders/post/blur.vsh +++ b/assets/minecraft/shaders/post/blur.vsh @@ -11,11 +11,11 @@ out vec2 texCoord; out vec2 sampleStep; void main() { - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); vec2 oneTexel = 1.0 / InSize; sampleStep = oneTexel * BlurDir; - texCoord = Position.xy / OutSize; + texCoord = Position.xy; } diff --git a/assets/minecraft/shaders/post/box_blur.fsh b/assets/minecraft/shaders/post/box_blur.fsh index 381e1e84..32780bbc 100644 --- a/assets/minecraft/shaders/post/box_blur.fsh +++ b/assets/minecraft/shaders/post/box_blur.fsh @@ -6,7 +6,6 @@ in vec2 texCoord; in vec2 sampleStep; uniform float Radius; -uniform float RadiusMultiplier; out vec4 fragColor; @@ -15,7 +14,7 @@ out vec4 fragColor; // In the end we sample the last pixel with a half weight, since the amount of pixels to sample is always odd (actualRadius * 2 + 1). void main() { vec4 blurred = vec4(0.0); - float actualRadius = round(Radius * RadiusMultiplier); + float actualRadius = round(Radius); for (float a = -actualRadius + 0.5; a <= actualRadius; a += 2.0) { blurred += texture(InSampler, texCoord + sampleStep * a); } diff --git a/assets/minecraft/shaders/post/box_blur.json b/assets/minecraft/shaders/post/box_blur.json deleted file mode 100644 index c2d389f2..00000000 --- a/assets/minecraft/shaders/post/box_blur.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "vertex": "minecraft:post/blur", - "fragment": "minecraft:post/box_blur", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "BlurDir", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "Radius", "type": "float", "count": 1, "values": [ 5.0 ] }, - { "name": "RadiusMultiplier", "type": "float", "count": 1, "values": [ 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/color_convolve.fsh b/assets/minecraft/shaders/post/color_convolve.fsh index 329e1e55..c8de40ac 100644 --- a/assets/minecraft/shaders/post/color_convolve.fsh +++ b/assets/minecraft/shaders/post/color_convolve.fsh @@ -4,16 +4,14 @@ uniform sampler2D InSampler; in vec2 texCoord; in vec2 oneTexel; - uniform vec2 InSize; -uniform vec3 Gray; uniform vec3 RedMatrix; uniform vec3 GreenMatrix; uniform vec3 BlueMatrix; -uniform vec3 Offset; -uniform vec3 ColorScale; -uniform float Saturation; + +const vec3 Gray = vec3(0.3, 0.59, 0.11); +const float Saturation = 1.8; out vec4 fragColor; @@ -26,9 +24,6 @@ void main() { float BlueValue = dot(InTexel.rgb, BlueMatrix); vec3 OutColor = vec3(RedValue, GreenValue, BlueValue); - // Offset & Scale - OutColor = (OutColor * ColorScale) + Offset; - // Saturation float Luma = dot(OutColor, Gray); vec3 Chroma = OutColor - Luma; diff --git a/assets/minecraft/shaders/post/color_convolve.json b/assets/minecraft/shaders/post/color_convolve.json deleted file mode 100644 index 5ed0aeb9..00000000 --- a/assets/minecraft/shaders/post/color_convolve.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "vertex": "minecraft:post/sobel", - "fragment": "minecraft:post/color_convolve", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "Gray", "type": "float", "count": 3, "values": [ 0.3, 0.59, 0.11 ] }, - { "name": "RedMatrix", "type": "float", "count": 3, "values": [ 1.0, 0.0, 0.0 ] }, - { "name": "GreenMatrix", "type": "float", "count": 3, "values": [ 0.0, 1.0, 0.0 ] }, - { "name": "BlueMatrix", "type": "float", "count": 3, "values": [ 0.0, 0.0, 1.0 ] }, - { "name": "Offset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, - { "name": "ColorScale", "type": "float", "count": 3, "values": [ 1.0, 1.0, 1.0 ] }, - { "name": "Saturation", "type": "float", "count": 1, "values": [ 1.8 ] } - ] -} diff --git a/assets/minecraft/shaders/post/entity_outline.json b/assets/minecraft/shaders/post/entity_outline.json deleted file mode 100644 index a60098f0..00000000 --- a/assets/minecraft/shaders/post/entity_outline.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "vertex": "minecraft:post/sobel", - "fragment": "minecraft:post/entity_sobel", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/entity_outline_box_blur.json b/assets/minecraft/shaders/post/entity_outline_box_blur.json deleted file mode 100644 index d46d1520..00000000 --- a/assets/minecraft/shaders/post/entity_outline_box_blur.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "blend": { - "func": "add", - "srcrgb": "one", - "dstrgb": "zero" - }, - "vertex": "minecraft:post/blur", - "fragment": "minecraft:post/entity_outline_box_blur", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "BlurDir", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/invert.json b/assets/minecraft/shaders/post/invert.json deleted file mode 100644 index e3ef44e9..00000000 --- a/assets/minecraft/shaders/post/invert.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "vertex": "minecraft:post/blit", - "fragment": "minecraft:post/invert", - "samplers": [ - { "name": "InSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "InverseAmount", "type": "float", "count": 1, "values": [ 0.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/invert.vsh b/assets/minecraft/shaders/post/invert.vsh index f30f3a83..c4fb025c 100644 --- a/assets/minecraft/shaders/post/invert.vsh +++ b/assets/minecraft/shaders/post/invert.vsh @@ -9,11 +9,11 @@ uniform vec2 OutSize; out vec2 texCoord; void main(){ - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); vec2 sizeRatio = OutSize / InSize; - texCoord = Position.xy / OutSize; + texCoord = Position.xy; texCoord.x = texCoord.x * sizeRatio.x; texCoord.y = texCoord.y * sizeRatio.y; texCoord.y = sizeRatio.y - texCoord.y; diff --git a/assets/minecraft/shaders/post/rotscale.vsh b/assets/minecraft/shaders/post/rotscale.vsh index 7ca34de5..599ca499 100644 --- a/assets/minecraft/shaders/post/rotscale.vsh +++ b/assets/minecraft/shaders/post/rotscale.vsh @@ -14,10 +14,10 @@ out vec2 texCoord; out vec2 scaledCoord; void main(){ - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); - texCoord = Position.xy / OutSize; + texCoord = Position.xy; float Deg2Rad = 0.0174532925; float InRadians = InRotation * Deg2Rad; diff --git a/assets/minecraft/shaders/post/screenquad.vsh b/assets/minecraft/shaders/post/screenquad.vsh index 9dfe91cd..c510ceed 100644 --- a/assets/minecraft/shaders/post/screenquad.vsh +++ b/assets/minecraft/shaders/post/screenquad.vsh @@ -8,7 +8,7 @@ uniform vec2 OutSize; out vec2 texCoord; void main() { - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); - texCoord = Position.xy / OutSize; + texCoord = Position.xy; } diff --git a/assets/minecraft/shaders/post/sobel.vsh b/assets/minecraft/shaders/post/sobel.vsh index 99e97e06..65dd8581 100644 --- a/assets/minecraft/shaders/post/sobel.vsh +++ b/assets/minecraft/shaders/post/sobel.vsh @@ -10,10 +10,10 @@ out vec2 texCoord; out vec2 oneTexel; void main(){ - vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0); + vec4 outPos = ProjMat * vec4(Position.xy * OutSize, 0.0, 1.0); gl_Position = vec4(outPos.xy, 0.2, 1.0); oneTexel = 1.0 / InSize; - texCoord = Position.xy / OutSize; + texCoord = Position.xy; } diff --git a/assets/minecraft/shaders/post/spider.json b/assets/minecraft/shaders/post/spider.json deleted file mode 100644 index 1999cae7..00000000 --- a/assets/minecraft/shaders/post/spider.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "vertex": "minecraft:post/rotscale", - "fragment": "minecraft:post/spiderclip", - "samplers": [ - { "name": "InSampler" }, - { "name": "BlurSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "InScale", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, - { "name": "InOffset", "type": "float", "count": 2, "values": [ 0.0, 0.0 ] }, - { "name": "InRotation", "type": "float", "count": 1, "values": [ 0.0 ] }, - { "name": "Scissor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 1.0, 1.0 ] }, - { "name": "Vignette", "type": "float", "count": 4, "values": [ 0.0, 0.0, 1.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/shaders/post/transparency.json b/assets/minecraft/shaders/post/transparency.json deleted file mode 100644 index 8f5b68ce..00000000 --- a/assets/minecraft/shaders/post/transparency.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "vertex": "minecraft:post/screenquad", - "fragment": "minecraft:post/transparency", - "samplers": [ - { "name": "MainSampler" }, - { "name": "MainDepthSampler" }, - { "name": "TranslucentSampler" }, - { "name": "TranslucentDepthSampler" }, - { "name": "ItemEntitySampler" }, - { "name": "ItemEntityDepthSampler" }, - { "name": "ParticlesSampler" }, - { "name": "ParticlesDepthSampler" }, - { "name": "CloudsSampler" }, - { "name": "CloudsDepthSampler" }, - { "name": "WeatherSampler" }, - { "name": "WeatherDepthSampler" } - ], - "uniforms": [ - { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, - { "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] } - ] -} diff --git a/assets/minecraft/textures/block/bricks.png b/assets/minecraft/textures/block/bricks.png index 71c7d076..0b301720 100644 --- a/assets/minecraft/textures/block/bricks.png +++ b/assets/minecraft/textures/block/bricks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33f9411f1cb233a2020df0cf3fda32c0f67a4b0fac3751bde2ba6f2fee81b169 -size 216 +oid sha256:3242cb8e441c940156633b0d867e08c887ddaeaa32343b212d4b1e5ca3dae123 +size 206 diff --git a/assets/minecraft/textures/block/bush.png b/assets/minecraft/textures/block/bush.png new file mode 100644 index 00000000..7d8d0577 --- /dev/null +++ b/assets/minecraft/textures/block/bush.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4749dab15dd8baccfb3eb295f0a7241175e02a8ec66c6ce4601337147974812f +size 198 diff --git a/assets/minecraft/textures/block/cactus_flower.png b/assets/minecraft/textures/block/cactus_flower.png new file mode 100644 index 00000000..5416813e --- /dev/null +++ b/assets/minecraft/textures/block/cactus_flower.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce712339cfeb510319c8f313bdb77fe42912b7c87eeab6e6faa1f70c74ace512 +size 182 diff --git a/assets/minecraft/textures/block/chiseled_nether_bricks.png b/assets/minecraft/textures/block/chiseled_nether_bricks.png index 240a441d..909d644c 100644 --- a/assets/minecraft/textures/block/chiseled_nether_bricks.png +++ b/assets/minecraft/textures/block/chiseled_nether_bricks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:912db8068dc28f858988821e76cc7be62405f3a05a10f84d0b9fe3bdf214ca08 -size 214 +oid sha256:c404d7fd31864978639528de6a2660c0b6929689ada66fc132929938b72193e0 +size 199 diff --git a/assets/minecraft/textures/block/chiseled_resin_bricks.png b/assets/minecraft/textures/block/chiseled_resin_bricks.png new file mode 100644 index 00000000..4cff2b57 --- /dev/null +++ b/assets/minecraft/textures/block/chiseled_resin_bricks.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e0d6bdcfcc420b52660e53c2058747ef709fe293295128e8c8690eace91a9e9 +size 208 diff --git a/assets/minecraft/textures/block/closed_eyeblossom.png b/assets/minecraft/textures/block/closed_eyeblossom.png new file mode 100644 index 00000000..7cf73997 --- /dev/null +++ b/assets/minecraft/textures/block/closed_eyeblossom.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:581ecac12232a67e56a6becd110d7bd764ae7b40ab3e2d4f109ebd0030749989 +size 297 diff --git a/assets/minecraft/textures/block/cracked_nether_bricks.png b/assets/minecraft/textures/block/cracked_nether_bricks.png index 9332f12d..2f87930e 100644 --- a/assets/minecraft/textures/block/cracked_nether_bricks.png +++ b/assets/minecraft/textures/block/cracked_nether_bricks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29314fb4debac85bcfe820d539707538add507b7e7b964237611aef7d8933524 -size 216 +oid sha256:e4d72096b6d64c111322abe482b13ec8d859fa85537dad25b26f16cb3122c982 +size 215 diff --git a/assets/minecraft/textures/block/creaking_heart_active.png b/assets/minecraft/textures/block/creaking_heart_awake.png similarity index 100% rename from assets/minecraft/textures/block/creaking_heart_active.png rename to assets/minecraft/textures/block/creaking_heart_awake.png diff --git a/assets/minecraft/textures/block/creaking_heart_dormant.png b/assets/minecraft/textures/block/creaking_heart_dormant.png new file mode 100644 index 00000000..74e29f34 --- /dev/null +++ b/assets/minecraft/textures/block/creaking_heart_dormant.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:541721401cf7cdb6c001b66ead22afce92527a934ed23eb15b8c8f8af1509765 +size 236 diff --git a/assets/minecraft/textures/block/creaking_heart_top.png b/assets/minecraft/textures/block/creaking_heart_top.png index e7c16c53..01b68903 100644 --- a/assets/minecraft/textures/block/creaking_heart_top.png +++ b/assets/minecraft/textures/block/creaking_heart_top.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c98cfb528d113b8b11972466f545daaedf4cd2af1da63abc867c840ac3f4e4c -size 225 +oid sha256:96f9d77f2649d122717c2fccea6e62df99d41661c1342cf655a4a8617ec9241b +size 226 diff --git a/assets/minecraft/textures/block/creaking_heart_top_active.png b/assets/minecraft/textures/block/creaking_heart_top_awake.png similarity index 100% rename from assets/minecraft/textures/block/creaking_heart_top_active.png rename to assets/minecraft/textures/block/creaking_heart_top_awake.png diff --git a/assets/minecraft/textures/block/creaking_heart_top_dormant.png b/assets/minecraft/textures/block/creaking_heart_top_dormant.png new file mode 100644 index 00000000..17ac5a9d --- /dev/null +++ b/assets/minecraft/textures/block/creaking_heart_top_dormant.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:607ef7939ef2445fb508f40d23d1dab3774dde91f3acd1447045be47153d9660 +size 233 diff --git a/assets/minecraft/textures/block/exposed_copper_bulb_lit_powered.png b/assets/minecraft/textures/block/exposed_copper_bulb_lit_powered.png index 97c36319..08c640b0 100644 --- a/assets/minecraft/textures/block/exposed_copper_bulb_lit_powered.png +++ b/assets/minecraft/textures/block/exposed_copper_bulb_lit_powered.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47a78e0b8d0a044404ad19433d2707c1857136112682625efdf5c3843eea501e -size 263 +oid sha256:e384d9d6816fcc4132fb6bf167790553de8a91489def66941963e38b68d7b8ea +size 265 diff --git a/assets/minecraft/textures/block/firefly_bush.png b/assets/minecraft/textures/block/firefly_bush.png new file mode 100644 index 00000000..153c8fe4 --- /dev/null +++ b/assets/minecraft/textures/block/firefly_bush.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8561248bf33ef1dea7ed84a16b3623aa7a974a707c06b3b2a161a122cbe1600 +size 224 diff --git a/assets/minecraft/textures/block/firefly_bush_emissive.png b/assets/minecraft/textures/block/firefly_bush_emissive.png new file mode 100644 index 00000000..3218f922 --- /dev/null +++ b/assets/minecraft/textures/block/firefly_bush_emissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9519a8118504163df75438045befeaa440778bbb7c91f38066729be326358399 +size 188 diff --git a/assets/minecraft/textures/block/firefly_bush_emissive.png.mcmeta b/assets/minecraft/textures/block/firefly_bush_emissive.png.mcmeta new file mode 100644 index 00000000..8e55e43b --- /dev/null +++ b/assets/minecraft/textures/block/firefly_bush_emissive.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 3 + } +} diff --git a/assets/minecraft/textures/block/leaf_litter.png b/assets/minecraft/textures/block/leaf_litter.png new file mode 100644 index 00000000..fd6f8452 --- /dev/null +++ b/assets/minecraft/textures/block/leaf_litter.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:671d40e6b84d5bade73eb6738e358ead56b8cc5e5f2e67592bc6ee32e05db885 +size 251 diff --git a/assets/minecraft/textures/block/nether_bricks.png b/assets/minecraft/textures/block/nether_bricks.png index 79333514..0ab212a7 100644 --- a/assets/minecraft/textures/block/nether_bricks.png +++ b/assets/minecraft/textures/block/nether_bricks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3cf860896f5977a69eea6432f8d920c4f380229ad8b2cf19184d4629faca4627 -size 193 +oid sha256:2eba1f96e7fcaa5d9ea8ae2dd8c196494039fa41e9ed4c89909c90d942297318 +size 190 diff --git a/assets/minecraft/textures/block/open_eyeblossom.png b/assets/minecraft/textures/block/open_eyeblossom.png new file mode 100644 index 00000000..4486637f --- /dev/null +++ b/assets/minecraft/textures/block/open_eyeblossom.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fedee209983d9df1df1eb4946664d1f0bdc1cb2b703720573fb4533772bb8efb +size 316 diff --git a/assets/minecraft/textures/block/open_eyeblossom_emissive.png b/assets/minecraft/textures/block/open_eyeblossom_emissive.png new file mode 100644 index 00000000..960ca884 --- /dev/null +++ b/assets/minecraft/textures/block/open_eyeblossom_emissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bbccb88bf07c8225da7ee2a5ba4bbe75c6b60400eb67b166364f980703bdce6 +size 101 diff --git a/assets/minecraft/textures/block/red_nether_bricks.png b/assets/minecraft/textures/block/red_nether_bricks.png index 2ac0542a..e50114d9 100644 --- a/assets/minecraft/textures/block/red_nether_bricks.png +++ b/assets/minecraft/textures/block/red_nether_bricks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86516fbe227cf501e20d97b2cf0049102b406e4f80971b33904dde544fe2fc44 -size 197 +oid sha256:a158bae8173f719d7f1e0fb713cff7fcd47615b647088bebcd02e0cd04c71663 +size 190 diff --git a/assets/minecraft/textures/block/resin_block.png b/assets/minecraft/textures/block/resin_block.png new file mode 100644 index 00000000..5895a3a5 --- /dev/null +++ b/assets/minecraft/textures/block/resin_block.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f39a1f402a25f97828e9391a2953e3c84a46cc5c4a6c0b10e72bb9e6ed7bcfdf +size 205 diff --git a/assets/minecraft/textures/block/resin_bricks.png b/assets/minecraft/textures/block/resin_bricks.png new file mode 100644 index 00000000..539bd9cb --- /dev/null +++ b/assets/minecraft/textures/block/resin_bricks.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab7b68d7fd987c8d82e9225a33b783419a86ff4a2e77e5b1cc22cd63f546445c +size 200 diff --git a/assets/minecraft/textures/block/resin_clump.png b/assets/minecraft/textures/block/resin_clump.png new file mode 100644 index 00000000..784bce93 --- /dev/null +++ b/assets/minecraft/textures/block/resin_clump.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24196521916d0169f048423b8317846a67ee62e9adec6bca5223437fd1043265 +size 154 diff --git a/assets/minecraft/textures/block/short_dry_grass.png b/assets/minecraft/textures/block/short_dry_grass.png new file mode 100644 index 00000000..e8556739 --- /dev/null +++ b/assets/minecraft/textures/block/short_dry_grass.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e14ad13ebef278a19400829c319ea0f73f742fa806fd4f5edd3eca5588ce1057 +size 155 diff --git a/assets/minecraft/textures/block/tall_dry_grass.png b/assets/minecraft/textures/block/tall_dry_grass.png new file mode 100644 index 00000000..fc628165 --- /dev/null +++ b/assets/minecraft/textures/block/tall_dry_grass.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:720b8a49865f7d2f700a9a30317090cf8f1614790a034b96cb7a1aefe62d9a5d +size 189 diff --git a/assets/minecraft/textures/block/test_block_accept.png b/assets/minecraft/textures/block/test_block_accept.png new file mode 100644 index 00000000..0e27a3e0 --- /dev/null +++ b/assets/minecraft/textures/block/test_block_accept.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5d6a5c2cf864db7b3eccd9816c47d122fc59b10c6bb55cb9432346c8c8a0cb0 +size 253 diff --git a/assets/minecraft/textures/block/test_block_fail.png b/assets/minecraft/textures/block/test_block_fail.png new file mode 100644 index 00000000..a7a28e38 --- /dev/null +++ b/assets/minecraft/textures/block/test_block_fail.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47daec1cdb03a50a5821d068f5649fa07dadc740fef71e9b4d6cf3dd6956f370 +size 253 diff --git a/assets/minecraft/textures/block/test_block_log.png b/assets/minecraft/textures/block/test_block_log.png new file mode 100644 index 00000000..e90fe0dc --- /dev/null +++ b/assets/minecraft/textures/block/test_block_log.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e719b222e49f642d09d64c2cb2d885b3f0c103f877dae07c59dbbbe4653b13d +size 253 diff --git a/assets/minecraft/textures/block/test_block_start.png b/assets/minecraft/textures/block/test_block_start.png new file mode 100644 index 00000000..c83b812f --- /dev/null +++ b/assets/minecraft/textures/block/test_block_start.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a36d144eabc272bbc6c31a18a656d6561e71836d4587ad04d382a536ca95e162 +size 260 diff --git a/assets/minecraft/textures/block/test_instance_block.png b/assets/minecraft/textures/block/test_instance_block.png new file mode 100644 index 00000000..725e2d4e --- /dev/null +++ b/assets/minecraft/textures/block/test_instance_block.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e762c8b71a04f0e4269eb6ababfa9be90086a1d164fc0828619f37469f6a6a77 +size 244 diff --git a/assets/minecraft/textures/block/wildflowers.png b/assets/minecraft/textures/block/wildflowers.png new file mode 100644 index 00000000..ed81c2cb --- /dev/null +++ b/assets/minecraft/textures/block/wildflowers.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:229760ea01b4ed04469c32fe16d04a966ca6e3df9616f4eead5126a6138d2c7f +size 192 diff --git a/assets/minecraft/textures/block/wildflowers_stem.png b/assets/minecraft/textures/block/wildflowers_stem.png new file mode 100644 index 00000000..3438db93 --- /dev/null +++ b/assets/minecraft/textures/block/wildflowers_stem.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86622b67af968e48c78539b8d9d958123890af17c5a03f28348015d6f10b42f5 +size 80 diff --git a/assets/minecraft/textures/colormap/dry_foliage.png b/assets/minecraft/textures/colormap/dry_foliage.png new file mode 100644 index 00000000..72cacff4 --- /dev/null +++ b/assets/minecraft/textures/colormap/dry_foliage.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:daf58d3c01ebdca88a7e8062f3c5d9f54da0ba9347c110aa69492ffed68cf40a +size 8979 diff --git a/assets/minecraft/textures/entity/camel/camel.png b/assets/minecraft/textures/entity/camel/camel.png index 32b567a4..86550d5b 100644 --- a/assets/minecraft/textures/entity/camel/camel.png +++ b/assets/minecraft/textures/entity/camel/camel.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc9c69ed055f3c98da53bb1f0c8093d58e3775bbbd2ea8217287394d56879487 -size 2218 +oid sha256:c8364d5bb6b667c3e4fe8364aea1d707dcb93c93b9d45c942e619b3130a3451a +size 1752 diff --git a/assets/minecraft/textures/entity/chicken/cold_chicken.png b/assets/minecraft/textures/entity/chicken/cold_chicken.png new file mode 100644 index 00000000..32772094 --- /dev/null +++ b/assets/minecraft/textures/entity/chicken/cold_chicken.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc5c80b547f5a1c0b70ef19c51543f5fb02853e4d45cdfca9407dd925bb50761 +size 502 diff --git a/assets/minecraft/textures/entity/chicken.png b/assets/minecraft/textures/entity/chicken/temperate_chicken.png similarity index 100% rename from assets/minecraft/textures/entity/chicken.png rename to assets/minecraft/textures/entity/chicken/temperate_chicken.png diff --git a/assets/minecraft/textures/entity/chicken/warm_chicken.png b/assets/minecraft/textures/entity/chicken/warm_chicken.png new file mode 100644 index 00000000..aea49bc7 --- /dev/null +++ b/assets/minecraft/textures/entity/chicken/warm_chicken.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5643d6df418294ee65c5f1d7970927fd563d855c2ab534723fee946b69273f0b +size 414 diff --git a/assets/minecraft/textures/entity/cow/brown_mooshroom.png b/assets/minecraft/textures/entity/cow/brown_mooshroom.png index 1c8a5add..c8918932 100644 --- a/assets/minecraft/textures/entity/cow/brown_mooshroom.png +++ b/assets/minecraft/textures/entity/cow/brown_mooshroom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f82e60437c2d9e3d8b11664358e848030fef70143343ac3f48da260a16242208 -size 835 +oid sha256:4dd50e641d3c8132c6b0d7575ff4db4f3c2d9e1db9d5442414d91a9dcd924ae2 +size 829 diff --git a/assets/minecraft/textures/entity/cow/cold_cow.png b/assets/minecraft/textures/entity/cow/cold_cow.png new file mode 100644 index 00000000..3c6957ad --- /dev/null +++ b/assets/minecraft/textures/entity/cow/cold_cow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45282919f7b5b2b1f074a2036882e8d34d55c72ae2ecb313ad949ba6d750abc8 +size 977 diff --git a/assets/minecraft/textures/entity/cow/cow.png b/assets/minecraft/textures/entity/cow/cow.png deleted file mode 100644 index 12321bbe..00000000 --- a/assets/minecraft/textures/entity/cow/cow.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47ae8e77011e8b86a64047388a60bd8cfc9bd071301d6072a554c2134065996a -size 866 diff --git a/assets/minecraft/textures/entity/cow/red_mooshroom.png b/assets/minecraft/textures/entity/cow/red_mooshroom.png index 79956061..558a4524 100644 --- a/assets/minecraft/textures/entity/cow/red_mooshroom.png +++ b/assets/minecraft/textures/entity/cow/red_mooshroom.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:689cd82d0783b06648624bc241cb223d5bbcbb4410806ff6f97875608bec5224 -size 853 +oid sha256:f06ac87b18f499925614ec48498f727c4f175ae389549dcf44ef855b3de8485c +size 861 diff --git a/assets/minecraft/textures/entity/cow/temperate_cow.png b/assets/minecraft/textures/entity/cow/temperate_cow.png new file mode 100644 index 00000000..d0d597bf --- /dev/null +++ b/assets/minecraft/textures/entity/cow/temperate_cow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:def74de776f7f28bd199dfc765bd0fabda18ce0339e70355f52d2dce42b0f93a +size 933 diff --git a/assets/minecraft/textures/entity/cow/warm_cow.png b/assets/minecraft/textures/entity/cow/warm_cow.png new file mode 100644 index 00000000..e6d1d3d4 --- /dev/null +++ b/assets/minecraft/textures/entity/cow/warm_cow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d64a17aecc2d0dd37b5367ca89e5163ea70788052a3c00992bd6fc021f569ca0 +size 709 diff --git a/assets/minecraft/textures/entity/equipment/camel_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/camel_saddle/saddle.png new file mode 100644 index 00000000..25c00ae9 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/camel_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e779d363b44eb73c4f3f3a27520b7f26a2cb2d1512aeb0f371f58fd3c82491bb +size 587 diff --git a/assets/minecraft/textures/entity/equipment/donkey_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/donkey_saddle/saddle.png new file mode 100644 index 00000000..08651d51 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/donkey_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eca0e61839969413e6ff9cdadfca3eb909779ff13abe18e4c4fab6780ae91fc +size 313 diff --git a/assets/minecraft/textures/entity/equipment/horse_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/horse_saddle/saddle.png new file mode 100644 index 00000000..08651d51 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/horse_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eca0e61839969413e6ff9cdadfca3eb909779ff13abe18e4c4fab6780ae91fc +size 313 diff --git a/assets/minecraft/textures/entity/equipment/mule_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/mule_saddle/saddle.png new file mode 100644 index 00000000..08651d51 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/mule_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eca0e61839969413e6ff9cdadfca3eb909779ff13abe18e4c4fab6780ae91fc +size 313 diff --git a/assets/minecraft/textures/entity/equipment/pig_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/pig_saddle/saddle.png new file mode 100644 index 00000000..50c22002 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/pig_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:773087a4e77b29ccf8a0b98029f38e2aff07efad7720e5f21abdef5fd3b50177 +size 221 diff --git a/assets/minecraft/textures/entity/equipment/skeleton_horse_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/skeleton_horse_saddle/saddle.png new file mode 100644 index 00000000..08651d51 --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/skeleton_horse_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4eca0e61839969413e6ff9cdadfca3eb909779ff13abe18e4c4fab6780ae91fc +size 313 diff --git a/assets/minecraft/textures/entity/strider/strider_saddle.png b/assets/minecraft/textures/entity/equipment/strider_saddle/saddle.png similarity index 100% rename from assets/minecraft/textures/entity/strider/strider_saddle.png rename to assets/minecraft/textures/entity/equipment/strider_saddle/saddle.png diff --git a/assets/minecraft/textures/entity/equipment/zombie_horse_saddle/saddle.png b/assets/minecraft/textures/entity/equipment/zombie_horse_saddle/saddle.png new file mode 100644 index 00000000..78202ffe --- /dev/null +++ b/assets/minecraft/textures/entity/equipment/zombie_horse_saddle/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99b6e167497b0000e6e2e1558e192ae25a2956fb6deb0b49f6bf9ee49d05ab24 +size 303 diff --git a/assets/minecraft/textures/entity/horse/donkey.png b/assets/minecraft/textures/entity/horse/donkey.png index a37998d2..6cf9d9f9 100644 --- a/assets/minecraft/textures/entity/horse/donkey.png +++ b/assets/minecraft/textures/entity/horse/donkey.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac25979cab02ad1839113b97f41a98656fe8494e07c93d52eae7339bed2969ff -size 1411 +oid sha256:d834e6a98697f8b7c2a78ad1f648aa91696f6bec1b653a1edb918f13bbc666ca +size 1194 diff --git a/assets/minecraft/textures/entity/horse/horse_black.png b/assets/minecraft/textures/entity/horse/horse_black.png index 0dae766f..847ade87 100644 --- a/assets/minecraft/textures/entity/horse/horse_black.png +++ b/assets/minecraft/textures/entity/horse/horse_black.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:145403abe62e528b9e1953bc05237596f6c38b1b2bb90d6be98f4a8fb2870094 -size 1242 +oid sha256:b187fa206d78fc85c6f645e97a27f0c16b1c50bfdaf0bd3cc1965a329a4470a2 +size 910 diff --git a/assets/minecraft/textures/entity/horse/horse_brown.png b/assets/minecraft/textures/entity/horse/horse_brown.png index 8502c960..14db5854 100644 --- a/assets/minecraft/textures/entity/horse/horse_brown.png +++ b/assets/minecraft/textures/entity/horse/horse_brown.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23f01fe3c03bb7a2023b8107cc0779a3ae1ac3ca6118fcf523df5549868903ac -size 1363 +oid sha256:3930cbd4620439e8f83c674f1729f49ec4f21205de5205a96d90bcf86e092830 +size 998 diff --git a/assets/minecraft/textures/entity/horse/horse_chestnut.png b/assets/minecraft/textures/entity/horse/horse_chestnut.png index 20625678..2a63e12b 100644 --- a/assets/minecraft/textures/entity/horse/horse_chestnut.png +++ b/assets/minecraft/textures/entity/horse/horse_chestnut.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cf1db801e5581cac698f82b5cd060c2eb89464d85ffdfee75b8f865439f81ec -size 1425 +oid sha256:8fac7f1ae4212dca54f21a1795b239a4f6dcbe2d487b956bfc2e653393194ecd +size 1059 diff --git a/assets/minecraft/textures/entity/horse/horse_creamy.png b/assets/minecraft/textures/entity/horse/horse_creamy.png index 6c0935bf..e194fec1 100644 --- a/assets/minecraft/textures/entity/horse/horse_creamy.png +++ b/assets/minecraft/textures/entity/horse/horse_creamy.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:047c520b46fa3c6dfcdac68a140ce4fc4fde01f56beb44efa2fb631dabc08cc8 -size 1470 +oid sha256:109260e147deb23bb1867d32dee6ceda6c419ad06ca0319a09598b500ed167ff +size 1116 diff --git a/assets/minecraft/textures/entity/horse/horse_darkbrown.png b/assets/minecraft/textures/entity/horse/horse_darkbrown.png index 10174176..f9622988 100644 --- a/assets/minecraft/textures/entity/horse/horse_darkbrown.png +++ b/assets/minecraft/textures/entity/horse/horse_darkbrown.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54c82c1291d63e65a87cbbfd4163c61106d92e98c1a4ad8a7e46b59f4c095595 -size 1243 +oid sha256:9df50d70aaf8a4b26456d7e7e1ad31e82dbc03d2c19b6a4fabfd3512baac64bf +size 913 diff --git a/assets/minecraft/textures/entity/horse/horse_gray.png b/assets/minecraft/textures/entity/horse/horse_gray.png index b77ff81a..74c0da3d 100644 --- a/assets/minecraft/textures/entity/horse/horse_gray.png +++ b/assets/minecraft/textures/entity/horse/horse_gray.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09a683fd8c6d1b3aa227fd08c66ee394be63868b590c54476ea21853cf06417c -size 1148 +oid sha256:b4196f003b5377a84affd435bfaa247d9bbe497f82b091560a28c548b263e4bf +size 806 diff --git a/assets/minecraft/textures/entity/horse/horse_skeleton.png b/assets/minecraft/textures/entity/horse/horse_skeleton.png index 3db4a359..f31d914e 100644 --- a/assets/minecraft/textures/entity/horse/horse_skeleton.png +++ b/assets/minecraft/textures/entity/horse/horse_skeleton.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ce6d2ccb97c63565ff6e23df46b10876811e847eee6a2d5e080350cc4f48ac2 -size 1102 +oid sha256:6603d27caae633947f6a0a0b8311e9659752f7343b0f97727ca10fa63693bd3d +size 762 diff --git a/assets/minecraft/textures/entity/horse/horse_white.png b/assets/minecraft/textures/entity/horse/horse_white.png index 87e87c59..6102245c 100644 --- a/assets/minecraft/textures/entity/horse/horse_white.png +++ b/assets/minecraft/textures/entity/horse/horse_white.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43c3c9e5d5b92238590d72ac6d44e3c4b134207c9399641ffa4214495b8c5b2c -size 2454 +oid sha256:48db71af3dc8f11505afa2c3ad594e6cb5894a04f453869982b6f19bdaf27157 +size 987 diff --git a/assets/minecraft/textures/entity/horse/horse_zombie.png b/assets/minecraft/textures/entity/horse/horse_zombie.png index 611a6705..a6feb1fd 100644 --- a/assets/minecraft/textures/entity/horse/horse_zombie.png +++ b/assets/minecraft/textures/entity/horse/horse_zombie.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80047f48572639faa015b9a9733eeb2cbe55e592b15ec0609858007c958e97f4 -size 1519 +oid sha256:1417f923875027f42720c4116a2d1d81ea1d16fc44efede100853d5cca9ecc7a +size 1116 diff --git a/assets/minecraft/textures/entity/horse/mule.png b/assets/minecraft/textures/entity/horse/mule.png index 926191a3..f31af875 100644 --- a/assets/minecraft/textures/entity/horse/mule.png +++ b/assets/minecraft/textures/entity/horse/mule.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da3558c068899cc03743f8aa33aa31c374048bb0f5618e78b2d180b998b270ee -size 1403 +oid sha256:4b868118075c0a93621a48c68f438dff87f3911f6932442eb7fc99e588852da4 +size 1181 diff --git a/assets/minecraft/textures/entity/pig/cold_pig.png b/assets/minecraft/textures/entity/pig/cold_pig.png new file mode 100644 index 00000000..8f94322b --- /dev/null +++ b/assets/minecraft/textures/entity/pig/cold_pig.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f9a30605143d055d198722ef96766fc339e179dd3977f4e8e3c3b61a8a832b4 +size 656 diff --git a/assets/minecraft/textures/entity/pig/pig.png b/assets/minecraft/textures/entity/pig/pig.png deleted file mode 100644 index 560a7f1b..00000000 --- a/assets/minecraft/textures/entity/pig/pig.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dd8df187e9f0014d39fa1eddd7f96e1dcefdb88c9d019d4b16c3fefe8603305 -size 567 diff --git a/assets/minecraft/textures/entity/pig/pig_saddle.png b/assets/minecraft/textures/entity/pig/pig_saddle.png deleted file mode 100644 index 76cf3d78..00000000 --- a/assets/minecraft/textures/entity/pig/pig_saddle.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d6ef196a11c6f3ac59a25706fc851fcff40a12592887c37e8c7d901c798b020 -size 219 diff --git a/assets/minecraft/textures/entity/pig/temperate_pig.png b/assets/minecraft/textures/entity/pig/temperate_pig.png new file mode 100644 index 00000000..55d5bb2d --- /dev/null +++ b/assets/minecraft/textures/entity/pig/temperate_pig.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e2891d9e7d7ac592c911a43c419e9bc6c91918fad3c45a1e8db2021b5553f0d +size 565 diff --git a/assets/minecraft/textures/entity/pig/warm_pig.png b/assets/minecraft/textures/entity/pig/warm_pig.png new file mode 100644 index 00000000..2423d47d --- /dev/null +++ b/assets/minecraft/textures/entity/pig/warm_pig.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e346928596596213712f5868ab2aa81d4ac89bc54cb62fc9e67c8d4a0a0642ef +size 573 diff --git a/assets/minecraft/textures/entity/sheep/sheep_fur.png b/assets/minecraft/textures/entity/sheep/sheep_fur.png deleted file mode 100644 index 089d02ba..00000000 --- a/assets/minecraft/textures/entity/sheep/sheep_fur.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bb089b142bd96ef829eb1e77a09cc579e27f7a54520e4cdb9917bfd811e329d -size 417 diff --git a/assets/minecraft/textures/entity/sheep/sheep_wool.png b/assets/minecraft/textures/entity/sheep/sheep_wool.png new file mode 100644 index 00000000..1fda2e01 --- /dev/null +++ b/assets/minecraft/textures/entity/sheep/sheep_wool.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f76a7d14c8248288e7ad1bc73ea76bd509c19c828dd02268453406fd59d961c +size 414 diff --git a/assets/minecraft/textures/entity/sheep/sheep_wool_undercoat.png b/assets/minecraft/textures/entity/sheep/sheep_wool_undercoat.png new file mode 100644 index 00000000..e64865b7 --- /dev/null +++ b/assets/minecraft/textures/entity/sheep/sheep_wool_undercoat.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c954e67d69eace6cb1ffe431fda7591264f1b7c32bc2925b44ba606851e0b8b5 +size 414 diff --git a/assets/minecraft/textures/entity/signs/hanging/pale_oak.png b/assets/minecraft/textures/entity/signs/hanging/pale_oak.png index 13d8267a..2ed26df1 100644 --- a/assets/minecraft/textures/entity/signs/hanging/pale_oak.png +++ b/assets/minecraft/textures/entity/signs/hanging/pale_oak.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0b7766d12a383dcce32dca2bf158ff876a02cb30737cd49b74cb0f259984418 -size 409 +oid sha256:6f8c9f29e49165a5df3bd9168bcb105f2228dbb6ad1a67549ae69d3db2c2dd83 +size 394 diff --git a/assets/minecraft/textures/entity/signs/pale_oak.png b/assets/minecraft/textures/entity/signs/pale_oak.png index 173fd810..14d7bfd7 100644 --- a/assets/minecraft/textures/entity/signs/pale_oak.png +++ b/assets/minecraft/textures/entity/signs/pale_oak.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d83dc5bac3be05d0783f1aca78800d63f9e026509d2c18b8ded4f9571f019bee -size 432 +oid sha256:6f5123d4b1588459649cce32182b756d91441e9ff77907c23eb4393716091664 +size 461 diff --git a/assets/minecraft/textures/entity/slime/magmacube.png b/assets/minecraft/textures/entity/slime/magmacube.png index 2cda2629..2962d9d8 100644 --- a/assets/minecraft/textures/entity/slime/magmacube.png +++ b/assets/minecraft/textures/entity/slime/magmacube.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f25bfb01e93c7004c2d9d780534215464fe644f8f26cb7eb0570238b5a43910 -size 772 +oid sha256:5a094598401348a086c7e2c17d749cd5b903b09259f96959e7937fcd0cac6968 +size 732 diff --git a/assets/minecraft/textures/gui/container/brewing_stand.png b/assets/minecraft/textures/gui/container/brewing_stand.png index d1a23395..1dd95f9e 100644 --- a/assets/minecraft/textures/gui/container/brewing_stand.png +++ b/assets/minecraft/textures/gui/container/brewing_stand.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d958c996b8b95cba9997c4a0f47326589164b5cd609048db745b420dc74aa5b -size 791 +oid sha256:b7dfd2610763891af7a65f2b40b0ee1835872c6f9e73055f753ff925e0034d53 +size 637 diff --git a/assets/minecraft/textures/gui/sprites/advancements/box_obtained.png.mcmeta b/assets/minecraft/textures/gui/sprites/advancements/box_obtained.png.mcmeta new file mode 100644 index 00000000..14436098 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/advancements/box_obtained.png.mcmeta @@ -0,0 +1,10 @@ +{ + "gui": { + "scaling": { + "type": "nine_slice", + "width": 200, + "height": 26, + "border": 10 + } + } +} diff --git a/assets/minecraft/textures/gui/sprites/advancements/box_unobtained.png.mcmeta b/assets/minecraft/textures/gui/sprites/advancements/box_unobtained.png.mcmeta new file mode 100644 index 00000000..14436098 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/advancements/box_unobtained.png.mcmeta @@ -0,0 +1,10 @@ +{ + "gui": { + "scaling": { + "type": "nine_slice", + "width": 200, + "height": 26, + "border": 10 + } + } +} diff --git a/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png b/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png index aff884c2..81699bcd 100644 --- a/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png +++ b/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c56d1a3124b838baf20e7022fe76e94f5d15cbe6eadbd6060ac374107de51965 -size 111 +oid sha256:f3d867c9e19e0bfb049b42e9fac35983c5375d3bb7b7801baa755e297215b20d +size 113 diff --git a/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png.mcmeta b/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png.mcmeta new file mode 100644 index 00000000..21fe5868 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/bundle/slot_background.png.mcmeta @@ -0,0 +1,10 @@ +{ + "gui": { + "scaling": { + "type": "nine_slice", + "width": 24, + "height": 24, + "border": 4 + } + } +} diff --git a/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_back.png b/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_back.png index 3fb006e3..0f3e3021 100644 --- a/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_back.png +++ b/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_back.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53002d882dc48b6d4d3727a9f64df361ba97d12a53e00a3db4f7bf24e389f226 -size 96 +oid sha256:5890dbb32cf2a55d6bc62dd56e6afc6c8d6ce2f3e6df579c5fd7ec35374cc67e +size 114 diff --git a/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_front.png b/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_front.png index 41a55e37..ca0e3ff6 100644 --- a/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_front.png +++ b/assets/minecraft/textures/gui/sprites/container/bundle/slot_highlight_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5eaada2b194107aa6a3efa9927b12473feaa73a2881c5dec7e0773adc7d38519 -size 96 +oid sha256:534acc950a68d207ac99f20b681c0d40225d46df24a68a5500beb3c7c7655c4a +size 114 diff --git a/assets/minecraft/textures/gui/sprites/container/horse/armor_slot.png b/assets/minecraft/textures/gui/sprites/container/horse/armor_slot.png deleted file mode 100644 index 189ee257..00000000 --- a/assets/minecraft/textures/gui/sprites/container/horse/armor_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca1592758268de83071a0fa6ebf11658938c4360fd290724c04a6524acd8ef6f -size 141 diff --git a/assets/minecraft/textures/gui/sprites/container/horse/llama_armor_slot.png b/assets/minecraft/textures/gui/sprites/container/horse/llama_armor_slot.png deleted file mode 100644 index 12611e7f..00000000 --- a/assets/minecraft/textures/gui/sprites/container/horse/llama_armor_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6051d481a62708df563fae491ead5c7a66ad3dac25b351cdd233c78eed475bb -size 127 diff --git a/assets/minecraft/textures/gui/sprites/container/horse/saddle_slot.png b/assets/minecraft/textures/gui/sprites/container/horse/saddle_slot.png deleted file mode 100644 index ce6e8561..00000000 --- a/assets/minecraft/textures/gui/sprites/container/horse/saddle_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7ed9a679caa522dc406f207e79188bb783f86cb8b340ae77cb2fd0b682605de -size 151 diff --git a/assets/minecraft/textures/gui/sprites/container/loom/banner_slot.png b/assets/minecraft/textures/gui/sprites/container/loom/banner_slot.png deleted file mode 100644 index 4156aa13..00000000 --- a/assets/minecraft/textures/gui/sprites/container/loom/banner_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abf5e5810f57faa47b81f672216824db6a3826ffd282d25b7dda06e2a868cecc -size 102 diff --git a/assets/minecraft/textures/gui/sprites/container/loom/dye_slot.png b/assets/minecraft/textures/gui/sprites/container/loom/dye_slot.png deleted file mode 100644 index 6babbbdd..00000000 --- a/assets/minecraft/textures/gui/sprites/container/loom/dye_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf2abc0ec5327828eb307428d1af19d2de2592a7ea42853aba4b06e565eedd4a -size 124 diff --git a/assets/minecraft/textures/gui/sprites/container/loom/pattern_slot.png b/assets/minecraft/textures/gui/sprites/container/loom/pattern_slot.png deleted file mode 100644 index 395cbb4a..00000000 --- a/assets/minecraft/textures/gui/sprites/container/loom/pattern_slot.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59d8dd78dcc044cf67ffff8c4b5d2da84abea2177d8062917fcea6246b8b9b94 -size 114 diff --git a/assets/minecraft/textures/item/empty_slot_amethyst_shard.png b/assets/minecraft/textures/gui/sprites/container/slot/amethyst_shard.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_amethyst_shard.png rename to assets/minecraft/textures/gui/sprites/container/slot/amethyst_shard.png diff --git a/assets/minecraft/textures/item/empty_slot_axe.png b/assets/minecraft/textures/gui/sprites/container/slot/axe.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_axe.png rename to assets/minecraft/textures/gui/sprites/container/slot/axe.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/banner.png b/assets/minecraft/textures/gui/sprites/container/slot/banner.png new file mode 100644 index 00000000..bec783eb --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/banner.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30d33905125d25ad15415ebb29ca3cf323fb9eb13d603926b352ecf2f83e53d3 +size 116 diff --git a/assets/minecraft/textures/gui/sprites/container/slot/banner_pattern.png b/assets/minecraft/textures/gui/sprites/container/slot/banner_pattern.png new file mode 100644 index 00000000..31a0e8d2 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/banner_pattern.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40fca99325e8d73cca483885f734d711cefbfd3b3c5751ac8bf809b3c131eb85 +size 129 diff --git a/assets/minecraft/textures/item/empty_armor_slot_boots.png b/assets/minecraft/textures/gui/sprites/container/slot/boots.png similarity index 100% rename from assets/minecraft/textures/item/empty_armor_slot_boots.png rename to assets/minecraft/textures/gui/sprites/container/slot/boots.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/brewing_fuel.png b/assets/minecraft/textures/gui/sprites/container/slot/brewing_fuel.png new file mode 100644 index 00000000..9977e193 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/brewing_fuel.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec2392bf047df85ce09209d01229345b5125b057d8bc0a4aabc3274843ab347 +size 138 diff --git a/assets/minecraft/textures/item/empty_armor_slot_chestplate.png b/assets/minecraft/textures/gui/sprites/container/slot/chestplate.png similarity index 100% rename from assets/minecraft/textures/item/empty_armor_slot_chestplate.png rename to assets/minecraft/textures/gui/sprites/container/slot/chestplate.png diff --git a/assets/minecraft/textures/item/empty_slot_diamond.png b/assets/minecraft/textures/gui/sprites/container/slot/diamond.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_diamond.png rename to assets/minecraft/textures/gui/sprites/container/slot/diamond.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/dye.png b/assets/minecraft/textures/gui/sprites/container/slot/dye.png new file mode 100644 index 00000000..d948f23a --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/dye.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:656833a0804ccb512a76144417c4abeafd81f40be1b156bc4174d36bf3fa1add +size 132 diff --git a/assets/minecraft/textures/item/empty_slot_emerald.png b/assets/minecraft/textures/gui/sprites/container/slot/emerald.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_emerald.png rename to assets/minecraft/textures/gui/sprites/container/slot/emerald.png diff --git a/assets/minecraft/textures/item/empty_armor_slot_helmet.png b/assets/minecraft/textures/gui/sprites/container/slot/helmet.png similarity index 100% rename from assets/minecraft/textures/item/empty_armor_slot_helmet.png rename to assets/minecraft/textures/gui/sprites/container/slot/helmet.png diff --git a/assets/minecraft/textures/item/empty_slot_hoe.png b/assets/minecraft/textures/gui/sprites/container/slot/hoe.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_hoe.png rename to assets/minecraft/textures/gui/sprites/container/slot/hoe.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/horse_armor.png b/assets/minecraft/textures/gui/sprites/container/slot/horse_armor.png new file mode 100644 index 00000000..fe802190 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/horse_armor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f99614e412f61c01067e9f88cb0bbad918371bd9ca5e8b59651d1d3a6819574e +size 128 diff --git a/assets/minecraft/textures/item/empty_slot_ingot.png b/assets/minecraft/textures/gui/sprites/container/slot/ingot.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_ingot.png rename to assets/minecraft/textures/gui/sprites/container/slot/ingot.png diff --git a/assets/minecraft/textures/item/empty_slot_lapis_lazuli.png b/assets/minecraft/textures/gui/sprites/container/slot/lapis_lazuli.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_lapis_lazuli.png rename to assets/minecraft/textures/gui/sprites/container/slot/lapis_lazuli.png diff --git a/assets/minecraft/textures/item/empty_armor_slot_leggings.png b/assets/minecraft/textures/gui/sprites/container/slot/leggings.png similarity index 100% rename from assets/minecraft/textures/item/empty_armor_slot_leggings.png rename to assets/minecraft/textures/gui/sprites/container/slot/leggings.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/llama_armor.png b/assets/minecraft/textures/gui/sprites/container/slot/llama_armor.png new file mode 100644 index 00000000..cc749581 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/llama_armor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1f335294feb44045a170b6e4bf55456adbed29c4a92c68516b396c54a766044 +size 118 diff --git a/assets/minecraft/textures/item/empty_slot_pickaxe.png b/assets/minecraft/textures/gui/sprites/container/slot/pickaxe.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_pickaxe.png rename to assets/minecraft/textures/gui/sprites/container/slot/pickaxe.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/potion.png b/assets/minecraft/textures/gui/sprites/container/slot/potion.png new file mode 100644 index 00000000..d3ee1255 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/potion.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbcc06031d8038d1343ea43c07d8f2958c551f6e3a63b7d56e64281d5a3056be +size 134 diff --git a/assets/minecraft/textures/item/empty_slot_quartz.png b/assets/minecraft/textures/gui/sprites/container/slot/quartz.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_quartz.png rename to assets/minecraft/textures/gui/sprites/container/slot/quartz.png diff --git a/assets/minecraft/textures/item/empty_slot_redstone_dust.png b/assets/minecraft/textures/gui/sprites/container/slot/redstone_dust.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_redstone_dust.png rename to assets/minecraft/textures/gui/sprites/container/slot/redstone_dust.png diff --git a/assets/minecraft/textures/gui/sprites/container/slot/saddle.png b/assets/minecraft/textures/gui/sprites/container/slot/saddle.png new file mode 100644 index 00000000..7cdbb512 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/container/slot/saddle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a20887f79c63f89705b0752c85370811cd9cf3a8f1befd919a199523844f11d +size 132 diff --git a/assets/minecraft/textures/item/empty_armor_slot_shield.png b/assets/minecraft/textures/gui/sprites/container/slot/shield.png similarity index 100% rename from assets/minecraft/textures/item/empty_armor_slot_shield.png rename to assets/minecraft/textures/gui/sprites/container/slot/shield.png diff --git a/assets/minecraft/textures/item/empty_slot_shovel.png b/assets/minecraft/textures/gui/sprites/container/slot/shovel.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_shovel.png rename to assets/minecraft/textures/gui/sprites/container/slot/shovel.png diff --git a/assets/minecraft/textures/item/empty_slot_smithing_template_armor_trim.png b/assets/minecraft/textures/gui/sprites/container/slot/smithing_template_armor_trim.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_smithing_template_armor_trim.png rename to assets/minecraft/textures/gui/sprites/container/slot/smithing_template_armor_trim.png diff --git a/assets/minecraft/textures/item/empty_slot_smithing_template_netherite_upgrade.png b/assets/minecraft/textures/gui/sprites/container/slot/smithing_template_netherite_upgrade.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_smithing_template_netherite_upgrade.png rename to assets/minecraft/textures/gui/sprites/container/slot/smithing_template_netherite_upgrade.png diff --git a/assets/minecraft/textures/item/empty_slot_sword.png b/assets/minecraft/textures/gui/sprites/container/slot/sword.png similarity index 100% rename from assets/minecraft/textures/item/empty_slot_sword.png rename to assets/minecraft/textures/gui/sprites/container/slot/sword.png diff --git a/assets/minecraft/textures/gui/sprites/toast/system.png b/assets/minecraft/textures/gui/sprites/toast/system.png index 0c373c38..6e585a0a 100644 --- a/assets/minecraft/textures/gui/sprites/toast/system.png +++ b/assets/minecraft/textures/gui/sprites/toast/system.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e2a0fa4ef3dbfd3d7bd0012cb838ef2865120160ebac5a4239b853193991e7d -size 147 +oid sha256:025070341685b12420583b3711d02814936ab622208f896782626acae92e0e9b +size 169 diff --git a/assets/minecraft/textures/gui/sprites/toast/system.png.mcmeta b/assets/minecraft/textures/gui/sprites/toast/system.png.mcmeta new file mode 100644 index 00000000..c5f90dd0 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/toast/system.png.mcmeta @@ -0,0 +1,15 @@ +{ + "gui": { + "scaling": { + "type": "nine_slice", + "width": 160, + "height": 64, + "border": { + "left": 17, + "top": 30, + "right": 4, + "bottom": 4 + } + } + } +} diff --git a/assets/minecraft/textures/gui/sprites/toast/tutorial.png.mcmeta b/assets/minecraft/textures/gui/sprites/toast/tutorial.png.mcmeta new file mode 100644 index 00000000..7e3e21c7 --- /dev/null +++ b/assets/minecraft/textures/gui/sprites/toast/tutorial.png.mcmeta @@ -0,0 +1,10 @@ +{ + "gui": { + "scaling": { + "type": "nine_slice", + "width": 160, + "height": 32, + "border": 3 + } + } +} diff --git a/assets/minecraft/textures/item/allay_spawn_egg.png b/assets/minecraft/textures/item/allay_spawn_egg.png new file mode 100644 index 00000000..b5e468b2 --- /dev/null +++ b/assets/minecraft/textures/item/allay_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4534adf0c917e2542c56a10315e10eb77e3362a95700858b445278392e9b532 +size 237 diff --git a/assets/minecraft/textures/item/armadillo_spawn_egg.png b/assets/minecraft/textures/item/armadillo_spawn_egg.png new file mode 100644 index 00000000..a972094e --- /dev/null +++ b/assets/minecraft/textures/item/armadillo_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b4be11ad86e4b266dac8b9080a38532b3ab8590d315338520e473e40c2f0450 +size 236 diff --git a/assets/minecraft/textures/item/axolotl_spawn_egg.png b/assets/minecraft/textures/item/axolotl_spawn_egg.png new file mode 100644 index 00000000..04def43f --- /dev/null +++ b/assets/minecraft/textures/item/axolotl_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a643dfe68e94abe248a3e85625d3326cdf498c1cf90090fb2bec4106d6ce4185 +size 208 diff --git a/assets/minecraft/textures/item/bat_spawn_egg.png b/assets/minecraft/textures/item/bat_spawn_egg.png new file mode 100644 index 00000000..cbfdba47 --- /dev/null +++ b/assets/minecraft/textures/item/bat_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77de7634170e355513940358ccb6ae56a3866ff85a8476d7539082a8c6854d53 +size 231 diff --git a/assets/minecraft/textures/item/bee_spawn_egg.png b/assets/minecraft/textures/item/bee_spawn_egg.png new file mode 100644 index 00000000..25019e4d --- /dev/null +++ b/assets/minecraft/textures/item/bee_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98adc405bbddfdf313fc464010163e20fac69805df7f8990893a624b8858a08b +size 223 diff --git a/assets/minecraft/textures/item/black_bundle_open_front.png b/assets/minecraft/textures/item/black_bundle_open_front.png index e89c48bb..931b56e9 100644 --- a/assets/minecraft/textures/item/black_bundle_open_front.png +++ b/assets/minecraft/textures/item/black_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47573721a22bbc59e4ff33c8b0b00eb8fb535d7d020943651f642f39b82655d9 +oid sha256:ae590e3c3bd621f55b6a8ca24ee6fc62f974ee385e1460fe1bd8b43bac8ecccf size 191 diff --git a/assets/minecraft/textures/item/blaze_spawn_egg.png b/assets/minecraft/textures/item/blaze_spawn_egg.png new file mode 100644 index 00000000..4fb409ea --- /dev/null +++ b/assets/minecraft/textures/item/blaze_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b58eea7f036473fb503bf5645bcd562b2cd4e10367080aca3fb4f97ba3c6604 +size 248 diff --git a/assets/minecraft/textures/item/blue_bundle_open_front.png b/assets/minecraft/textures/item/blue_bundle_open_front.png index cd159f82..5a455683 100644 --- a/assets/minecraft/textures/item/blue_bundle_open_front.png +++ b/assets/minecraft/textures/item/blue_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c74ea271b2654846efc44bb551bcb040dd782c25c6cc43cd9e58dcd992f0e33 +oid sha256:dbf0b75202fa0748bd6e0a3f53a5a07d37bc9f20b8b72ad747c48ed3e68dc7f3 size 191 diff --git a/assets/minecraft/textures/item/blue_egg.png b/assets/minecraft/textures/item/blue_egg.png new file mode 100644 index 00000000..bb9a6b1f --- /dev/null +++ b/assets/minecraft/textures/item/blue_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:513e1b9d7e57d9ffdd0a053f3ccf617dc9cab0dbd2f4956a83ba81b118b4dfcb +size 176 diff --git a/assets/minecraft/textures/item/bogged_spawn_egg.png b/assets/minecraft/textures/item/bogged_spawn_egg.png new file mode 100644 index 00000000..024052f7 --- /dev/null +++ b/assets/minecraft/textures/item/bogged_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f770c421598453842a424cfed6121264f63f8aa3718c6d5e6e541ca685fae511 +size 272 diff --git a/assets/minecraft/textures/item/breeze_spawn_egg.png b/assets/minecraft/textures/item/breeze_spawn_egg.png new file mode 100644 index 00000000..28db48ad --- /dev/null +++ b/assets/minecraft/textures/item/breeze_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bcdca3c772bbaf014e26813017a940666456b4037d39c11a7921bb8f4d0d803 +size 250 diff --git a/assets/minecraft/textures/item/brown_bundle_open_front.png b/assets/minecraft/textures/item/brown_bundle_open_front.png index aa086cb2..7de1e69b 100644 --- a/assets/minecraft/textures/item/brown_bundle_open_front.png +++ b/assets/minecraft/textures/item/brown_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b3783b255e0e87940936a63a46eaa74f8dc79698bfe1082772d32ca832cd204 -size 197 +oid sha256:80ed4f57815b2e9d802bc1e8b02b5d18268b997f1d503810b153ee5076944899 +size 191 diff --git a/assets/minecraft/textures/item/brown_egg.png b/assets/minecraft/textures/item/brown_egg.png new file mode 100644 index 00000000..ff12fdc4 --- /dev/null +++ b/assets/minecraft/textures/item/brown_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e8b89d49ae64f218cfe5266954791694b1c8c0a29aefa1dd1692c0303ac4ee6 +size 176 diff --git a/assets/minecraft/textures/item/bundle_open_front.png b/assets/minecraft/textures/item/bundle_open_front.png index 6e5e2c2e..eea6f5fb 100644 --- a/assets/minecraft/textures/item/bundle_open_front.png +++ b/assets/minecraft/textures/item/bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fec97f3abc6d15e1f341751e59c255fd01c693195b2fc9af8f724b45c1a4270 +oid sha256:2bb8c49f0f0285724de85ae1795f98a7963aa6e9058c3172107393405841d9f9 size 191 diff --git a/assets/minecraft/textures/item/camel_spawn_egg.png b/assets/minecraft/textures/item/camel_spawn_egg.png new file mode 100644 index 00000000..8e0c453f --- /dev/null +++ b/assets/minecraft/textures/item/camel_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26bb0ae9cb7c27fe284c676f1c78baa5be0c58a66bd73df35061706c74b0bc23 +size 254 diff --git a/assets/minecraft/textures/item/cat_spawn_egg.png b/assets/minecraft/textures/item/cat_spawn_egg.png new file mode 100644 index 00000000..2ba19918 --- /dev/null +++ b/assets/minecraft/textures/item/cat_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ba9b5888b0087c0cb32cd6ea4999022a55ac8429e813e5f2e420ebbed2198b4 +size 201 diff --git a/assets/minecraft/textures/item/cave_spider_spawn_egg.png b/assets/minecraft/textures/item/cave_spider_spawn_egg.png new file mode 100644 index 00000000..290dea5a --- /dev/null +++ b/assets/minecraft/textures/item/cave_spider_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feee12d692d516ac3c1a9ac8deebccd9a5c6d7acb4be7db34742c157dc796b56 +size 229 diff --git a/assets/minecraft/textures/item/chicken_spawn_egg.png b/assets/minecraft/textures/item/chicken_spawn_egg.png new file mode 100644 index 00000000..3f52de8b --- /dev/null +++ b/assets/minecraft/textures/item/chicken_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97c478f0cc229dbdead7975785a54a20d532321c5789364c03c3b64a21fdc047 +size 199 diff --git a/assets/minecraft/textures/item/cod_spawn_egg.png b/assets/minecraft/textures/item/cod_spawn_egg.png new file mode 100644 index 00000000..12aa81c7 --- /dev/null +++ b/assets/minecraft/textures/item/cod_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29a94226feabdad20e65369b2290e9fc2016c3b9897b2f0ebecce918a3ea959f +size 219 diff --git a/assets/minecraft/textures/item/cow_spawn_egg.png b/assets/minecraft/textures/item/cow_spawn_egg.png new file mode 100644 index 00000000..37fa3a4c --- /dev/null +++ b/assets/minecraft/textures/item/cow_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfedb3c84c51e23eba0d9dabd5030271af51b0a438373987c0ff5beddc90b58c +size 261 diff --git a/assets/minecraft/textures/item/creaking_spawn_egg.png b/assets/minecraft/textures/item/creaking_spawn_egg.png new file mode 100644 index 00000000..a8e3cfcc --- /dev/null +++ b/assets/minecraft/textures/item/creaking_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1994cc7868d542f46e4c3ac1d01af6d3de5931786b2870fad3ab2ef7d4f0019c +size 258 diff --git a/assets/minecraft/textures/item/creeper_spawn_egg.png b/assets/minecraft/textures/item/creeper_spawn_egg.png new file mode 100644 index 00000000..be2fa5a6 --- /dev/null +++ b/assets/minecraft/textures/item/creeper_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2283799812c0b0931e5a566a09f805d4a041eb06fb3ed8d0580dd236e140c5a9 +size 236 diff --git a/assets/minecraft/textures/item/cyan_bundle_open_front.png b/assets/minecraft/textures/item/cyan_bundle_open_front.png index 90dcbccf..02306145 100644 --- a/assets/minecraft/textures/item/cyan_bundle_open_front.png +++ b/assets/minecraft/textures/item/cyan_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4698af2c5c6b660176d6b893be3189cc006ab90a1e2f74d6a6911ece5a1712f0 +oid sha256:4b46772c5d48942caea6a83d10663edc0726206a02e13482a9c4b52bd3c7da6b size 191 diff --git a/assets/minecraft/textures/item/dolphin_spawn_egg.png b/assets/minecraft/textures/item/dolphin_spawn_egg.png new file mode 100644 index 00000000..f361b818 --- /dev/null +++ b/assets/minecraft/textures/item/dolphin_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:034a57dc91d7feb43c94178be6c2a4779be2920155d51e920ef04aa9c25c8489 +size 251 diff --git a/assets/minecraft/textures/item/donkey_spawn_egg.png b/assets/minecraft/textures/item/donkey_spawn_egg.png new file mode 100644 index 00000000..9d063f8b --- /dev/null +++ b/assets/minecraft/textures/item/donkey_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1d4b8d3aacd6a9605fc7f0fbd4159ebd21a816b99725bdae010d7aaceb6188a +size 267 diff --git a/assets/minecraft/textures/item/drowned_spawn_egg.png b/assets/minecraft/textures/item/drowned_spawn_egg.png new file mode 100644 index 00000000..0ba70fd8 --- /dev/null +++ b/assets/minecraft/textures/item/drowned_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c32f60dcae3127f8d697fc241cc3aca9a86335ee1bc364302487c6d7004f1328 +size 247 diff --git a/assets/minecraft/textures/item/elder_guardian_spawn_egg.png b/assets/minecraft/textures/item/elder_guardian_spawn_egg.png new file mode 100644 index 00000000..959f3b29 --- /dev/null +++ b/assets/minecraft/textures/item/elder_guardian_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:543c855aabb79164e05fc78cdf19e2fd3ce81003144f078ce82e20cfcf4b7c1d +size 268 diff --git a/assets/minecraft/textures/item/broken_elytra.png b/assets/minecraft/textures/item/elytra_broken.png similarity index 100% rename from assets/minecraft/textures/item/broken_elytra.png rename to assets/minecraft/textures/item/elytra_broken.png diff --git a/assets/minecraft/textures/item/ender_dragon_spawn_egg.png b/assets/minecraft/textures/item/ender_dragon_spawn_egg.png new file mode 100644 index 00000000..b5e847b9 --- /dev/null +++ b/assets/minecraft/textures/item/ender_dragon_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ee2291325ee273642a6114ecab2f92562d156f730b981bb0c600d7c52358cd2 +size 269 diff --git a/assets/minecraft/textures/item/enderman_spawn_egg.png b/assets/minecraft/textures/item/enderman_spawn_egg.png new file mode 100644 index 00000000..56631136 --- /dev/null +++ b/assets/minecraft/textures/item/enderman_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60d0fea60abea2aab1d9c6670153699586d63c77a336212768299e1f5aa36ef2 +size 258 diff --git a/assets/minecraft/textures/item/endermite_spawn_egg.png b/assets/minecraft/textures/item/endermite_spawn_egg.png new file mode 100644 index 00000000..7e87eef7 --- /dev/null +++ b/assets/minecraft/textures/item/endermite_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94d1a49d87c2a1c955633390633c3c539a02931e84a111f18d2f4fcf1c7ba153 +size 205 diff --git a/assets/minecraft/textures/item/evoker_spawn_egg.png b/assets/minecraft/textures/item/evoker_spawn_egg.png new file mode 100644 index 00000000..030fa476 --- /dev/null +++ b/assets/minecraft/textures/item/evoker_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:222b6972c64970ebf1e3afa749d8bf24e17b0f5331512f348d3a585fbf331a95 +size 258 diff --git a/assets/minecraft/textures/item/firefly_bush.png b/assets/minecraft/textures/item/firefly_bush.png new file mode 100644 index 00000000..f9b9015f --- /dev/null +++ b/assets/minecraft/textures/item/firefly_bush.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3b6d7188b43667e73c290eaf0f3e692edc6dc13249d92008f4a0ec1348ef239 +size 227 diff --git a/assets/minecraft/textures/item/fox_spawn_egg.png b/assets/minecraft/textures/item/fox_spawn_egg.png new file mode 100644 index 00000000..c234785f --- /dev/null +++ b/assets/minecraft/textures/item/fox_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48d2929623398b7ffce53489a9fb8a5a874d50022309f21c797ee6f1dbfdd1e3 +size 218 diff --git a/assets/minecraft/textures/item/frog_spawn_egg.png b/assets/minecraft/textures/item/frog_spawn_egg.png new file mode 100644 index 00000000..c6e5d976 --- /dev/null +++ b/assets/minecraft/textures/item/frog_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cec76cd48e6285d3c12de129e29fed43914d1aaf3258bc1aa33de1d55266aa1 +size 204 diff --git a/assets/minecraft/textures/item/ghast_spawn_egg.png b/assets/minecraft/textures/item/ghast_spawn_egg.png new file mode 100644 index 00000000..09fb58a7 --- /dev/null +++ b/assets/minecraft/textures/item/ghast_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:445b71f617703d755b4b78639014f29ed8acc845834791d239a1138d1082e2db +size 207 diff --git a/assets/minecraft/textures/item/glow_squid_spawn_egg.png b/assets/minecraft/textures/item/glow_squid_spawn_egg.png new file mode 100644 index 00000000..009e5a60 --- /dev/null +++ b/assets/minecraft/textures/item/glow_squid_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35ec4c9d75040570e153b8c22bd9d2642567be32c076448138f550be3474ae62 +size 253 diff --git a/assets/minecraft/textures/item/goat_spawn_egg.png b/assets/minecraft/textures/item/goat_spawn_egg.png new file mode 100644 index 00000000..bcf7d017 --- /dev/null +++ b/assets/minecraft/textures/item/goat_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfff74c1d086f7d9a8abcedbe12558711c1971e7f80ded59a83eeefb3e7daec0 +size 242 diff --git a/assets/minecraft/textures/item/gray_bundle_open_front.png b/assets/minecraft/textures/item/gray_bundle_open_front.png index aee53ef7..dc5c1828 100644 --- a/assets/minecraft/textures/item/gray_bundle_open_front.png +++ b/assets/minecraft/textures/item/gray_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19bb276fe396b71f213c493d1259e1a5e8f7f74880825a495d153923ffbbb3fe +oid sha256:1af2cf1f5142ff63929a5f29bbabc50ebf52272f77e452b56df2d17550fd621e size 191 diff --git a/assets/minecraft/textures/item/green_bundle_open_front.png b/assets/minecraft/textures/item/green_bundle_open_front.png index 24882995..de8057ee 100644 --- a/assets/minecraft/textures/item/green_bundle_open_front.png +++ b/assets/minecraft/textures/item/green_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebdea03ba52bce5f3d2fbb350e65e9c69dd7543b7b1bc63f03a7b6384482b79e +oid sha256:32db865dbebcf66d9e279305ffd78e7960a9ea988c73159e07e5f0030ba69721 size 191 diff --git a/assets/minecraft/textures/item/guardian_spawn_egg.png b/assets/minecraft/textures/item/guardian_spawn_egg.png new file mode 100644 index 00000000..0296cd8b --- /dev/null +++ b/assets/minecraft/textures/item/guardian_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e33aa2a5c81a75e79549cce02bbf054f1ee2adf9a8afc5d3c970d1986d2b99e +size 255 diff --git a/assets/minecraft/textures/item/hoglin_spawn_egg.png b/assets/minecraft/textures/item/hoglin_spawn_egg.png new file mode 100644 index 00000000..014768aa --- /dev/null +++ b/assets/minecraft/textures/item/hoglin_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6c3ad682fbf4220578f58ec962238182853d729b9ee2e833e76992b32ea5a7c +size 269 diff --git a/assets/minecraft/textures/item/horse_spawn_egg.png b/assets/minecraft/textures/item/horse_spawn_egg.png new file mode 100644 index 00000000..54469c62 --- /dev/null +++ b/assets/minecraft/textures/item/horse_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81c74186b55759ce647e2515935ad9e9153bb8a0e18bce373dc540ddf48ebb7d +size 269 diff --git a/assets/minecraft/textures/item/husk_spawn_egg.png b/assets/minecraft/textures/item/husk_spawn_egg.png new file mode 100644 index 00000000..6c2134ab --- /dev/null +++ b/assets/minecraft/textures/item/husk_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a188ad79c566a9ada8de8399785146efe6eb0339d55d64c508d223becc5c5c0 +size 249 diff --git a/assets/minecraft/textures/item/iron_golem_spawn_egg.png b/assets/minecraft/textures/item/iron_golem_spawn_egg.png new file mode 100644 index 00000000..69c10b97 --- /dev/null +++ b/assets/minecraft/textures/item/iron_golem_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f269e010c8cf5d3657ede43a8c5d79df4df5d3b77bdd6e0a0bd079f4216f405 +size 297 diff --git a/assets/minecraft/textures/item/leaf_litter.png b/assets/minecraft/textures/item/leaf_litter.png new file mode 100644 index 00000000..fdba83e9 --- /dev/null +++ b/assets/minecraft/textures/item/leaf_litter.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c205b6f8698b961fc54e4fa4df6d42a813840cd7fc07ff033a3f5ea65e534a8c +size 273 diff --git a/assets/minecraft/textures/item/light_blue_bundle_open_front.png b/assets/minecraft/textures/item/light_blue_bundle_open_front.png index eadc9ddb..e0618174 100644 --- a/assets/minecraft/textures/item/light_blue_bundle_open_front.png +++ b/assets/minecraft/textures/item/light_blue_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12482a7694f665417c37d00e8d4e757c5763c30cdf437f1e758d85741c873ef8 +oid sha256:7b1439dcbde6706414fc557f16c233d2fd228bc8a994ff799c8e49a3a45ee2c8 size 191 diff --git a/assets/minecraft/textures/item/light_gray_bundle_open_front.png b/assets/minecraft/textures/item/light_gray_bundle_open_front.png index 303a864a..cf3070b7 100644 --- a/assets/minecraft/textures/item/light_gray_bundle_open_front.png +++ b/assets/minecraft/textures/item/light_gray_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e4a77f88bea4a12003bc62742d874d27c77cdced9c1c5d948f9cd75cd955920 +oid sha256:2f3a75457158ae841815cb0a61e490753bed15c0bd72c251266269ef6b721c9c size 191 diff --git a/assets/minecraft/textures/item/lime_bundle_open_front.png b/assets/minecraft/textures/item/lime_bundle_open_front.png index 9260ec10..c1b2acad 100644 --- a/assets/minecraft/textures/item/lime_bundle_open_front.png +++ b/assets/minecraft/textures/item/lime_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a5fe6e456dd6df0c9d02ba4eb8a5f5b8d4fa3a4c7cfa4f081e29527a4f9a0c4 +oid sha256:c8256856787785f41f9b6fdbe1a7135a985ff3d6ad8971db4077ea605a95115b size 191 diff --git a/assets/minecraft/textures/item/llama_spawn_egg.png b/assets/minecraft/textures/item/llama_spawn_egg.png new file mode 100644 index 00000000..b2d51923 --- /dev/null +++ b/assets/minecraft/textures/item/llama_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e1eb88d7ad03ee8664e2d7f1be3fc45f12f21eb84b4296a8dd7c74f3a50f14e +size 223 diff --git a/assets/minecraft/textures/item/magenta_bundle_open_front.png b/assets/minecraft/textures/item/magenta_bundle_open_front.png index b814a934..359eb0a2 100644 --- a/assets/minecraft/textures/item/magenta_bundle_open_front.png +++ b/assets/minecraft/textures/item/magenta_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4d6c3bb0be02c595a85410284c7957e85f8dc8a6a3d44d76f038a3e613548f5 -size 191 +oid sha256:65dd65416b09257c4ede3d29e16bad1802513063ad2c9e6a56434b3aeaea12e1 +size 190 diff --git a/assets/minecraft/textures/item/magma_cube_spawn_egg.png b/assets/minecraft/textures/item/magma_cube_spawn_egg.png new file mode 100644 index 00000000..b9050c8d --- /dev/null +++ b/assets/minecraft/textures/item/magma_cube_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2213be1fe21507a22d5ab580fb1da9ab70c2f63c9a35fdc824bea802165578cf +size 265 diff --git a/assets/minecraft/textures/item/mooshroom_spawn_egg.png b/assets/minecraft/textures/item/mooshroom_spawn_egg.png new file mode 100644 index 00000000..42c2b1a1 --- /dev/null +++ b/assets/minecraft/textures/item/mooshroom_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c7f03cce335163fe3e39e02218398659970d1a6a4aeba73e9c7d1d993987899 +size 268 diff --git a/assets/minecraft/textures/item/mule_spawn_egg.png b/assets/minecraft/textures/item/mule_spawn_egg.png new file mode 100644 index 00000000..f7e04049 --- /dev/null +++ b/assets/minecraft/textures/item/mule_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3124dca18f54698644298d2eb60f32d771a4bc2b39ed459579be19e98c9a706 +size 266 diff --git a/assets/minecraft/textures/item/ocelot_spawn_egg.png b/assets/minecraft/textures/item/ocelot_spawn_egg.png new file mode 100644 index 00000000..9da97043 --- /dev/null +++ b/assets/minecraft/textures/item/ocelot_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89b52eb8feec7bbe1244115ef3db70f85cc01ca751b8013a6974555ee94e27d0 +size 199 diff --git a/assets/minecraft/textures/item/orange_bundle_open_front.png b/assets/minecraft/textures/item/orange_bundle_open_front.png index a2d617d3..9279806d 100644 --- a/assets/minecraft/textures/item/orange_bundle_open_front.png +++ b/assets/minecraft/textures/item/orange_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:064c96232802cf6ee2a31dae4d484b6a04163c0003fe5ec504dea927d70d3726 +oid sha256:30881cee8f71ea67ffdaafa7f855fac6f7ba1366fca106f465c9ce055331ff06 size 191 diff --git a/assets/minecraft/textures/item/pale_oak_chest_boat.png b/assets/minecraft/textures/item/pale_oak_chest_boat.png index f887f296..805c061a 100644 --- a/assets/minecraft/textures/item/pale_oak_chest_boat.png +++ b/assets/minecraft/textures/item/pale_oak_chest_boat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d184c633358827c2d9eca7dbc8a41cf94b8956532985d27e4ae66cd815d2fab2 -size 251 +oid sha256:3af7da2a2fa9791c4f723752db809791546bbde9e5f7aebfd8d0d234bf4d5bcc +size 256 diff --git a/assets/minecraft/textures/item/pale_oak_hanging_sign.png b/assets/minecraft/textures/item/pale_oak_hanging_sign.png index 36ba9250..74eae7c9 100644 --- a/assets/minecraft/textures/item/pale_oak_hanging_sign.png +++ b/assets/minecraft/textures/item/pale_oak_hanging_sign.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cff876b061caa78988a8dd8e20794b02fbca65c1a33dd8b8dbbbb881eec973e -size 207 +oid sha256:d5b8bd8c7d1fead4e2481c38942c20a7fd106eb71859fc09f25b1e5929480a74 +size 204 diff --git a/assets/minecraft/textures/item/pale_oak_sign.png b/assets/minecraft/textures/item/pale_oak_sign.png index 066538c6..8a1b2e14 100644 --- a/assets/minecraft/textures/item/pale_oak_sign.png +++ b/assets/minecraft/textures/item/pale_oak_sign.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aab37b8a151108437681161d78767451f1982e761e0f93631dae2ad55e9d67aa -size 183 +oid sha256:f8f7e2fe6923e1ea4229e2957118031d9268df4d47be1d4324e7d7e370d78f70 +size 194 diff --git a/assets/minecraft/textures/item/panda_spawn_egg.png b/assets/minecraft/textures/item/panda_spawn_egg.png new file mode 100644 index 00000000..fe11a05e --- /dev/null +++ b/assets/minecraft/textures/item/panda_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75a6f6c61e1f3792127a2275b11aa5a4c90beeace2ec3137ee9f1db15158e4e9 +size 267 diff --git a/assets/minecraft/textures/item/parrot_spawn_egg.png b/assets/minecraft/textures/item/parrot_spawn_egg.png new file mode 100644 index 00000000..a350c7cf --- /dev/null +++ b/assets/minecraft/textures/item/parrot_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d4c9e57d9a8d801937a0539652c8ee2544e70ac8f4d2bf7c4b345cd8749ebd7 +size 231 diff --git a/assets/minecraft/textures/item/phantom_spawn_egg.png b/assets/minecraft/textures/item/phantom_spawn_egg.png new file mode 100644 index 00000000..5fe086bc --- /dev/null +++ b/assets/minecraft/textures/item/phantom_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a8df3e4dc448442cb12e6cc49a5fe7f0a980dc0b51241987a34cd431537b613 +size 233 diff --git a/assets/minecraft/textures/item/pig_spawn_egg.png b/assets/minecraft/textures/item/pig_spawn_egg.png new file mode 100644 index 00000000..6d9b2ea2 --- /dev/null +++ b/assets/minecraft/textures/item/pig_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ae86040bb313c13e2545bb2611cdf8ea40d4ed2b447c88a4396e170ac74acfa +size 201 diff --git a/assets/minecraft/textures/item/piglin_brute_spawn_egg.png b/assets/minecraft/textures/item/piglin_brute_spawn_egg.png new file mode 100644 index 00000000..08e7d987 --- /dev/null +++ b/assets/minecraft/textures/item/piglin_brute_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0b4df628900aa05a048190c2c0216bfcfd73c9b33b2be7dac9f012c43000af6 +size 291 diff --git a/assets/minecraft/textures/item/piglin_spawn_egg.png b/assets/minecraft/textures/item/piglin_spawn_egg.png new file mode 100644 index 00000000..186c362f --- /dev/null +++ b/assets/minecraft/textures/item/piglin_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53c292b6c54f402e3b03184ec4c61472ff0bf7050b878b3eb1d203df59ae47d4 +size 267 diff --git a/assets/minecraft/textures/item/pillager_spawn_egg.png b/assets/minecraft/textures/item/pillager_spawn_egg.png new file mode 100644 index 00000000..44ab02fb --- /dev/null +++ b/assets/minecraft/textures/item/pillager_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e570952d3aa129e37d9a9e0964fea9b63ce37de31e04cb04d2c49354a1a47ca0 +size 262 diff --git a/assets/minecraft/textures/item/pink_bundle_open_front.png b/assets/minecraft/textures/item/pink_bundle_open_front.png index fd595bc1..f9ad5882 100644 --- a/assets/minecraft/textures/item/pink_bundle_open_front.png +++ b/assets/minecraft/textures/item/pink_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0b97be39f55dd506f64d96363ebc2d62463485145b8d7ce4cfa02ccc0269f3e +oid sha256:be151e35deca8dfb49dac84ba080ab7643442dd2c04a67ed262f07f28447f611 size 191 diff --git a/assets/minecraft/textures/item/polar_bear_spawn_egg.png b/assets/minecraft/textures/item/polar_bear_spawn_egg.png new file mode 100644 index 00000000..e63d0792 --- /dev/null +++ b/assets/minecraft/textures/item/polar_bear_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09b559f500c3239a54a8a7a03ec91e54c638adf248927186124b7aaebde3161c +size 224 diff --git a/assets/minecraft/textures/item/pufferfish_spawn_egg.png b/assets/minecraft/textures/item/pufferfish_spawn_egg.png new file mode 100644 index 00000000..cc04c3bf --- /dev/null +++ b/assets/minecraft/textures/item/pufferfish_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d2ecb04a6471e238339920002ff2f68272511285410b96bc31df755687e8ffd +size 272 diff --git a/assets/minecraft/textures/item/purple_bundle_open_front.png b/assets/minecraft/textures/item/purple_bundle_open_front.png index 143dac8f..2c471e15 100644 --- a/assets/minecraft/textures/item/purple_bundle_open_front.png +++ b/assets/minecraft/textures/item/purple_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80b4c5a85a303c3544935e37246eea8e2a6fc440917e92a4dec1de0adac4bcaa +oid sha256:301244edf18b3205c828423a1576ef4d365848af3a9a75691fbd8dfec8a12ea6 size 191 diff --git a/assets/minecraft/textures/item/rabbit_spawn_egg.png b/assets/minecraft/textures/item/rabbit_spawn_egg.png new file mode 100644 index 00000000..549343bc --- /dev/null +++ b/assets/minecraft/textures/item/rabbit_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:497f068d34ce25c3ae31500726053f4c3f459156798501d8aa4e636175651603 +size 219 diff --git a/assets/minecraft/textures/item/ravager_spawn_egg.png b/assets/minecraft/textures/item/ravager_spawn_egg.png new file mode 100644 index 00000000..911c4013 --- /dev/null +++ b/assets/minecraft/textures/item/ravager_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b67c0d1215504411d3546bd411f956407d41028543afac46a06abb991d3ee5c2 +size 276 diff --git a/assets/minecraft/textures/item/red_bundle_open_front.png b/assets/minecraft/textures/item/red_bundle_open_front.png index 9559e05e..3045dff0 100644 --- a/assets/minecraft/textures/item/red_bundle_open_front.png +++ b/assets/minecraft/textures/item/red_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:298c9eb545ee593740eb63d97165eaafc784f69939cdf3408e4e288bb073c6df -size 197 +oid sha256:720016ee326e7c1577e511331fbfeb39eba3bed20f70fdc79a938310212af8f1 +size 191 diff --git a/assets/minecraft/textures/item/resin_brick.png b/assets/minecraft/textures/item/resin_brick.png new file mode 100644 index 00000000..1d28b46d --- /dev/null +++ b/assets/minecraft/textures/item/resin_brick.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7d73d5495b3357a0efd5971c932ac5f9e9aa369339190b8b14c6cac9ddbff3c +size 198 diff --git a/assets/minecraft/textures/item/resin_clump.png b/assets/minecraft/textures/item/resin_clump.png new file mode 100644 index 00000000..e8374699 --- /dev/null +++ b/assets/minecraft/textures/item/resin_clump.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2540522d3d04f64bb8ebe73a173e44ec516d27ba1fe375834d77e7bda32758b +size 196 diff --git a/assets/minecraft/textures/item/salmon_spawn_egg.png b/assets/minecraft/textures/item/salmon_spawn_egg.png new file mode 100644 index 00000000..b15120bf --- /dev/null +++ b/assets/minecraft/textures/item/salmon_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:808f0b3f83e645f54d6b484afaf06d143b457ed69176a039ce2b25c89af1c9b3 +size 268 diff --git a/assets/minecraft/textures/item/sheep_spawn_egg.png b/assets/minecraft/textures/item/sheep_spawn_egg.png new file mode 100644 index 00000000..ba16547b --- /dev/null +++ b/assets/minecraft/textures/item/sheep_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00489967e2c351927b5b9f77fb7cbc1a1e0bc5681556c612ef21a1de0b731bf3 +size 232 diff --git a/assets/minecraft/textures/item/shulker_spawn_egg.png b/assets/minecraft/textures/item/shulker_spawn_egg.png new file mode 100644 index 00000000..7158be28 --- /dev/null +++ b/assets/minecraft/textures/item/shulker_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64bac5108a8304b3d2b1a965802bf47db3d9d2e6c5039e54c8879c2d630ef50c +size 213 diff --git a/assets/minecraft/textures/item/silverfish_spawn_egg.png b/assets/minecraft/textures/item/silverfish_spawn_egg.png new file mode 100644 index 00000000..8264f7a8 --- /dev/null +++ b/assets/minecraft/textures/item/silverfish_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a86e7965931498a38d748af9dd868b0fc39c76ccaad4411f55c2741f69665dee +size 260 diff --git a/assets/minecraft/textures/item/skeleton_horse_spawn_egg.png b/assets/minecraft/textures/item/skeleton_horse_spawn_egg.png new file mode 100644 index 00000000..891063c2 --- /dev/null +++ b/assets/minecraft/textures/item/skeleton_horse_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0477a9e8747eaf64a481e6ea529a10b635dbb0c8306c16e3d096cb5ac375ca02 +size 231 diff --git a/assets/minecraft/textures/item/skeleton_spawn_egg.png b/assets/minecraft/textures/item/skeleton_spawn_egg.png new file mode 100644 index 00000000..04ae1120 --- /dev/null +++ b/assets/minecraft/textures/item/skeleton_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5075baf4259864f65699f1b363b95300ec70ef9254fb163f1a368a7ee52a736 +size 209 diff --git a/assets/minecraft/textures/item/slime_spawn_egg.png b/assets/minecraft/textures/item/slime_spawn_egg.png new file mode 100644 index 00000000..dbdd7852 --- /dev/null +++ b/assets/minecraft/textures/item/slime_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd4a8f63547d62633f251f4611bef9fead987e0e3308b465db0474c0856552e9 +size 208 diff --git a/assets/minecraft/textures/item/sniffer_spawn_egg.png b/assets/minecraft/textures/item/sniffer_spawn_egg.png new file mode 100644 index 00000000..77a7fe3c --- /dev/null +++ b/assets/minecraft/textures/item/sniffer_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e3d4eb2af771f88c35c00f70d55da6ef421eceb0c6a01318308ab33327b4e43 +size 272 diff --git a/assets/minecraft/textures/item/snow_golem_spawn_egg.png b/assets/minecraft/textures/item/snow_golem_spawn_egg.png new file mode 100644 index 00000000..7a85c214 --- /dev/null +++ b/assets/minecraft/textures/item/snow_golem_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:377ac75349e6746acdecee9b791a4ac9c82f08d75098aec1dcfe543eeba9c8b9 +size 262 diff --git a/assets/minecraft/textures/item/spawn_egg.png b/assets/minecraft/textures/item/spawn_egg.png deleted file mode 100644 index 180f1bfd..00000000 --- a/assets/minecraft/textures/item/spawn_egg.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6b985a0094408770f4b0ba919c2cb6365c6e8b65080334b33617518be2089c1 -size 266 diff --git a/assets/minecraft/textures/item/spawn_egg_overlay.png b/assets/minecraft/textures/item/spawn_egg_overlay.png deleted file mode 100644 index de7cb17d..00000000 --- a/assets/minecraft/textures/item/spawn_egg_overlay.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df0075d5081a1f49f0f4de1e1f004764446ecb3233416f7cd027c58823190747 -size 402 diff --git a/assets/minecraft/textures/item/spider_spawn_egg.png b/assets/minecraft/textures/item/spider_spawn_egg.png new file mode 100644 index 00000000..df445c5a --- /dev/null +++ b/assets/minecraft/textures/item/spider_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45a01717c134362db5a2bbd8e25bf12480453a2849ceeb24d3d815687df4f996 +size 236 diff --git a/assets/minecraft/textures/item/squid_spawn_egg.png b/assets/minecraft/textures/item/squid_spawn_egg.png new file mode 100644 index 00000000..6a828f3a --- /dev/null +++ b/assets/minecraft/textures/item/squid_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4b9b3a5f2f5504e42b85a99e3d4e74820934d83a85d7af25b208c27251b8c55 +size 240 diff --git a/assets/minecraft/textures/item/stray_spawn_egg.png b/assets/minecraft/textures/item/stray_spawn_egg.png new file mode 100644 index 00000000..078dc51c --- /dev/null +++ b/assets/minecraft/textures/item/stray_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d5e3fdcff2fe213baec93e4aed9974fcfc746c396ff3da90bab8e07d6f7f037 +size 240 diff --git a/assets/minecraft/textures/item/strider_spawn_egg.png b/assets/minecraft/textures/item/strider_spawn_egg.png new file mode 100644 index 00000000..8bb37804 --- /dev/null +++ b/assets/minecraft/textures/item/strider_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f65f8a015fe2b2380c44dfc328ea666674359602516ad04f4129d5c222cffc6d +size 265 diff --git a/assets/minecraft/textures/item/tadpole_spawn_egg.png b/assets/minecraft/textures/item/tadpole_spawn_egg.png new file mode 100644 index 00000000..8a2192f1 --- /dev/null +++ b/assets/minecraft/textures/item/tadpole_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:557a75a1d8f24c3033b45d337918c105bb8c70bc89f7c4bc58b97d99d94a7f8c +size 224 diff --git a/assets/minecraft/textures/item/trader_llama_spawn_egg.png b/assets/minecraft/textures/item/trader_llama_spawn_egg.png new file mode 100644 index 00000000..eb90a953 --- /dev/null +++ b/assets/minecraft/textures/item/trader_llama_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56b5a3c8d90225012bc7e67fb2d4c76d38e5c6735992f09969bf4e2e33f13d05 +size 262 diff --git a/assets/minecraft/textures/item/tropical_fish_spawn_egg.png b/assets/minecraft/textures/item/tropical_fish_spawn_egg.png new file mode 100644 index 00000000..537ba46c --- /dev/null +++ b/assets/minecraft/textures/item/tropical_fish_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0093fe3958eb7ee063b66d0b3cdc609fc2569d98743e63cb2710ad5af3c0fc8 +size 255 diff --git a/assets/minecraft/textures/item/turtle_spawn_egg.png b/assets/minecraft/textures/item/turtle_spawn_egg.png new file mode 100644 index 00000000..29c2f70b --- /dev/null +++ b/assets/minecraft/textures/item/turtle_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c99f416648419cc5109c29b06bc6ea48f5e6b1782d26cb71c3305c22538c96b +size 234 diff --git a/assets/minecraft/textures/item/vex_spawn_egg.png b/assets/minecraft/textures/item/vex_spawn_egg.png new file mode 100644 index 00000000..d35b6826 --- /dev/null +++ b/assets/minecraft/textures/item/vex_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:811472304ac3fd3c44fb4e0071f1c6a0829103666428416c88e448231bcad64c +size 243 diff --git a/assets/minecraft/textures/item/villager_spawn_egg.png b/assets/minecraft/textures/item/villager_spawn_egg.png new file mode 100644 index 00000000..450b01bb --- /dev/null +++ b/assets/minecraft/textures/item/villager_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5f5efd1d6c8e4c4ab577a2586eaac4cf95c47fe053da03bf26a8573749718cb +size 228 diff --git a/assets/minecraft/textures/item/vindicator_spawn_egg.png b/assets/minecraft/textures/item/vindicator_spawn_egg.png new file mode 100644 index 00000000..d2e51e73 --- /dev/null +++ b/assets/minecraft/textures/item/vindicator_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a04b98a84248c658d028fa00fef8bf91c1f6e617bd260ad7b13b5bc95689670 +size 247 diff --git a/assets/minecraft/textures/item/wandering_trader_spawn_egg.png b/assets/minecraft/textures/item/wandering_trader_spawn_egg.png new file mode 100644 index 00000000..ad1e278d --- /dev/null +++ b/assets/minecraft/textures/item/wandering_trader_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0366be3234cf03fa7ebd9d2007bac086350a72d9cb8a12abb66e1d591a674d83 +size 279 diff --git a/assets/minecraft/textures/item/warden_spawn_egg.png b/assets/minecraft/textures/item/warden_spawn_egg.png new file mode 100644 index 00000000..e7e50629 --- /dev/null +++ b/assets/minecraft/textures/item/warden_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8123e3bd155dc18e320c80451836e43c8639683a7d9360986f197254204a876a +size 272 diff --git a/assets/minecraft/textures/item/white_bundle_open_front.png b/assets/minecraft/textures/item/white_bundle_open_front.png index 0ebd5c2c..4c40fb81 100644 --- a/assets/minecraft/textures/item/white_bundle_open_front.png +++ b/assets/minecraft/textures/item/white_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:325109e77c1de7c3a2a4bc65ee1218d062cb681fed43fb838966452d912115e1 +oid sha256:b4eaa82b3d1489e80305bac817f40d3fedaf48e3a56ea2f4b679fa091d9cc380 size 191 diff --git a/assets/minecraft/textures/item/wildflowers.png b/assets/minecraft/textures/item/wildflowers.png new file mode 100644 index 00000000..6e4669ea --- /dev/null +++ b/assets/minecraft/textures/item/wildflowers.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5082cc0923298aa031aac59c6238dbb1b1e80160949c89f6b92236575b3987a +size 201 diff --git a/assets/minecraft/textures/item/witch_spawn_egg.png b/assets/minecraft/textures/item/witch_spawn_egg.png new file mode 100644 index 00000000..e06c216d --- /dev/null +++ b/assets/minecraft/textures/item/witch_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64b45ddac963a62da25e73910117ff741c73793cc5b486efeb6f5dfcce20f203 +size 277 diff --git a/assets/minecraft/textures/item/wither_skeleton_spawn_egg.png b/assets/minecraft/textures/item/wither_skeleton_spawn_egg.png new file mode 100644 index 00000000..ef5f0c3c --- /dev/null +++ b/assets/minecraft/textures/item/wither_skeleton_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b3b161c33007dd26220b8be6dcec9b7b13a5b6b98c2f6c52af72e5400d6ccfb +size 216 diff --git a/assets/minecraft/textures/item/wither_spawn_egg.png b/assets/minecraft/textures/item/wither_spawn_egg.png new file mode 100644 index 00000000..8a16e0e6 --- /dev/null +++ b/assets/minecraft/textures/item/wither_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c33dba205369d447ef224d6fa520f998b0188acc721ba70b493eb85031170a5 +size 233 diff --git a/assets/minecraft/textures/item/wolf_spawn_egg.png b/assets/minecraft/textures/item/wolf_spawn_egg.png new file mode 100644 index 00000000..883230e6 --- /dev/null +++ b/assets/minecraft/textures/item/wolf_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e11bf54810132fec84e45511a3567dd97e029c1bb655d6c5e5ba77945c49129b +size 241 diff --git a/assets/minecraft/textures/item/yellow_bundle_open_front.png b/assets/minecraft/textures/item/yellow_bundle_open_front.png index a81c9e7d..650097f9 100644 --- a/assets/minecraft/textures/item/yellow_bundle_open_front.png +++ b/assets/minecraft/textures/item/yellow_bundle_open_front.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16da871fe81cf9f51f67dd49e745a458b5eca7216fa5c309f304a8207aa12b32 +oid sha256:3008f402c8beff4c2fa8eb53f8779fc88d170206e1843aefa5732be3f98caf6b size 191 diff --git a/assets/minecraft/textures/item/zoglin_spawn_egg.png b/assets/minecraft/textures/item/zoglin_spawn_egg.png new file mode 100644 index 00000000..e560e6f1 --- /dev/null +++ b/assets/minecraft/textures/item/zoglin_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bba948f53316aa2d24d54d736e611e796bc968c48da72c5890e0f86addff410c +size 337 diff --git a/assets/minecraft/textures/item/zombie_horse_spawn_egg.png b/assets/minecraft/textures/item/zombie_horse_spawn_egg.png new file mode 100644 index 00000000..d7039361 --- /dev/null +++ b/assets/minecraft/textures/item/zombie_horse_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:954e802a6a177f9fb22a7c54b0824ea05080e8a0b621fd3768a8a3dc35966074 +size 259 diff --git a/assets/minecraft/textures/item/zombie_spawn_egg.png b/assets/minecraft/textures/item/zombie_spawn_egg.png new file mode 100644 index 00000000..450c9214 --- /dev/null +++ b/assets/minecraft/textures/item/zombie_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dc67c80c9d13874d9863b7249af585829cc9610bd6c377704ab97e643da34eb +size 235 diff --git a/assets/minecraft/textures/item/zombie_villager_spawn_egg.png b/assets/minecraft/textures/item/zombie_villager_spawn_egg.png new file mode 100644 index 00000000..b00eb576 --- /dev/null +++ b/assets/minecraft/textures/item/zombie_villager_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88906bcece7e0c8e2a3132149e3775a4928a213aa22a592df3b9cc91aed93981 +size 235 diff --git a/assets/minecraft/textures/item/zombified_piglin_spawn_egg.png b/assets/minecraft/textures/item/zombified_piglin_spawn_egg.png new file mode 100644 index 00000000..ed01dcf5 --- /dev/null +++ b/assets/minecraft/textures/item/zombified_piglin_spawn_egg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:513a7b61259a40b806757f8ec163d5c24be5e3f0fdabf6cf941bd61fb16bbf12 +size 297 diff --git a/assets/minecraft/textures/misc/enchanted_glint_entity.png b/assets/minecraft/textures/misc/enchanted_glint_armor.png similarity index 100% rename from assets/minecraft/textures/misc/enchanted_glint_entity.png rename to assets/minecraft/textures/misc/enchanted_glint_armor.png diff --git a/assets/minecraft/textures/misc/enchanted_glint_entity.png.mcmeta b/assets/minecraft/textures/misc/enchanted_glint_armor.png.mcmeta similarity index 100% rename from assets/minecraft/textures/misc/enchanted_glint_entity.png.mcmeta rename to assets/minecraft/textures/misc/enchanted_glint_armor.png.mcmeta diff --git a/assets/minecraft/textures/particle/firefly.png b/assets/minecraft/textures/particle/firefly.png new file mode 100644 index 00000000..e4ef4763 --- /dev/null +++ b/assets/minecraft/textures/particle/firefly.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e13ccf41823ca16b8abeed793b3c39e1936a4fb2f24349f888ea86de7ce0cfbb +size 73 diff --git a/assets/minecraft/textures/particle/leaf_0.png b/assets/minecraft/textures/particle/leaf_0.png new file mode 100644 index 00000000..9aeeaeb7 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b12e8934f96e2eb37a173f378621bdff9039d5a0f4c06ce52e051a53b87708d +size 90 diff --git a/assets/minecraft/textures/particle/leaf_1.png b/assets/minecraft/textures/particle/leaf_1.png new file mode 100644 index 00000000..6e48b512 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32196809dad8e56155d211470301bdf37381171278e990ee436e2e7d5f3a9ef6 +size 92 diff --git a/assets/minecraft/textures/particle/leaf_10.png b/assets/minecraft/textures/particle/leaf_10.png new file mode 100644 index 00000000..1fc5d7bc --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_10.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8886f315a6e9bb5dc75f590c4856d59a3c00ce27b34b9960f80f36381606710a +size 94 diff --git a/assets/minecraft/textures/particle/leaf_11.png b/assets/minecraft/textures/particle/leaf_11.png new file mode 100644 index 00000000..b319100f --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_11.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceea23d422ae250074ff19506d17a1162a9364142961b6225da524a7345319b9 +size 93 diff --git a/assets/minecraft/textures/particle/leaf_2.png b/assets/minecraft/textures/particle/leaf_2.png new file mode 100644 index 00000000..b8abf967 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a233a2f58755d28eb64f6e0a43d1a68ac4ef45932d6425c06019e422b4fbd8ff +size 94 diff --git a/assets/minecraft/textures/particle/leaf_3.png b/assets/minecraft/textures/particle/leaf_3.png new file mode 100644 index 00000000..db0b41f6 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:852122041345064c49c2ca49100f8e18f6578c1e6bbc8624267c779ddb9ee950 +size 93 diff --git a/assets/minecraft/textures/particle/leaf_4.png b/assets/minecraft/textures/particle/leaf_4.png new file mode 100644 index 00000000..38534a0e --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20fea4ec7d5e6d2f96b8be1256b0cfe0d3b965cbdbe76da6b0fbeccd0fa1eddd +size 90 diff --git a/assets/minecraft/textures/particle/leaf_5.png b/assets/minecraft/textures/particle/leaf_5.png new file mode 100644 index 00000000..a34c773c --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:673031686a603b9f3a769006fecad747e06729e66f2eb8ee87212053d5c37860 +size 92 diff --git a/assets/minecraft/textures/particle/leaf_6.png b/assets/minecraft/textures/particle/leaf_6.png new file mode 100644 index 00000000..2e065738 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b69f4a6473226248c010b4dad63e7d036bb59a140ee18f614b843e655e725bbf +size 94 diff --git a/assets/minecraft/textures/particle/leaf_7.png b/assets/minecraft/textures/particle/leaf_7.png new file mode 100644 index 00000000..6e80e038 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b4084542edd97aacd8d48d4ba31a20258bb8610faaf956f64b3d6137eb3c75c +size 93 diff --git a/assets/minecraft/textures/particle/leaf_8.png b/assets/minecraft/textures/particle/leaf_8.png new file mode 100644 index 00000000..51ab25cb --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f53ff0892ec2f42a3e035ca43aa2289283895f23b0d6523f0c12dc1e7da65896 +size 90 diff --git a/assets/minecraft/textures/particle/leaf_9.png b/assets/minecraft/textures/particle/leaf_9.png new file mode 100644 index 00000000..d45ee348 --- /dev/null +++ b/assets/minecraft/textures/particle/leaf_9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba90e27854b52f3ae0a3b41b69a3e0f3e15e5a17e8aedbcdbd2379334677cfa1 +size 92 diff --git a/assets/minecraft/textures/particle/pale_oak_0.png b/assets/minecraft/textures/particle/pale_oak_0.png new file mode 100644 index 00000000..4fdbbce4 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aecb48b0c756e050e4468883644d650dd56bdec5444913682743592ecf006ae7 +size 95 diff --git a/assets/minecraft/textures/particle/pale_oak_1.png b/assets/minecraft/textures/particle/pale_oak_1.png new file mode 100644 index 00000000..fea3eccf --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:754f516a7a7fe081f6e962f7230022f79b3441f0e90ee2ad390a6960624898fe +size 92 diff --git a/assets/minecraft/textures/particle/pale_oak_10.png b/assets/minecraft/textures/particle/pale_oak_10.png new file mode 100644 index 00000000..73bdec7a --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_10.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fdce87d727d5be2ad7bca671016325c15343175a14bf6471aca5030d8bc25c1 +size 97 diff --git a/assets/minecraft/textures/particle/pale_oak_11.png b/assets/minecraft/textures/particle/pale_oak_11.png new file mode 100644 index 00000000..b6bc5b34 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_11.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8cbbbb05eea4cd6ad3b9ef4a64fdd53670d89e83c78510aac06dadc9dda2be8 +size 94 diff --git a/assets/minecraft/textures/particle/pale_oak_2.png b/assets/minecraft/textures/particle/pale_oak_2.png new file mode 100644 index 00000000..4efb0160 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb8b610ce176ce5dca89dd557c276265dff45db0d770aba100c9dbd349eb20f8 +size 97 diff --git a/assets/minecraft/textures/particle/pale_oak_3.png b/assets/minecraft/textures/particle/pale_oak_3.png new file mode 100644 index 00000000..6c260bb5 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb2fa0dd775defd7c023dd396b9b230c97055cc8a1ce40a3b2869812f89e123c +size 94 diff --git a/assets/minecraft/textures/particle/pale_oak_4.png b/assets/minecraft/textures/particle/pale_oak_4.png new file mode 100644 index 00000000..daf0fca2 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a49e3d95b1d810c3454fe40dd0d9a8355259289db3ea36b34dbc24ed7ca78257 +size 95 diff --git a/assets/minecraft/textures/particle/pale_oak_5.png b/assets/minecraft/textures/particle/pale_oak_5.png new file mode 100644 index 00000000..999350d3 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74f4f572734b02f37f9a72564ec5c57b89c9fb9b3c3f39229f949fc3b2894d80 +size 92 diff --git a/assets/minecraft/textures/particle/pale_oak_6.png b/assets/minecraft/textures/particle/pale_oak_6.png new file mode 100644 index 00000000..aa1438d4 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887e6d2048f557924e7927242b51343751ae00e8d7204d51b90d4eb683417891 +size 97 diff --git a/assets/minecraft/textures/particle/pale_oak_7.png b/assets/minecraft/textures/particle/pale_oak_7.png new file mode 100644 index 00000000..605cb1dc --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d320ae1240c36380e5fdbe94c688090aa21c55eb39b459936c8b4532be225de +size 94 diff --git a/assets/minecraft/textures/particle/pale_oak_8.png b/assets/minecraft/textures/particle/pale_oak_8.png new file mode 100644 index 00000000..81e122a0 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d56959b02fa4ae70ceb98115ae946f27776b69cd8df7e24d74a01171fc20b6f +size 95 diff --git a/assets/minecraft/textures/particle/pale_oak_9.png b/assets/minecraft/textures/particle/pale_oak_9.png new file mode 100644 index 00000000..278fc4c0 --- /dev/null +++ b/assets/minecraft/textures/particle/pale_oak_9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ccdb8f0ad5f1253d7db45f449415f1d5e41b5955287c018d6071065232032fc +size 92 diff --git a/assets/minecraft/textures/trims/color_palettes/resin.png b/assets/minecraft/textures/trims/color_palettes/resin.png new file mode 100644 index 00000000..b1119433 --- /dev/null +++ b/assets/minecraft/textures/trims/color_palettes/resin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45b7dad5f876474a49ab0a9547cd31f3f693222e5f5eeb30d4d5ae26602e5ea7 +size 90 diff --git a/com/mojang/blaze3d/GpuOutOfMemoryException.java b/com/mojang/blaze3d/GpuOutOfMemoryException.java new file mode 100644 index 00000000..b286d8a3 --- /dev/null +++ b/com/mojang/blaze3d/GpuOutOfMemoryException.java @@ -0,0 +1,11 @@ +package com.mojang.blaze3d; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class GpuOutOfMemoryException extends RuntimeException { + public GpuOutOfMemoryException(String message) { + super(message); + } +} diff --git a/com/mojang/blaze3d/ProjectionType.java b/com/mojang/blaze3d/ProjectionType.java index 0c537c51..529b1eef 100644 --- a/com/mojang/blaze3d/ProjectionType.java +++ b/com/mojang/blaze3d/ProjectionType.java @@ -22,8 +22,8 @@ public enum ProjectionType { return this.vertexSorting; } - public void applyLayeringTransform(Matrix4f matrix4f, float f) { - this.layeringTransform.apply(matrix4f, f); + public void applyLayeringTransform(Matrix4f modelViewMatrix, float distance) { + this.layeringTransform.apply(modelViewMatrix, distance); } @FunctionalInterface diff --git a/com/mojang/blaze3d/TracyFrameCapture.java b/com/mojang/blaze3d/TracyFrameCapture.java index 930dbd2d..a230141e 100644 --- a/com/mojang/blaze3d/TracyFrameCapture.java +++ b/com/mojang/blaze3d/TracyFrameCapture.java @@ -3,13 +3,18 @@ package com.mojang.blaze3d; import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; import com.mojang.blaze3d.buffers.GpuBuffer; -import com.mojang.blaze3d.buffers.GpuFence; import com.mojang.blaze3d.pipeline.RenderTarget; -import com.mojang.blaze3d.pipeline.TextureTarget; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; +import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.jtracy.TracyClient; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.RenderPipelines; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -21,41 +26,51 @@ public class TracyFrameCapture implements AutoCloseable { private int targetHeight; private int width; private int height; - private final RenderTarget frameBuffer = new TextureTarget(320, 180, false); - private final GpuBuffer pixelbuffer = new GpuBuffer(BufferType.PIXEL_PACK, BufferUsage.STREAM_READ, 0); @Nullable - private GpuFence fence; + private GpuTexture frameBuffer; + @Nullable + private GpuBuffer pixelbuffer; private int lastCaptureDelay; private boolean capturedThisFrame; + private TracyFrameCapture.Status status = TracyFrameCapture.Status.WAITING_FOR_CAPTURE; - private void resize(int i, int j) { - float f = (float)i / j; - if (i > 320) { - i = 320; - j = (int)(320.0F / f); + private void resize(int width, int height) { + float f = (float)width / height; + if (width > 320) { + width = 320; + height = (int)(320.0F / f); } - if (j > 180) { - i = (int)(180.0F * f); - j = 180; + if (height > 180) { + width = (int)(180.0F * f); + height = 180; } - i = i / 4 * 4; - j = j / 4 * 4; - if (this.width != i || this.height != j) { - this.width = i; - this.height = j; - this.frameBuffer.resize(i, j); - this.pixelbuffer.resize(i * j * 4); - if (this.fence != null) { - this.fence.close(); - this.fence = null; + width = width / 4 * 4; + height = height / 4 * 4; + if (this.width != width || this.height != height) { + this.width = width; + this.height = height; + if (this.frameBuffer != null) { + this.frameBuffer.close(); } + + this.frameBuffer = RenderSystem.getDevice().createTexture("Tracy Frame Capture", TextureFormat.RGBA8, width, height, 1); + if (this.pixelbuffer != null) { + this.pixelbuffer.close(); + } + + this.pixelbuffer = RenderSystem.getDevice() + .createBuffer(() -> "Tracy Frame Capture buffer", BufferType.PIXEL_PACK, BufferUsage.STREAM_READ, width * height * 4); } } public void capture(RenderTarget renderTarget) { - if (this.fence == null && !this.capturedThisFrame) { + if (this.status == TracyFrameCapture.Status.WAITING_FOR_CAPTURE + && !this.capturedThisFrame + && renderTarget.getColorTexture() != null + && this.pixelbuffer != null + && this.frameBuffer != null) { this.capturedThisFrame = true; if (renderTarget.width != this.targetWidth || renderTarget.height != this.targetHeight) { this.targetWidth = renderTarget.width; @@ -63,30 +78,30 @@ public class TracyFrameCapture implements AutoCloseable { this.resize(this.targetWidth, this.targetHeight); } - GlStateManager._glBindFramebuffer(36009, this.frameBuffer.frameBufferId); - GlStateManager._glBindFramebuffer(36008, renderTarget.frameBufferId); - GlStateManager._glBlitFrameBuffer(0, 0, renderTarget.width, renderTarget.height, 0, 0, this.width, this.height, 16384, 9729); - GlStateManager._glBindFramebuffer(36008, 0); - GlStateManager._glBindFramebuffer(36009, 0); - this.pixelbuffer.bind(); - GlStateManager._glBindFramebuffer(36008, this.frameBuffer.frameBufferId); - GlStateManager._readPixels(0, 0, this.width, this.height, 6408, 5121, 0L); - GlStateManager._glBindFramebuffer(36008, 0); - this.fence = new GpuFence(); + this.status = TracyFrameCapture.Status.WAITING_FOR_COPY; + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer = autoStorageIndexBuffer.getBuffer(6); + + try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(this.frameBuffer, OptionalInt.empty())) { + renderPass.setPipeline(RenderPipelines.TRACY_BLIT); + renderPass.setVertexBuffer(0, RenderSystem.getQuadVertexBuffer()); + renderPass.setIndexBuffer(gpuBuffer, autoStorageIndexBuffer.type()); + renderPass.bindSampler("InSampler", renderTarget.getColorTexture()); + renderPass.drawIndexed(0, 6); + } + + commandEncoder.copyTextureToBuffer(this.frameBuffer, this.pixelbuffer, 0, () -> this.status = TracyFrameCapture.Status.WAITING_FOR_UPLOAD, 0); this.lastCaptureDelay = 0; } } public void upload() { - if (this.fence != null) { - if (this.fence.awaitCompletion(0L)) { - this.fence = null; + if (this.status == TracyFrameCapture.Status.WAITING_FOR_UPLOAD && this.pixelbuffer != null) { + this.status = TracyFrameCapture.Status.WAITING_FOR_CAPTURE; - try (GpuBuffer.ReadView readView = this.pixelbuffer.read()) { - if (readView != null) { - TracyClient.frameImage(readView.data(), this.width, this.height, this.lastCaptureDelay, true); - } - } + try (GpuBuffer.ReadView readView = RenderSystem.getDevice().createCommandEncoder().readBuffer(this.pixelbuffer)) { + TracyClient.frameImage(readView.data(), this.width, this.height, this.lastCaptureDelay, true); } } } @@ -98,12 +113,19 @@ public class TracyFrameCapture implements AutoCloseable { } public void close() { - if (this.fence != null) { - this.fence.close(); - this.fence = null; + if (this.frameBuffer != null) { + this.frameBuffer.close(); } - this.pixelbuffer.close(); - this.frameBuffer.destroyBuffers(); + if (this.pixelbuffer != null) { + this.pixelbuffer.close(); + } + } + + @Environment(EnvType.CLIENT) + static enum Status { + WAITING_FOR_CAPTURE, + WAITING_FOR_COPY, + WAITING_FOR_UPLOAD; } } diff --git a/com/mojang/blaze3d/audio/Library.java b/com/mojang/blaze3d/audio/Library.java index beae77f2..ca7c7da7 100644 --- a/com/mojang/blaze3d/audio/Library.java +++ b/com/mojang/blaze3d/audio/Library.java @@ -22,7 +22,6 @@ import org.lwjgl.openal.ALC11; import org.lwjgl.openal.ALCCapabilities; import org.lwjgl.openal.ALCapabilities; import org.lwjgl.openal.ALUtil; -import org.lwjgl.openal.SOFTHRTF; import org.lwjgl.system.MemoryStack; import org.slf4j.Logger; @@ -86,10 +85,8 @@ public class Library { } else if (!aLCCapabilities.OpenALC11) { throw new IllegalStateException("OpenAL 1.1 not supported"); } else { - this.setHrtf(aLCCapabilities.ALC_SOFT_HRTF && enableHrtf); - try (MemoryStack memoryStack = MemoryStack.stackPush()) { - IntBuffer intBuffer = memoryStack.callocInt(3).put(6554).put(1).put(0).flip(); + IntBuffer intBuffer = this.createAttributes(memoryStack, aLCCapabilities.ALC_SOFT_HRTF && enableHrtf); this.context = ALC10.alcCreateContext(this.currentDevice, intBuffer); } @@ -120,21 +117,17 @@ public class Library { } } - /** - * Sets the HRTF (head-related transfer function) for spatial audio, if it is supported by the current device. - * - * @param enableHrtf Whether to enable HRTF. - */ - private void setHrtf(boolean enableHrtf) { - int i = ALC10.alcGetInteger(this.currentDevice, 6548); - if (i > 0) { - try (MemoryStack memoryStack = MemoryStack.stackPush()) { - IntBuffer intBuffer = memoryStack.callocInt(10).put(6546).put(enableHrtf ? 1 : 0).put(6550).put(0).put(0).flip(); - if (!SOFTHRTF.alcResetDeviceSOFT(this.currentDevice, intBuffer)) { - LOGGER.warn("Failed to reset device: {}", ALC10.alcGetString(this.currentDevice, ALC10.alcGetError(this.currentDevice))); - } - } + private IntBuffer createAttributes(MemoryStack memoryStack, boolean enableHrtf) { + int i = 5; + IntBuffer intBuffer = memoryStack.callocInt(11); + int j = ALC10.alcGetInteger(this.currentDevice, 6548); + if (j > 0) { + intBuffer.put(6546).put(enableHrtf ? 1 : 0); + intBuffer.put(6550).put(0); } + + intBuffer.put(6554).put(1); + return intBuffer.put(0).flip(); } /** diff --git a/com/mojang/blaze3d/buffers/BufferType.java b/com/mojang/blaze3d/buffers/BufferType.java index 76943794..34539b9e 100644 --- a/com/mojang/blaze3d/buffers/BufferType.java +++ b/com/mojang/blaze3d/buffers/BufferType.java @@ -1,21 +1,17 @@ package com.mojang.blaze3d.buffers; +import com.mojang.blaze3d.DontObfuscate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) +@DontObfuscate public enum BufferType { - VERTICES(34962), - INDICES(34963), - PIXEL_PACK(35051), - COPY_READ(36662), - COPY_WRITE(36663), - PIXEL_UNPACK(35052), - UNIFORM(35345); - - final int id; - - private BufferType(final int j) { - this.id = j; - } + VERTICES, + INDICES, + PIXEL_PACK, + COPY_READ, + COPY_WRITE, + PIXEL_UNPACK, + UNIFORM; } diff --git a/com/mojang/blaze3d/buffers/BufferUsage.java b/com/mojang/blaze3d/buffers/BufferUsage.java index a3d7c23b..db4d1de6 100644 --- a/com/mojang/blaze3d/buffers/BufferUsage.java +++ b/com/mojang/blaze3d/buffers/BufferUsage.java @@ -1,27 +1,35 @@ package com.mojang.blaze3d.buffers; +import com.mojang.blaze3d.DontObfuscate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) +@DontObfuscate public enum BufferUsage { - DYNAMIC_WRITE(35048, false, true), - STATIC_WRITE(35044, false, true), - STREAM_WRITE(35040, false, true), - STATIC_READ(35045, true, false), - DYNAMIC_READ(35049, true, false), - STREAM_READ(35041, true, false), - DYNAMIC_COPY(35050, false, false), - STATIC_COPY(35046, false, false), - STREAM_COPY(35042, false, false); + DYNAMIC_WRITE(false, true), + STATIC_WRITE(false, true), + STREAM_WRITE(false, true), + STATIC_READ(true, false), + DYNAMIC_READ(true, false), + STREAM_READ(true, false), + DYNAMIC_COPY(false, false), + STATIC_COPY(false, false), + STREAM_COPY(false, false); - final int id; final boolean readable; final boolean writable; - private BufferUsage(final int j, final boolean bl, final boolean bl2) { - this.id = j; + private BufferUsage(final boolean bl, final boolean bl2) { this.readable = bl; this.writable = bl2; } + + public boolean isReadable() { + return this.readable; + } + + public boolean isWritable() { + return this.writable; + } } diff --git a/com/mojang/blaze3d/buffers/GpuBuffer.java b/com/mojang/blaze3d/buffers/GpuBuffer.java index e9f897c0..ab22827a 100644 --- a/com/mojang/blaze3d/buffers/GpuBuffer.java +++ b/com/mojang/blaze3d/buffers/GpuBuffer.java @@ -1,136 +1,44 @@ package com.mojang.blaze3d.buffers; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.jtracy.MemoryPool; -import com.mojang.jtracy.TracyClient; +import com.mojang.blaze3d.DontObfuscate; import java.nio.ByteBuffer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class GpuBuffer implements AutoCloseable { - private static final MemoryPool MEMORY_POOl = TracyClient.createMemoryPool("GPU Buffers"); +@DontObfuscate +public abstract class GpuBuffer implements AutoCloseable { private final BufferType type; private final BufferUsage usage; - private boolean closed; - private boolean initialized = false; - public final int handle; public int size; public GpuBuffer(BufferType bufferType, BufferUsage bufferUsage, int i) { this.type = bufferType; this.size = i; this.usage = bufferUsage; - this.handle = GlStateManager._glGenBuffers(); } - public GpuBuffer(BufferType bufferType, BufferUsage bufferUsage, ByteBuffer byteBuffer) { - this(bufferType, bufferUsage, byteBuffer.remaining()); - this.write(byteBuffer, 0); + public int size() { + return this.size; } - public void resize(int i) { - if (this.closed) { - throw new IllegalStateException("Buffer already closed"); - } else { - if (this.initialized) { - MEMORY_POOl.free(this.handle); - } - - this.size = i; - if (this.usage.writable) { - this.initialized = false; - } else { - this.bind(); - GlStateManager._glBufferData(this.type.id, i, this.usage.id); - MEMORY_POOl.malloc(this.handle, i); - this.initialized = true; - } - } + public BufferType type() { + return this.type; } - public void write(ByteBuffer byteBuffer, int i) { - if (this.closed) { - throw new IllegalStateException("Buffer already closed"); - } else if (!this.usage.writable) { - throw new IllegalStateException("Buffer is not writable"); - } else { - int j = byteBuffer.remaining(); - if (j + i > this.size) { - throw new IllegalArgumentException( - "Cannot write more data than this buffer can hold (attempting to write " + j + " bytes at offset " + i + " to " + this.size + " size buffer)" - ); - } else { - this.bind(); - if (this.initialized) { - GlStateManager._glBufferSubData(this.type.id, i, byteBuffer); - } else if (i == 0 && j == this.size) { - GlStateManager._glBufferData(this.type.id, byteBuffer, this.usage.id); - MEMORY_POOl.malloc(this.handle, this.size); - this.initialized = true; - } else { - GlStateManager._glBufferData(this.type.id, this.size, this.usage.id); - GlStateManager._glBufferSubData(this.type.id, i, byteBuffer); - MEMORY_POOl.malloc(this.handle, this.size); - this.initialized = true; - } - } - } + public BufferUsage usage() { + return this.usage; } - @Nullable - public GpuBuffer.ReadView read() { - return this.read(0, this.size); - } + public abstract boolean isClosed(); - @Nullable - public GpuBuffer.ReadView read(int i, int j) { - if (this.closed) { - throw new IllegalStateException("Buffer already closed"); - } else if (!this.usage.readable) { - throw new IllegalStateException("Buffer is not readable"); - } else if (i + j > this.size) { - throw new IllegalArgumentException( - "Cannot read more data than this buffer can hold (attempting to read " + j + " bytes at offset " + i + " from " + this.size + " size buffer)" - ); - } else { - this.bind(); - ByteBuffer byteBuffer = GlStateManager._glMapBufferRange(this.type.id, i, j, 1); - return byteBuffer == null ? null : new GpuBuffer.ReadView(this.type.id, byteBuffer); - } - } - - public void close() { - if (!this.closed) { - this.closed = true; - GlStateManager._glDeleteBuffers(this.handle); - if (this.initialized) { - MEMORY_POOl.free(this.handle); - } - } - } - - public void bind() { - GlStateManager._glBindBuffer(this.type.id, this.handle); - } + public abstract void close(); @Environment(EnvType.CLIENT) - public static class ReadView implements AutoCloseable { - private final int target; - private final ByteBuffer data; + @DontObfuscate + public interface ReadView extends AutoCloseable { + ByteBuffer data(); - protected ReadView(int i, ByteBuffer byteBuffer) { - this.target = i; - this.data = byteBuffer; - } - - public ByteBuffer data() { - return this.data; - } - - public void close() { - GlStateManager._glUnmapBuffer(this.target); - } + void close(); } } diff --git a/com/mojang/blaze3d/buffers/GpuFence.java b/com/mojang/blaze3d/buffers/GpuFence.java index 26e2066c..708688ba 100644 --- a/com/mojang/blaze3d/buffers/GpuFence.java +++ b/com/mojang/blaze3d/buffers/GpuFence.java @@ -1,10 +1,12 @@ package com.mojang.blaze3d.buffers; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.opengl.GlStateManager; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) +@DontObfuscate public class GpuFence implements AutoCloseable { private long handle = GlStateManager._glFenceSync(37143, 0); diff --git a/com/mojang/blaze3d/font/SheetGlyphInfo.java b/com/mojang/blaze3d/font/SheetGlyphInfo.java index 289cf864..958d7499 100644 --- a/com/mojang/blaze3d/font/SheetGlyphInfo.java +++ b/com/mojang/blaze3d/font/SheetGlyphInfo.java @@ -1,5 +1,6 @@ package com.mojang.blaze3d.font; +import com.mojang.blaze3d.textures.GpuTexture; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -9,7 +10,7 @@ public interface SheetGlyphInfo { int getPixelHeight(); - void upload(int xOffset, int yOffset); + void upload(int x, int y, GpuTexture texture); boolean isColored(); diff --git a/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java b/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java index e702edde..1d42c730 100644 --- a/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java +++ b/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java @@ -71,14 +71,14 @@ public class TrueTypeGlyphProvider implements GlyphProvider { return glyphEntry != null ? this.getOrLoadGlyphInfo(character, glyphEntry) : null; } - private GlyphInfo getOrLoadGlyphInfo(int i, TrueTypeGlyphProvider.GlyphEntry glyphEntry) { + private GlyphInfo getOrLoadGlyphInfo(int character, TrueTypeGlyphProvider.GlyphEntry glyphEntry) { GlyphInfo glyphInfo = glyphEntry.glyph; if (glyphInfo == null) { FT_Face fT_Face = this.validateFontOpen(); synchronized (fT_Face) { glyphInfo = glyphEntry.glyph; if (glyphInfo == null) { - glyphInfo = this.loadGlyph(i, fT_Face, glyphEntry.index); + glyphInfo = this.loadGlyph(character, fT_Face, glyphEntry.index); glyphEntry.glyph = glyphInfo; } } @@ -87,23 +87,23 @@ public class TrueTypeGlyphProvider implements GlyphProvider { return glyphInfo; } - private GlyphInfo loadGlyph(int i, FT_Face fT_Face, int j) { - int k = FreeType.FT_Load_Glyph(fT_Face, j, 4194312); - if (k != 0) { - FreeTypeUtil.assertError(k, String.format(Locale.ROOT, "Loading glyph U+%06X", i)); + private GlyphInfo loadGlyph(int character, FT_Face face, int index) { + int i = FreeType.FT_Load_Glyph(face, index, 4194312); + if (i != 0) { + FreeTypeUtil.assertError(i, String.format(Locale.ROOT, "Loading glyph U+%06X", character)); } - FT_GlyphSlot fT_GlyphSlot = fT_Face.glyph(); + FT_GlyphSlot fT_GlyphSlot = face.glyph(); if (fT_GlyphSlot == null) { - throw new NullPointerException(String.format(Locale.ROOT, "Glyph U+%06X not initialized", i)); + throw new NullPointerException(String.format(Locale.ROOT, "Glyph U+%06X not initialized", character)); } else { float f = FreeTypeUtil.x(fT_GlyphSlot.advance()); FT_Bitmap fT_Bitmap = fT_GlyphSlot.bitmap(); - int l = fT_GlyphSlot.bitmap_left(); - int m = fT_GlyphSlot.bitmap_top(); - int n = fT_Bitmap.width(); - int o = fT_Bitmap.rows(); - return (GlyphInfo)(n > 0 && o > 0 ? new TrueTypeGlyphProvider.Glyph(l, m, n, o, f, j) : () -> f / this.oversample); + int j = fT_GlyphSlot.bitmap_left(); + int k = fT_GlyphSlot.bitmap_top(); + int l = fT_Bitmap.width(); + int m = fT_Bitmap.rows(); + return (GlyphInfo)(l > 0 && m > 0 ? new TrueTypeGlyphProvider.Glyph(j, k, l, m, f, index) : () -> f / this.oversample); } } @@ -169,8 +169,8 @@ public class TrueTypeGlyphProvider implements GlyphProvider { @Nullable volatile GlyphInfo glyph; - GlyphEntry(int i) { - this.index = i; + GlyphEntry(int index) { + this.index = index; } } } diff --git a/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java b/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java index d71d1573..f2ef17f0 100644 --- a/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java +++ b/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java @@ -22,36 +22,36 @@ public class FrameGraphBuilder { private final List> externalResources = new ArrayList(); private final List passes = new ArrayList(); - public FramePass addPass(String string) { - FrameGraphBuilder.Pass pass = new FrameGraphBuilder.Pass(this.passes.size(), string); + public FramePass addPass(String name) { + FrameGraphBuilder.Pass pass = new FrameGraphBuilder.Pass(this.passes.size(), name); this.passes.add(pass); return pass; } - public ResourceHandle importExternal(String string, T object) { - FrameGraphBuilder.ExternalResource externalResource = new FrameGraphBuilder.ExternalResource<>(string, null, object); + public ResourceHandle importExternal(String name, T resource) { + FrameGraphBuilder.ExternalResource externalResource = new FrameGraphBuilder.ExternalResource<>(name, null, resource); this.externalResources.add(externalResource); return externalResource.handle; } - public ResourceHandle createInternal(String string, ResourceDescriptor resourceDescriptor) { - return this.createInternalResource(string, resourceDescriptor, null).handle; + public ResourceHandle createInternal(String name, ResourceDescriptor descriptor) { + return this.createInternalResource(name, descriptor, null).handle; } FrameGraphBuilder.InternalVirtualResource createInternalResource( - String string, ResourceDescriptor resourceDescriptor, @Nullable FrameGraphBuilder.Pass pass + String name, ResourceDescriptor descriptor, @Nullable FrameGraphBuilder.Pass createdBy ) { int i = this.internalResources.size(); - FrameGraphBuilder.InternalVirtualResource internalVirtualResource = new FrameGraphBuilder.InternalVirtualResource<>(i, string, pass, resourceDescriptor); + FrameGraphBuilder.InternalVirtualResource internalVirtualResource = new FrameGraphBuilder.InternalVirtualResource<>(i, name, createdBy, descriptor); this.internalResources.add(internalVirtualResource); return internalVirtualResource; } - public void execute(GraphicsResourceAllocator graphicsResourceAllocator) { - this.execute(graphicsResourceAllocator, FrameGraphBuilder.Inspector.NONE); + public void execute(GraphicsResourceAllocator allocator) { + this.execute(allocator, FrameGraphBuilder.Inspector.NONE); } - public void execute(GraphicsResourceAllocator graphicsResourceAllocator, FrameGraphBuilder.Inspector inspector) { + public void execute(GraphicsResourceAllocator allocator, FrameGraphBuilder.Inspector inspector) { BitSet bitSet = this.identifyPassesToKeep(); List list = new ArrayList(bitSet.cardinality()); BitSet bitSet2 = new BitSet(this.passes.size()); @@ -65,7 +65,7 @@ public class FrameGraphBuilder { for (FrameGraphBuilder.Pass pass : list) { for (FrameGraphBuilder.InternalVirtualResource internalVirtualResource : pass.resourcesToAcquire) { inspector.acquireResource(internalVirtualResource.name); - internalVirtualResource.acquire(graphicsResourceAllocator); + internalVirtualResource.acquire(allocator); } inspector.beforeExecutePass(pass.name); @@ -75,7 +75,7 @@ public class FrameGraphBuilder { for (int i = pass.resourcesToRelease.nextSetBit(0); i >= 0; i = pass.resourcesToRelease.nextSetBit(i + 1)) { FrameGraphBuilder.InternalVirtualResource internalVirtualResource = (FrameGraphBuilder.InternalVirtualResource)this.internalResources.get(i); inspector.releaseResource(internalVirtualResource.name); - internalVirtualResource.release(graphicsResourceAllocator); + internalVirtualResource.release(allocator); } } } @@ -100,50 +100,50 @@ public class FrameGraphBuilder { return bitSet; } - private void discoverAllRequiredPasses(FrameGraphBuilder.Pass pass, BitSet bitSet, Deque deque) { - deque.add(pass); + private void discoverAllRequiredPasses(FrameGraphBuilder.Pass pass, BitSet passesToKeep, Deque output) { + output.add(pass); - while (!deque.isEmpty()) { - FrameGraphBuilder.Pass pass2 = (FrameGraphBuilder.Pass)deque.poll(); - if (!bitSet.get(pass2.id)) { - bitSet.set(pass2.id); + while (!output.isEmpty()) { + FrameGraphBuilder.Pass pass2 = (FrameGraphBuilder.Pass)output.poll(); + if (!passesToKeep.get(pass2.id)) { + passesToKeep.set(pass2.id); for (int i = pass2.requiredPassIds.nextSetBit(0); i >= 0; i = pass2.requiredPassIds.nextSetBit(i + 1)) { - deque.add((FrameGraphBuilder.Pass)this.passes.get(i)); + output.add((FrameGraphBuilder.Pass)this.passes.get(i)); } } } } - private void resolvePassOrder(FrameGraphBuilder.Pass pass, BitSet bitSet, BitSet bitSet2, List list) { - if (bitSet2.get(pass.id)) { - String string = (String)bitSet2.stream().mapToObj(ix -> ((FrameGraphBuilder.Pass)this.passes.get(ix)).name).collect(Collectors.joining(", ")); + private void resolvePassOrder(FrameGraphBuilder.Pass pass, BitSet passesToKeep, BitSet output, List orderedPasses) { + if (output.get(pass.id)) { + String string = (String)output.stream().mapToObj(ix -> ((FrameGraphBuilder.Pass)this.passes.get(ix)).name).collect(Collectors.joining(", ")); throw new IllegalStateException("Frame graph cycle detected between " + string); - } else if (bitSet.get(pass.id)) { - bitSet2.set(pass.id); - bitSet.clear(pass.id); + } else if (passesToKeep.get(pass.id)) { + output.set(pass.id); + passesToKeep.clear(pass.id); for (int i = pass.requiredPassIds.nextSetBit(0); i >= 0; i = pass.requiredPassIds.nextSetBit(i + 1)) { - this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(i), bitSet, bitSet2, list); + this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(i), passesToKeep, output, orderedPasses); } for (FrameGraphBuilder.Handle handle : pass.writesFrom) { for (int j = handle.readBy.nextSetBit(0); j >= 0; j = handle.readBy.nextSetBit(j + 1)) { if (j != pass.id) { - this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(j), bitSet, bitSet2, list); + this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(j), passesToKeep, output, orderedPasses); } } } - list.add(pass); - bitSet2.clear(pass.id); + orderedPasses.add(pass); + output.clear(pass.id); } } - private void assignResourceLifetimes(Collection collection) { + private void assignResourceLifetimes(Collection passes) { FrameGraphBuilder.Pass[] passs = new FrameGraphBuilder.Pass[this.internalResources.size()]; - for (FrameGraphBuilder.Pass pass : collection) { + for (FrameGraphBuilder.Pass pass : passes) { for (int i = pass.requiredResourceIds.nextSetBit(0); i >= 0; i = pass.requiredResourceIds.nextSetBit(i + 1)) { FrameGraphBuilder.InternalVirtualResource internalVirtualResource = (FrameGraphBuilder.InternalVirtualResource)this.internalResources.get(i); FrameGraphBuilder.Pass pass2 = passs[i]; @@ -163,9 +163,9 @@ public class FrameGraphBuilder { static class ExternalResource extends FrameGraphBuilder.VirtualResource { private final T resource; - public ExternalResource(String string, @Nullable FrameGraphBuilder.Pass pass, T object) { - super(string, pass); - this.resource = object; + public ExternalResource(String name, @Nullable FrameGraphBuilder.Pass createdBy, T resource) { + super(name, createdBy); + this.resource = resource; } @Override @@ -184,10 +184,10 @@ public class FrameGraphBuilder { @Nullable private FrameGraphBuilder.Handle aliasedBy; - Handle(FrameGraphBuilder.VirtualResource virtualResource, int i, @Nullable FrameGraphBuilder.Pass pass) { - this.holder = virtualResource; - this.version = i; - this.createdBy = pass; + Handle(FrameGraphBuilder.VirtualResource holder, int version, @Nullable FrameGraphBuilder.Pass createdBy) { + this.holder = holder; + this.version = version; + this.createdBy = createdBy; } @Override @@ -195,11 +195,11 @@ public class FrameGraphBuilder { return this.holder.get(); } - FrameGraphBuilder.Handle writeAndAlias(FrameGraphBuilder.Pass pass) { + FrameGraphBuilder.Handle writeAndAlias(FrameGraphBuilder.Pass alias) { if (this.holder.handle != this) { throw new IllegalStateException("Handle " + this + " is no longer valid, as its contents were moved into " + this.aliasedBy); } else { - FrameGraphBuilder.Handle handle = new FrameGraphBuilder.Handle<>(this.holder, this.version + 1, pass); + FrameGraphBuilder.Handle handle = new FrameGraphBuilder.Handle<>(this.holder, this.version + 1, alias); this.holder.handle = handle; this.aliasedBy = handle; return handle; @@ -215,16 +215,16 @@ public class FrameGraphBuilder { public interface Inspector { FrameGraphBuilder.Inspector NONE = new 1(); - default void acquireResource(String string) { + default void acquireResource(String name) { } - default void releaseResource(String string) { + default void releaseResource(String name) { } - default void beforeExecutePass(String string) { + default void beforeExecutePass(String name) { } - default void afterExecutePass(String string) { + default void afterExecutePass(String name) { } } @@ -235,10 +235,10 @@ public class FrameGraphBuilder { @Nullable private T physicalResource; - public InternalVirtualResource(int i, String string, @Nullable FrameGraphBuilder.Pass pass, ResourceDescriptor resourceDescriptor) { - super(string, pass); - this.id = i; - this.descriptor = resourceDescriptor; + public InternalVirtualResource(int id, String name, @Nullable FrameGraphBuilder.Pass createdBy, ResourceDescriptor descriptor) { + super(name, createdBy); + this.id = id; + this.descriptor = descriptor; } @Override @@ -246,19 +246,19 @@ public class FrameGraphBuilder { return (T)Objects.requireNonNull(this.physicalResource, "Resource is not currently available"); } - public void acquire(GraphicsResourceAllocator graphicsResourceAllocator) { + public void acquire(GraphicsResourceAllocator allocator) { if (this.physicalResource != null) { throw new IllegalStateException("Tried to acquire physical resource, but it was already assigned"); } else { - this.physicalResource = graphicsResourceAllocator.acquire(this.descriptor); + this.physicalResource = allocator.acquire(this.descriptor); } } - public void release(GraphicsResourceAllocator graphicsResourceAllocator) { + public void release(GraphicsResourceAllocator allocator) { if (this.physicalResource == null) { throw new IllegalStateException("Tried to release physical resource that was not allocated"); } else { - graphicsResourceAllocator.release(this.descriptor, this.physicalResource); + allocator.release(this.descriptor, this.physicalResource); this.physicalResource = null; } } @@ -276,9 +276,9 @@ public class FrameGraphBuilder { final BitSet resourcesToRelease = new BitSet(); boolean disableCulling; - public Pass(final int i, final String string) { - this.id = i; - this.name = string; + public Pass(final int id, final String name) { + this.id = id; + this.name = name; } private void markResourceRequired(FrameGraphBuilder.Handle handle) { @@ -292,15 +292,15 @@ public class FrameGraphBuilder { } @Override - public ResourceHandle createsInternal(String string, ResourceDescriptor resourceDescriptor) { - FrameGraphBuilder.InternalVirtualResource internalVirtualResource = FrameGraphBuilder.this.createInternalResource(string, resourceDescriptor, this); + public ResourceHandle createsInternal(String name, ResourceDescriptor descriptor) { + FrameGraphBuilder.InternalVirtualResource internalVirtualResource = FrameGraphBuilder.this.createInternalResource(name, descriptor, this); this.requiredResourceIds.set(internalVirtualResource.id); return internalVirtualResource.handle; } @Override - public void reads(ResourceHandle resourceHandle) { - this._reads((FrameGraphBuilder.Handle)resourceHandle); + public void reads(ResourceHandle handle) { + this._reads((FrameGraphBuilder.Handle)handle); } private void _reads(FrameGraphBuilder.Handle handle) { @@ -313,13 +313,13 @@ public class FrameGraphBuilder { } @Override - public ResourceHandle readsAndWrites(ResourceHandle resourceHandle) { - return this._readsAndWrites((FrameGraphBuilder.Handle)resourceHandle); + public ResourceHandle readsAndWrites(ResourceHandle handle) { + return this._readsAndWrites((FrameGraphBuilder.Handle)handle); } @Override - public void requires(FramePass framePass) { - this.requiredPassIds.set(((FrameGraphBuilder.Pass)framePass).id); + public void requires(FramePass pass) { + this.requiredPassIds.set(((FrameGraphBuilder.Pass)pass).id); } @Override @@ -334,8 +334,8 @@ public class FrameGraphBuilder { } @Override - public void executes(Runnable runnable) { - this.task = runnable; + public void executes(Runnable task) { + this.task = task; } public String toString() { @@ -348,9 +348,9 @@ public class FrameGraphBuilder { public final String name; public FrameGraphBuilder.Handle handle; - public VirtualResource(String string, @Nullable FrameGraphBuilder.Pass pass) { - this.name = string; - this.handle = new FrameGraphBuilder.Handle<>(this, 0, pass); + public VirtualResource(String name, @Nullable FrameGraphBuilder.Pass createdBy) { + this.name = name; + this.handle = new FrameGraphBuilder.Handle<>(this, 0, createdBy); } public abstract T get(); diff --git a/com/mojang/blaze3d/framegraph/FramePass.java b/com/mojang/blaze3d/framegraph/FramePass.java index 3010e3d0..d73d64f0 100644 --- a/com/mojang/blaze3d/framegraph/FramePass.java +++ b/com/mojang/blaze3d/framegraph/FramePass.java @@ -7,15 +7,15 @@ import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) public interface FramePass { - ResourceHandle createsInternal(String string, ResourceDescriptor resourceDescriptor); + ResourceHandle createsInternal(String name, ResourceDescriptor descriptor); - void reads(ResourceHandle resourceHandle); + void reads(ResourceHandle handle); - ResourceHandle readsAndWrites(ResourceHandle resourceHandle); + ResourceHandle readsAndWrites(ResourceHandle handle); - void requires(FramePass framePass); + void requires(FramePass pass); void disableCulling(); - void executes(Runnable runnable); + void executes(Runnable task); } diff --git a/com/mojang/blaze3d/opengl/AbstractUniform.java b/com/mojang/blaze3d/opengl/AbstractUniform.java new file mode 100644 index 00000000..2328e30c --- /dev/null +++ b/com/mojang/blaze3d/opengl/AbstractUniform.java @@ -0,0 +1,49 @@ +package com.mojang.blaze3d.opengl; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.joml.Matrix4f; +import org.joml.Vector3f; +import org.joml.Vector4f; + +@Environment(EnvType.CLIENT) +public class AbstractUniform { + public void set(float value) { + } + + public void set(float value1, float value2) { + } + + public void set(float value1, float value2, float value3) { + } + + public void set(float value1, float value2, float value3, float value4) { + } + + public void set(int value) { + } + + public void set(int value1, int value2) { + } + + public void set(int value1, int value2, int value3) { + } + + public void set(int value1, int value2, int value3, int value4) { + } + + public void set(float[] values) { + } + + public void set(int[] values) { + } + + public void set(Vector3f values) { + } + + public void set(Vector4f values) { + } + + public void set(Matrix4f values) { + } +} diff --git a/com/mojang/blaze3d/opengl/DirectStateAccess.java b/com/mojang/blaze3d/opengl/DirectStateAccess.java new file mode 100644 index 00000000..a9982e63 --- /dev/null +++ b/com/mojang/blaze3d/opengl/DirectStateAccess.java @@ -0,0 +1,84 @@ +package com.mojang.blaze3d.opengl; + +import java.util.Set; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.lwjgl.opengl.ARBDirectStateAccess; +import org.lwjgl.opengl.GLCapabilities; + +@Environment(EnvType.CLIENT) +public abstract class DirectStateAccess { + public static DirectStateAccess create(GLCapabilities capabilities, Set enabledExtensions) { + if (capabilities.GL_ARB_direct_state_access && GlDevice.USE_GL_ARB_direct_state_access) { + enabledExtensions.add("GL_ARB_direct_state_access"); + return new DirectStateAccess.Core(); + } else { + return new DirectStateAccess.Emulated(); + } + } + + abstract int createFrameBufferObject(); + + abstract void bindFrameBufferTextures(int frameBuffer, int colorTexture, int depthTexture, int level, int target); + + abstract void blitFrameBuffers( + int readFrameBuffer, int drawFrameBuffer, int srcX0, int srcY0, int srcX1, int srcY1, int destX0, int destY0, int destX1, int destY1, int mask, int filter + ); + + @Environment(EnvType.CLIENT) + static class Core extends DirectStateAccess { + @Override + public int createFrameBufferObject() { + return ARBDirectStateAccess.glCreateFramebuffers(); + } + + @Override + public void bindFrameBufferTextures(int frameBuffer, int colorTexture, int depthTexture, int level, int target) { + ARBDirectStateAccess.glNamedFramebufferTexture(frameBuffer, 36064, colorTexture, level); + ARBDirectStateAccess.glNamedFramebufferTexture(frameBuffer, 36096, depthTexture, level); + if (target != 0) { + GlStateManager._glBindFramebuffer(target, frameBuffer); + } + } + + @Override + public void blitFrameBuffers( + int readFrameBuffer, int drawFrameBuffer, int srcX0, int srcY0, int srcX1, int srcY1, int destX0, int destY0, int destX1, int destY1, int mask, int filter + ) { + ARBDirectStateAccess.glBlitNamedFramebuffer(readFrameBuffer, drawFrameBuffer, srcX0, srcY0, srcX1, srcY1, destX0, destY0, destX1, destY1, mask, filter); + } + } + + @Environment(EnvType.CLIENT) + static class Emulated extends DirectStateAccess { + @Override + public int createFrameBufferObject() { + return GlStateManager.glGenFramebuffers(); + } + + @Override + public void bindFrameBufferTextures(int frameBuffer, int colorTexture, int depthTexture, int level, int target) { + int i = target == 0 ? '販' : target; + int j = GlStateManager.getFrameBuffer(i); + GlStateManager._glBindFramebuffer(i, frameBuffer); + GlStateManager._glFramebufferTexture2D(i, 36064, 3553, colorTexture, level); + GlStateManager._glFramebufferTexture2D(i, 36096, 3553, depthTexture, level); + if (target == 0) { + GlStateManager._glBindFramebuffer(i, j); + } + } + + @Override + public void blitFrameBuffers( + int readFrameBuffer, int drawFrameBuffer, int srcX0, int srcY0, int srcX1, int srcY1, int destX0, int destY0, int destX1, int destY1, int mask, int filter + ) { + int i = GlStateManager.getFrameBuffer(36008); + int j = GlStateManager.getFrameBuffer(36009); + GlStateManager._glBindFramebuffer(36008, readFrameBuffer); + GlStateManager._glBindFramebuffer(36009, drawFrameBuffer); + GlStateManager._glBlitFrameBuffer(srcX0, srcY0, srcX1, srcY1, destX0, destY0, destX1, destY1, mask, filter); + GlStateManager._glBindFramebuffer(36008, i); + GlStateManager._glBindFramebuffer(36009, j); + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlBuffer.java b/com/mojang/blaze3d/opengl/GlBuffer.java new file mode 100644 index 00000000..9eb4c848 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlBuffer.java @@ -0,0 +1,79 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.jtracy.MemoryPool; +import com.mojang.jtracy.TracyClient; +import java.nio.ByteBuffer; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class GlBuffer extends GpuBuffer { + protected static final MemoryPool MEMORY_POOl = TracyClient.createMemoryPool("GPU Buffers"); + protected boolean closed; + protected boolean initialized = false; + @Nullable + protected final Supplier label; + protected final int handle; + + protected GlBuffer(GlDebugLabel debugLabel, @Nullable Supplier label, BufferType type, BufferUsage usage, int size, int handle) { + super(type, usage, size); + this.label = label; + this.handle = handle; + if (usage.isReadable()) { + GlStateManager._glBindBuffer(GlConst.toGl(type), handle); + GlStateManager._glBufferData(GlConst.toGl(type), size, GlConst.toGl(usage)); + MEMORY_POOl.malloc(handle, size); + this.initialized = true; + debugLabel.applyLabel(this); + } + } + + protected void ensureBufferExists() { + if (!this.initialized) { + GlStateManager._glBindBuffer(GlConst.toGl(this.type()), this.handle); + GlStateManager._glBindBuffer(GlConst.toGl(this.type()), 0); + } + } + + @Override + public boolean isClosed() { + return this.closed; + } + + @Override + public void close() { + if (!this.closed) { + this.closed = true; + GlStateManager._glDeleteBuffers(this.handle); + if (this.initialized) { + MEMORY_POOl.free(this.handle); + } + } + } + + @Environment(EnvType.CLIENT) + public static class ReadView implements GpuBuffer.ReadView { + private final int target; + private final ByteBuffer data; + + protected ReadView(int target, ByteBuffer data) { + this.target = target; + this.data = data; + } + + @Override + public ByteBuffer data() { + return this.data; + } + + @Override + public void close() { + GlStateManager._glUnmapBuffer(this.target); + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlCommandEncoder.java b/com/mojang/blaze3d/opengl/GlCommandEncoder.java new file mode 100644 index 00000000..e8c1ccd5 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlCommandEncoder.java @@ -0,0 +1,712 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.BlendFunction; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.platform.DepthTestFunction; +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.logging.LogUtils; +import it.unimi.dsi.fastutil.ints.IntList; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.Collection; +import java.util.OptionalDouble; +import java.util.OptionalInt; +import java.util.function.Consumer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ARGB; +import org.jetbrains.annotations.Nullable; +import org.lwjgl.opengl.GL11; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class GlCommandEncoder implements CommandEncoder { + private static final Logger LOGGER = LogUtils.getLogger(); + private final GlDevice device; + private final int readFbo; + private final int drawFbo; + @Nullable + private RenderPipeline lastPipeline; + private boolean inRenderPass; + @Nullable + private GlProgram lastProgram; + + protected GlCommandEncoder(GlDevice device) { + this.device = device; + this.readFbo = device.directStateAccess().createFrameBufferObject(); + this.drawFbo = device.directStateAccess().createFrameBufferObject(); + } + + @Override + public RenderPass createRenderPass(GpuTexture gpuTexture, OptionalInt optionalInt) { + return this.createRenderPass(gpuTexture, optionalInt, null, OptionalDouble.empty()); + } + + @Override + public RenderPass createRenderPass(GpuTexture gpuTexture, OptionalInt optionalInt, @Nullable GpuTexture gpuTexture2, OptionalDouble optionalDouble) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before creating a new one!"); + } else { + if (optionalDouble.isPresent() && gpuTexture2 == null) { + LOGGER.warn("Depth clear value was provided but no depth texture is being used"); + } + + if (gpuTexture.isClosed()) { + throw new IllegalStateException("Color texture is closed"); + } else if (gpuTexture2 != null && gpuTexture2.isClosed()) { + throw new IllegalStateException("Depth texture is closed"); + } else { + this.inRenderPass = true; + int i = ((GlTexture)gpuTexture).getFbo(this.device.directStateAccess(), gpuTexture2); + GlStateManager._glBindFramebuffer(36160, i); + int j = 0; + if (optionalInt.isPresent()) { + int k = optionalInt.getAsInt(); + GL11.glClearColor(ARGB.redFloat(k), ARGB.greenFloat(k), ARGB.blueFloat(k), ARGB.alphaFloat(k)); + j |= 16384; + } + + if (gpuTexture2 != null && optionalDouble.isPresent()) { + GL11.glClearDepth(optionalDouble.getAsDouble()); + j |= 256; + } + + if (j != 0) { + GlStateManager._disableScissorTest(); + GlStateManager._depthMask(true); + GlStateManager._colorMask(true, true, true, true); + GlStateManager._clear(j); + } + + GlStateManager._viewport(0, 0, gpuTexture.getWidth(0), gpuTexture.getHeight(0)); + this.lastPipeline = null; + return new GlRenderPass(this, gpuTexture2 != null); + } + } + } + + @Override + public void clearColorTexture(GpuTexture gpuTexture, int i) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before creating a new one!"); + } else if (!gpuTexture.getFormat().hasColorAspect()) { + throw new IllegalStateException("Trying to clear a non-color texture as color"); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Color texture is closed"); + } else { + this.device.directStateAccess().bindFrameBufferTextures(this.drawFbo, ((GlTexture)gpuTexture).id, 0, 0, 36160); + GL11.glClearColor(ARGB.redFloat(i), ARGB.greenFloat(i), ARGB.blueFloat(i), ARGB.alphaFloat(i)); + GlStateManager._disableScissorTest(); + GlStateManager._colorMask(true, true, true, true); + GlStateManager._clear(16384); + GlStateManager._glFramebufferTexture2D(36160, 36064, 3553, 0, 0); + GlStateManager._glBindFramebuffer(36160, 0); + } + } + + @Override + public void clearColorAndDepthTextures(GpuTexture gpuTexture, int i, GpuTexture gpuTexture2, double d) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before creating a new one!"); + } else if (!gpuTexture.getFormat().hasColorAspect()) { + throw new IllegalStateException("Trying to clear a non-color texture as color"); + } else if (!gpuTexture2.getFormat().hasDepthAspect()) { + throw new IllegalStateException("Trying to clear a non-depth texture as depth"); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Color texture is closed"); + } else if (gpuTexture2.isClosed()) { + throw new IllegalStateException("Depth texture is closed"); + } else { + int j = ((GlTexture)gpuTexture).getFbo(this.device.directStateAccess(), gpuTexture2); + GlStateManager._glBindFramebuffer(36160, j); + GlStateManager._disableScissorTest(); + GL11.glClearDepth(d); + GL11.glClearColor(ARGB.redFloat(i), ARGB.greenFloat(i), ARGB.blueFloat(i), ARGB.alphaFloat(i)); + GlStateManager._depthMask(true); + GlStateManager._colorMask(true, true, true, true); + GlStateManager._clear(16640); + GlStateManager._glBindFramebuffer(36160, 0); + } + } + + @Override + public void clearDepthTexture(GpuTexture gpuTexture, double d) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before creating a new one!"); + } else if (!gpuTexture.getFormat().hasDepthAspect()) { + throw new IllegalStateException("Trying to clear a non-depth texture as depth"); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Depth texture is closed"); + } else { + this.device.directStateAccess().bindFrameBufferTextures(this.drawFbo, 0, ((GlTexture)gpuTexture).id, 0, 36160); + GL11.glDrawBuffer(0); + GL11.glClearDepth(d); + GlStateManager._depthMask(true); + GlStateManager._disableScissorTest(); + GlStateManager._clear(256); + GL11.glDrawBuffer(36064); + GlStateManager._glFramebufferTexture2D(36160, 36096, 3553, 0, 0); + GlStateManager._glBindFramebuffer(36160, 0); + } + } + + @Override + public void writeToBuffer(GpuBuffer gpuBuffer, ByteBuffer byteBuffer, int i) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else { + GlBuffer glBuffer = (GlBuffer)gpuBuffer; + if (glBuffer.closed) { + throw new IllegalStateException("Buffer already closed"); + } else if (!glBuffer.usage().isWritable()) { + throw new IllegalStateException("Buffer is not writable"); + } else { + int j = byteBuffer.remaining(); + if (j + i > glBuffer.size) { + throw new IllegalArgumentException( + "Cannot write more data than this buffer can hold (attempting to write " + j + " bytes at offset " + i + " to " + glBuffer.size + " size buffer)" + ); + } else { + GlStateManager._glBindBuffer(GlConst.toGl(glBuffer.type()), glBuffer.handle); + if (glBuffer.initialized) { + GlStateManager._glBufferSubData(GlConst.toGl(glBuffer.type()), i, byteBuffer); + } else if (i == 0 && j == glBuffer.size) { + GlStateManager._glBufferData(GlConst.toGl(glBuffer.type()), byteBuffer, GlConst.toGl(glBuffer.usage())); + GlBuffer.MEMORY_POOl.malloc(glBuffer.handle, glBuffer.size); + glBuffer.initialized = true; + this.device.debugLabels().applyLabel(glBuffer); + } else { + GlStateManager._glBufferData(GlConst.toGl(glBuffer.type()), glBuffer.size, GlConst.toGl(glBuffer.usage())); + GlStateManager._glBufferSubData(GlConst.toGl(glBuffer.type()), i, byteBuffer); + GlBuffer.MEMORY_POOl.malloc(glBuffer.handle, glBuffer.size); + glBuffer.initialized = true; + this.device.debugLabels().applyLabel(glBuffer); + } + } + } + } + } + + @Override + public GpuBuffer.ReadView readBuffer(GpuBuffer gpuBuffer) { + return this.readBuffer(gpuBuffer, 0, gpuBuffer.size()); + } + + @Override + public GpuBuffer.ReadView readBuffer(GpuBuffer gpuBuffer, int i, int j) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else { + GlBuffer glBuffer = (GlBuffer)gpuBuffer; + if (glBuffer.closed) { + throw new IllegalStateException("Buffer already closed"); + } else if (!glBuffer.usage().isReadable()) { + throw new IllegalStateException("Buffer is not readable"); + } else if (i + j > glBuffer.size) { + throw new IllegalArgumentException( + "Cannot read more data than this buffer can hold (attempting to read " + j + " bytes at offset " + i + " from " + glBuffer.size + " size buffer)" + ); + } else { + GlStateManager.clearGlErrors(); + GlStateManager._glBindBuffer(GlConst.toGl(glBuffer.type()), glBuffer.handle); + ByteBuffer byteBuffer = GlStateManager._glMapBufferRange(GlConst.toGl(glBuffer.type()), i, j, 1); + if (byteBuffer == null) { + throw new IllegalStateException("Can't read buffer, opengl error " + GlStateManager._getError()); + } else { + return new GlBuffer.ReadView(GlConst.toGl(glBuffer.type()), byteBuffer); + } + } + } + } + + @Override + public void writeToTexture(GpuTexture gpuTexture, NativeImage nativeImage) { + int i = gpuTexture.getWidth(0); + int j = gpuTexture.getHeight(0); + if (nativeImage.getWidth() != i || nativeImage.getHeight() != j) { + throw new IllegalArgumentException( + "Cannot replace texture of size " + i + "x" + j + " with image of size " + nativeImage.getWidth() + "x" + nativeImage.getHeight() + ); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Destination texture is closed"); + } else { + this.writeToTexture(gpuTexture, nativeImage, 0, 0, 0, i, j, 0, 0); + } + } + + @Override + public void writeToTexture(GpuTexture gpuTexture, NativeImage nativeImage, int i, int j, int k, int l, int m, int n, int o) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else if (i >= 0 && i < gpuTexture.getMipLevels()) { + if (n + l > nativeImage.getWidth() || o + m > nativeImage.getHeight()) { + throw new IllegalArgumentException( + "Copy source (" + + nativeImage.getWidth() + + "x" + + nativeImage.getHeight() + + ") is not large enough to read a rectangle of " + + l + + "x" + + m + + " from " + + n + + "x" + + o + ); + } else if (j + l > gpuTexture.getWidth(i) || k + m > gpuTexture.getHeight(i)) { + throw new IllegalArgumentException( + "Dest texture (" + l + "x" + m + ") is not large enough to write a rectangle of " + l + "x" + m + " at " + j + "x" + k + " (at mip level " + i + ")" + ); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Destination texture is closed"); + } else { + GlStateManager._bindTexture(((GlTexture)gpuTexture).id); + GlStateManager._pixelStore(3314, nativeImage.getWidth()); + GlStateManager._pixelStore(3316, n); + GlStateManager._pixelStore(3315, o); + GlStateManager._pixelStore(3317, nativeImage.format().components()); + GlStateManager._texSubImage2D(3553, i, j, k, l, m, GlConst.toGl(nativeImage.format()), 5121, nativeImage.getPointer()); + } + } else { + throw new IllegalArgumentException("Invalid mipLevel " + i + ", must be >= 0 and < " + gpuTexture.getMipLevels()); + } + } + + @Override + public void writeToTexture(GpuTexture gpuTexture, IntBuffer intBuffer, NativeImage.Format format, int i, int j, int k, int l, int m) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else if (i >= 0 && i < gpuTexture.getMipLevels()) { + if (l * m > intBuffer.remaining()) { + throw new IllegalArgumentException( + "Copy would overrun the source buffer (remaining length of " + intBuffer.remaining() + ", but copy is " + l + "x" + m + ")" + ); + } else if (j + l > gpuTexture.getWidth(i) || k + m > gpuTexture.getHeight(i)) { + throw new IllegalArgumentException( + "Dest texture (" + + gpuTexture.getWidth(i) + + "x" + + gpuTexture.getHeight(i) + + ") is not large enough to write a rectangle of " + + l + + "x" + + m + + " at " + + j + + "x" + + k + ); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Destination texture is closed"); + } else { + GlStateManager._bindTexture(((GlTexture)gpuTexture).id); + GlStateManager._pixelStore(3314, l); + GlStateManager._pixelStore(3316, 0); + GlStateManager._pixelStore(3315, 0); + GlStateManager._pixelStore(3317, format.components()); + GlStateManager._texSubImage2D(3553, i, j, k, l, m, GlConst.toGl(format), 5121, intBuffer); + } + } else { + throw new IllegalArgumentException("Invalid mipLevel, must be >= 0 and < " + gpuTexture.getMipLevels()); + } + } + + @Override + public void copyTextureToBuffer(GpuTexture gpuTexture, GpuBuffer gpuBuffer, int i, Runnable runnable, int j) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else { + this.copyTextureToBuffer(gpuTexture, gpuBuffer, i, runnable, j, 0, 0, gpuTexture.getWidth(j), gpuTexture.getHeight(j)); + } + } + + @Override + public void copyTextureToBuffer(GpuTexture gpuTexture, GpuBuffer gpuBuffer, int i, Runnable runnable, int j, int k, int l, int m, int n) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else if (j >= 0 && j < gpuTexture.getMipLevels()) { + if (gpuTexture.getWidth(j) * gpuTexture.getHeight(j) * gpuTexture.getFormat().pixelSize() + i > gpuBuffer.size()) { + throw new IllegalArgumentException( + "Buffer of size " + + gpuBuffer.size() + + " is not large enough to hold " + + m + + "x" + + n + + " pixels (" + + gpuTexture.getFormat().pixelSize() + + " bytes each) starting from offset " + + i + ); + } else if (gpuBuffer.type() != BufferType.PIXEL_PACK) { + throw new IllegalArgumentException("Buffer of type " + gpuBuffer.type() + " cannot be used to retrieve a texture"); + } else if (k + m > gpuTexture.getWidth(j) || l + n > gpuTexture.getHeight(j)) { + throw new IllegalArgumentException( + "Copy source texture (" + + gpuTexture.getWidth(j) + + "x" + + gpuTexture.getHeight(j) + + ") is not large enough to read a rectangle of " + + m + + "x" + + n + + " from " + + k + + "," + + l + ); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Source texture is closed"); + } else if (gpuBuffer.isClosed()) { + throw new IllegalStateException("Destination buffer is closed"); + } else { + GlStateManager.clearGlErrors(); + this.device.directStateAccess().bindFrameBufferTextures(this.readFbo, ((GlTexture)gpuTexture).glId(), 0, j, 36008); + GlStateManager._glBindBuffer(GlConst.toGl(gpuBuffer.type()), ((GlBuffer)gpuBuffer).handle); + GlStateManager._pixelStore(3330, m); + GlStateManager._readPixels(k, l, m, n, GlConst.toGlExternalId(gpuTexture.getFormat()), GlConst.toGlType(gpuTexture.getFormat()), i); + RenderSystem.queueFencedTask(runnable); + GlStateManager._glFramebufferTexture2D(36008, 36064, 3553, 0, j); + GlStateManager._glBindFramebuffer(36008, 0); + GlStateManager._glBindBuffer(GlConst.toGl(gpuBuffer.type()), 0); + int o = GlStateManager._getError(); + if (o != 0) { + throw new IllegalStateException("Couldn't perform copyTobuffer for texture " + gpuTexture.getLabel() + ": GL error " + o); + } + } + } else { + throw new IllegalArgumentException("Invalid mipLevel " + j + ", must be >= 0 and < " + gpuTexture.getMipLevels()); + } + } + + @Override + public void copyTextureToTexture(GpuTexture gpuTexture, GpuTexture gpuTexture2, int i, int j, int k, int l, int m, int n, int o) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else if (i >= 0 && i < gpuTexture.getMipLevels() && i < gpuTexture2.getMipLevels()) { + if (j + n > gpuTexture2.getWidth(i) || k + o > gpuTexture2.getHeight(i)) { + throw new IllegalArgumentException( + "Dest texture (" + + gpuTexture2.getWidth(i) + + "x" + + gpuTexture2.getHeight(i) + + ") is not large enough to write a rectangle of " + + n + + "x" + + o + + " at " + + j + + "x" + + k + ); + } else if (l + n > gpuTexture.getWidth(i) || m + o > gpuTexture.getHeight(i)) { + throw new IllegalArgumentException( + "Source texture (" + + gpuTexture.getWidth(i) + + "x" + + gpuTexture.getHeight(i) + + ") is not large enough to read a rectangle of " + + n + + "x" + + o + + " at " + + l + + "x" + + m + ); + } else if (gpuTexture.isClosed()) { + throw new IllegalStateException("Source texture is closed"); + } else if (gpuTexture2.isClosed()) { + throw new IllegalStateException("Destination texture is closed"); + } else { + GlStateManager.clearGlErrors(); + GlStateManager._disableScissorTest(); + boolean bl = gpuTexture.getFormat().hasDepthAspect(); + int p = ((GlTexture)gpuTexture).glId(); + int q = ((GlTexture)gpuTexture2).glId(); + this.device.directStateAccess().bindFrameBufferTextures(this.readFbo, bl ? 0 : p, bl ? p : 0, 0, 0); + this.device.directStateAccess().bindFrameBufferTextures(this.drawFbo, bl ? 0 : q, bl ? q : 0, 0, 0); + this.device.directStateAccess().blitFrameBuffers(this.readFbo, this.drawFbo, l, m, n, o, j, k, n, o, bl ? 256 : 16384, 9728); + int r = GlStateManager._getError(); + if (r != 0) { + throw new IllegalStateException( + "Couldn't perform copyToTexture for texture " + gpuTexture.getLabel() + " to " + gpuTexture2.getLabel() + ": GL error " + r + ); + } + } + } else { + throw new IllegalArgumentException("Invalid mipLevel " + i + ", must be >= 0 and < " + gpuTexture.getMipLevels() + " and < " + gpuTexture2.getMipLevels()); + } + } + + @Override + public void presentTexture(GpuTexture gpuTexture) { + if (this.inRenderPass) { + throw new IllegalStateException("Close the existing render pass before performing additional commands"); + } else if (!gpuTexture.getFormat().hasColorAspect()) { + throw new IllegalStateException("Cannot present a non-color texture!"); + } else { + GlStateManager._disableScissorTest(); + GlStateManager._viewport(0, 0, gpuTexture.getWidth(0), gpuTexture.getHeight(0)); + GlStateManager._depthMask(true); + GlStateManager._colorMask(true, true, true, true); + this.device.directStateAccess().bindFrameBufferTextures(this.drawFbo, ((GlTexture)gpuTexture).glId(), 0, 0, 0); + this.device + .directStateAccess() + .blitFrameBuffers( + this.drawFbo, 0, 0, 0, gpuTexture.getWidth(0), gpuTexture.getHeight(0), 0, 0, gpuTexture.getWidth(0), gpuTexture.getHeight(0), 16384, 9728 + ); + } + } + + protected void executeDrawMultiple( + GlRenderPass renderPass, Collection draws, @Nullable GpuBuffer buffer, @Nullable VertexFormat.IndexType indexType + ) { + if (this.trySetup(renderPass)) { + if (indexType == null) { + indexType = VertexFormat.IndexType.SHORT; + } + + for (RenderPass.Draw draw : draws) { + VertexFormat.IndexType indexType2 = draw.indexType() == null ? indexType : draw.indexType(); + renderPass.setIndexBuffer(draw.indexBuffer() == null ? buffer : draw.indexBuffer(), indexType2); + renderPass.setVertexBuffer(draw.slot(), draw.vertexBuffer()); + if (GlRenderPass.VALIDATION) { + if (renderPass.indexBuffer == null) { + throw new IllegalStateException("Missing index buffer"); + } + + if (renderPass.indexBuffer.isClosed()) { + throw new IllegalStateException("Index buffer has been closed!"); + } + + if (renderPass.vertexBuffers[0] == null) { + throw new IllegalStateException("Missing vertex buffer at slot 0"); + } + + if (renderPass.vertexBuffers[0].isClosed()) { + throw new IllegalStateException("Vertex buffer at slot 0 has been closed!"); + } + } + + Consumer consumer = draw.uniformUploaderConsumer(); + if (consumer != null) { + consumer.accept((RenderPass.UniformUploader)(string, fs) -> { + Uniform uniform = renderPass.pipeline.program().getUniform(string); + if (uniform != null) { + uniform.set(fs); + uniform.upload(); + } + }); + } + + this.drawFromBuffers(renderPass, draw.firstIndex(), draw.indexCount(), indexType2, renderPass.pipeline); + } + } + } + + protected void executeDraw(GlRenderPass renderPass, int firstIndex, int indexCount, @Nullable VertexFormat.IndexType indexType) { + if (this.trySetup(renderPass)) { + if (GlRenderPass.VALIDATION) { + if (indexType != null) { + if (renderPass.indexBuffer == null) { + throw new IllegalStateException("Missing index buffer"); + } + + if (renderPass.indexBuffer.isClosed()) { + throw new IllegalStateException("Index buffer has been closed!"); + } + } + + if (renderPass.vertexBuffers[0] == null) { + throw new IllegalStateException("Missing vertex buffer at slot 0"); + } + + if (renderPass.vertexBuffers[0].isClosed()) { + throw new IllegalStateException("Vertex buffer at slot 0 has been closed!"); + } + } + + this.drawFromBuffers(renderPass, firstIndex, indexCount, indexType, renderPass.pipeline); + } + } + + private void drawFromBuffers(GlRenderPass renderPass, int firstIndex, int indexCount, @Nullable VertexFormat.IndexType indexType, GlRenderPipeline pipeline) { + this.device.vertexArrayCache().bindVertexArray(pipeline.info().getVertexFormat(), (GlBuffer)renderPass.vertexBuffers[0]); + if (indexType != null) { + GlStateManager._glBindBuffer(34963, ((GlBuffer)renderPass.indexBuffer).handle); + GlStateManager._drawElements(GlConst.toGl(pipeline.info().getVertexFormatMode()), indexCount, GlConst.toGl(indexType), (long)firstIndex * indexType.bytes); + } else { + GlStateManager._drawArrays(GlConst.toGl(pipeline.info().getVertexFormatMode()), firstIndex, indexCount); + } + } + + private boolean trySetup(GlRenderPass renderPass) { + if (GlRenderPass.VALIDATION) { + if (renderPass.pipeline == null) { + throw new IllegalStateException("Can't draw without a render pipeline"); + } + + if (renderPass.pipeline.program() == GlProgram.INVALID_PROGRAM) { + throw new IllegalStateException("Pipeline contains invalid shader program"); + } + + for (RenderPipeline.UniformDescription uniformDescription : renderPass.pipeline.info().getUniforms()) { + Object object = renderPass.uniforms.get(uniformDescription.name()); + if (object == null && !GlProgram.BUILT_IN_UNIFORMS.contains(uniformDescription.name())) { + throw new IllegalStateException("Missing uniform " + uniformDescription.name() + " (should be " + uniformDescription.type() + ")"); + } + } + + for (String string : renderPass.pipeline.program().getSamplers()) { + if (!renderPass.samplers.containsKey(string)) { + throw new IllegalStateException("Missing sampler " + string); + } + + if (((GpuTexture)renderPass.samplers.get(string)).isClosed()) { + throw new IllegalStateException("Sampler " + string + " has been closed!"); + } + } + + if (renderPass.pipeline.info().wantsDepthTexture() && !renderPass.hasDepthTexture()) { + LOGGER.warn("Render pipeline {} wants a depth texture but none was provided - this is probably a bug", renderPass.pipeline.info().getLocation()); + } + } else if (renderPass.pipeline == null || renderPass.pipeline.program() == GlProgram.INVALID_PROGRAM) { + return false; + } + + RenderPipeline renderPipeline = renderPass.pipeline.info(); + GlProgram glProgram = renderPass.pipeline.program(); + + for (Uniform uniform : glProgram.getUniforms()) { + if (renderPass.dirtyUniforms.contains(uniform.getName())) { + Object object2 = renderPass.uniforms.get(uniform.getName()); + if (object2 instanceof int[]) { + glProgram.safeGetUniform(uniform.getName()).set((int[])object2); + } else if (object2 instanceof float[]) { + glProgram.safeGetUniform(uniform.getName()).set((float[])object2); + } else if (object2 != null) { + throw new IllegalStateException("Unknown uniform type - expected " + uniform.getType() + ", found " + object2); + } + } + } + + renderPass.dirtyUniforms.clear(); + this.applyPipelineState(renderPipeline); + boolean bl = this.lastProgram != glProgram; + if (bl) { + GlStateManager._glUseProgram(glProgram.getProgramId()); + this.lastProgram = glProgram; + } + + IntList intList = glProgram.getSamplerLocations(); + + for (int i = 0; i < glProgram.getSamplers().size(); i++) { + String string2 = (String)glProgram.getSamplers().get(i); + GlTexture glTexture = (GlTexture)renderPass.samplers.get(string2); + if (glTexture != null) { + if (bl || renderPass.dirtySamplers.contains(string2)) { + int j = intList.getInt(i); + Uniform.uploadInteger(j, i); + GlStateManager._activeTexture(33984 + i); + } + + GlStateManager._bindTexture(glTexture.glId()); + glTexture.flushModeChanges(); + } + } + + Window window = Minecraft.getInstance() == null ? null : Minecraft.getInstance().getWindow(); + glProgram.setDefaultUniforms( + renderPipeline.getVertexFormatMode(), + RenderSystem.getModelViewMatrix(), + RenderSystem.getProjectionMatrix(), + window == null ? 0.0F : window.getWidth(), + window == null ? 0.0F : window.getHeight() + ); + + for (Uniform uniform2 : glProgram.getUniforms()) { + uniform2.upload(); + } + + if (renderPass.scissorState.isEnabled()) { + GlStateManager._enableScissorTest(); + GlStateManager._scissorBox( + renderPass.scissorState.getX(), renderPass.scissorState.getY(), renderPass.scissorState.getWidth(), renderPass.scissorState.getHeight() + ); + } else { + GlStateManager._disableScissorTest(); + } + + return true; + } + + private void applyPipelineState(RenderPipeline pipeline) { + if (this.lastPipeline != pipeline) { + this.lastPipeline = pipeline; + if (pipeline.getDepthTestFunction() != DepthTestFunction.NO_DEPTH_TEST) { + GlStateManager._enableDepthTest(); + GlStateManager._depthFunc(GlConst.toGl(pipeline.getDepthTestFunction())); + } else { + GlStateManager._disableDepthTest(); + } + + if (pipeline.isCull()) { + GlStateManager._enableCull(); + } else { + GlStateManager._disableCull(); + } + + if (pipeline.getBlendFunction().isPresent()) { + GlStateManager._enableBlend(); + BlendFunction blendFunction = (BlendFunction)pipeline.getBlendFunction().get(); + GlStateManager._blendFuncSeparate( + GlConst.toGl(blendFunction.sourceColor()), + GlConst.toGl(blendFunction.destColor()), + GlConst.toGl(blendFunction.sourceAlpha()), + GlConst.toGl(blendFunction.destAlpha()) + ); + } else { + GlStateManager._disableBlend(); + } + + GlStateManager._polygonMode(1032, GlConst.toGl(pipeline.getPolygonMode())); + GlStateManager._depthMask(pipeline.isWriteDepth()); + GlStateManager._colorMask(pipeline.isWriteColor(), pipeline.isWriteColor(), pipeline.isWriteColor(), pipeline.isWriteAlpha()); + if (pipeline.getDepthBiasConstant() == 0.0F && pipeline.getDepthBiasScaleFactor() == 0.0F) { + GlStateManager._disablePolygonOffset(); + } else { + GlStateManager._polygonOffset(pipeline.getDepthBiasScaleFactor(), pipeline.getDepthBiasConstant()); + GlStateManager._enablePolygonOffset(); + } + + switch (pipeline.getColorLogic()) { + case NONE: + GlStateManager._disableColorLogicOp(); + break; + case OR_REVERSE: + GlStateManager._enableColorLogicOp(); + GlStateManager._logicOp(5387); + } + } + } + + public void finishRenderPass() { + this.inRenderPass = false; + GlStateManager._glBindFramebuffer(36160, 0); + } + + protected GlDevice getDevice() { + return this.device; + } +} diff --git a/com/mojang/blaze3d/opengl/GlConst.java b/com/mojang/blaze3d/opengl/GlConst.java new file mode 100644 index 00000000..9b49f085 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlConst.java @@ -0,0 +1,303 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.platform.DepthTestFunction; +import com.mojang.blaze3d.platform.DestFactor; +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.platform.PolygonMode; +import com.mojang.blaze3d.platform.SourceFactor; +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.textures.AddressMode; +import com.mojang.blaze3d.textures.TextureFormat; +import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.blaze3d.vertex.VertexFormatElement; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public class GlConst { + public static final int GL_READ_FRAMEBUFFER = 36008; + public static final int GL_DRAW_FRAMEBUFFER = 36009; + public static final int GL_TRUE = 1; + public static final int GL_FALSE = 0; + public static final int GL_NONE = 0; + public static final int GL_LINES = 1; + public static final int GL_LINE_STRIP = 3; + public static final int GL_TRIANGLE_STRIP = 5; + public static final int GL_TRIANGLE_FAN = 6; + public static final int GL_TRIANGLES = 4; + public static final int GL_WRITE_ONLY = 35001; + public static final int GL_READ_ONLY = 35000; + public static final int GL_MAP_READ_BIT = 1; + public static final int GL_EQUAL = 514; + public static final int GL_LEQUAL = 515; + public static final int GL_LESS = 513; + public static final int GL_GREATER = 516; + public static final int GL_GEQUAL = 518; + public static final int GL_ALWAYS = 519; + public static final int GL_TEXTURE_MAG_FILTER = 10240; + public static final int GL_TEXTURE_MIN_FILTER = 10241; + public static final int GL_TEXTURE_WRAP_S = 10242; + public static final int GL_TEXTURE_WRAP_T = 10243; + public static final int GL_NEAREST = 9728; + public static final int GL_LINEAR = 9729; + public static final int GL_NEAREST_MIPMAP_LINEAR = 9986; + public static final int GL_LINEAR_MIPMAP_LINEAR = 9987; + public static final int GL_CLAMP_TO_EDGE = 33071; + public static final int GL_REPEAT = 10497; + public static final int GL_FRONT = 1028; + public static final int GL_FRONT_AND_BACK = 1032; + public static final int GL_LINE = 6913; + public static final int GL_FILL = 6914; + public static final int GL_BYTE = 5120; + public static final int GL_UNSIGNED_BYTE = 5121; + public static final int GL_SHORT = 5122; + public static final int GL_UNSIGNED_SHORT = 5123; + public static final int GL_INT = 5124; + public static final int GL_UNSIGNED_INT = 5125; + public static final int GL_FLOAT = 5126; + public static final int GL_ZERO = 0; + public static final int GL_ONE = 1; + public static final int GL_SRC_COLOR = 768; + public static final int GL_ONE_MINUS_SRC_COLOR = 769; + public static final int GL_SRC_ALPHA = 770; + public static final int GL_ONE_MINUS_SRC_ALPHA = 771; + public static final int GL_DST_ALPHA = 772; + public static final int GL_ONE_MINUS_DST_ALPHA = 773; + public static final int GL_DST_COLOR = 774; + public static final int GL_ONE_MINUS_DST_COLOR = 775; + public static final int GL_REPLACE = 7681; + public static final int GL_DEPTH_BUFFER_BIT = 256; + public static final int GL_COLOR_BUFFER_BIT = 16384; + public static final int GL_RGBA8 = 32856; + public static final int GL_PROXY_TEXTURE_2D = 32868; + public static final int GL_RGBA = 6408; + public static final int GL_TEXTURE_WIDTH = 4096; + public static final int GL_BGR = 32992; + public static final int GL_FUNC_ADD = 32774; + public static final int GL_MIN = 32775; + public static final int GL_MAX = 32776; + public static final int GL_FUNC_SUBTRACT = 32778; + public static final int GL_FUNC_REVERSE_SUBTRACT = 32779; + public static final int GL_DEPTH_COMPONENT24 = 33190; + public static final int GL_STATIC_DRAW = 35044; + public static final int GL_DYNAMIC_DRAW = 35048; + public static final int GL_STREAM_DRAW = 35040; + public static final int GL_STATIC_READ = 35045; + public static final int GL_DYNAMIC_READ = 35049; + public static final int GL_STREAM_READ = 35041; + public static final int GL_STATIC_COPY = 35046; + public static final int GL_DYNAMIC_COPY = 35050; + public static final int GL_STREAM_COPY = 35042; + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 37143; + public static final int GL_TIMEOUT_EXPIRED = 37147; + public static final int GL_WAIT_FAILED = 37149; + public static final int GL_UNPACK_SWAP_BYTES = 3312; + public static final int GL_UNPACK_LSB_FIRST = 3313; + public static final int GL_UNPACK_ROW_LENGTH = 3314; + public static final int GL_UNPACK_SKIP_ROWS = 3315; + public static final int GL_UNPACK_SKIP_PIXELS = 3316; + public static final int GL_UNPACK_ALIGNMENT = 3317; + public static final int GL_PACK_ALIGNMENT = 3333; + public static final int GL_PACK_ROW_LENGTH = 3330; + public static final int GL_MAX_TEXTURE_SIZE = 3379; + public static final int GL_TEXTURE_2D = 3553; + public static final int GL_DEPTH_COMPONENT = 6402; + public static final int GL_DEPTH_COMPONENT32 = 33191; + public static final int GL_FRAMEBUFFER = 36160; + public static final int GL_RENDERBUFFER = 36161; + public static final int GL_COLOR_ATTACHMENT0 = 36064; + public static final int GL_DEPTH_ATTACHMENT = 36096; + public static final int GL_FRAMEBUFFER_COMPLETE = 36053; + public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054; + public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055; + public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 36059; + public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 36060; + public static final int GL_FRAMEBUFFER_UNSUPPORTED = 36061; + public static final int GL_LINK_STATUS = 35714; + public static final int GL_COMPILE_STATUS = 35713; + public static final int GL_VERTEX_SHADER = 35633; + public static final int GL_FRAGMENT_SHADER = 35632; + public static final int GL_TEXTURE0 = 33984; + public static final int GL_TEXTURE1 = 33985; + public static final int GL_TEXTURE2 = 33986; + public static final int GL_DEPTH_TEXTURE_MODE = 34891; + public static final int GL_TEXTURE_COMPARE_MODE = 34892; + public static final int GL_ARRAY_BUFFER = 34962; + public static final int GL_ELEMENT_ARRAY_BUFFER = 34963; + public static final int GL_PIXEL_PACK_BUFFER = 35051; + public static final int GL_COPY_READ_BUFFER = 36662; + public static final int GL_COPY_WRITE_BUFFER = 36663; + public static final int GL_PIXEL_UNPACK_BUFFER = 35052; + public static final int GL_UNIFORM_BUFFER = 35345; + public static final int GL_ALPHA_BIAS = 3357; + public static final int GL_RGB = 6407; + public static final int GL_RG = 33319; + public static final int GL_R8 = 33321; + public static final int GL_RED = 6403; + public static final int GL_OUT_OF_MEMORY = 1285; + + public static int toGl(DepthTestFunction depthTestFunction) { + return switch (depthTestFunction) { + case NO_DEPTH_TEST -> 519; + case EQUAL_DEPTH_TEST -> 514; + case LESS_DEPTH_TEST -> 513; + case GREATER_DEPTH_TEST -> 516; + default -> 515; + }; + } + + public static int toGl(PolygonMode polygonMode) { + return switch (polygonMode) { + case WIREFRAME -> 6913; + default -> 6914; + }; + } + + public static int toGl(DestFactor destFactor) { + return switch (destFactor) { + case CONSTANT_ALPHA -> 32771; + case CONSTANT_COLOR -> 32769; + case DST_ALPHA -> 772; + case DST_COLOR -> 774; + case ONE -> 1; + case ONE_MINUS_CONSTANT_ALPHA -> 32772; + case ONE_MINUS_CONSTANT_COLOR -> 32770; + case ONE_MINUS_DST_ALPHA -> 773; + case ONE_MINUS_DST_COLOR -> 775; + case ONE_MINUS_SRC_ALPHA -> 771; + case ONE_MINUS_SRC_COLOR -> 769; + case SRC_ALPHA -> 770; + case SRC_COLOR -> 768; + case ZERO -> 0; + }; + } + + public static int toGl(SourceFactor sourceFactor) { + return switch (sourceFactor) { + case CONSTANT_ALPHA -> 32771; + case CONSTANT_COLOR -> 32769; + case DST_ALPHA -> 772; + case DST_COLOR -> 774; + case ONE -> 1; + case ONE_MINUS_CONSTANT_ALPHA -> 32772; + case ONE_MINUS_CONSTANT_COLOR -> 32770; + case ONE_MINUS_DST_ALPHA -> 773; + case ONE_MINUS_DST_COLOR -> 775; + case ONE_MINUS_SRC_ALPHA -> 771; + case ONE_MINUS_SRC_COLOR -> 769; + case SRC_ALPHA -> 770; + case SRC_ALPHA_SATURATE -> 776; + case SRC_COLOR -> 768; + case ZERO -> 0; + }; + } + + public static int toGl(BufferType bufferType) { + return switch (bufferType) { + case VERTICES -> 34962; + case INDICES -> 34963; + case PIXEL_PACK -> 35051; + case COPY_READ -> 36662; + case COPY_WRITE -> 36663; + case PIXEL_UNPACK -> 35052; + case UNIFORM -> 35345; + }; + } + + public static int toGl(VertexFormat.Mode mode) { + return switch (mode) { + case LINES -> 4; + case LINE_STRIP -> 5; + case DEBUG_LINES -> 1; + case DEBUG_LINE_STRIP -> 3; + case TRIANGLES -> 4; + case TRIANGLE_STRIP -> 5; + case TRIANGLE_FAN -> 6; + case QUADS -> 4; + }; + } + + public static int toGl(VertexFormat.IndexType indexType) { + return switch (indexType) { + case SHORT -> 5123; + case INT -> 5125; + }; + } + + public static int toGl(NativeImage.Format format) { + return switch (format) { + case RGBA -> 6408; + case RGB -> 6407; + case LUMINANCE_ALPHA -> 33319; + case LUMINANCE -> 6403; + }; + } + + public static int toGl(BufferUsage bufferUsage) { + return switch (bufferUsage) { + case DYNAMIC_WRITE -> 35048; + case STATIC_WRITE -> 35044; + case STREAM_WRITE -> 35040; + case STATIC_READ -> 35045; + case DYNAMIC_READ -> 35049; + case STREAM_READ -> 35041; + case DYNAMIC_COPY -> 35050; + case STATIC_COPY -> 35046; + case STREAM_COPY -> 35042; + }; + } + + public static int toGl(AddressMode addressMode) { + return switch (addressMode) { + case REPEAT -> 10497; + case CLAMP_TO_EDGE -> 33071; + }; + } + + public static int toGl(VertexFormatElement.Type type) { + return switch (type) { + case FLOAT -> 5126; + case UBYTE -> 5121; + case BYTE -> 5120; + case USHORT -> 5123; + case SHORT -> 5122; + case UINT -> 5125; + case INT -> 5124; + }; + } + + public static int toGlInternalId(TextureFormat textureFormat) { + return switch (textureFormat) { + case RGBA8 -> 32856; + case RED8 -> 33321; + case DEPTH32 -> 33191; + }; + } + + public static int toGlExternalId(TextureFormat textureFormat) { + return switch (textureFormat) { + case RGBA8 -> 6408; + case RED8 -> 6403; + case DEPTH32 -> 6402; + }; + } + + public static int toGlType(TextureFormat textureFormat) { + return switch (textureFormat) { + case RGBA8 -> 5121; + case RED8 -> 5121; + case DEPTH32 -> 5126; + }; + } + + public static int toGl(ShaderType shaderType) { + return switch (shaderType) { + case VERTEX -> 35633; + case FRAGMENT -> 35632; + }; + } +} diff --git a/com/mojang/blaze3d/opengl/GlDebug.java b/com/mojang/blaze3d/opengl/GlDebug.java new file mode 100644 index 00000000..89392c74 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlDebug.java @@ -0,0 +1,198 @@ +package com.mojang.blaze3d.opengl; + +import com.google.common.collect.EvictingQueue; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import com.mojang.blaze3d.platform.DebugMemoryUntracker; +import com.mojang.blaze3d.platform.GLX; +import com.mojang.logging.LogUtils; +import java.util.List; +import java.util.Queue; +import java.util.Set; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; +import org.lwjgl.opengl.ARBDebugOutput; +import org.lwjgl.opengl.GL; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GLCapabilities; +import org.lwjgl.opengl.GLDebugMessageARBCallback; +import org.lwjgl.opengl.GLDebugMessageCallback; +import org.lwjgl.opengl.KHRDebug; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class GlDebug { + private static final Logger LOGGER = LogUtils.getLogger(); + private static final int CIRCULAR_LOG_SIZE = 10; + private final Queue MESSAGE_BUFFER = EvictingQueue.create(10); + @Nullable + private volatile GlDebug.LogEntry lastEntry; + private static final List DEBUG_LEVELS = ImmutableList.of(37190, 37191, 37192, 33387); + private static final List DEBUG_LEVELS_ARB = ImmutableList.of(37190, 37191, 37192); + + private static String printUnknownToken(int token) { + return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; + } + + public static String sourceToString(int source) { + switch (source) { + case 33350: + return "API"; + case 33351: + return "WINDOW SYSTEM"; + case 33352: + return "SHADER COMPILER"; + case 33353: + return "THIRD PARTY"; + case 33354: + return "APPLICATION"; + case 33355: + return "OTHER"; + default: + return printUnknownToken(source); + } + } + + public static String typeToString(int type) { + switch (type) { + case 33356: + return "ERROR"; + case 33357: + return "DEPRECATED BEHAVIOR"; + case 33358: + return "UNDEFINED BEHAVIOR"; + case 33359: + return "PORTABILITY"; + case 33360: + return "PERFORMANCE"; + case 33361: + return "OTHER"; + case 33384: + return "MARKER"; + default: + return printUnknownToken(type); + } + } + + public static String severityToString(int type) { + switch (type) { + case 33387: + return "NOTIFICATION"; + case 37190: + return "HIGH"; + case 37191: + return "MEDIUM"; + case 37192: + return "LOW"; + default: + return printUnknownToken(type); + } + } + + private void printDebugLog(int source, int type, int id, int severity, int length, long message, long userProgram) { + String string = GLDebugMessageCallback.getMessage(length, message); + GlDebug.LogEntry logEntry; + synchronized (this.MESSAGE_BUFFER) { + logEntry = this.lastEntry; + if (logEntry != null && logEntry.isSame(source, type, id, severity, string)) { + logEntry.count++; + } else { + logEntry = new GlDebug.LogEntry(source, type, id, severity, string); + this.MESSAGE_BUFFER.add(logEntry); + this.lastEntry = logEntry; + } + } + + LOGGER.info("OpenGL debug message: {}", logEntry); + } + + public List getLastOpenGlDebugMessages() { + synchronized (this.MESSAGE_BUFFER) { + List list = Lists.newArrayListWithCapacity(this.MESSAGE_BUFFER.size()); + + for (GlDebug.LogEntry logEntry : this.MESSAGE_BUFFER) { + list.add(logEntry + " x " + logEntry.count); + } + + return list; + } + } + + @Nullable + public static GlDebug enableDebugCallback(int vebosity, boolean sychronous, Set enabledExtensions) { + if (vebosity <= 0) { + return null; + } else { + GLCapabilities gLCapabilities = GL.getCapabilities(); + if (gLCapabilities.GL_KHR_debug && GlDevice.USE_GL_KHR_debug) { + GlDebug glDebug = new GlDebug(); + enabledExtensions.add("GL_KHR_debug"); + GL11.glEnable(37600); + if (sychronous) { + GL11.glEnable(33346); + } + + for (int i = 0; i < DEBUG_LEVELS.size(); i++) { + boolean bl = i < vebosity; + KHRDebug.glDebugMessageControl(4352, 4352, (Integer)DEBUG_LEVELS.get(i), (int[])null, bl); + } + + KHRDebug.glDebugMessageCallback(GLX.make(GLDebugMessageCallback.create(glDebug::printDebugLog), DebugMemoryUntracker::untrack), 0L); + return glDebug; + } else if (gLCapabilities.GL_ARB_debug_output && GlDevice.USE_GL_ARB_debug_output) { + GlDebug glDebug = new GlDebug(); + enabledExtensions.add("GL_ARB_debug_output"); + if (sychronous) { + GL11.glEnable(33346); + } + + for (int i = 0; i < DEBUG_LEVELS_ARB.size(); i++) { + boolean bl = i < vebosity; + ARBDebugOutput.glDebugMessageControlARB(4352, 4352, (Integer)DEBUG_LEVELS_ARB.get(i), (int[])null, bl); + } + + ARBDebugOutput.glDebugMessageCallbackARB(GLX.make(GLDebugMessageARBCallback.create(glDebug::printDebugLog), DebugMemoryUntracker::untrack), 0L); + return glDebug; + } else { + return null; + } + } + } + + @Environment(EnvType.CLIENT) + static class LogEntry { + private final int id; + private final int source; + private final int type; + private final int severity; + private final String message; + int count = 1; + + LogEntry(int source, int type, int id, int severity, String message) { + this.id = id; + this.source = source; + this.type = type; + this.severity = severity; + this.message = message; + } + + boolean isSame(int source, int type, int id, int severity, String message) { + return type == this.type && source == this.source && id == this.id && severity == this.severity && message.equals(this.message); + } + + public String toString() { + return "id=" + + this.id + + ", source=" + + GlDebug.sourceToString(this.source) + + ", type=" + + GlDebug.typeToString(this.type) + + ", severity=" + + GlDebug.severityToString(this.severity) + + ", message='" + + this.message + + "'"; + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlDebugLabel.java b/com/mojang/blaze3d/opengl/GlDebugLabel.java new file mode 100644 index 00000000..40f09f58 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlDebugLabel.java @@ -0,0 +1,135 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.logging.LogUtils; +import java.util.Set; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.util.StringUtil; +import org.lwjgl.opengl.EXTDebugLabel; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GLCapabilities; +import org.lwjgl.opengl.KHRDebug; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public abstract class GlDebugLabel { + private static final Logger LOGGER = LogUtils.getLogger(); + + public void applyLabel(GlBuffer buffer) { + } + + public void applyLabel(GlTexture texture) { + } + + public void applyLabel(GlShaderModule shaderModule) { + } + + public void applyLabel(GlProgram program) { + } + + public void applyLabel(VertexArrayCache.VertexArray vertexArray) { + } + + public static GlDebugLabel create(GLCapabilities capabilities, boolean renderDebugLabels, Set enabledExtensions) { + if (renderDebugLabels) { + if (capabilities.GL_KHR_debug && GlDevice.USE_GL_KHR_debug) { + enabledExtensions.add("GL_KHR_debug"); + return new GlDebugLabel.Core(); + } + + if (capabilities.GL_EXT_debug_label && GlDevice.USE_GL_EXT_debug_label) { + enabledExtensions.add("GL_EXT_debug_label"); + return new GlDebugLabel.Ext(); + } + + LOGGER.warn("Debug labels unavailable: neither KHR_debug nor EXT_debug_label are supported"); + } + + return new GlDebugLabel.Empty(); + } + + public boolean exists() { + return false; + } + + @Environment(EnvType.CLIENT) + static class Core extends GlDebugLabel { + private final int maxLabelLength = GL11.glGetInteger(33512); + + @Override + public void applyLabel(GlBuffer buffer) { + buffer.ensureBufferExists(); + Supplier supplier = buffer.label; + if (supplier != null) { + KHRDebug.glObjectLabel(33504, buffer.handle, StringUtil.truncateStringIfNecessary((String)supplier.get(), this.maxLabelLength, true)); + } + } + + @Override + public void applyLabel(GlTexture texture) { + KHRDebug.glObjectLabel(5890, texture.id, StringUtil.truncateStringIfNecessary(texture.getLabel(), this.maxLabelLength, true)); + } + + @Override + public void applyLabel(GlShaderModule shaderModule) { + KHRDebug.glObjectLabel(33505, shaderModule.getShaderId(), StringUtil.truncateStringIfNecessary(shaderModule.getDebugLabel(), this.maxLabelLength, true)); + } + + @Override + public void applyLabel(GlProgram program) { + KHRDebug.glObjectLabel(33506, program.getProgramId(), StringUtil.truncateStringIfNecessary(program.getDebugLabel(), this.maxLabelLength, true)); + } + + @Override + public void applyLabel(VertexArrayCache.VertexArray vertexArray) { + KHRDebug.glObjectLabel(32884, vertexArray.id, StringUtil.truncateStringIfNecessary(vertexArray.format.toString(), this.maxLabelLength, true)); + } + + @Override + public boolean exists() { + return true; + } + } + + @Environment(EnvType.CLIENT) + static class Empty extends GlDebugLabel { + } + + @Environment(EnvType.CLIENT) + static class Ext extends GlDebugLabel { + @Override + public void applyLabel(GlBuffer buffer) { + buffer.ensureBufferExists(); + Supplier supplier = buffer.label; + if (supplier != null) { + EXTDebugLabel.glLabelObjectEXT(37201, buffer.handle, StringUtil.truncateStringIfNecessary((String)supplier.get(), 256, true)); + } + } + + @Override + public void applyLabel(GlTexture texture) { + EXTDebugLabel.glLabelObjectEXT(5890, texture.id, StringUtil.truncateStringIfNecessary(texture.getLabel(), 256, true)); + } + + @Override + public void applyLabel(GlShaderModule shaderModule) { + EXTDebugLabel.glLabelObjectEXT(35656, shaderModule.getShaderId(), StringUtil.truncateStringIfNecessary(shaderModule.getDebugLabel(), 256, true)); + } + + @Override + public void applyLabel(GlProgram program) { + EXTDebugLabel.glLabelObjectEXT(35648, program.getProgramId(), StringUtil.truncateStringIfNecessary(program.getDebugLabel(), 256, true)); + } + + @Override + public void applyLabel(VertexArrayCache.VertexArray vertexArray) { + EXTDebugLabel.glLabelObjectEXT(32884, vertexArray.id, StringUtil.truncateStringIfNecessary(vertexArray.format.toString(), 256, true)); + } + + @Override + public boolean exists() { + return true; + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlDevice.java b/com/mojang/blaze3d/opengl/GlDevice.java new file mode 100644 index 00000000..9f04dcb6 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlDevice.java @@ -0,0 +1,312 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.GpuOutOfMemoryException; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.preprocessor.GlslPreprocessor; +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.GpuDevice; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; +import com.mojang.logging.LogUtils; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.BiFunction; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.ShaderDefines; +import net.minecraft.client.renderer.ShaderManager; +import net.minecraft.resources.ResourceLocation; +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.Nullable; +import org.lwjgl.glfw.GLFW; +import org.lwjgl.opengl.GL; +import org.lwjgl.opengl.GLCapabilities; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class GlDevice implements GpuDevice { + private static final Logger LOGGER = LogUtils.getLogger(); + protected static boolean USE_GL_ARB_vertex_attrib_binding = true; + protected static boolean USE_GL_KHR_debug = true; + protected static boolean USE_GL_EXT_debug_label = true; + protected static boolean USE_GL_ARB_debug_output = true; + protected static boolean USE_GL_ARB_direct_state_access = true; + private final CommandEncoder encoder; + @Nullable + private final GlDebug debugLog; + private final GlDebugLabel debugLabels; + private final int maxSupportedTextureSize; + private final DirectStateAccess directStateAccess; + private final BiFunction defaultShaderSource; + private final Map pipelineCache = new IdentityHashMap(); + private final Map shaderCache = new HashMap(); + private final VertexArrayCache vertexArrayCache; + private final Set enabledExtensions = new HashSet(); + + public GlDevice( + long window, int debugVerbosity, boolean synchronous, BiFunction defaultShaderSource, boolean renderDebugLabels + ) { + GLFW.glfwMakeContextCurrent(window); + GLCapabilities gLCapabilities = GL.createCapabilities(); + int i = getMaxSupportedTextureSize(); + GLFW.glfwSetWindowSizeLimits(window, -1, -1, i, i); + this.debugLog = GlDebug.enableDebugCallback(debugVerbosity, synchronous, this.enabledExtensions); + this.debugLabels = GlDebugLabel.create(gLCapabilities, renderDebugLabels, this.enabledExtensions); + this.vertexArrayCache = VertexArrayCache.create(gLCapabilities, this.debugLabels, this.enabledExtensions); + this.directStateAccess = DirectStateAccess.create(gLCapabilities, this.enabledExtensions); + this.maxSupportedTextureSize = i; + this.defaultShaderSource = defaultShaderSource; + this.encoder = new GlCommandEncoder(this); + } + + public GlDebugLabel debugLabels() { + return this.debugLabels; + } + + @Override + public CommandEncoder createCommandEncoder() { + return this.encoder; + } + + @Override + public GpuTexture createTexture(@Nullable Supplier supplier, TextureFormat textureFormat, int i, int j, int k) { + return this.createTexture(this.debugLabels.exists() && supplier != null ? (String)supplier.get() : null, textureFormat, i, j, k); + } + + @Override + public GpuTexture createTexture(@Nullable String string, TextureFormat textureFormat, int i, int j, int k) { + if (k < 1) { + throw new IllegalArgumentException("mipLevels must be at least 1"); + } else { + GlStateManager.clearGlErrors(); + int l = GlStateManager._genTexture(); + if (string == null) { + string = String.valueOf(l); + } + + GlStateManager._bindTexture(l); + GlStateManager._texParameter(3553, 33085, k - 1); + GlStateManager._texParameter(3553, 33082, 0); + GlStateManager._texParameter(3553, 33083, k - 1); + if (textureFormat.hasDepthAspect()) { + GlStateManager._texParameter(3553, 34892, 0); + } + + for (int m = 0; m < k; m++) { + GlStateManager._texImage2D( + 3553, m, GlConst.toGlInternalId(textureFormat), i >> m, j >> m, 0, GlConst.toGlExternalId(textureFormat), GlConst.toGlType(textureFormat), null + ); + } + + int m = GlStateManager._getError(); + if (m == 1285) { + throw new GpuOutOfMemoryException("Could not allocate texture of " + i + "x" + j + " for " + string); + } else if (m != 0) { + throw new IllegalStateException("OpenGL error " + m); + } else { + GlTexture glTexture = new GlTexture(string, textureFormat, i, j, k, l); + this.debugLabels.applyLabel(glTexture); + return glTexture; + } + } + } + + @Override + public GpuBuffer createBuffer(@Nullable Supplier supplier, BufferType bufferType, BufferUsage bufferUsage, int i) { + if (i <= 0) { + throw new IllegalArgumentException("Buffer size must be greater than zero"); + } else { + return new GlBuffer(this.debugLabels, supplier, bufferType, bufferUsage, i, GlStateManager._glGenBuffers()); + } + } + + @Override + public GpuBuffer createBuffer(@Nullable Supplier supplier, BufferType bufferType, BufferUsage bufferUsage, ByteBuffer byteBuffer) { + if (!byteBuffer.hasRemaining()) { + throw new IllegalArgumentException("Buffer source must not be empty"); + } else { + GlBuffer glBuffer = new GlBuffer(this.debugLabels, supplier, bufferType, bufferUsage, byteBuffer.remaining(), GlStateManager._glGenBuffers()); + this.encoder.writeToBuffer(glBuffer, byteBuffer, 0); + return glBuffer; + } + } + + @Override + public String getImplementationInformation() { + return GLFW.glfwGetCurrentContext() == 0L + ? "NO CONTEXT" + : GlStateManager._getString(7937) + " GL version " + GlStateManager._getString(7938) + ", " + GlStateManager._getString(7936); + } + + @Override + public List getLastDebugMessages() { + return this.debugLog == null ? Collections.emptyList() : this.debugLog.getLastOpenGlDebugMessages(); + } + + @Override + public boolean isDebuggingEnabled() { + return this.debugLog != null; + } + + @Override + public String getRenderer() { + return GlStateManager._getString(7937); + } + + @Override + public String getVendor() { + return GlStateManager._getString(7936); + } + + @Override + public String getBackendName() { + return "OpenGL"; + } + + @Override + public String getVersion() { + return GlStateManager._getString(7938); + } + + private static int getMaxSupportedTextureSize() { + int i = GlStateManager._getInteger(3379); + + for (int j = Math.max(32768, i); j >= 1024; j >>= 1) { + GlStateManager._texImage2D(32868, 0, 6408, j, j, 0, 6408, 5121, null); + int k = GlStateManager._getTexLevelParameter(32868, 0, 4096); + if (k != 0) { + return j; + } + } + + int jx = Math.max(i, 1024); + LOGGER.info("Failed to determine maximum texture size by probing, trying GL_MAX_TEXTURE_SIZE = {}", jx); + return jx; + } + + @Override + public int getMaxTextureSize() { + return this.maxSupportedTextureSize; + } + + @Override + public void clearPipelineCache() { + for (GlRenderPipeline glRenderPipeline : this.pipelineCache.values()) { + if (glRenderPipeline.program() != GlProgram.INVALID_PROGRAM) { + glRenderPipeline.program().close(); + } + } + + this.pipelineCache.clear(); + + for (GlShaderModule glShaderModule : this.shaderCache.values()) { + if (glShaderModule != GlShaderModule.INVALID_SHADER) { + glShaderModule.close(); + } + } + + this.shaderCache.clear(); + } + + @Override + public List getEnabledExtensions() { + return new ArrayList(this.enabledExtensions); + } + + @Override + public void close() { + this.clearPipelineCache(); + } + + public DirectStateAccess directStateAccess() { + return this.directStateAccess; + } + + protected GlRenderPipeline getOrCompilePipeline(RenderPipeline pipeline) { + return (GlRenderPipeline)this.pipelineCache.computeIfAbsent(pipeline, renderPipeline2 -> this.compilePipeline(pipeline, this.defaultShaderSource)); + } + + protected GlShaderModule getOrCompileShader( + ResourceLocation shader, ShaderType type, ShaderDefines defines, BiFunction shaderSource + ) { + GlDevice.ShaderCompilationKey shaderCompilationKey = new GlDevice.ShaderCompilationKey(shader, type, defines); + return (GlShaderModule)this.shaderCache + .computeIfAbsent(shaderCompilationKey, shaderCompilationKey2 -> this.compileShader(shaderCompilationKey, shaderSource)); + } + + public GlRenderPipeline precompilePipeline(RenderPipeline renderPipeline, @Nullable BiFunction biFunction) { + BiFunction biFunction2 = biFunction == null ? this.defaultShaderSource : biFunction; + return (GlRenderPipeline)this.pipelineCache.computeIfAbsent(renderPipeline, renderPipeline2 -> this.compilePipeline(renderPipeline, biFunction2)); + } + + private GlShaderModule compileShader(GlDevice.ShaderCompilationKey key, BiFunction shaderSource) { + String string = (String)shaderSource.apply(key.id, key.type); + if (string == null) { + LOGGER.error("Couldn't find source for {} shader ({})", key.type, key.id); + return GlShaderModule.INVALID_SHADER; + } else { + String string2 = GlslPreprocessor.injectDefines(string, key.defines); + int i = GlStateManager.glCreateShader(GlConst.toGl(key.type)); + GlStateManager.glShaderSource(i, string2); + GlStateManager.glCompileShader(i); + if (GlStateManager.glGetShaderi(i, 35713) == 0) { + String string3 = StringUtils.trim(GlStateManager.glGetShaderInfoLog(i, 32768)); + LOGGER.error("Couldn't compile {} shader ({}): {}", key.type.getName(), key.id, string3); + return GlShaderModule.INVALID_SHADER; + } else { + GlShaderModule glShaderModule = new GlShaderModule(i, key.id, key.type); + this.debugLabels.applyLabel(glShaderModule); + return glShaderModule; + } + } + } + + private GlRenderPipeline compilePipeline(RenderPipeline pipeline, BiFunction shaderSource) { + GlShaderModule glShaderModule = this.getOrCompileShader(pipeline.getVertexShader(), ShaderType.VERTEX, pipeline.getShaderDefines(), shaderSource); + GlShaderModule glShaderModule2 = this.getOrCompileShader(pipeline.getFragmentShader(), ShaderType.FRAGMENT, pipeline.getShaderDefines(), shaderSource); + if (glShaderModule == GlShaderModule.INVALID_SHADER) { + LOGGER.error("Couldn't compile pipeline {}: vertex shader {} was invalid", pipeline.getLocation(), pipeline.getVertexShader()); + return new GlRenderPipeline(pipeline, GlProgram.INVALID_PROGRAM); + } else if (glShaderModule2 == GlShaderModule.INVALID_SHADER) { + LOGGER.error("Couldn't compile pipeline {}: fragment shader {} was invalid", pipeline.getLocation(), pipeline.getFragmentShader()); + return new GlRenderPipeline(pipeline, GlProgram.INVALID_PROGRAM); + } else { + GlProgram glProgram; + try { + glProgram = GlProgram.link(glShaderModule, glShaderModule2, pipeline.getVertexFormat(), pipeline.getLocation().toString()); + } catch (ShaderManager.CompilationException var7) { + LOGGER.error("Couldn't compile program for pipeline {}: {}", pipeline.getLocation(), var7); + return new GlRenderPipeline(pipeline, GlProgram.INVALID_PROGRAM); + } + + glProgram.setupUniforms(pipeline.getUniforms(), pipeline.getSamplers()); + this.debugLabels.applyLabel(glProgram); + return new GlRenderPipeline(pipeline, glProgram); + } + } + + public VertexArrayCache vertexArrayCache() { + return this.vertexArrayCache; + } + + @Environment(EnvType.CLIENT) + record ShaderCompilationKey(ResourceLocation id, ShaderType type, ShaderDefines defines) { + + public String toString() { + String string = this.id + " (" + this.type + ")"; + return !this.defines.isEmpty() ? string + " with " + this.defines : string; + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlProgram.java b/com/mojang/blaze3d/opengl/GlProgram.java new file mode 100644 index 00000000..26b9b501 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlProgram.java @@ -0,0 +1,335 @@ +package com.mojang.blaze3d.opengl; + +import com.google.common.collect.Sets; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.logging.LogUtils; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import java.nio.IntBuffer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.FogParameters; +import net.minecraft.client.renderer.ShaderManager; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.VisibleForTesting; +import org.joml.Matrix4f; +import org.joml.Vector3f; +import org.lwjgl.opengl.GL20; +import org.lwjgl.system.MemoryStack; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class GlProgram implements AutoCloseable { + private static final Logger LOGGER = LogUtils.getLogger(); + public static Set BUILT_IN_UNIFORMS = Sets.newHashSet( + "ModelViewMat", + "ProjMat", + "TextureMat", + "ScreenSize", + "ColorModulator", + "Light0_Direction", + "Light1_Direction", + "GlintAlpha", + "FogStart", + "FogEnd", + "FogColor", + "FogShape", + "LineWidth", + "GameTime", + "ModelOffset" + ); + public static GlProgram INVALID_PROGRAM = new GlProgram(-1, "invalid"); + private static final AbstractUniform DUMMY_UNIFORM = new AbstractUniform(); + private final List samplers = new ArrayList(); + private final Object2ObjectMap samplerTextures = new Object2ObjectOpenHashMap<>(); + private final IntList samplerLocations = new IntArrayList(); + private final List uniforms = new ArrayList(); + private final Map uniformsByName = new HashMap(); + private final int programId; + private final String debugLabel; + @Nullable + public Uniform MODEL_VIEW_MATRIX; + @Nullable + public Uniform PROJECTION_MATRIX; + @Nullable + public Uniform TEXTURE_MATRIX; + @Nullable + public Uniform SCREEN_SIZE; + @Nullable + public Uniform COLOR_MODULATOR; + @Nullable + public Uniform LIGHT0_DIRECTION; + @Nullable + public Uniform LIGHT1_DIRECTION; + @Nullable + public Uniform GLINT_ALPHA; + @Nullable + public Uniform FOG_START; + @Nullable + public Uniform FOG_END; + @Nullable + public Uniform FOG_COLOR; + @Nullable + public Uniform FOG_SHAPE; + @Nullable + public Uniform LINE_WIDTH; + @Nullable + public Uniform GAME_TIME; + @Nullable + public Uniform MODEL_OFFSET; + + private GlProgram(int programId, String debugLabel) { + this.programId = programId; + this.debugLabel = debugLabel; + } + + public static GlProgram link(GlShaderModule vertexShader, GlShaderModule fragmentShader, VertexFormat vertexFormat, String debugLabel) throws ShaderManager.CompilationException { + int i = GlStateManager.glCreateProgram(); + if (i <= 0) { + throw new ShaderManager.CompilationException("Could not create shader program (returned program ID " + i + ")"); + } else { + int j = 0; + + for (String string : vertexFormat.getElementAttributeNames()) { + GlStateManager._glBindAttribLocation(i, j, string); + j++; + } + + GlStateManager.glAttachShader(i, vertexShader.getShaderId()); + GlStateManager.glAttachShader(i, fragmentShader.getShaderId()); + GlStateManager.glLinkProgram(i); + int k = GlStateManager.glGetProgrami(i, 35714); + if (k == 0) { + String string = GlStateManager.glGetProgramInfoLog(i, 32768); + throw new ShaderManager.CompilationException( + "Error encountered when linking program containing VS " + vertexShader.getId() + " and FS " + fragmentShader.getId() + ". Log output: " + string + ); + } else { + return new GlProgram(i, debugLabel); + } + } + } + + public void setupUniforms(List uniforms, List samplers) { + RenderSystem.assertOnRenderThread(); + + for (RenderPipeline.UniformDescription uniformDescription : uniforms) { + String string = uniformDescription.name(); + int i = Uniform.glGetUniformLocation(this.programId, string); + if (i != -1) { + Uniform uniform = this.createUniform(uniformDescription); + uniform.setLocation(i); + this.uniforms.add(uniform); + this.uniformsByName.put(string, uniform); + } + } + + for (String string2 : samplers) { + int j = Uniform.glGetUniformLocation(this.programId, string2); + if (j == -1) { + LOGGER.warn("{} shader program does not use sampler {} defined in the pipeline. This might be a bug.", this.debugLabel, string2); + } else { + this.samplers.add(string2); + this.samplerLocations.add(j); + } + } + + int k = GlStateManager.glGetProgrami(this.programId, 35718); + + try (MemoryStack memoryStack = MemoryStack.stackPush()) { + IntBuffer intBuffer = memoryStack.mallocInt(1); + IntBuffer intBuffer2 = memoryStack.mallocInt(1); + + for (int l = 0; l < k; l++) { + String string3 = GL20.glGetActiveUniform(this.programId, l, intBuffer, intBuffer2); + UniformType uniformType = getTypeFromGl(intBuffer2.get(0)); + if (!this.uniformsByName.containsKey(string3) && !samplers.contains(string3)) { + if (uniformType != null) { + LOGGER.info("Found unknown but potentially supported uniform {} in {}", string3, this.debugLabel); + Uniform uniform2 = new Uniform(string3, uniformType); + uniform2.setLocation(l); + this.uniforms.add(uniform2); + this.uniformsByName.put(string3, uniform2); + } else { + LOGGER.warn("Found unknown and unsupported uniform {} in {}", string3, this.debugLabel); + } + } + } + } + + this.MODEL_VIEW_MATRIX = this.getUniform("ModelViewMat"); + this.PROJECTION_MATRIX = this.getUniform("ProjMat"); + this.TEXTURE_MATRIX = this.getUniform("TextureMat"); + this.SCREEN_SIZE = this.getUniform("ScreenSize"); + this.COLOR_MODULATOR = this.getUniform("ColorModulator"); + this.LIGHT0_DIRECTION = this.getUniform("Light0_Direction"); + this.LIGHT1_DIRECTION = this.getUniform("Light1_Direction"); + this.GLINT_ALPHA = this.getUniform("GlintAlpha"); + this.FOG_START = this.getUniform("FogStart"); + this.FOG_END = this.getUniform("FogEnd"); + this.FOG_COLOR = this.getUniform("FogColor"); + this.FOG_SHAPE = this.getUniform("FogShape"); + this.LINE_WIDTH = this.getUniform("LineWidth"); + this.GAME_TIME = this.getUniform("GameTime"); + this.MODEL_OFFSET = this.getUniform("ModelOffset"); + } + + private Uniform createUniform(RenderPipeline.UniformDescription description) { + return new Uniform(description.name(), description.type()); + } + + public void close() { + this.uniforms.forEach(Uniform::close); + GlStateManager.glDeleteProgram(this.programId); + } + + public void clear() { + RenderSystem.assertOnRenderThread(); + GlStateManager._glUseProgram(0); + int i = GlStateManager._getActiveTexture(); + + for (int j = 0; j < this.samplerLocations.size(); j++) { + String string = (String)this.samplers.get(j); + if (!this.samplerTextures.containsKey(string)) { + GlStateManager._activeTexture(33984 + j); + GlStateManager._bindTexture(0); + } + } + + GlStateManager._activeTexture(i); + } + + @Nullable + public Uniform getUniform(String name) { + RenderSystem.assertOnRenderThread(); + return (Uniform)this.uniformsByName.get(name); + } + + public AbstractUniform safeGetUniform(String name) { + Uniform uniform = this.getUniform(name); + return (AbstractUniform)(uniform == null ? DUMMY_UNIFORM : uniform); + } + + public void bindSampler(String name, @Nullable GpuTexture texture) { + this.samplerTextures.put(name, texture); + } + + public void setDefaultUniforms(VertexFormat.Mode mode, Matrix4f modelViewMatrix, Matrix4f projectionMatrix, float screenWidth, float screenHeight) { + for (int i = 0; i < 12; i++) { + GpuTexture gpuTexture = RenderSystem.getShaderTexture(i); + this.bindSampler("Sampler" + i, gpuTexture); + } + + if (this.MODEL_VIEW_MATRIX != null) { + this.MODEL_VIEW_MATRIX.set(modelViewMatrix); + } + + if (this.PROJECTION_MATRIX != null) { + this.PROJECTION_MATRIX.set(projectionMatrix); + } + + if (this.COLOR_MODULATOR != null) { + this.COLOR_MODULATOR.set(RenderSystem.getShaderColor()); + } + + if (this.GLINT_ALPHA != null) { + this.GLINT_ALPHA.set(RenderSystem.getShaderGlintAlpha()); + } + + FogParameters fogParameters = RenderSystem.getShaderFog(); + if (this.FOG_START != null) { + this.FOG_START.set(fogParameters.start()); + } + + if (this.FOG_END != null) { + this.FOG_END.set(fogParameters.end()); + } + + if (this.FOG_COLOR != null) { + this.FOG_COLOR.set(fogParameters.red(), fogParameters.green(), fogParameters.blue(), fogParameters.alpha()); + } + + if (this.FOG_SHAPE != null) { + this.FOG_SHAPE.set(fogParameters.shape().getIndex()); + } + + if (this.TEXTURE_MATRIX != null) { + this.TEXTURE_MATRIX.set(RenderSystem.getTextureMatrix()); + } + + if (this.GAME_TIME != null) { + this.GAME_TIME.set(RenderSystem.getShaderGameTime()); + } + + if (this.MODEL_OFFSET != null) { + this.MODEL_OFFSET.set(RenderSystem.getModelOffset()); + } + + if (this.SCREEN_SIZE != null) { + this.SCREEN_SIZE.set(screenWidth, screenHeight); + } + + if (this.LINE_WIDTH != null && (mode == VertexFormat.Mode.LINES || mode == VertexFormat.Mode.LINE_STRIP)) { + this.LINE_WIDTH.set(RenderSystem.getShaderLineWidth()); + } + + Vector3f[] vector3fs = RenderSystem.getShaderLights(); + if (this.LIGHT0_DIRECTION != null) { + this.LIGHT0_DIRECTION.set(vector3fs[0]); + } + + if (this.LIGHT1_DIRECTION != null) { + this.LIGHT1_DIRECTION.set(vector3fs[1]); + } + } + + @VisibleForTesting + public int getProgramId() { + return this.programId; + } + + public String toString() { + return this.debugLabel; + } + + public String getDebugLabel() { + return this.debugLabel; + } + + public IntList getSamplerLocations() { + return this.samplerLocations; + } + + public List getSamplers() { + return this.samplers; + } + + public List getUniforms() { + return this.uniforms; + } + + @Nullable + private static UniformType getTypeFromGl(int type) { + return switch (type) { + case 5124 -> UniformType.INT; + case 5126 -> UniformType.FLOAT; + case 35664 -> UniformType.VEC2; + case 35665 -> UniformType.VEC3; + case 35666 -> UniformType.VEC4; + case 35668 -> UniformType.IVEC3; + case 35676 -> UniformType.MATRIX4X4; + default -> null; + }; + } +} diff --git a/com/mojang/blaze3d/opengl/GlRenderPass.java b/com/mojang/blaze3d/opengl/GlRenderPass.java new file mode 100644 index 00000000..b98c6067 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlRenderPass.java @@ -0,0 +1,145 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.ScissorState; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.VertexFormat; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.SharedConstants; +import org.jetbrains.annotations.Nullable; +import org.joml.Matrix4f; + +@Environment(EnvType.CLIENT) +public class GlRenderPass implements RenderPass { + protected static final int MAX_VERTEX_BUFFERS = 1; + public static final boolean VALIDATION = SharedConstants.IS_RUNNING_IN_IDE; + private final GlCommandEncoder encoder; + private final boolean hasDepthTexture; + private boolean closed; + @Nullable + protected GlRenderPipeline pipeline; + protected final GpuBuffer[] vertexBuffers = new GpuBuffer[1]; + @Nullable + protected GpuBuffer indexBuffer; + protected VertexFormat.IndexType indexType = VertexFormat.IndexType.INT; + protected final ScissorState scissorState = new ScissorState(); + protected final HashMap uniforms = new HashMap(); + protected final HashMap samplers = new HashMap(); + protected final Set dirtyUniforms = new HashSet(); + protected final Set dirtySamplers = new HashSet(); + + public GlRenderPass(GlCommandEncoder encoder, boolean hasDepthTexture) { + this.encoder = encoder; + this.hasDepthTexture = hasDepthTexture; + } + + public boolean hasDepthTexture() { + return this.hasDepthTexture; + } + + @Override + public void setPipeline(RenderPipeline renderPipeline) { + if (this.pipeline == null || this.pipeline.info() != renderPipeline) { + this.dirtyUniforms.addAll(this.uniforms.keySet()); + this.dirtySamplers.addAll(this.samplers.keySet()); + } + + this.pipeline = this.encoder.getDevice().getOrCompilePipeline(renderPipeline); + } + + @Override + public void bindSampler(String string, GpuTexture gpuTexture) { + this.samplers.put(string, gpuTexture); + this.dirtySamplers.add(string); + } + + @Override + public void setUniform(String string, int... is) { + this.uniforms.put(string, is); + this.dirtyUniforms.add(string); + } + + @Override + public void setUniform(String string, float... fs) { + this.uniforms.put(string, fs); + this.dirtyUniforms.add(string); + } + + @Override + public void setUniform(String string, Matrix4f matrix4f) { + this.uniforms.put(string, matrix4f.get(new float[16])); + this.dirtyUniforms.add(string); + } + + @Override + public void enableScissor(ScissorState scissorState) { + this.scissorState.copyFrom(scissorState); + } + + @Override + public void enableScissor(int i, int j, int k, int l) { + this.scissorState.enable(i, j, k, l); + } + + @Override + public void disableScissor() { + this.scissorState.disable(); + } + + @Override + public void setVertexBuffer(int i, GpuBuffer gpuBuffer) { + if (i >= 0 && i < 1) { + this.vertexBuffers[i] = gpuBuffer; + } else { + throw new IllegalArgumentException("Vertex buffer slot is out of range: " + i); + } + } + + @Override + public void setIndexBuffer(@Nullable GpuBuffer gpuBuffer, VertexFormat.IndexType indexType) { + this.indexBuffer = gpuBuffer; + this.indexType = indexType; + } + + @Override + public void drawIndexed(int i, int j) { + if (this.closed) { + throw new IllegalStateException("Can't use a closed render pass"); + } else { + this.encoder.executeDraw(this, i, j, this.indexType); + } + } + + @Override + public void drawMultipleIndexed(Collection collection, @Nullable GpuBuffer gpuBuffer, @Nullable VertexFormat.IndexType indexType) { + if (this.closed) { + throw new IllegalStateException("Can't use a closed render pass"); + } else { + this.encoder.executeDrawMultiple(this, collection, gpuBuffer, indexType); + } + } + + @Override + public void draw(int i, int j) { + if (this.closed) { + throw new IllegalStateException("Can't use a closed render pass"); + } else { + this.encoder.executeDraw(this, i, j, null); + } + } + + @Override + public void close() { + if (!this.closed) { + this.closed = true; + this.encoder.finishRenderPass(); + } + } +} diff --git a/com/mojang/blaze3d/opengl/GlRenderPipeline.java b/com/mojang/blaze3d/opengl/GlRenderPipeline.java new file mode 100644 index 00000000..7db5639a --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlRenderPipeline.java @@ -0,0 +1,19 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.pipeline.CompiledRenderPipeline; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public record GlRenderPipeline(RenderPipeline info, GlProgram program) implements CompiledRenderPipeline { + @Override + public boolean containsUniform(String string) { + return this.program.getUniform(string) != null; + } + + @Override + public boolean isValid() { + return this.program != GlProgram.INVALID_PROGRAM; + } +} diff --git a/com/mojang/blaze3d/opengl/GlShaderModule.java b/com/mojang/blaze3d/opengl/GlShaderModule.java new file mode 100644 index 00000000..12b8afdf --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlShaderModule.java @@ -0,0 +1,59 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.systems.RenderSystem; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.ShaderManager; +import net.minecraft.resources.ResourceLocation; +import org.apache.commons.lang3.StringUtils; + +@Environment(EnvType.CLIENT) +public class GlShaderModule implements AutoCloseable { + private static final int NOT_ALLOCATED = -1; + public static final GlShaderModule INVALID_SHADER = new GlShaderModule(-1, ResourceLocation.withDefaultNamespace("invalid"), ShaderType.VERTEX); + private final ResourceLocation id; + private int shaderId; + private final ShaderType type; + + public GlShaderModule(int shaderId, ResourceLocation id, ShaderType type) { + this.id = id; + this.shaderId = shaderId; + this.type = type; + } + + public static GlShaderModule compile(ResourceLocation id, ShaderType type, String source) throws ShaderManager.CompilationException { + RenderSystem.assertOnRenderThread(); + int i = GlStateManager.glCreateShader(GlConst.toGl(type)); + GlStateManager.glShaderSource(i, source); + GlStateManager.glCompileShader(i); + if (GlStateManager.glGetShaderi(i, 35713) == 0) { + String string = StringUtils.trim(GlStateManager.glGetShaderInfoLog(i, 32768)); + throw new ShaderManager.CompilationException("Couldn't compile " + type.getName() + " shader (" + id + ") : " + string); + } else { + return new GlShaderModule(i, id, type); + } + } + + public void close() { + if (this.shaderId == -1) { + throw new IllegalStateException("Already closed"); + } else { + RenderSystem.assertOnRenderThread(); + GlStateManager.glDeleteShader(this.shaderId); + this.shaderId = -1; + } + } + + public ResourceLocation getId() { + return this.id; + } + + public int getShaderId() { + return this.shaderId; + } + + public String getDebugLabel() { + return this.type.idConverter().idToFile(this.id).toString(); + } +} diff --git a/com/mojang/blaze3d/opengl/GlStateManager.java b/com/mojang/blaze3d/opengl/GlStateManager.java new file mode 100644 index 00000000..f53ba0d8 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlStateManager.java @@ -0,0 +1,645 @@ +package com.mojang.blaze3d.opengl; + +import com.google.common.base.Charsets; +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.platform.MacosUtil; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.jtracy.Plot; +import com.mojang.jtracy.TracyClient; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.util.stream.IntStream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.Util; +import org.jetbrains.annotations.Nullable; +import org.lwjgl.PointerBuffer; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL13; +import org.lwjgl.opengl.GL14; +import org.lwjgl.opengl.GL15; +import org.lwjgl.opengl.GL20; +import org.lwjgl.opengl.GL20C; +import org.lwjgl.opengl.GL30; +import org.lwjgl.opengl.GL32; +import org.lwjgl.opengl.GL32C; +import org.lwjgl.system.MemoryStack; +import org.lwjgl.system.MemoryUtil; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public class GlStateManager { + private static final boolean ON_LINUX = Util.getPlatform() == Util.OS.LINUX; + private static final Plot PLOT_TEXTURES = TracyClient.createPlot("GPU Textures"); + private static int numTextures = 0; + private static final Plot PLOT_BUFFERS = TracyClient.createPlot("GPU Buffers"); + private static int numBuffers = 0; + private static final GlStateManager.BlendState BLEND = new GlStateManager.BlendState(); + private static final GlStateManager.DepthState DEPTH = new GlStateManager.DepthState(); + private static final GlStateManager.CullState CULL = new GlStateManager.CullState(); + private static final GlStateManager.PolygonOffsetState POLY_OFFSET = new GlStateManager.PolygonOffsetState(); + private static final GlStateManager.ColorLogicState COLOR_LOGIC = new GlStateManager.ColorLogicState(); + private static final GlStateManager.ScissorState SCISSOR = new GlStateManager.ScissorState(); + private static int activeTexture; + private static final GlStateManager.TextureState[] TEXTURES = (GlStateManager.TextureState[])IntStream.range(0, 12) + .mapToObj(i -> new GlStateManager.TextureState()) + .toArray(GlStateManager.TextureState[]::new); + private static final GlStateManager.ColorMask COLOR_MASK = new GlStateManager.ColorMask(); + private static int readFbo; + private static int writeFbo; + + public static void _disableScissorTest() { + RenderSystem.assertOnRenderThread(); + SCISSOR.mode.disable(); + } + + public static void _enableScissorTest() { + RenderSystem.assertOnRenderThread(); + SCISSOR.mode.enable(); + } + + public static void _scissorBox(int i, int j, int k, int l) { + RenderSystem.assertOnRenderThread(); + GL20.glScissor(i, j, k, l); + } + + public static void _disableDepthTest() { + RenderSystem.assertOnRenderThread(); + DEPTH.mode.disable(); + } + + public static void _enableDepthTest() { + RenderSystem.assertOnRenderThread(); + DEPTH.mode.enable(); + } + + public static void _depthFunc(int i) { + RenderSystem.assertOnRenderThread(); + if (i != DEPTH.func) { + DEPTH.func = i; + GL11.glDepthFunc(i); + } + } + + public static void _depthMask(boolean bl) { + RenderSystem.assertOnRenderThread(); + if (bl != DEPTH.mask) { + DEPTH.mask = bl; + GL11.glDepthMask(bl); + } + } + + public static void _disableBlend() { + RenderSystem.assertOnRenderThread(); + BLEND.mode.disable(); + } + + public static void _enableBlend() { + RenderSystem.assertOnRenderThread(); + BLEND.mode.enable(); + } + + public static void _blendFuncSeparate(int i, int j, int k, int l) { + RenderSystem.assertOnRenderThread(); + if (i != BLEND.srcRgb || j != BLEND.dstRgb || k != BLEND.srcAlpha || l != BLEND.dstAlpha) { + BLEND.srcRgb = i; + BLEND.dstRgb = j; + BLEND.srcAlpha = k; + BLEND.dstAlpha = l; + glBlendFuncSeparate(i, j, k, l); + } + } + + public static int glGetProgrami(int i, int j) { + RenderSystem.assertOnRenderThread(); + return GL20.glGetProgrami(i, j); + } + + public static void glAttachShader(int i, int j) { + RenderSystem.assertOnRenderThread(); + GL20.glAttachShader(i, j); + } + + public static void glDeleteShader(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glDeleteShader(i); + } + + public static int glCreateShader(int i) { + RenderSystem.assertOnRenderThread(); + return GL20.glCreateShader(i); + } + + public static void glShaderSource(int i, String string) { + RenderSystem.assertOnRenderThread(); + byte[] bs = string.getBytes(Charsets.UTF_8); + ByteBuffer byteBuffer = MemoryUtil.memAlloc(bs.length + 1); + byteBuffer.put(bs); + byteBuffer.put((byte)0); + byteBuffer.flip(); + + try (MemoryStack memoryStack = MemoryStack.stackPush()) { + PointerBuffer pointerBuffer = memoryStack.mallocPointer(1); + pointerBuffer.put(byteBuffer); + GL20C.nglShaderSource(i, 1, pointerBuffer.address0(), 0L); + } finally { + MemoryUtil.memFree(byteBuffer); + } + } + + public static void glCompileShader(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glCompileShader(i); + } + + public static int glGetShaderi(int i, int j) { + RenderSystem.assertOnRenderThread(); + return GL20.glGetShaderi(i, j); + } + + public static void _glUseProgram(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glUseProgram(i); + } + + public static int glCreateProgram() { + RenderSystem.assertOnRenderThread(); + return GL20.glCreateProgram(); + } + + public static void glDeleteProgram(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glDeleteProgram(i); + } + + public static void glLinkProgram(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glLinkProgram(i); + } + + public static int _glGetUniformLocation(int i, CharSequence charSequence) { + RenderSystem.assertOnRenderThread(); + return GL20.glGetUniformLocation(i, charSequence); + } + + public static void _glUniform1(int i, IntBuffer intBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform1iv(i, intBuffer); + } + + public static void _glUniform1i(int i, int j) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform1i(i, j); + } + + public static void _glUniform1(int i, FloatBuffer floatBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform1fv(i, floatBuffer); + } + + public static void _glUniform2(int i, FloatBuffer floatBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform2fv(i, floatBuffer); + } + + public static void _glUniform3(int i, IntBuffer intBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform3iv(i, intBuffer); + } + + public static void _glUniform3(int i, FloatBuffer floatBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform3fv(i, floatBuffer); + } + + public static void _glUniform4(int i, FloatBuffer floatBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniform4fv(i, floatBuffer); + } + + public static void _glUniformMatrix4(int i, FloatBuffer floatBuffer) { + RenderSystem.assertOnRenderThread(); + GL20.glUniformMatrix4fv(i, false, floatBuffer); + } + + public static void _glBindAttribLocation(int i, int j, CharSequence charSequence) { + RenderSystem.assertOnRenderThread(); + GL20.glBindAttribLocation(i, j, charSequence); + } + + public static int _glGenBuffers() { + RenderSystem.assertOnRenderThread(); + numBuffers++; + PLOT_BUFFERS.setValue(numBuffers); + return GL15.glGenBuffers(); + } + + public static int _glGenVertexArrays() { + RenderSystem.assertOnRenderThread(); + return GL30.glGenVertexArrays(); + } + + public static void _glBindBuffer(int i, int j) { + RenderSystem.assertOnRenderThread(); + GL15.glBindBuffer(i, j); + } + + public static void _glBindVertexArray(int i) { + RenderSystem.assertOnRenderThread(); + GL30.glBindVertexArray(i); + } + + public static void _glBufferData(int i, ByteBuffer byteBuffer, int j) { + RenderSystem.assertOnRenderThread(); + GL15.glBufferData(i, byteBuffer, j); + } + + public static void _glBufferSubData(int i, int j, ByteBuffer byteBuffer) { + RenderSystem.assertOnRenderThread(); + GL15.glBufferSubData(i, (long)j, byteBuffer); + } + + public static void _glBufferData(int i, long l, int j) { + RenderSystem.assertOnRenderThread(); + GL15.glBufferData(i, l, j); + } + + @Nullable + public static ByteBuffer _glMapBufferRange(int i, int j, int k, int l) { + RenderSystem.assertOnRenderThread(); + return GL30.glMapBufferRange(i, j, k, l); + } + + public static void _glUnmapBuffer(int i) { + RenderSystem.assertOnRenderThread(); + GL15.glUnmapBuffer(i); + } + + public static void _glDeleteBuffers(int i) { + RenderSystem.assertOnRenderThread(); + if (ON_LINUX) { + GL32C.glBindBuffer(34962, i); + GL32C.glBufferData(34962, 0L, 35048); + GL32C.glBindBuffer(34962, 0); + } + + numBuffers--; + PLOT_BUFFERS.setValue(numBuffers); + GL15.glDeleteBuffers(i); + } + + public static void _glBindFramebuffer(int i, int j) { + if ((i == 36008 || i == 36160) && readFbo != j) { + GL30.glBindFramebuffer(36008, j); + readFbo = j; + } + + if ((i == 36009 || i == 36160) && writeFbo != j) { + GL30.glBindFramebuffer(36009, j); + writeFbo = j; + } + } + + public static int getFrameBuffer(int i) { + if (i == 36008) { + return readFbo; + } else { + return i == 36009 ? writeFbo : 0; + } + } + + public static void _glBlitFrameBuffer(int i, int j, int k, int l, int m, int n, int o, int p, int q, int r) { + RenderSystem.assertOnRenderThread(); + GL30.glBlitFramebuffer(i, j, k, l, m, n, o, p, q, r); + } + + public static void _glDeleteFramebuffers(int i) { + RenderSystem.assertOnRenderThread(); + GL30.glDeleteFramebuffers(i); + } + + public static int glGenFramebuffers() { + RenderSystem.assertOnRenderThread(); + return GL30.glGenFramebuffers(); + } + + public static void _glFramebufferTexture2D(int i, int j, int k, int l, int m) { + RenderSystem.assertOnRenderThread(); + GL30.glFramebufferTexture2D(i, j, k, l, m); + } + + public static void glActiveTexture(int i) { + RenderSystem.assertOnRenderThread(); + GL13.glActiveTexture(i); + } + + public static void glBlendFuncSeparate(int i, int j, int k, int l) { + RenderSystem.assertOnRenderThread(); + GL14.glBlendFuncSeparate(i, j, k, l); + } + + public static String glGetShaderInfoLog(int i, int j) { + RenderSystem.assertOnRenderThread(); + return GL20.glGetShaderInfoLog(i, j); + } + + public static String glGetProgramInfoLog(int i, int j) { + RenderSystem.assertOnRenderThread(); + return GL20.glGetProgramInfoLog(i, j); + } + + public static void _enableCull() { + RenderSystem.assertOnRenderThread(); + CULL.enable.enable(); + } + + public static void _disableCull() { + RenderSystem.assertOnRenderThread(); + CULL.enable.disable(); + } + + public static void _polygonMode(int i, int j) { + RenderSystem.assertOnRenderThread(); + GL11.glPolygonMode(i, j); + } + + public static void _enablePolygonOffset() { + RenderSystem.assertOnRenderThread(); + POLY_OFFSET.fill.enable(); + } + + public static void _disablePolygonOffset() { + RenderSystem.assertOnRenderThread(); + POLY_OFFSET.fill.disable(); + } + + public static void _polygonOffset(float f, float g) { + RenderSystem.assertOnRenderThread(); + if (f != POLY_OFFSET.factor || g != POLY_OFFSET.units) { + POLY_OFFSET.factor = f; + POLY_OFFSET.units = g; + GL11.glPolygonOffset(f, g); + } + } + + public static void _enableColorLogicOp() { + RenderSystem.assertOnRenderThread(); + COLOR_LOGIC.enable.enable(); + } + + public static void _disableColorLogicOp() { + RenderSystem.assertOnRenderThread(); + COLOR_LOGIC.enable.disable(); + } + + public static void _logicOp(int i) { + RenderSystem.assertOnRenderThread(); + if (i != COLOR_LOGIC.op) { + COLOR_LOGIC.op = i; + GL11.glLogicOp(i); + } + } + + public static void _activeTexture(int i) { + RenderSystem.assertOnRenderThread(); + if (activeTexture != i - 33984) { + activeTexture = i - 33984; + glActiveTexture(i); + } + } + + public static void _texParameter(int i, int j, int k) { + RenderSystem.assertOnRenderThread(); + GL11.glTexParameteri(i, j, k); + } + + public static int _getTexLevelParameter(int i, int j, int k) { + return GL11.glGetTexLevelParameteri(i, j, k); + } + + public static int _genTexture() { + RenderSystem.assertOnRenderThread(); + numTextures++; + PLOT_TEXTURES.setValue(numTextures); + return GL11.glGenTextures(); + } + + public static void _deleteTexture(int i) { + RenderSystem.assertOnRenderThread(); + GL11.glDeleteTextures(i); + + for (GlStateManager.TextureState textureState : TEXTURES) { + if (textureState.binding == i) { + textureState.binding = -1; + } + } + + numTextures--; + PLOT_TEXTURES.setValue(numTextures); + } + + public static void _bindTexture(int i) { + RenderSystem.assertOnRenderThread(); + if (i != TEXTURES[activeTexture].binding) { + TEXTURES[activeTexture].binding = i; + GL11.glBindTexture(3553, i); + } + } + + public static int _getActiveTexture() { + return activeTexture + 33984; + } + + public static void _texImage2D(int i, int j, int k, int l, int m, int n, int o, int p, @Nullable IntBuffer intBuffer) { + RenderSystem.assertOnRenderThread(); + GL11.glTexImage2D(i, j, k, l, m, n, o, p, intBuffer); + } + + public static void _texSubImage2D(int i, int j, int k, int l, int m, int n, int o, int p, long q) { + RenderSystem.assertOnRenderThread(); + GL11.glTexSubImage2D(i, j, k, l, m, n, o, p, q); + } + + public static void _texSubImage2D(int i, int j, int k, int l, int m, int n, int o, int p, IntBuffer intBuffer) { + RenderSystem.assertOnRenderThread(); + GL11.glTexSubImage2D(i, j, k, l, m, n, o, p, intBuffer); + } + + public static void _viewport(int i, int j, int k, int l) { + GL11.glViewport(i, j, k, l); + } + + public static void _colorMask(boolean bl, boolean bl2, boolean bl3, boolean bl4) { + RenderSystem.assertOnRenderThread(); + if (bl != COLOR_MASK.red || bl2 != COLOR_MASK.green || bl3 != COLOR_MASK.blue || bl4 != COLOR_MASK.alpha) { + COLOR_MASK.red = bl; + COLOR_MASK.green = bl2; + COLOR_MASK.blue = bl3; + COLOR_MASK.alpha = bl4; + GL11.glColorMask(bl, bl2, bl3, bl4); + } + } + + public static void _clear(int i) { + RenderSystem.assertOnRenderThread(); + GL11.glClear(i); + if (MacosUtil.IS_MACOS) { + _getError(); + } + } + + public static void _vertexAttribPointer(int i, int j, int k, boolean bl, int l, long m) { + RenderSystem.assertOnRenderThread(); + GL20.glVertexAttribPointer(i, j, k, bl, l, m); + } + + public static void _vertexAttribIPointer(int i, int j, int k, int l, long m) { + RenderSystem.assertOnRenderThread(); + GL30.glVertexAttribIPointer(i, j, k, l, m); + } + + public static void _enableVertexAttribArray(int i) { + RenderSystem.assertOnRenderThread(); + GL20.glEnableVertexAttribArray(i); + } + + public static void _drawElements(int i, int j, int k, long l) { + RenderSystem.assertOnRenderThread(); + GL11.glDrawElements(i, j, k, l); + } + + public static void _drawArrays(int i, int j, int k) { + RenderSystem.assertOnRenderThread(); + GL11.glDrawArrays(i, j, k); + } + + public static void _pixelStore(int i, int j) { + RenderSystem.assertOnRenderThread(); + GL11.glPixelStorei(i, j); + } + + public static void _readPixels(int i, int j, int k, int l, int m, int n, long o) { + RenderSystem.assertOnRenderThread(); + GL11.glReadPixels(i, j, k, l, m, n, o); + } + + public static int _getError() { + RenderSystem.assertOnRenderThread(); + return GL11.glGetError(); + } + + public static void clearGlErrors() { + RenderSystem.assertOnRenderThread(); + + while (GL11.glGetError() != 0) { + } + } + + public static String _getString(int i) { + RenderSystem.assertOnRenderThread(); + return GL11.glGetString(i); + } + + public static int _getInteger(int i) { + RenderSystem.assertOnRenderThread(); + return GL11.glGetInteger(i); + } + + public static long _glFenceSync(int i, int j) { + RenderSystem.assertOnRenderThread(); + return GL32.glFenceSync(i, j); + } + + public static int _glClientWaitSync(long l, int i, long m) { + RenderSystem.assertOnRenderThread(); + return GL32.glClientWaitSync(l, i, m); + } + + public static void _glDeleteSync(long l) { + RenderSystem.assertOnRenderThread(); + GL32.glDeleteSync(l); + } + + @Environment(EnvType.CLIENT) + static class BlendState { + public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(3042); + public int srcRgb = 1; + public int dstRgb = 0; + public int srcAlpha = 1; + public int dstAlpha = 0; + } + + @Environment(EnvType.CLIENT) + static class BooleanState { + private final int state; + private boolean enabled; + + public BooleanState(int state) { + this.state = state; + } + + public void disable() { + this.setEnabled(false); + } + + public void enable() { + this.setEnabled(true); + } + + public void setEnabled(boolean enabled) { + RenderSystem.assertOnRenderThread(); + if (enabled != this.enabled) { + this.enabled = enabled; + if (enabled) { + GL11.glEnable(this.state); + } else { + GL11.glDisable(this.state); + } + } + } + } + + @Environment(EnvType.CLIENT) + static class ColorLogicState { + public final GlStateManager.BooleanState enable = new GlStateManager.BooleanState(3058); + public int op = 5379; + } + + @Environment(EnvType.CLIENT) + static class ColorMask { + public boolean red = true; + public boolean green = true; + public boolean blue = true; + public boolean alpha = true; + } + + @Environment(EnvType.CLIENT) + static class CullState { + public final GlStateManager.BooleanState enable = new GlStateManager.BooleanState(2884); + } + + @Environment(EnvType.CLIENT) + static class DepthState { + public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(2929); + public boolean mask = true; + public int func = 513; + } + + @Environment(EnvType.CLIENT) + static class PolygonOffsetState { + public final GlStateManager.BooleanState fill = new GlStateManager.BooleanState(32823); + public float factor; + public float units; + } + + @Environment(EnvType.CLIENT) + static class ScissorState { + public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(3089); + } + + @Environment(EnvType.CLIENT) + static class TextureState { + public int binding; + } +} diff --git a/com/mojang/blaze3d/opengl/GlTexture.java b/com/mojang/blaze3d/opengl/GlTexture.java new file mode 100644 index 00000000..0135c300 --- /dev/null +++ b/com/mojang/blaze3d/opengl/GlTexture.java @@ -0,0 +1,94 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.textures.AddressMode; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; +import it.unimi.dsi.fastutil.ints.Int2IntFunction; +import it.unimi.dsi.fastutil.ints.Int2IntMap; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; +import it.unimi.dsi.fastutil.ints.IntIterator; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class GlTexture extends GpuTexture { + protected final int id; + private final Int2IntMap fboCache = new Int2IntOpenHashMap(); + protected boolean closed; + protected boolean modesDirty = true; + + protected GlTexture(String label, TextureFormat format, int width, int height, int mipLevels, int id) { + super(label, format, width, height, mipLevels); + this.id = id; + } + + @Override + public void close() { + if (!this.closed) { + this.closed = true; + GlStateManager._deleteTexture(this.id); + IntIterator var1 = this.fboCache.values().iterator(); + + while (var1.hasNext()) { + int i = (Integer)var1.next(); + GlStateManager._glDeleteFramebuffers(i); + } + } + } + + @Override + public boolean isClosed() { + return this.closed; + } + + public int getFbo(DirectStateAccess directStateAccess, @Nullable GpuTexture texture) { + int i = texture == null ? 0 : ((GlTexture)texture).id; + return this.fboCache.computeIfAbsent(i, (Int2IntFunction)(j -> { + int k = directStateAccess.createFrameBufferObject(); + directStateAccess.bindFrameBufferTextures(k, this.id, i, 0, 0); + return k; + })); + } + + public void flushModeChanges() { + if (this.modesDirty) { + GlStateManager._texParameter(3553, 10242, GlConst.toGl(this.addressModeU)); + GlStateManager._texParameter(3553, 10243, GlConst.toGl(this.addressModeV)); + switch (this.minFilter) { + case NEAREST: + GlStateManager._texParameter(3553, 10241, this.useMipmaps ? 9986 : 9728); + break; + case LINEAR: + GlStateManager._texParameter(3553, 10241, this.useMipmaps ? 9987 : 9729); + } + + switch (this.magFilter) { + case NEAREST: + GlStateManager._texParameter(3553, 10240, 9728); + break; + case LINEAR: + GlStateManager._texParameter(3553, 10240, 9729); + } + + this.modesDirty = false; + } + } + + public int glId() { + return this.id; + } + + @Override + public void setAddressMode(AddressMode addressMode, AddressMode addressMode2) { + super.setAddressMode(addressMode, addressMode2); + this.modesDirty = true; + } + + @Override + public void setTextureFilter(FilterMode filterMode, FilterMode filterMode2, boolean bl) { + super.setTextureFilter(filterMode, filterMode2, bl); + this.modesDirty = true; + } +} diff --git a/com/mojang/blaze3d/opengl/Uniform.java b/com/mojang/blaze3d/opengl/Uniform.java new file mode 100644 index 00000000..f7e8c25f --- /dev/null +++ b/com/mojang/blaze3d/opengl/Uniform.java @@ -0,0 +1,189 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.logging.LogUtils; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.joml.Matrix4f; +import org.joml.Vector3f; +import org.lwjgl.system.MemoryUtil; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class Uniform extends AbstractUniform implements AutoCloseable { + private static final Logger LOGGER = LogUtils.getLogger(); + private int location; + private final UniformType type; + private final IntBuffer intValues; + private final FloatBuffer floatValues; + private final String name; + private boolean dirty; + + public Uniform(String name, UniformType type) { + this.name = name; + this.type = type; + if (type.isIntStorage()) { + this.intValues = MemoryUtil.memAllocInt(type.count()); + this.floatValues = null; + } else { + this.intValues = null; + this.floatValues = MemoryUtil.memAllocFloat(type.count()); + } + + this.location = -1; + } + + public static int glGetUniformLocation(int program, CharSequence name) { + return GlStateManager._glGetUniformLocation(program, name); + } + + public static void uploadInteger(int location, int value) { + GlStateManager._glUniform1i(location, value); + } + + public void close() { + if (this.intValues != null) { + MemoryUtil.memFree(this.intValues); + } + + if (this.floatValues != null) { + MemoryUtil.memFree(this.floatValues); + } + } + + public void setLocation(int location) { + this.location = location; + } + + public String getName() { + return this.name; + } + + public UniformType getType() { + return this.type; + } + + @Override + public final void set(float value) { + this.floatValues.position(0); + this.floatValues.put(0, value); + this.dirty = true; + } + + @Override + public final void set(float value1, float value2) { + this.floatValues.position(0); + this.floatValues.put(0, value1); + this.floatValues.put(1, value2); + this.dirty = true; + } + + @Override + public final void set(float value1, float value2, float value3) { + this.floatValues.position(0); + this.floatValues.put(0, value1); + this.floatValues.put(1, value2); + this.floatValues.put(2, value3); + this.dirty = true; + } + + @Override + public final void set(Vector3f values) { + this.floatValues.position(0); + values.get(this.floatValues); + this.dirty = true; + } + + @Override + public final void set(float value1, float value2, float value3, float value4) { + this.floatValues.position(0); + this.floatValues.put(value1); + this.floatValues.put(value2); + this.floatValues.put(value3); + this.floatValues.put(value4); + this.floatValues.flip(); + this.dirty = true; + } + + @Override + public final void set(int value) { + this.intValues.position(0); + this.intValues.put(0, value); + this.dirty = true; + } + + @Override + public final void set(int value1, int value2, int value3) { + this.intValues.position(0); + this.intValues.put(0, value1); + this.intValues.put(1, value2); + this.intValues.put(2, value3); + this.dirty = true; + } + + @Override + public final void set(float[] values) { + if (values.length < this.type.count()) { + LOGGER.warn("Uniform.set called with a too-small value array (expected {}, got {}). Ignoring.", this.type.count(), values.length); + } else { + this.floatValues.position(0); + this.floatValues.put(values); + this.floatValues.position(0); + this.dirty = true; + } + } + + @Override + public final void set(int[] values) { + if (values.length < this.type.count()) { + LOGGER.warn("Uniform.set called with a too-small value array (expected {}, got {}). Ignoring.", this.type.count(), values.length); + } else { + this.intValues.position(0); + this.intValues.put(values); + this.intValues.position(0); + this.dirty = true; + } + } + + @Override + public final void set(Matrix4f values) { + this.floatValues.position(0); + values.get(this.floatValues); + this.dirty = true; + } + + public void upload() { + if (this.dirty) { + if (this.type.isIntStorage()) { + switch (this.type) { + case INT: + GlStateManager._glUniform1(this.location, this.intValues); + break; + case IVEC3: + GlStateManager._glUniform3(this.location, this.intValues); + } + } else { + switch (this.type) { + case FLOAT: + GlStateManager._glUniform1(this.location, this.floatValues); + break; + case VEC2: + GlStateManager._glUniform2(this.location, this.floatValues); + break; + case VEC3: + GlStateManager._glUniform3(this.location, this.floatValues); + break; + case VEC4: + GlStateManager._glUniform4(this.location, this.floatValues); + break; + case MATRIX4X4: + GlStateManager._glUniformMatrix4(this.location, this.floatValues); + } + } + + this.dirty = false; + } + } +} diff --git a/com/mojang/blaze3d/opengl/VertexArrayCache.java b/com/mojang/blaze3d/opengl/VertexArrayCache.java new file mode 100644 index 00000000..f7c25b9c --- /dev/null +++ b/com/mojang/blaze3d/opengl/VertexArrayCache.java @@ -0,0 +1,175 @@ +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.blaze3d.vertex.VertexFormatElement; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; +import org.lwjgl.opengl.ARBVertexAttribBinding; +import org.lwjgl.opengl.GLCapabilities; + +@Environment(EnvType.CLIENT) +public abstract class VertexArrayCache { + public static VertexArrayCache create(GLCapabilities capabilities, GlDebugLabel debugLabel, Set enabledExtensions) { + if (capabilities.GL_ARB_vertex_attrib_binding && GlDevice.USE_GL_ARB_vertex_attrib_binding) { + enabledExtensions.add("GL_ARB_vertex_attrib_binding"); + return new VertexArrayCache.Separate(debugLabel); + } else { + return new VertexArrayCache.Emulated(debugLabel); + } + } + + public abstract void bindVertexArray(VertexFormat format, GlBuffer buffer); + + @Environment(EnvType.CLIENT) + static class Emulated extends VertexArrayCache { + private final Map cache = new HashMap(); + private final GlDebugLabel debugLabels; + + public Emulated(GlDebugLabel debugLabels) { + this.debugLabels = debugLabels; + } + + @Override + public void bindVertexArray(VertexFormat format, GlBuffer buffer) { + VertexArrayCache.VertexArray vertexArray = (VertexArrayCache.VertexArray)this.cache.get(format); + if (vertexArray == null) { + int i = GlStateManager._glGenVertexArrays(); + GlStateManager._glBindVertexArray(i); + GlStateManager._glBindBuffer(34962, buffer.handle); + setupCombinedAttributes(format, true); + VertexArrayCache.VertexArray vertexArray2 = new VertexArrayCache.VertexArray(i, format, buffer); + this.debugLabels.applyLabel(vertexArray2); + this.cache.put(format, vertexArray2); + } else { + GlStateManager._glBindVertexArray(vertexArray.id); + if (vertexArray.lastVertexBuffer != buffer) { + GlStateManager._glBindBuffer(34962, buffer.handle); + vertexArray.lastVertexBuffer = buffer; + setupCombinedAttributes(format, false); + } + } + } + + private static void setupCombinedAttributes(VertexFormat vertexFormat, boolean enabled) { + int i = vertexFormat.getVertexSize(); + List list = vertexFormat.getElements(); + + for (int j = 0; j < list.size(); j++) { + VertexFormatElement vertexFormatElement = (VertexFormatElement)list.get(j); + if (enabled) { + GlStateManager._enableVertexAttribArray(j); + } + + switch (vertexFormatElement.usage()) { + case POSITION: + case GENERIC: + GlStateManager._vertexAttribPointer( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), false, i, vertexFormat.getOffset(vertexFormatElement) + ); + break; + case NORMAL: + case COLOR: + GlStateManager._vertexAttribPointer( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), true, i, vertexFormat.getOffset(vertexFormatElement) + ); + break; + case UV: + if (vertexFormatElement.type() == VertexFormatElement.Type.FLOAT) { + GlStateManager._vertexAttribPointer( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), false, i, vertexFormat.getOffset(vertexFormatElement) + ); + } else { + GlStateManager._vertexAttribIPointer( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), i, vertexFormat.getOffset(vertexFormatElement) + ); + } + } + } + } + } + + @Environment(EnvType.CLIENT) + static class Separate extends VertexArrayCache { + private final Map cache = new HashMap(); + private final GlDebugLabel debugLabels; + + public Separate(GlDebugLabel debugLabels) { + this.debugLabels = debugLabels; + } + + @Override + public void bindVertexArray(VertexFormat format, GlBuffer buffer) { + VertexArrayCache.VertexArray vertexArray = (VertexArrayCache.VertexArray)this.cache.get(format); + if (vertexArray == null) { + int i = GlStateManager._glGenVertexArrays(); + GlStateManager._glBindVertexArray(i); + ARBVertexAttribBinding.glBindVertexBuffer(0, buffer.handle, 0L, format.getVertexSize()); + List list = format.getElements(); + + for (int j = 0; j < list.size(); j++) { + VertexFormatElement vertexFormatElement = (VertexFormatElement)list.get(j); + GlStateManager._enableVertexAttribArray(j); + switch (vertexFormatElement.usage()) { + case POSITION: + case GENERIC: + ARBVertexAttribBinding.glVertexAttribFormat( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), false, format.getOffset(vertexFormatElement) + ); + break; + case NORMAL: + case COLOR: + ARBVertexAttribBinding.glVertexAttribFormat( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), true, format.getOffset(vertexFormatElement) + ); + break; + case UV: + if (vertexFormatElement.type() == VertexFormatElement.Type.FLOAT) { + ARBVertexAttribBinding.glVertexAttribFormat( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), false, format.getOffset(vertexFormatElement) + ); + } else { + ARBVertexAttribBinding.glVertexAttribIFormat( + j, vertexFormatElement.count(), GlConst.toGl(vertexFormatElement.type()), format.getOffset(vertexFormatElement) + ); + } + } + + ARBVertexAttribBinding.glVertexAttribBinding(j, 0); + } + + VertexArrayCache.VertexArray vertexArray2 = new VertexArrayCache.VertexArray(i, format, buffer); + this.debugLabels.applyLabel(vertexArray2); + this.cache.put(format, vertexArray2); + } else { + GlStateManager._glBindVertexArray(vertexArray.id); + if (vertexArray.lastVertexBuffer != buffer) { + if (vertexArray.lastVertexBuffer != null && vertexArray.lastVertexBuffer.handle == buffer.handle) { + ARBVertexAttribBinding.glBindVertexBuffer(0, 0, 0L, 0); + } + + ARBVertexAttribBinding.glBindVertexBuffer(0, buffer.handle, 0L, format.getVertexSize()); + vertexArray.lastVertexBuffer = buffer; + } + } + } + } + + @Environment(EnvType.CLIENT) + public static class VertexArray { + final int id; + final VertexFormat format; + @Nullable + GlBuffer lastVertexBuffer; + + VertexArray(int id, VertexFormat format, @Nullable GlBuffer lastVertexBuffer) { + this.id = id; + this.format = format; + this.lastVertexBuffer = lastVertexBuffer; + } + } +} diff --git a/com/mojang/blaze3d/opengl/package-info.java b/com/mojang/blaze3d/opengl/package-info.java new file mode 100644 index 00000000..39bdd525 --- /dev/null +++ b/com/mojang/blaze3d/opengl/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package com.mojang.blaze3d.opengl; + +import com.mojang.blaze3d.FieldsAreNonnullByDefault; +import com.mojang.blaze3d.MethodsReturnNonnullByDefault; +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; diff --git a/com/mojang/blaze3d/pipeline/BlendFunction.java b/com/mojang/blaze3d/pipeline/BlendFunction.java new file mode 100644 index 00000000..a8b7ccbd --- /dev/null +++ b/com/mojang/blaze3d/pipeline/BlendFunction.java @@ -0,0 +1,27 @@ +package com.mojang.blaze3d.pipeline; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.platform.DestFactor; +import com.mojang.blaze3d.platform.SourceFactor; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public record BlendFunction(SourceFactor sourceColor, DestFactor destColor, SourceFactor sourceAlpha, DestFactor destAlpha) { + public static final BlendFunction LIGHTNING = new BlendFunction(SourceFactor.SRC_ALPHA, DestFactor.ONE); + public static final BlendFunction GLINT = new BlendFunction(SourceFactor.SRC_COLOR, DestFactor.ONE, SourceFactor.ZERO, DestFactor.ONE); + public static final BlendFunction OVERLAY = new BlendFunction(SourceFactor.SRC_ALPHA, DestFactor.ONE, SourceFactor.ONE, DestFactor.ZERO); + public static final BlendFunction TRANSLUCENT = new BlendFunction( + SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ONE_MINUS_SRC_ALPHA + ); + public static final BlendFunction ADDITIVE = new BlendFunction(SourceFactor.ONE, DestFactor.ONE); + public static final BlendFunction PANORAMA = new BlendFunction(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO); + public static final BlendFunction ENTITY_OUTLINE_BLIT = new BlendFunction( + SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ZERO, DestFactor.ONE + ); + + public BlendFunction(SourceFactor sourceFactor, DestFactor destFactor) { + this(sourceFactor, destFactor, sourceFactor, destFactor); + } +} diff --git a/com/mojang/blaze3d/pipeline/CompiledRenderPipeline.java b/com/mojang/blaze3d/pipeline/CompiledRenderPipeline.java new file mode 100644 index 00000000..1b3861c0 --- /dev/null +++ b/com/mojang/blaze3d/pipeline/CompiledRenderPipeline.java @@ -0,0 +1,13 @@ +package com.mojang.blaze3d.pipeline; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public interface CompiledRenderPipeline { + boolean containsUniform(String string); + + boolean isValid(); +} diff --git a/com/mojang/blaze3d/pipeline/MainTarget.java b/com/mojang/blaze3d/pipeline/MainTarget.java index b7f173e8..d5a77a23 100644 --- a/com/mojang/blaze3d/pipeline/MainTarget.java +++ b/com/mojang/blaze3d/pipeline/MainTarget.java @@ -1,13 +1,17 @@ package com.mojang.blaze3d.pipeline; import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.platform.TextureUtil; +import com.mojang.blaze3d.GpuOutOfMemoryException; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.AddressMode; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; import java.util.List; import java.util.Objects; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class MainTarget extends RenderTarget { @@ -16,87 +20,71 @@ public class MainTarget extends RenderTarget { static final MainTarget.Dimension DEFAULT_DIMENSIONS = new MainTarget.Dimension(854, 480); public MainTarget(int width, int height) { - super(true); + super("Main", true); this.createFrameBuffer(width, height); } private void createFrameBuffer(int width, int height) { MainTarget.Dimension dimension = this.allocateAttachments(width, height); - this.frameBufferId = GlStateManager.glGenFramebuffers(); - GlStateManager._glBindFramebuffer(36160, this.frameBufferId); - GlStateManager._bindTexture(this.colorTextureId); - GlStateManager._texParameter(3553, 10241, 9728); - GlStateManager._texParameter(3553, 10240, 9728); - GlStateManager._texParameter(3553, 10242, 33071); - GlStateManager._texParameter(3553, 10243, 33071); - GlStateManager._glFramebufferTexture2D(36160, 36064, 3553, this.colorTextureId, 0); - GlStateManager._bindTexture(this.depthBufferId); - GlStateManager._texParameter(3553, 34892, 0); - GlStateManager._texParameter(3553, 10241, 9728); - GlStateManager._texParameter(3553, 10240, 9728); - GlStateManager._texParameter(3553, 10242, 33071); - GlStateManager._texParameter(3553, 10243, 33071); - GlStateManager._glFramebufferTexture2D(36160, 36096, 3553, this.depthBufferId, 0); - GlStateManager._bindTexture(0); - this.viewWidth = dimension.width; - this.viewHeight = dimension.height; - this.width = dimension.width; - this.height = dimension.height; - this.checkStatus(); - GlStateManager._glBindFramebuffer(36160, 0); + if (this.colorTexture != null && this.depthTexture != null) { + this.colorTexture.setTextureFilter(FilterMode.NEAREST, false); + this.colorTexture.setAddressMode(AddressMode.CLAMP_TO_EDGE); + this.colorTexture.setTextureFilter(FilterMode.NEAREST, false); + this.colorTexture.setAddressMode(AddressMode.CLAMP_TO_EDGE); + this.viewWidth = dimension.width; + this.viewHeight = dimension.height; + this.width = dimension.width; + this.height = dimension.height; + } else { + throw new IllegalStateException("Missing color and/or depth textures"); + } } private MainTarget.Dimension allocateAttachments(int width, int height) { - RenderSystem.assertOnRenderThreadOrInit(); - this.colorTextureId = TextureUtil.generateTextureId(); - this.depthBufferId = TextureUtil.generateTextureId(); - MainTarget.AttachmentState attachmentState = MainTarget.AttachmentState.NONE; + RenderSystem.assertOnRenderThread(); for (MainTarget.Dimension dimension : MainTarget.Dimension.listWithFallback(width, height)) { - attachmentState = MainTarget.AttachmentState.NONE; - if (this.allocateColorAttachment(dimension)) { - attachmentState = attachmentState.with(MainTarget.AttachmentState.COLOR); + if (this.colorTexture != null) { + this.colorTexture.close(); + this.colorTexture = null; } - if (this.allocateDepthAttachment(dimension)) { - attachmentState = attachmentState.with(MainTarget.AttachmentState.DEPTH); + if (this.depthTexture != null) { + this.depthTexture.close(); + this.depthTexture = null; } - if (attachmentState == MainTarget.AttachmentState.COLOR_DEPTH) { + this.colorTexture = this.allocateColorAttachment(dimension); + this.depthTexture = this.allocateDepthAttachment(dimension); + if (this.colorTexture != null && this.depthTexture != null) { return dimension; } } - throw new RuntimeException("Unrecoverable GL_OUT_OF_MEMORY (allocated attachments = " + attachmentState.name() + ")"); + throw new RuntimeException( + "Unrecoverable GL_OUT_OF_MEMORY (" + + (this.colorTexture == null ? "missing color" : "have color") + + ", " + + (this.depthTexture == null ? "missing depth" : "have depth") + + ")" + ); } - private boolean allocateColorAttachment(MainTarget.Dimension dimension) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._getError(); - GlStateManager._bindTexture(this.colorTextureId); - GlStateManager._texImage2D(3553, 0, 32856, dimension.width, dimension.height, 0, 6408, 5121, null); - return GlStateManager._getError() != 1285; + @Nullable + private GpuTexture allocateColorAttachment(MainTarget.Dimension dimension) { + try { + return RenderSystem.getDevice().createTexture(() -> this.label + " / Color", TextureFormat.RGBA8, dimension.width, dimension.height, 1); + } catch (GpuOutOfMemoryException var3) { + return null; + } } - private boolean allocateDepthAttachment(MainTarget.Dimension dimension) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._getError(); - GlStateManager._bindTexture(this.depthBufferId); - GlStateManager._texImage2D(3553, 0, 6402, dimension.width, dimension.height, 0, 6402, 5126, null); - return GlStateManager._getError() != 1285; - } - - @Environment(EnvType.CLIENT) - static enum AttachmentState { - NONE, - COLOR, - DEPTH, - COLOR_DEPTH; - - private static final MainTarget.AttachmentState[] VALUES = values(); - - MainTarget.AttachmentState with(MainTarget.AttachmentState otherState) { - return VALUES[this.ordinal() | otherState.ordinal()]; + @Nullable + private GpuTexture allocateDepthAttachment(MainTarget.Dimension dimension) { + try { + return RenderSystem.getDevice().createTexture(() -> this.label + " / Depth", TextureFormat.DEPTH32, dimension.width, dimension.height, 1); + } catch (GpuOutOfMemoryException var3) { + return null; } } @@ -111,8 +99,8 @@ public class MainTarget extends RenderTarget { } static List listWithFallback(int width, int height) { - RenderSystem.assertOnRenderThreadOrInit(); - int i = RenderSystem.maxSupportedTextureSize(); + RenderSystem.assertOnRenderThread(); + int i = RenderSystem.getDevice().getMaxTextureSize(); return width > 0 && width <= i && height > 0 && height <= i ? ImmutableList.of(new MainTarget.Dimension(width, height), MainTarget.DEFAULT_DIMENSIONS) : ImmutableList.of(MainTarget.DEFAULT_DIMENSIONS); diff --git a/com/mojang/blaze3d/pipeline/RenderCall.java b/com/mojang/blaze3d/pipeline/RenderCall.java deleted file mode 100644 index 957fcc11..00000000 --- a/com/mojang/blaze3d/pipeline/RenderCall.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mojang.blaze3d.pipeline; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -public interface RenderCall { - void execute(); -} diff --git a/com/mojang/blaze3d/pipeline/RenderPipeline.java b/com/mojang/blaze3d/pipeline/RenderPipeline.java new file mode 100644 index 00000000..a5ca7f89 --- /dev/null +++ b/com/mojang/blaze3d/pipeline/RenderPipeline.java @@ -0,0 +1,488 @@ +package com.mojang.blaze3d.pipeline; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.platform.DepthTestFunction; +import com.mojang.blaze3d.platform.LogicOp; +import com.mojang.blaze3d.platform.PolygonMode; +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.blaze3d.vertex.VertexFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.Map.Entry; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.ShaderDefines; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public class RenderPipeline { + private final ResourceLocation location; + private final ResourceLocation vertexShader; + private final ResourceLocation fragmentShader; + private final ShaderDefines shaderDefines; + private final List samplers; + private final List uniforms; + private final DepthTestFunction depthTestFunction; + private final PolygonMode polygonMode; + private final boolean cull; + private final LogicOp colorLogic; + private final Optional blendFunction; + private final boolean writeColor; + private final boolean writeAlpha; + private final boolean writeDepth; + private final VertexFormat vertexFormat; + private final VertexFormat.Mode vertexFormatMode; + private final float depthBiasScaleFactor; + private final float depthBiasConstant; + + protected RenderPipeline( + ResourceLocation resourceLocation, + ResourceLocation resourceLocation2, + ResourceLocation resourceLocation3, + ShaderDefines shaderDefines, + List list, + List list2, + Optional optional, + DepthTestFunction depthTestFunction, + PolygonMode polygonMode, + boolean bl, + boolean bl2, + boolean bl3, + boolean bl4, + LogicOp logicOp, + VertexFormat vertexFormat, + VertexFormat.Mode mode, + float f, + float g + ) { + this.location = resourceLocation; + this.vertexShader = resourceLocation2; + this.fragmentShader = resourceLocation3; + this.shaderDefines = shaderDefines; + this.samplers = list; + this.uniforms = list2; + this.depthTestFunction = depthTestFunction; + this.polygonMode = polygonMode; + this.cull = bl; + this.blendFunction = optional; + this.writeColor = bl2; + this.writeAlpha = bl3; + this.writeDepth = bl4; + this.colorLogic = logicOp; + this.vertexFormat = vertexFormat; + this.vertexFormatMode = mode; + this.depthBiasScaleFactor = f; + this.depthBiasConstant = g; + } + + public String toString() { + return this.location.toString(); + } + + public DepthTestFunction getDepthTestFunction() { + return this.depthTestFunction; + } + + public PolygonMode getPolygonMode() { + return this.polygonMode; + } + + public boolean isCull() { + return this.cull; + } + + public LogicOp getColorLogic() { + return this.colorLogic; + } + + public Optional getBlendFunction() { + return this.blendFunction; + } + + public boolean isWriteColor() { + return this.writeColor; + } + + public boolean isWriteAlpha() { + return this.writeAlpha; + } + + public boolean isWriteDepth() { + return this.writeDepth; + } + + public float getDepthBiasScaleFactor() { + return this.depthBiasScaleFactor; + } + + public float getDepthBiasConstant() { + return this.depthBiasConstant; + } + + public ResourceLocation getLocation() { + return this.location; + } + + public VertexFormat getVertexFormat() { + return this.vertexFormat; + } + + public VertexFormat.Mode getVertexFormatMode() { + return this.vertexFormatMode; + } + + public ResourceLocation getVertexShader() { + return this.vertexShader; + } + + public ResourceLocation getFragmentShader() { + return this.fragmentShader; + } + + public ShaderDefines getShaderDefines() { + return this.shaderDefines; + } + + public List getSamplers() { + return this.samplers; + } + + public List getUniforms() { + return this.uniforms; + } + + public boolean wantsDepthTexture() { + return this.depthTestFunction != DepthTestFunction.NO_DEPTH_TEST || this.depthBiasConstant != 0.0F || this.depthBiasScaleFactor != 0.0F || this.writeDepth; + } + + public static RenderPipeline.Builder builder(RenderPipeline.Snippet... snippets) { + RenderPipeline.Builder builder = new RenderPipeline.Builder(); + + for (RenderPipeline.Snippet snippet : snippets) { + builder.withSnippet(snippet); + } + + return builder; + } + + @Environment(EnvType.CLIENT) + @DontObfuscate + public static class Builder { + private Optional location = Optional.empty(); + private Optional fragmentShader = Optional.empty(); + private Optional vertexShader = Optional.empty(); + private Optional definesBuilder = Optional.empty(); + private Optional> samplers = Optional.empty(); + private Optional> uniforms = Optional.empty(); + private Optional depthTestFunction = Optional.empty(); + private Optional polygonMode = Optional.empty(); + private Optional cull = Optional.empty(); + private Optional writeColor = Optional.empty(); + private Optional writeAlpha = Optional.empty(); + private Optional writeDepth = Optional.empty(); + private Optional colorLogic = Optional.empty(); + private Optional blendFunction = Optional.empty(); + private Optional vertexFormat = Optional.empty(); + private Optional vertexFormatMode = Optional.empty(); + private float depthBiasScaleFactor; + private float depthBiasConstant; + + Builder() { + } + + public RenderPipeline.Builder withLocation(String string) { + this.location = Optional.of(ResourceLocation.withDefaultNamespace(string)); + return this; + } + + public RenderPipeline.Builder withLocation(ResourceLocation resourceLocation) { + this.location = Optional.of(resourceLocation); + return this; + } + + public RenderPipeline.Builder withFragmentShader(String string) { + this.fragmentShader = Optional.of(ResourceLocation.withDefaultNamespace(string)); + return this; + } + + public RenderPipeline.Builder withFragmentShader(ResourceLocation resourceLocation) { + this.fragmentShader = Optional.of(resourceLocation); + return this; + } + + public RenderPipeline.Builder withVertexShader(String string) { + this.vertexShader = Optional.of(ResourceLocation.withDefaultNamespace(string)); + return this; + } + + public RenderPipeline.Builder withVertexShader(ResourceLocation resourceLocation) { + this.vertexShader = Optional.of(resourceLocation); + return this; + } + + public RenderPipeline.Builder withShaderDefine(String string) { + if (this.definesBuilder.isEmpty()) { + this.definesBuilder = Optional.of(ShaderDefines.builder()); + } + + ((ShaderDefines.Builder)this.definesBuilder.get()).define(string); + return this; + } + + public RenderPipeline.Builder withShaderDefine(String string, int i) { + if (this.definesBuilder.isEmpty()) { + this.definesBuilder = Optional.of(ShaderDefines.builder()); + } + + ((ShaderDefines.Builder)this.definesBuilder.get()).define(string, i); + return this; + } + + public RenderPipeline.Builder withShaderDefine(String string, float f) { + if (this.definesBuilder.isEmpty()) { + this.definesBuilder = Optional.of(ShaderDefines.builder()); + } + + ((ShaderDefines.Builder)this.definesBuilder.get()).define(string, f); + return this; + } + + public RenderPipeline.Builder withSampler(String string) { + if (this.samplers.isEmpty()) { + this.samplers = Optional.of(new ArrayList()); + } + + ((List)this.samplers.get()).add(string); + return this; + } + + public RenderPipeline.Builder withUniform(String string, UniformType uniformType) { + if (this.uniforms.isEmpty()) { + this.uniforms = Optional.of(new ArrayList()); + } + + ((List)this.uniforms.get()).add(new RenderPipeline.UniformDescription(string, uniformType)); + return this; + } + + public RenderPipeline.Builder withDepthTestFunction(DepthTestFunction depthTestFunction) { + this.depthTestFunction = Optional.of(depthTestFunction); + return this; + } + + public RenderPipeline.Builder withPolygonMode(PolygonMode polygonMode) { + this.polygonMode = Optional.of(polygonMode); + return this; + } + + public RenderPipeline.Builder withCull(boolean bl) { + this.cull = Optional.of(bl); + return this; + } + + public RenderPipeline.Builder withBlend(BlendFunction blendFunction) { + this.blendFunction = Optional.of(blendFunction); + return this; + } + + public RenderPipeline.Builder withoutBlend() { + this.blendFunction = Optional.empty(); + return this; + } + + public RenderPipeline.Builder withColorWrite(boolean bl) { + this.writeColor = Optional.of(bl); + this.writeAlpha = Optional.of(bl); + return this; + } + + public RenderPipeline.Builder withColorWrite(boolean bl, boolean bl2) { + this.writeColor = Optional.of(bl); + this.writeAlpha = Optional.of(bl2); + return this; + } + + public RenderPipeline.Builder withDepthWrite(boolean bl) { + this.writeDepth = Optional.of(bl); + return this; + } + + public RenderPipeline.Builder withColorLogic(LogicOp logicOp) { + this.colorLogic = Optional.of(logicOp); + return this; + } + + public RenderPipeline.Builder withVertexFormat(VertexFormat vertexFormat, VertexFormat.Mode mode) { + this.vertexFormat = Optional.of(vertexFormat); + this.vertexFormatMode = Optional.of(mode); + return this; + } + + public RenderPipeline.Builder withDepthBias(float f, float g) { + this.depthBiasScaleFactor = f; + this.depthBiasConstant = g; + return this; + } + + void withSnippet(RenderPipeline.Snippet snippet) { + if (snippet.vertexShader.isPresent()) { + this.vertexShader = snippet.vertexShader; + } + + if (snippet.fragmentShader.isPresent()) { + this.fragmentShader = snippet.fragmentShader; + } + + if (snippet.shaderDefines.isPresent()) { + if (this.definesBuilder.isEmpty()) { + this.definesBuilder = Optional.of(ShaderDefines.builder()); + } + + ShaderDefines shaderDefines = (ShaderDefines)snippet.shaderDefines.get(); + + for (Entry entry : shaderDefines.values().entrySet()) { + ((ShaderDefines.Builder)this.definesBuilder.get()).define((String)entry.getKey(), (String)entry.getValue()); + } + + for (String string : shaderDefines.flags()) { + ((ShaderDefines.Builder)this.definesBuilder.get()).define(string); + } + } + + snippet.samplers.ifPresent(list -> { + if (this.samplers.isPresent()) { + ((List)this.samplers.get()).addAll(list); + } else { + this.samplers = Optional.of(new ArrayList(list)); + } + }); + snippet.uniforms.ifPresent(list -> { + if (this.uniforms.isPresent()) { + ((List)this.uniforms.get()).addAll(list); + } else { + this.uniforms = Optional.of(new ArrayList(list)); + } + }); + if (snippet.depthTestFunction.isPresent()) { + this.depthTestFunction = snippet.depthTestFunction; + } + + if (snippet.cull.isPresent()) { + this.cull = snippet.cull; + } + + if (snippet.writeColor.isPresent()) { + this.writeColor = snippet.writeColor; + } + + if (snippet.writeAlpha.isPresent()) { + this.writeAlpha = snippet.writeAlpha; + } + + if (snippet.writeDepth.isPresent()) { + this.writeDepth = snippet.writeDepth; + } + + if (snippet.colorLogic.isPresent()) { + this.colorLogic = snippet.colorLogic; + } + + if (snippet.blendFunction.isPresent()) { + this.blendFunction = snippet.blendFunction; + } + + if (snippet.vertexFormat.isPresent()) { + this.vertexFormat = snippet.vertexFormat; + } + + if (snippet.vertexFormatMode.isPresent()) { + this.vertexFormatMode = snippet.vertexFormatMode; + } + } + + public RenderPipeline.Snippet buildSnippet() { + return new RenderPipeline.Snippet( + this.vertexShader, + this.fragmentShader, + this.definesBuilder.map(ShaderDefines.Builder::build), + this.samplers.map(Collections::unmodifiableList), + this.uniforms.map(Collections::unmodifiableList), + this.blendFunction, + this.depthTestFunction, + this.polygonMode, + this.cull, + this.writeColor, + this.writeAlpha, + this.writeDepth, + this.colorLogic, + this.vertexFormat, + this.vertexFormatMode + ); + } + + public RenderPipeline build() { + if (this.location.isEmpty()) { + throw new IllegalStateException("Missing location"); + } else if (this.vertexShader.isEmpty()) { + throw new IllegalStateException("Missing vertex shader"); + } else if (this.fragmentShader.isEmpty()) { + throw new IllegalStateException("Missing fragment shader"); + } else if (this.vertexFormat.isEmpty()) { + throw new IllegalStateException("Missing vertex buffer format"); + } else if (this.vertexFormatMode.isEmpty()) { + throw new IllegalStateException("Missing vertex mode"); + } else { + return new RenderPipeline( + (ResourceLocation)this.location.get(), + (ResourceLocation)this.vertexShader.get(), + (ResourceLocation)this.fragmentShader.get(), + ((ShaderDefines.Builder)this.definesBuilder.orElse(ShaderDefines.builder())).build(), + List.copyOf((Collection)this.samplers.orElse(new ArrayList())), + (List)this.uniforms.orElse(Collections.emptyList()), + this.blendFunction, + (DepthTestFunction)this.depthTestFunction.orElse(DepthTestFunction.LEQUAL_DEPTH_TEST), + (PolygonMode)this.polygonMode.orElse(PolygonMode.FILL), + (Boolean)this.cull.orElse(true), + (Boolean)this.writeColor.orElse(true), + (Boolean)this.writeAlpha.orElse(true), + (Boolean)this.writeDepth.orElse(true), + (LogicOp)this.colorLogic.orElse(LogicOp.NONE), + (VertexFormat)this.vertexFormat.get(), + (VertexFormat.Mode)this.vertexFormatMode.get(), + this.depthBiasScaleFactor, + this.depthBiasConstant + ); + } + } + } + + @Environment(EnvType.CLIENT) + @DontObfuscate + public record Snippet( + Optional vertexShader, + Optional fragmentShader, + Optional shaderDefines, + Optional> samplers, + Optional> uniforms, + Optional blendFunction, + Optional depthTestFunction, + Optional polygonMode, + Optional cull, + Optional writeColor, + Optional writeAlpha, + Optional writeDepth, + Optional colorLogic, + Optional vertexFormat, + Optional vertexFormatMode + ) { + } + + @Environment(EnvType.CLIENT) + @DontObfuscate + public record UniformDescription(String name, UniformType type) { + } +} diff --git a/com/mojang/blaze3d/pipeline/RenderTarget.java b/com/mojang/blaze3d/pipeline/RenderTarget.java index 2fdb06b5..585d1347 100644 --- a/com/mojang/blaze3d/pipeline/RenderTarget.java +++ b/com/mojang/blaze3d/pipeline/RenderTarget.java @@ -1,235 +1,136 @@ package com.mojang.blaze3d.pipeline; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.platform.TextureUtil; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.textures.AddressMode; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; import com.mojang.blaze3d.vertex.VertexFormat; -import java.util.Objects; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.Util; -import net.minecraft.client.renderer.CompiledShaderProgram; -import net.minecraft.client.renderer.CoreShaders; +import net.minecraft.client.renderer.RenderPipelines; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public abstract class RenderTarget { - private static final int RED_CHANNEL = 0; - private static final int GREEN_CHANNEL = 1; - private static final int BLUE_CHANNEL = 2; - private static final int ALPHA_CHANNEL = 3; + private static int UNNAMED_RENDER_TARGETS = 0; public int width; public int height; public int viewWidth; public int viewHeight; + protected final String label; public final boolean useDepth; - public int frameBufferId; - protected int colorTextureId; - protected int depthBufferId; - private final float[] clearChannels = Util.make(() -> new float[]{1.0F, 1.0F, 1.0F, 0.0F}); - public int filterMode; + @Nullable + protected GpuTexture colorTexture; + @Nullable + protected GpuTexture depthTexture; + public FilterMode filterMode; - public RenderTarget(boolean useDepth) { + public RenderTarget(@Nullable String name, boolean useDepth) { + this.label = name == null ? "FBO " + UNNAMED_RENDER_TARGETS++ : name; this.useDepth = useDepth; - this.frameBufferId = -1; - this.colorTextureId = -1; - this.depthBufferId = -1; } - public void resize(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._enableDepthTest(); - if (this.frameBufferId >= 0) { - this.destroyBuffers(); - } - - this.createBuffers(i, j); - GlStateManager._glBindFramebuffer(36160, 0); + public void resize(int width, int height) { + RenderSystem.assertOnRenderThread(); + this.destroyBuffers(); + this.createBuffers(width, height); } public void destroyBuffers() { - RenderSystem.assertOnRenderThreadOrInit(); - this.unbindRead(); - this.unbindWrite(); - if (this.depthBufferId > -1) { - TextureUtil.releaseTextureId(this.depthBufferId); - this.depthBufferId = -1; + RenderSystem.assertOnRenderThread(); + if (this.depthTexture != null) { + this.depthTexture.close(); + this.depthTexture = null; } - if (this.colorTextureId > -1) { - TextureUtil.releaseTextureId(this.colorTextureId); - this.colorTextureId = -1; - } - - if (this.frameBufferId > -1) { - GlStateManager._glBindFramebuffer(36160, 0); - GlStateManager._glDeleteFramebuffers(this.frameBufferId); - this.frameBufferId = -1; + if (this.colorTexture != null) { + this.colorTexture.close(); + this.colorTexture = null; } } public void copyDepthFrom(RenderTarget otherTarget) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._glBindFramebuffer(36008, otherTarget.frameBufferId); - GlStateManager._glBindFramebuffer(36009, this.frameBufferId); - GlStateManager._glBlitFrameBuffer(0, 0, otherTarget.width, otherTarget.height, 0, 0, this.width, this.height, 256, 9728); - GlStateManager._glBindFramebuffer(36160, 0); - } - - public void createBuffers(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - int k = RenderSystem.maxSupportedTextureSize(); - if (i > 0 && i <= k && j > 0 && j <= k) { - this.viewWidth = i; - this.viewHeight = j; - this.width = i; - this.height = j; - this.frameBufferId = GlStateManager.glGenFramebuffers(); - this.colorTextureId = TextureUtil.generateTextureId(); - if (this.useDepth) { - this.depthBufferId = TextureUtil.generateTextureId(); - GlStateManager._bindTexture(this.depthBufferId); - GlStateManager._texParameter(3553, 10241, 9728); - GlStateManager._texParameter(3553, 10240, 9728); - GlStateManager._texParameter(3553, 34892, 0); - GlStateManager._texParameter(3553, 10242, 33071); - GlStateManager._texParameter(3553, 10243, 33071); - GlStateManager._texImage2D(3553, 0, 6402, this.width, this.height, 0, 6402, 5126, null); - } - - this.setFilterMode(9728, true); - GlStateManager._bindTexture(this.colorTextureId); - GlStateManager._texParameter(3553, 10242, 33071); - GlStateManager._texParameter(3553, 10243, 33071); - GlStateManager._texImage2D(3553, 0, 32856, this.width, this.height, 0, 6408, 5121, null); - GlStateManager._glBindFramebuffer(36160, this.frameBufferId); - GlStateManager._glFramebufferTexture2D(36160, 36064, 3553, this.colorTextureId, 0); - if (this.useDepth) { - GlStateManager._glFramebufferTexture2D(36160, 36096, 3553, this.depthBufferId, 0); - } - - this.checkStatus(); - this.clear(); - this.unbindRead(); + RenderSystem.assertOnRenderThread(); + if (this.depthTexture == null) { + throw new IllegalStateException("Trying to copy depth texture to a RenderTarget without a depth texture"); + } else if (otherTarget.depthTexture == null) { + throw new IllegalStateException("Trying to copy depth texture from a RenderTarget without a depth texture"); } else { - throw new IllegalArgumentException("Window " + i + "x" + j + " size out of bounds (max. size: " + k + ")"); + RenderSystem.getDevice().createCommandEncoder().copyTextureToTexture(otherTarget.depthTexture, this.depthTexture, 0, 0, 0, 0, 0, this.width, this.height); } } - public void setFilterMode(int filterMode) { + public void createBuffers(int width, int height) { + RenderSystem.assertOnRenderThread(); + int i = RenderSystem.getDevice().getMaxTextureSize(); + if (width > 0 && width <= i && height > 0 && height <= i) { + this.viewWidth = width; + this.viewHeight = height; + this.width = width; + this.height = height; + if (this.useDepth) { + this.depthTexture = RenderSystem.getDevice().createTexture(() -> this.label + " / Depth", TextureFormat.DEPTH32, width, height, 1); + this.depthTexture.setTextureFilter(FilterMode.NEAREST, false); + this.depthTexture.setAddressMode(AddressMode.CLAMP_TO_EDGE); + } + + this.colorTexture = RenderSystem.getDevice().createTexture(() -> this.label + " / Color", TextureFormat.RGBA8, width, height, 1); + this.colorTexture.setAddressMode(AddressMode.CLAMP_TO_EDGE); + this.setFilterMode(FilterMode.NEAREST, true); + } else { + throw new IllegalArgumentException("Window " + width + "x" + height + " size out of bounds (max. size: " + i + ")"); + } + } + + public void setFilterMode(FilterMode filterMode) { this.setFilterMode(filterMode, false); } - private void setFilterMode(int filterMode, boolean force) { - RenderSystem.assertOnRenderThreadOrInit(); - if (force || filterMode != this.filterMode) { - this.filterMode = filterMode; - GlStateManager._bindTexture(this.colorTextureId); - GlStateManager._texParameter(3553, 10241, filterMode); - GlStateManager._texParameter(3553, 10240, filterMode); - GlStateManager._bindTexture(0); - } - } - - public void checkStatus() { - RenderSystem.assertOnRenderThreadOrInit(); - int i = GlStateManager.glCheckFramebufferStatus(36160); - if (i != 36053) { - if (i == 36054) { - throw new RuntimeException("GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"); - } else if (i == 36055) { - throw new RuntimeException("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"); - } else if (i == 36059) { - throw new RuntimeException("GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER"); - } else if (i == 36060) { - throw new RuntimeException("GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER"); - } else if (i == 36061) { - throw new RuntimeException("GL_FRAMEBUFFER_UNSUPPORTED"); - } else if (i == 1285) { - throw new RuntimeException("GL_OUT_OF_MEMORY"); - } else { - throw new RuntimeException("glCheckFramebufferStatus returned unknown status:" + i); + private void setFilterMode(FilterMode filterMode, boolean force) { + if (this.colorTexture == null) { + throw new IllegalStateException("Can't change filter mode, color texture doesn't exist yet"); + } else { + if (force || filterMode != this.filterMode) { + this.filterMode = filterMode; + this.colorTexture.setTextureFilter(filterMode, false); } } } - public void bindRead() { - RenderSystem.assertOnRenderThread(); - GlStateManager._bindTexture(this.colorTextureId); - } - - public void unbindRead() { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._bindTexture(0); - } - - public void bindWrite(boolean setViewport) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._glBindFramebuffer(36160, this.frameBufferId); - if (setViewport) { - GlStateManager._viewport(0, 0, this.viewWidth, this.viewHeight); + public void blitToScreen() { + if (this.colorTexture == null) { + throw new IllegalStateException("Can't blit to screen, color texture doesn't exist yet"); + } else { + RenderSystem.getDevice().createCommandEncoder().presentTexture(this.colorTexture); } } - public void unbindWrite() { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._glBindFramebuffer(36160, 0); - } - - public void setClearColor(float red, float green, float blue, float alpha) { - this.clearChannels[0] = red; - this.clearChannels[1] = green; - this.clearChannels[2] = blue; - this.clearChannels[3] = alpha; - } - - public void blitToScreen(int width, int height) { - GlStateManager._glBindFramebuffer(36008, this.frameBufferId); - GlStateManager._glBlitFrameBuffer(0, 0, this.width, this.height, 0, 0, width, height, 16384, 9728); - GlStateManager._glBindFramebuffer(36008, 0); - } - - public void blitAndBlendToScreen(int i, int j) { + public void blitAndBlendToTexture(GpuTexture texture) { RenderSystem.assertOnRenderThread(); - GlStateManager._colorMask(true, true, true, false); - GlStateManager._disableDepthTest(); - GlStateManager._depthMask(false); - GlStateManager._viewport(0, 0, i, j); - CompiledShaderProgram compiledShaderProgram = (CompiledShaderProgram)Objects.requireNonNull( - RenderSystem.setShader(CoreShaders.BLIT_SCREEN), "Blit shader not loaded" - ); - compiledShaderProgram.bindSampler("InSampler", this.colorTextureId); - BufferBuilder bufferBuilder = RenderSystem.renderThreadTesselator().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLIT_SCREEN); - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(1.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(1.0F, 1.0F, 0.0F); - bufferBuilder.addVertex(0.0F, 1.0F, 0.0F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - GlStateManager._depthMask(true); - GlStateManager._colorMask(true, true, true, true); - } + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer = autoStorageIndexBuffer.getBuffer(6); + GpuBuffer gpuBuffer2 = RenderSystem.getQuadVertexBuffer(); - public void clear() { - RenderSystem.assertOnRenderThreadOrInit(); - this.bindWrite(true); - GlStateManager._clearColor(this.clearChannels[0], this.clearChannels[1], this.clearChannels[2], this.clearChannels[3]); - int i = 16384; - if (this.useDepth) { - GlStateManager._clearDepth(1.0); - i |= 256; + try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(texture, OptionalInt.empty())) { + renderPass.setPipeline(RenderPipelines.ENTITY_OUTLINE_BLIT); + renderPass.setVertexBuffer(0, gpuBuffer2); + renderPass.setIndexBuffer(gpuBuffer, autoStorageIndexBuffer.type()); + renderPass.bindSampler("InSampler", this.colorTexture); + renderPass.drawIndexed(0, 6); } - - GlStateManager._clear(i); - this.unbindWrite(); } - public int getColorTextureId() { - return this.colorTextureId; + @Nullable + public GpuTexture getColorTexture() { + return this.colorTexture; } - public int getDepthTextureId() { - return this.depthBufferId; + @Nullable + public GpuTexture getDepthTexture() { + return this.depthTexture; } } diff --git a/com/mojang/blaze3d/pipeline/TextureTarget.java b/com/mojang/blaze3d/pipeline/TextureTarget.java index c5d45e33..9a197c93 100644 --- a/com/mojang/blaze3d/pipeline/TextureTarget.java +++ b/com/mojang/blaze3d/pipeline/TextureTarget.java @@ -3,12 +3,13 @@ package com.mojang.blaze3d.pipeline; import com.mojang.blaze3d.systems.RenderSystem; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class TextureTarget extends RenderTarget { - public TextureTarget(int i, int j, boolean bl) { - super(bl); - RenderSystem.assertOnRenderThreadOrInit(); - this.resize(i, j); + public TextureTarget(@Nullable String name, int width, int height, boolean useDepth) { + super(name, useDepth); + RenderSystem.assertOnRenderThread(); + this.resize(width, height); } } diff --git a/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java b/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java index 69e491e7..2a8a2b2e 100644 --- a/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java +++ b/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java @@ -12,7 +12,7 @@ import net.minecraft.server.dedicated.ServerWatchdog; public class ClientShutdownWatchdog { private static final Duration CRASH_REPORT_PRELOAD_LOAD = Duration.ofSeconds(15L); - public static void startShutdownWatchdog(File file, long l) { + public static void startShutdownWatchdog(File file, long threadId) { Thread thread = new Thread(() -> { try { Thread.sleep(CRASH_REPORT_PRELOAD_LOAD); @@ -20,7 +20,7 @@ public class ClientShutdownWatchdog { return; } - CrashReport crashReport = ServerWatchdog.createWatchdogCrashReport("Client shutdown", l); + CrashReport crashReport = ServerWatchdog.createWatchdogCrashReport("Client shutdown", threadId); Minecraft.saveReport(file, crashReport); }); thread.setDaemon(true); diff --git a/com/mojang/blaze3d/platform/DepthTestFunction.java b/com/mojang/blaze3d/platform/DepthTestFunction.java new file mode 100644 index 00000000..d90b0ab1 --- /dev/null +++ b/com/mojang/blaze3d/platform/DepthTestFunction.java @@ -0,0 +1,15 @@ +package com.mojang.blaze3d.platform; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum DepthTestFunction { + NO_DEPTH_TEST, + EQUAL_DEPTH_TEST, + LEQUAL_DEPTH_TEST, + LESS_DEPTH_TEST, + GREATER_DEPTH_TEST; +} diff --git a/com/mojang/blaze3d/platform/DestFactor.java b/com/mojang/blaze3d/platform/DestFactor.java new file mode 100644 index 00000000..5d9b6ab4 --- /dev/null +++ b/com/mojang/blaze3d/platform/DestFactor.java @@ -0,0 +1,24 @@ +package com.mojang.blaze3d.platform; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum DestFactor { + CONSTANT_ALPHA, + CONSTANT_COLOR, + DST_ALPHA, + DST_COLOR, + ONE, + ONE_MINUS_CONSTANT_ALPHA, + ONE_MINUS_CONSTANT_COLOR, + ONE_MINUS_DST_ALPHA, + ONE_MINUS_DST_COLOR, + ONE_MINUS_SRC_ALPHA, + ONE_MINUS_SRC_COLOR, + SRC_ALPHA, + SRC_COLOR, + ZERO; +} diff --git a/com/mojang/blaze3d/platform/DisplayData.java b/com/mojang/blaze3d/platform/DisplayData.java index b1db3451..bc445ee2 100644 --- a/com/mojang/blaze3d/platform/DisplayData.java +++ b/com/mojang/blaze3d/platform/DisplayData.java @@ -5,18 +5,12 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class DisplayData { - public final int width; - public final int height; - public final OptionalInt fullscreenWidth; - public final OptionalInt fullscreenHeight; - public final boolean isFullscreen; +public record DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) { + public DisplayData withSize(int width, int height) { + return new DisplayData(width, height, this.fullscreenWidth, this.fullscreenHeight, this.isFullscreen); + } - public DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) { - this.width = width; - this.height = height; - this.fullscreenWidth = fullscreenWidth; - this.fullscreenHeight = fullscreenHeight; - this.isFullscreen = isFullscreen; + public DisplayData withFullscreen(boolean fullscreen) { + return new DisplayData(this.width, this.height, this.fullscreenWidth, this.fullscreenHeight, fullscreen); } } diff --git a/com/mojang/blaze3d/platform/FramerateLimitTracker.java b/com/mojang/blaze3d/platform/FramerateLimitTracker.java index 5404bf17..24d31888 100644 --- a/com/mojang/blaze3d/platform/FramerateLimitTracker.java +++ b/com/mojang/blaze3d/platform/FramerateLimitTracker.java @@ -27,30 +27,57 @@ public class FramerateLimitTracker { } public int getFramerateLimit() { + return switch (this.getThrottleReason()) { + case NONE -> this.framerateLimit; + case WINDOW_ICONIFIED -> 10; + case LONG_AFK -> 10; + case SHORT_AFK -> Math.min(this.framerateLimit, 30); + case OUT_OF_LEVEL_MENU -> 60; + }; + } + + public FramerateLimitTracker.FramerateThrottleReason getThrottleReason() { InactivityFpsLimit inactivityFpsLimit = this.options.inactivityFpsLimit().get(); if (this.minecraft.getWindow().isIconified()) { - return 10; + return FramerateLimitTracker.FramerateThrottleReason.WINDOW_ICONIFIED; } else { if (inactivityFpsLimit == InactivityFpsLimit.AFK) { long l = Util.getMillis() - this.latestInputTime; if (l > 600000L) { - return 10; + return FramerateLimitTracker.FramerateThrottleReason.LONG_AFK; } if (l > 60000L) { - return Math.min(this.framerateLimit, 30); + return FramerateLimitTracker.FramerateThrottleReason.SHORT_AFK; } } - return this.minecraft.level != null || this.minecraft.screen == null && this.minecraft.getOverlay() == null ? this.framerateLimit : 60; + return this.minecraft.level != null || this.minecraft.screen == null && this.minecraft.getOverlay() == null + ? FramerateLimitTracker.FramerateThrottleReason.NONE + : FramerateLimitTracker.FramerateThrottleReason.OUT_OF_LEVEL_MENU; } } - public void setFramerateLimit(int i) { - this.framerateLimit = i; + public boolean isHeavilyThrottled() { + FramerateLimitTracker.FramerateThrottleReason framerateThrottleReason = this.getThrottleReason(); + return framerateThrottleReason == FramerateLimitTracker.FramerateThrottleReason.WINDOW_ICONIFIED + || framerateThrottleReason == FramerateLimitTracker.FramerateThrottleReason.LONG_AFK; + } + + public void setFramerateLimit(int framerateLimit) { + this.framerateLimit = framerateLimit; } public void onInputReceived() { this.latestInputTime = Util.getMillis(); } + + @Environment(EnvType.CLIENT) + public static enum FramerateThrottleReason { + NONE, + WINDOW_ICONIFIED, + LONG_AFK, + SHORT_AFK, + OUT_OF_LEVEL_MENU; + } } diff --git a/com/mojang/blaze3d/platform/GLX.java b/com/mojang/blaze3d/platform/GLX.java index d81e7dae..57aec956 100644 --- a/com/mojang/blaze3d/platform/GLX.java +++ b/com/mojang/blaze3d/platform/GLX.java @@ -4,11 +4,6 @@ import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.mojang.blaze3d.DontObfuscate; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.logging.LogUtils; import java.util.List; import java.util.Locale; @@ -17,7 +12,7 @@ import java.util.function.LongSupplier; import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.CoreShaders; +import org.jetbrains.annotations.Nullable; import org.lwjgl.Version; import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFWErrorCallback; @@ -32,15 +27,9 @@ import oshi.hardware.CentralProcessor; @DontObfuscate public class GLX { private static final Logger LOGGER = LogUtils.getLogger(); + @Nullable private static String cpuInfo; - public static String getOpenGLVersionString() { - RenderSystem.assertOnRenderThread(); - return GLFW.glfwGetCurrentContext() == 0L - ? "NO CONTEXT" - : GlStateManager._getString(7937) + " GL version " + GlStateManager._getString(7938) + ", " + GlStateManager._getString(7936); - } - public static int _getRefreshRate(Window window) { RenderSystem.assertOnRenderThread(); long l = GLFW.glfwGetWindowMonitor(window.getWindow()); @@ -90,68 +79,19 @@ public class GLX { return GLFW.glfwWindowShouldClose(window.getWindow()); } - public static void _init(int i, boolean bl) { - try { - CentralProcessor centralProcessor = new SystemInfo().getHardware().getProcessor(); - cpuInfo = String.format(Locale.ROOT, "%dx %s", centralProcessor.getLogicalProcessorCount(), centralProcessor.getProcessorIdentifier().getName()) - .replaceAll("\\s+", " "); - } catch (Throwable var3) { - } - - GlDebug.enableDebugCallback(i, bl); - } - public static String _getCpuInfo() { - return cpuInfo == null ? "" : cpuInfo; - } + if (cpuInfo == null) { + cpuInfo = ""; - public static void _renderCrosshair(int i, boolean bl, boolean bl2, boolean bl3) { - if (bl || bl2 || bl3) { - RenderSystem.assertOnRenderThread(); - GlStateManager._depthMask(false); - GlStateManager._disableCull(); - RenderSystem.setShader(CoreShaders.RENDERTYPE_LINES); - Tesselator tesselator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.LINES, DefaultVertexFormat.POSITION_COLOR_NORMAL); - RenderSystem.lineWidth(4.0F); - if (bl) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-16777216).setNormal(1.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(i, 0.0F, 0.0F).setColor(-16777216).setNormal(1.0F, 0.0F, 0.0F); + try { + CentralProcessor centralProcessor = new SystemInfo().getHardware().getProcessor(); + cpuInfo = String.format(Locale.ROOT, "%dx %s", centralProcessor.getLogicalProcessorCount(), centralProcessor.getProcessorIdentifier().getName()) + .replaceAll("\\s+", " "); + } catch (Throwable var1) { } - - if (bl2) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-16777216).setNormal(0.0F, 1.0F, 0.0F); - bufferBuilder.addVertex(0.0F, i, 0.0F).setColor(-16777216).setNormal(0.0F, 1.0F, 0.0F); - } - - if (bl3) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-16777216).setNormal(0.0F, 0.0F, 1.0F); - bufferBuilder.addVertex(0.0F, 0.0F, i).setColor(-16777216).setNormal(0.0F, 0.0F, 1.0F); - } - - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.lineWidth(2.0F); - bufferBuilder = tesselator.begin(VertexFormat.Mode.LINES, DefaultVertexFormat.POSITION_COLOR_NORMAL); - if (bl) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-65536).setNormal(1.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(i, 0.0F, 0.0F).setColor(-65536).setNormal(1.0F, 0.0F, 0.0F); - } - - if (bl2) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-16711936).setNormal(0.0F, 1.0F, 0.0F); - bufferBuilder.addVertex(0.0F, i, 0.0F).setColor(-16711936).setNormal(0.0F, 1.0F, 0.0F); - } - - if (bl3) { - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-8421377).setNormal(0.0F, 0.0F, 1.0F); - bufferBuilder.addVertex(0.0F, 0.0F, i).setColor(-8421377).setNormal(0.0F, 0.0F, 1.0F); - } - - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.lineWidth(1.0F); - GlStateManager._enableCull(); - GlStateManager._depthMask(true); } + + return cpuInfo; } public static T make(Supplier supplier) { diff --git a/com/mojang/blaze3d/platform/GlConst.java b/com/mojang/blaze3d/platform/GlConst.java deleted file mode 100644 index afbde063..00000000 --- a/com/mojang/blaze3d/platform/GlConst.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.mojang.blaze3d.platform; - -import com.mojang.blaze3d.DontObfuscate; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -@DontObfuscate -public class GlConst { - public static final int GL_READ_FRAMEBUFFER = 36008; - public static final int GL_DRAW_FRAMEBUFFER = 36009; - public static final int GL_TRUE = 1; - public static final int GL_FALSE = 0; - public static final int GL_NONE = 0; - public static final int GL_LINES = 1; - public static final int GL_LINE_STRIP = 3; - public static final int GL_TRIANGLE_STRIP = 5; - public static final int GL_TRIANGLE_FAN = 6; - public static final int GL_TRIANGLES = 4; - public static final int GL_WRITE_ONLY = 35001; - public static final int GL_READ_ONLY = 35000; - public static final int GL_MAP_READ_BIT = 1; - public static final int GL_EQUAL = 514; - public static final int GL_LEQUAL = 515; - public static final int GL_GREATER = 516; - public static final int GL_GEQUAL = 518; - public static final int GL_ALWAYS = 519; - public static final int GL_TEXTURE_MAG_FILTER = 10240; - public static final int GL_TEXTURE_MIN_FILTER = 10241; - public static final int GL_TEXTURE_WRAP_S = 10242; - public static final int GL_TEXTURE_WRAP_T = 10243; - public static final int GL_NEAREST = 9728; - public static final int GL_LINEAR = 9729; - public static final int GL_NEAREST_MIPMAP_LINEAR = 9986; - public static final int GL_LINEAR_MIPMAP_LINEAR = 9987; - public static final int GL_CLAMP_TO_EDGE = 33071; - public static final int GL_FRONT = 1028; - public static final int GL_FRONT_AND_BACK = 1032; - public static final int GL_LINE = 6913; - public static final int GL_FILL = 6914; - public static final int GL_BYTE = 5120; - public static final int GL_UNSIGNED_BYTE = 5121; - public static final int GL_SHORT = 5122; - public static final int GL_UNSIGNED_SHORT = 5123; - public static final int GL_INT = 5124; - public static final int GL_UNSIGNED_INT = 5125; - public static final int GL_FLOAT = 5126; - public static final int GL_ZERO = 0; - public static final int GL_ONE = 1; - public static final int GL_SRC_COLOR = 768; - public static final int GL_ONE_MINUS_SRC_COLOR = 769; - public static final int GL_SRC_ALPHA = 770; - public static final int GL_ONE_MINUS_SRC_ALPHA = 771; - public static final int GL_DST_ALPHA = 772; - public static final int GL_ONE_MINUS_DST_ALPHA = 773; - public static final int GL_DST_COLOR = 774; - public static final int GL_ONE_MINUS_DST_COLOR = 775; - public static final int GL_REPLACE = 7681; - public static final int GL_DEPTH_BUFFER_BIT = 256; - public static final int GL_COLOR_BUFFER_BIT = 16384; - public static final int GL_RGBA8 = 32856; - public static final int GL_PROXY_TEXTURE_2D = 32868; - public static final int GL_RGBA = 6408; - public static final int GL_TEXTURE_WIDTH = 4096; - public static final int GL_BGR = 32992; - public static final int GL_FUNC_ADD = 32774; - public static final int GL_MIN = 32775; - public static final int GL_MAX = 32776; - public static final int GL_FUNC_SUBTRACT = 32778; - public static final int GL_FUNC_REVERSE_SUBTRACT = 32779; - public static final int GL_DEPTH_COMPONENT24 = 33190; - public static final int GL_STATIC_DRAW = 35044; - public static final int GL_DYNAMIC_DRAW = 35048; - public static final int GL_STREAM_DRAW = 35040; - public static final int GL_STATIC_READ = 35045; - public static final int GL_DYNAMIC_READ = 35049; - public static final int GL_STREAM_READ = 35041; - public static final int GL_STATIC_COPY = 35046; - public static final int GL_DYNAMIC_COPY = 35050; - public static final int GL_STREAM_COPY = 35042; - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 37143; - public static final int GL_TIMEOUT_EXPIRED = 37147; - public static final int GL_WAIT_FAILED = 37149; - public static final int GL_UNPACK_SWAP_BYTES = 3312; - public static final int GL_UNPACK_LSB_FIRST = 3313; - public static final int GL_UNPACK_ROW_LENGTH = 3314; - public static final int GL_UNPACK_SKIP_ROWS = 3315; - public static final int GL_UNPACK_SKIP_PIXELS = 3316; - public static final int GL_UNPACK_ALIGNMENT = 3317; - public static final int GL_PACK_ALIGNMENT = 3333; - public static final int GL_MAX_TEXTURE_SIZE = 3379; - public static final int GL_TEXTURE_2D = 3553; - public static final int GL_DEPTH_COMPONENT = 6402; - public static final int GL_DEPTH_COMPONENT32 = 33191; - public static final int GL_FRAMEBUFFER = 36160; - public static final int GL_RENDERBUFFER = 36161; - public static final int GL_COLOR_ATTACHMENT0 = 36064; - public static final int GL_DEPTH_ATTACHMENT = 36096; - public static final int GL_FRAMEBUFFER_COMPLETE = 36053; - public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054; - public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055; - public static final int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 36059; - public static final int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 36060; - public static final int GL_FRAMEBUFFER_UNSUPPORTED = 36061; - public static final int GL_LINK_STATUS = 35714; - public static final int GL_COMPILE_STATUS = 35713; - public static final int GL_VERTEX_SHADER = 35633; - public static final int GL_FRAGMENT_SHADER = 35632; - public static final int GL_TEXTURE0 = 33984; - public static final int GL_TEXTURE1 = 33985; - public static final int GL_TEXTURE2 = 33986; - public static final int GL_DEPTH_TEXTURE_MODE = 34891; - public static final int GL_TEXTURE_COMPARE_MODE = 34892; - public static final int GL_ARRAY_BUFFER = 34962; - public static final int GL_ELEMENT_ARRAY_BUFFER = 34963; - public static final int GL_PIXEL_PACK_BUFFER = 35051; - public static final int GL_COPY_READ_BUFFER = 36662; - public static final int GL_COPY_WRITE_BUFFER = 36663; - public static final int GL_PIXEL_UNPACK_BUFFER = 35052; - public static final int GL_UNIFORM_BUFFER = 35345; - public static final int GL_ALPHA_BIAS = 3357; - public static final int GL_RGB = 6407; - public static final int GL_RG = 33319; - public static final int GL_RED = 6403; - public static final int GL_OUT_OF_MEMORY = 1285; -} diff --git a/com/mojang/blaze3d/platform/GlDebug.java b/com/mojang/blaze3d/platform/GlDebug.java deleted file mode 100644 index 22bad349..00000000 --- a/com/mojang/blaze3d/platform/GlDebug.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.mojang.blaze3d.platform; - -import com.google.common.collect.EvictingQueue; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import com.mojang.logging.LogUtils; -import java.util.List; -import java.util.Queue; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import org.jetbrains.annotations.Nullable; -import org.lwjgl.opengl.ARBDebugOutput; -import org.lwjgl.opengl.GL; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLCapabilities; -import org.lwjgl.opengl.GLDebugMessageARBCallback; -import org.lwjgl.opengl.GLDebugMessageCallback; -import org.lwjgl.opengl.KHRDebug; -import org.slf4j.Logger; - -@Environment(EnvType.CLIENT) -public class GlDebug { - private static final Logger LOGGER = LogUtils.getLogger(); - private static final int CIRCULAR_LOG_SIZE = 10; - private static final Queue MESSAGE_BUFFER = EvictingQueue.create(10); - @Nullable - private static volatile GlDebug.LogEntry lastEntry; - private static final List DEBUG_LEVELS = ImmutableList.of(37190, 37191, 37192, 33387); - private static final List DEBUG_LEVELS_ARB = ImmutableList.of(37190, 37191, 37192); - private static boolean debugEnabled; - - private static String printUnknownToken(int token) { - return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; - } - - public static String sourceToString(int source) { - switch (source) { - case 33350: - return "API"; - case 33351: - return "WINDOW SYSTEM"; - case 33352: - return "SHADER COMPILER"; - case 33353: - return "THIRD PARTY"; - case 33354: - return "APPLICATION"; - case 33355: - return "OTHER"; - default: - return printUnknownToken(source); - } - } - - public static String typeToString(int type) { - switch (type) { - case 33356: - return "ERROR"; - case 33357: - return "DEPRECATED BEHAVIOR"; - case 33358: - return "UNDEFINED BEHAVIOR"; - case 33359: - return "PORTABILITY"; - case 33360: - return "PERFORMANCE"; - case 33361: - return "OTHER"; - case 33384: - return "MARKER"; - default: - return printUnknownToken(type); - } - } - - public static String severityToString(int severity) { - switch (severity) { - case 33387: - return "NOTIFICATION"; - case 37190: - return "HIGH"; - case 37191: - return "MEDIUM"; - case 37192: - return "LOW"; - default: - return printUnknownToken(severity); - } - } - - /** - * @param source The GLenum source represented as an ordinal integer. - * @param type The GLenum type represented as an ordinal integer. - * @param id The unbounded integer id of the message callback. - * @param severity The GLenum severity represented as an ordinal integer. - * @param messageLength The {@link org.lwjgl.opengl.GLDebugMessageCallback} length argument. - * @param message The {@link org.lwjgl.opengl.GLDebugMessageCallback} message argument - * @param userParam A user supplied pointer that will be passed on each invocation of callback. - */ - private static void printDebugLog(int source, int type, int id, int severity, int messageLength, long message, long userParam) { - String string = GLDebugMessageCallback.getMessage(messageLength, message); - GlDebug.LogEntry logEntry; - synchronized (MESSAGE_BUFFER) { - logEntry = lastEntry; - if (logEntry != null && logEntry.isSame(source, type, id, severity, string)) { - logEntry.count++; - } else { - logEntry = new GlDebug.LogEntry(source, type, id, severity, string); - MESSAGE_BUFFER.add(logEntry); - lastEntry = logEntry; - } - } - - LOGGER.info("OpenGL debug message: {}", logEntry); - } - - public static List getLastOpenGlDebugMessages() { - synchronized (MESSAGE_BUFFER) { - List list = Lists.newArrayListWithCapacity(MESSAGE_BUFFER.size()); - - for (GlDebug.LogEntry logEntry : MESSAGE_BUFFER) { - list.add(logEntry + " x " + logEntry.count); - } - - return list; - } - } - - public static boolean isDebugEnabled() { - return debugEnabled; - } - - public static void enableDebugCallback(int debugVerbosity, boolean synchronous) { - if (debugVerbosity > 0) { - GLCapabilities gLCapabilities = GL.getCapabilities(); - if (gLCapabilities.GL_KHR_debug) { - debugEnabled = true; - GL11.glEnable(37600); - if (synchronous) { - GL11.glEnable(33346); - } - - for (int i = 0; i < DEBUG_LEVELS.size(); i++) { - boolean bl = i < debugVerbosity; - KHRDebug.glDebugMessageControl(4352, 4352, (Integer)DEBUG_LEVELS.get(i), (int[])null, bl); - } - - KHRDebug.glDebugMessageCallback(GLX.make(GLDebugMessageCallback.create(GlDebug::printDebugLog), DebugMemoryUntracker::untrack), 0L); - } else if (gLCapabilities.GL_ARB_debug_output) { - debugEnabled = true; - if (synchronous) { - GL11.glEnable(33346); - } - - for (int i = 0; i < DEBUG_LEVELS_ARB.size(); i++) { - boolean bl = i < debugVerbosity; - ARBDebugOutput.glDebugMessageControlARB(4352, 4352, (Integer)DEBUG_LEVELS_ARB.get(i), (int[])null, bl); - } - - ARBDebugOutput.glDebugMessageCallbackARB(GLX.make(GLDebugMessageARBCallback.create(GlDebug::printDebugLog), DebugMemoryUntracker::untrack), 0L); - } - } - } - - @Environment(EnvType.CLIENT) - static class LogEntry { - private final int id; - private final int source; - private final int type; - private final int severity; - private final String message; - int count = 1; - - LogEntry(int source, int type, int id, int severity, String message) { - this.id = id; - this.source = source; - this.type = type; - this.severity = severity; - this.message = message; - } - - boolean isSame(int source, int type, int id, int severity, String message) { - return type == this.type && source == this.source && id == this.id && severity == this.severity && message.equals(this.message); - } - - public String toString() { - return "id=" - + this.id - + ", source=" - + GlDebug.sourceToString(this.source) - + ", type=" - + GlDebug.typeToString(this.type) - + ", severity=" - + GlDebug.severityToString(this.severity) - + ", message='" - + this.message - + "'"; - } - } -} diff --git a/com/mojang/blaze3d/platform/GlStateManager.java b/com/mojang/blaze3d/platform/GlStateManager.java deleted file mode 100644 index c1e6a127..00000000 --- a/com/mojang/blaze3d/platform/GlStateManager.java +++ /dev/null @@ -1,988 +0,0 @@ -package com.mojang.blaze3d.platform; - -import com.google.common.base.Charsets; -import com.mojang.blaze3d.DontObfuscate; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.jtracy.Plot; -import com.mojang.jtracy.TracyClient; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.util.function.Consumer; -import java.util.stream.IntStream; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.Util; -import org.jetbrains.annotations.Nullable; -import org.joml.Matrix4f; -import org.joml.Vector3f; -import org.lwjgl.PointerBuffer; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL13; -import org.lwjgl.opengl.GL14; -import org.lwjgl.opengl.GL15; -import org.lwjgl.opengl.GL20; -import org.lwjgl.opengl.GL20C; -import org.lwjgl.opengl.GL30; -import org.lwjgl.opengl.GL32; -import org.lwjgl.opengl.GL32C; -import org.lwjgl.system.MemoryStack; -import org.lwjgl.system.MemoryUtil; - -@Environment(EnvType.CLIENT) -@DontObfuscate -public class GlStateManager { - private static final boolean ON_LINUX = Util.getPlatform() == Util.OS.LINUX; - private static final Plot PLOT_TEXTURES = TracyClient.createPlot("GPU Textures"); - private static int numTextures = 0; - private static final Plot PLOT_BUFFERS = TracyClient.createPlot("GPU Buffers"); - private static int numBuffers = 0; - public static final int TEXTURE_COUNT = 12; - private static final GlStateManager.BlendState BLEND = new GlStateManager.BlendState(); - private static final GlStateManager.DepthState DEPTH = new GlStateManager.DepthState(); - private static final GlStateManager.CullState CULL = new GlStateManager.CullState(); - private static final GlStateManager.PolygonOffsetState POLY_OFFSET = new GlStateManager.PolygonOffsetState(); - private static final GlStateManager.ColorLogicState COLOR_LOGIC = new GlStateManager.ColorLogicState(); - private static final GlStateManager.StencilState STENCIL = new GlStateManager.StencilState(); - private static final GlStateManager.ScissorState SCISSOR = new GlStateManager.ScissorState(); - private static final GlStateManager.FramebufferState READ_FRAMEBUFFER = new GlStateManager.FramebufferState(); - private static final GlStateManager.FramebufferState DRAW_FRAMEBUFFER = new GlStateManager.FramebufferState(); - private static int activeTexture; - private static final GlStateManager.TextureState[] TEXTURES = (GlStateManager.TextureState[])IntStream.range(0, 12) - .mapToObj(i -> new GlStateManager.TextureState()) - .toArray(GlStateManager.TextureState[]::new); - private static final GlStateManager.ColorMask COLOR_MASK = new GlStateManager.ColorMask(); - - public static void _disableScissorTest() { - RenderSystem.assertOnRenderThreadOrInit(); - SCISSOR.mode.disable(); - } - - public static void _enableScissorTest() { - RenderSystem.assertOnRenderThreadOrInit(); - SCISSOR.mode.enable(); - } - - public static void _scissorBox(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - GL20.glScissor(i, j, k, l); - } - - public static void _disableDepthTest() { - RenderSystem.assertOnRenderThreadOrInit(); - DEPTH.mode.disable(); - } - - public static void _enableDepthTest() { - RenderSystem.assertOnRenderThreadOrInit(); - DEPTH.mode.enable(); - } - - public static void _depthFunc(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - if (i != DEPTH.func) { - DEPTH.func = i; - GL11.glDepthFunc(i); - } - } - - public static void _depthMask(boolean bl) { - RenderSystem.assertOnRenderThread(); - if (bl != DEPTH.mask) { - DEPTH.mask = bl; - GL11.glDepthMask(bl); - } - } - - public static void _disableBlend() { - RenderSystem.assertOnRenderThread(); - BLEND.mode.disable(); - } - - public static void _enableBlend() { - RenderSystem.assertOnRenderThread(); - BLEND.mode.enable(); - } - - public static void _blendFunc(int i, int j) { - RenderSystem.assertOnRenderThread(); - if (i != BLEND.srcRgb || j != BLEND.dstRgb) { - BLEND.srcRgb = i; - BLEND.dstRgb = j; - GL11.glBlendFunc(i, j); - } - } - - public static void _blendFuncSeparate(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThread(); - if (i != BLEND.srcRgb || j != BLEND.dstRgb || k != BLEND.srcAlpha || l != BLEND.dstAlpha) { - BLEND.srcRgb = i; - BLEND.dstRgb = j; - BLEND.srcAlpha = k; - BLEND.dstAlpha = l; - glBlendFuncSeparate(i, j, k, l); - } - } - - public static void _blendEquation(int i) { - RenderSystem.assertOnRenderThread(); - GL14.glBlendEquation(i); - } - - public static int glGetProgrami(int i, int j) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetProgrami(i, j); - } - - public static void glAttachShader(int i, int j) { - RenderSystem.assertOnRenderThread(); - GL20.glAttachShader(i, j); - } - - public static void glDeleteShader(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glDeleteShader(i); - } - - public static int glCreateShader(int i) { - RenderSystem.assertOnRenderThread(); - return GL20.glCreateShader(i); - } - - public static void glShaderSource(int i, String string) { - RenderSystem.assertOnRenderThread(); - byte[] bs = string.getBytes(Charsets.UTF_8); - ByteBuffer byteBuffer = MemoryUtil.memAlloc(bs.length + 1); - byteBuffer.put(bs); - byteBuffer.put((byte)0); - byteBuffer.flip(); - - try (MemoryStack memoryStack = MemoryStack.stackPush()) { - PointerBuffer pointerBuffer = memoryStack.mallocPointer(1); - pointerBuffer.put(byteBuffer); - GL20C.nglShaderSource(i, 1, pointerBuffer.address0(), 0L); - } finally { - MemoryUtil.memFree(byteBuffer); - } - } - - public static void glCompileShader(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glCompileShader(i); - } - - public static int glGetShaderi(int i, int j) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetShaderi(i, j); - } - - public static void _glUseProgram(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glUseProgram(i); - } - - public static int glCreateProgram() { - RenderSystem.assertOnRenderThread(); - return GL20.glCreateProgram(); - } - - public static void glDeleteProgram(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glDeleteProgram(i); - } - - public static void glLinkProgram(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glLinkProgram(i); - } - - public static int _glGetUniformLocation(int i, CharSequence charSequence) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetUniformLocation(i, charSequence); - } - - public static void _glUniform1(int i, IntBuffer intBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform1iv(i, intBuffer); - } - - public static void _glUniform1i(int i, int j) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform1i(i, j); - } - - public static void _glUniform1(int i, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform1fv(i, floatBuffer); - } - - public static void _glUniform2(int i, IntBuffer intBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform2iv(i, intBuffer); - } - - public static void _glUniform2(int i, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform2fv(i, floatBuffer); - } - - public static void _glUniform3(int i, IntBuffer intBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform3iv(i, intBuffer); - } - - public static void _glUniform3(int i, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform3fv(i, floatBuffer); - } - - public static void _glUniform4(int i, IntBuffer intBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform4iv(i, intBuffer); - } - - public static void _glUniform4(int i, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniform4fv(i, floatBuffer); - } - - public static void _glUniformMatrix2(int i, boolean bl, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniformMatrix2fv(i, bl, floatBuffer); - } - - public static void _glUniformMatrix3(int i, boolean bl, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniformMatrix3fv(i, bl, floatBuffer); - } - - public static void _glUniformMatrix4(int i, boolean bl, FloatBuffer floatBuffer) { - RenderSystem.assertOnRenderThread(); - GL20.glUniformMatrix4fv(i, bl, floatBuffer); - } - - public static int _glGetAttribLocation(int i, CharSequence charSequence) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetAttribLocation(i, charSequence); - } - - public static void _glBindAttribLocation(int i, int j, CharSequence charSequence) { - RenderSystem.assertOnRenderThread(); - GL20.glBindAttribLocation(i, j, charSequence); - } - - public static int _glGenBuffers() { - RenderSystem.assertOnRenderThreadOrInit(); - numBuffers++; - PLOT_BUFFERS.setValue(numBuffers); - return GL15.glGenBuffers(); - } - - public static int _glGenVertexArrays() { - RenderSystem.assertOnRenderThreadOrInit(); - return GL30.glGenVertexArrays(); - } - - public static void _glBindBuffer(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GL15.glBindBuffer(i, j); - } - - public static void _glBindVertexArray(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glBindVertexArray(i); - } - - public static void _glBufferData(int i, ByteBuffer byteBuffer, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GL15.glBufferData(i, byteBuffer, j); - } - - public static void _glBufferSubData(int i, int j, ByteBuffer byteBuffer) { - RenderSystem.assertOnRenderThreadOrInit(); - GL15.glBufferSubData(i, (long)j, byteBuffer); - } - - public static void _glBufferData(int i, long l, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GL15.glBufferData(i, l, j); - } - - @Nullable - public static ByteBuffer _glMapBuffer(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL15.glMapBuffer(i, j); - } - - @Nullable - public static ByteBuffer _glMapBufferRange(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL30.glMapBufferRange(i, j, k, l); - } - - public static void _glUnmapBuffer(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL15.glUnmapBuffer(i); - } - - public static void _glDeleteBuffers(int i) { - RenderSystem.assertOnRenderThread(); - if (ON_LINUX) { - GL32C.glBindBuffer(34962, i); - GL32C.glBufferData(34962, 0L, 35048); - GL32C.glBindBuffer(34962, 0); - } - - numBuffers--; - PLOT_BUFFERS.setValue(numBuffers); - GL15.glDeleteBuffers(i); - } - - public static void _glCopyTexSubImage2D(int i, int j, int k, int l, int m, int n, int o, int p) { - RenderSystem.assertOnRenderThreadOrInit(); - GL20.glCopyTexSubImage2D(i, j, k, l, m, n, o, p); - } - - public static void _glDeleteVertexArrays(int i) { - RenderSystem.assertOnRenderThread(); - GL30.glDeleteVertexArrays(i); - } - - public static void _glBindFramebuffer(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - - boolean bl = switch (i) { - case 36008 -> READ_FRAMEBUFFER.update(j); - case 36009 -> DRAW_FRAMEBUFFER.update(j); - case 36160 -> READ_FRAMEBUFFER.update(j) | DRAW_FRAMEBUFFER.update(j); - default -> true; - }; - if (bl) { - GL30.glBindFramebuffer(i, j); - } - } - - public static void _glBlitFrameBuffer(int i, int j, int k, int l, int m, int n, int o, int p, int q, int r) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glBlitFramebuffer(i, j, k, l, m, n, o, p, q, r); - } - - public static void _glBindRenderbuffer(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glBindRenderbuffer(i, j); - } - - public static void _glDeleteRenderbuffers(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glDeleteRenderbuffers(i); - } - - public static void _glDeleteFramebuffers(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glDeleteFramebuffers(i); - } - - public static int glGenFramebuffers() { - RenderSystem.assertOnRenderThreadOrInit(); - return GL30.glGenFramebuffers(); - } - - public static int glGenRenderbuffers() { - RenderSystem.assertOnRenderThreadOrInit(); - return GL30.glGenRenderbuffers(); - } - - public static void _glRenderbufferStorage(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glRenderbufferStorage(i, j, k, l); - } - - public static void _glFramebufferRenderbuffer(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glFramebufferRenderbuffer(i, j, k, l); - } - - public static int glCheckFramebufferStatus(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL30.glCheckFramebufferStatus(i); - } - - public static void _glFramebufferTexture2D(int i, int j, int k, int l, int m) { - RenderSystem.assertOnRenderThreadOrInit(); - GL30.glFramebufferTexture2D(i, j, k, l, m); - } - - public static int getBoundFramebuffer() { - RenderSystem.assertOnRenderThread(); - return _getInteger(36006); - } - - public static void glActiveTexture(int i) { - RenderSystem.assertOnRenderThread(); - GL13.glActiveTexture(i); - } - - public static void glBlendFuncSeparate(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThread(); - GL14.glBlendFuncSeparate(i, j, k, l); - } - - public static String glGetShaderInfoLog(int i, int j) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetShaderInfoLog(i, j); - } - - public static String glGetProgramInfoLog(int i, int j) { - RenderSystem.assertOnRenderThread(); - return GL20.glGetProgramInfoLog(i, j); - } - - public static void setupLevelDiffuseLighting(Vector3f vector3f, Vector3f vector3f2, Matrix4f matrix4f) { - RenderSystem.assertOnRenderThread(); - RenderSystem.setShaderLights(matrix4f.transformDirection(vector3f, new Vector3f()), matrix4f.transformDirection(vector3f2, new Vector3f())); - } - - public static void setupGuiFlatDiffuseLighting(Vector3f vector3f, Vector3f vector3f2) { - RenderSystem.assertOnRenderThread(); - Matrix4f matrix4f = new Matrix4f().rotationY((float) (-Math.PI / 8)).rotateX((float) (Math.PI * 3.0 / 4.0)); - setupLevelDiffuseLighting(vector3f, vector3f2, matrix4f); - } - - public static void setupGui3DDiffuseLighting(Vector3f vector3f, Vector3f vector3f2) { - RenderSystem.assertOnRenderThread(); - Matrix4f matrix4f = new Matrix4f() - .scaling(1.0F, -1.0F, 1.0F) - .rotateYXZ(1.0821041F, 3.2375858F, 0.0F) - .rotateYXZ((float) (-Math.PI / 8), (float) (Math.PI * 3.0 / 4.0), 0.0F); - setupLevelDiffuseLighting(vector3f, vector3f2, matrix4f); - } - - public static void _enableCull() { - RenderSystem.assertOnRenderThread(); - CULL.enable.enable(); - } - - public static void _disableCull() { - RenderSystem.assertOnRenderThread(); - CULL.enable.disable(); - } - - public static void _polygonMode(int i, int j) { - RenderSystem.assertOnRenderThread(); - GL11.glPolygonMode(i, j); - } - - public static void _enablePolygonOffset() { - RenderSystem.assertOnRenderThread(); - POLY_OFFSET.fill.enable(); - } - - public static void _disablePolygonOffset() { - RenderSystem.assertOnRenderThread(); - POLY_OFFSET.fill.disable(); - } - - public static void _polygonOffset(float f, float g) { - RenderSystem.assertOnRenderThread(); - if (f != POLY_OFFSET.factor || g != POLY_OFFSET.units) { - POLY_OFFSET.factor = f; - POLY_OFFSET.units = g; - GL11.glPolygonOffset(f, g); - } - } - - public static void _enableColorLogicOp() { - RenderSystem.assertOnRenderThread(); - COLOR_LOGIC.enable.enable(); - } - - public static void _disableColorLogicOp() { - RenderSystem.assertOnRenderThread(); - COLOR_LOGIC.enable.disable(); - } - - public static void _logicOp(int i) { - RenderSystem.assertOnRenderThread(); - if (i != COLOR_LOGIC.op) { - COLOR_LOGIC.op = i; - GL11.glLogicOp(i); - } - } - - public static void _activeTexture(int i) { - RenderSystem.assertOnRenderThread(); - if (activeTexture != i - 33984) { - activeTexture = i - 33984; - glActiveTexture(i); - } - } - - public static void _texParameter(int i, int j, float f) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glTexParameterf(i, j, f); - } - - public static void _texParameter(int i, int j, int k) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glTexParameteri(i, j, k); - } - - public static int _getTexLevelParameter(int i, int j, int k) { - return GL11.glGetTexLevelParameteri(i, j, k); - } - - public static int _genTexture() { - RenderSystem.assertOnRenderThreadOrInit(); - numTextures++; - PLOT_TEXTURES.setValue(numTextures); - return GL11.glGenTextures(); - } - - public static void _genTextures(int[] is) { - RenderSystem.assertOnRenderThreadOrInit(); - numTextures += is.length; - PLOT_TEXTURES.setValue(numTextures); - GL11.glGenTextures(is); - } - - public static void _deleteTexture(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glDeleteTextures(i); - - for (GlStateManager.TextureState textureState : TEXTURES) { - if (textureState.binding == i) { - textureState.binding = -1; - } - } - - numTextures--; - PLOT_TEXTURES.setValue(numTextures); - } - - public static void _deleteTextures(int[] is) { - RenderSystem.assertOnRenderThreadOrInit(); - - for (GlStateManager.TextureState textureState : TEXTURES) { - for (int i : is) { - if (textureState.binding == i) { - textureState.binding = -1; - } - } - } - - GL11.glDeleteTextures(is); - numTextures -= is.length; - PLOT_TEXTURES.setValue(numTextures); - } - - public static void _bindTexture(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - if (i != TEXTURES[activeTexture].binding) { - TEXTURES[activeTexture].binding = i; - GL11.glBindTexture(3553, i); - } - } - - public static int _getActiveTexture() { - return activeTexture + 33984; - } - - public static void _texImage2D(int i, int j, int k, int l, int m, int n, int o, int p, @Nullable IntBuffer intBuffer) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glTexImage2D(i, j, k, l, m, n, o, p, intBuffer); - } - - public static void _texSubImage2D(int i, int j, int k, int l, int m, int n, int o, int p, long q) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glTexSubImage2D(i, j, k, l, m, n, o, p, q); - } - - public static void upload(int i, int j, int k, int l, int m, NativeImage.Format format, IntBuffer intBuffer, Consumer consumer) { - if (!RenderSystem.isOnRenderThreadOrInit()) { - RenderSystem.recordRenderCall(() -> _upload(i, j, k, l, m, format, intBuffer, consumer)); - } else { - _upload(i, j, k, l, m, format, intBuffer, consumer); - } - } - - private static void _upload(int i, int j, int k, int l, int m, NativeImage.Format format, IntBuffer intBuffer, Consumer consumer) { - try { - RenderSystem.assertOnRenderThreadOrInit(); - _pixelStore(3314, l); - _pixelStore(3316, 0); - _pixelStore(3315, 0); - format.setUnpackPixelStoreState(); - GL11.glTexSubImage2D(3553, i, j, k, l, m, format.glFormat(), 5121, intBuffer); - } finally { - consumer.accept(intBuffer); - } - } - - public static void _getTexImage(int i, int j, int k, int l, long m) { - RenderSystem.assertOnRenderThread(); - GL11.glGetTexImage(i, j, k, l, m); - } - - public static void _viewport(int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager.Viewport.INSTANCE.x = i; - GlStateManager.Viewport.INSTANCE.y = j; - GlStateManager.Viewport.INSTANCE.width = k; - GlStateManager.Viewport.INSTANCE.height = l; - GL11.glViewport(i, j, k, l); - } - - public static void _colorMask(boolean bl, boolean bl2, boolean bl3, boolean bl4) { - RenderSystem.assertOnRenderThread(); - if (bl != COLOR_MASK.red || bl2 != COLOR_MASK.green || bl3 != COLOR_MASK.blue || bl4 != COLOR_MASK.alpha) { - COLOR_MASK.red = bl; - COLOR_MASK.green = bl2; - COLOR_MASK.blue = bl3; - COLOR_MASK.alpha = bl4; - GL11.glColorMask(bl, bl2, bl3, bl4); - } - } - - public static void _stencilFunc(int i, int j, int k) { - RenderSystem.assertOnRenderThread(); - if (i != STENCIL.func.func || i != STENCIL.func.ref || i != STENCIL.func.mask) { - STENCIL.func.func = i; - STENCIL.func.ref = j; - STENCIL.func.mask = k; - GL11.glStencilFunc(i, j, k); - } - } - - public static void _stencilMask(int i) { - RenderSystem.assertOnRenderThread(); - if (i != STENCIL.mask) { - STENCIL.mask = i; - GL11.glStencilMask(i); - } - } - - public static void _stencilOp(int i, int j, int k) { - RenderSystem.assertOnRenderThread(); - if (i != STENCIL.fail || j != STENCIL.zfail || k != STENCIL.zpass) { - STENCIL.fail = i; - STENCIL.zfail = j; - STENCIL.zpass = k; - GL11.glStencilOp(i, j, k); - } - } - - public static void _clearDepth(double d) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glClearDepth(d); - } - - public static void _clearColor(float f, float g, float h, float i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glClearColor(f, g, h, i); - } - - public static void _clearStencil(int i) { - RenderSystem.assertOnRenderThread(); - GL11.glClearStencil(i); - } - - public static void _clear(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glClear(i); - if (MacosUtil.IS_MACOS) { - _getError(); - } - } - - public static void _glDrawPixels(int i, int j, int k, int l, long m) { - RenderSystem.assertOnRenderThread(); - GL11.glDrawPixels(i, j, k, l, m); - } - - public static void _vertexAttribPointer(int i, int j, int k, boolean bl, int l, long m) { - RenderSystem.assertOnRenderThread(); - GL20.glVertexAttribPointer(i, j, k, bl, l, m); - } - - public static void _vertexAttribIPointer(int i, int j, int k, int l, long m) { - RenderSystem.assertOnRenderThread(); - GL30.glVertexAttribIPointer(i, j, k, l, m); - } - - public static void _enableVertexAttribArray(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glEnableVertexAttribArray(i); - } - - public static void _disableVertexAttribArray(int i) { - RenderSystem.assertOnRenderThread(); - GL20.glDisableVertexAttribArray(i); - } - - public static void _drawElements(int i, int j, int k, long l) { - RenderSystem.assertOnRenderThread(); - GL11.glDrawElements(i, j, k, l); - } - - public static void _pixelStore(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - GL11.glPixelStorei(i, j); - } - - public static void _readPixels(int i, int j, int k, int l, int m, int n, ByteBuffer byteBuffer) { - RenderSystem.assertOnRenderThread(); - GL11.glReadPixels(i, j, k, l, m, n, byteBuffer); - } - - public static void _readPixels(int i, int j, int k, int l, int m, int n, long o) { - RenderSystem.assertOnRenderThread(); - GL11.glReadPixels(i, j, k, l, m, n, o); - } - - public static int _getError() { - RenderSystem.assertOnRenderThread(); - return GL11.glGetError(); - } - - public static String _getString(int i) { - RenderSystem.assertOnRenderThread(); - return GL11.glGetString(i); - } - - public static int _getInteger(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL11.glGetInteger(i); - } - - public static long _glFenceSync(int i, int j) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL32.glFenceSync(i, j); - } - - public static int _glClientWaitSync(long l, int i, long m) { - RenderSystem.assertOnRenderThreadOrInit(); - return GL32.glClientWaitSync(l, i, m); - } - - public static void _glDeleteSync(long l) { - RenderSystem.assertOnRenderThreadOrInit(); - GL32.glDeleteSync(l); - } - - @Environment(EnvType.CLIENT) - static class BlendState { - public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(3042); - public int srcRgb = 1; - public int dstRgb = 0; - public int srcAlpha = 1; - public int dstAlpha = 0; - } - - @Environment(EnvType.CLIENT) - static class BooleanState { - private final int state; - private boolean enabled; - - public BooleanState(int state) { - this.state = state; - } - - public void disable() { - this.setEnabled(false); - } - - public void enable() { - this.setEnabled(true); - } - - public void setEnabled(boolean enabled) { - RenderSystem.assertOnRenderThreadOrInit(); - if (enabled != this.enabled) { - this.enabled = enabled; - if (enabled) { - GL11.glEnable(this.state); - } else { - GL11.glDisable(this.state); - } - } - } - } - - @Environment(EnvType.CLIENT) - static class ColorLogicState { - public final GlStateManager.BooleanState enable = new GlStateManager.BooleanState(3058); - public int op = 5379; - } - - @Environment(EnvType.CLIENT) - static class ColorMask { - public boolean red = true; - public boolean green = true; - public boolean blue = true; - public boolean alpha = true; - } - - @Environment(EnvType.CLIENT) - static class CullState { - public final GlStateManager.BooleanState enable = new GlStateManager.BooleanState(2884); - public int mode = 1029; - } - - @Environment(EnvType.CLIENT) - static class DepthState { - public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(2929); - public boolean mask = true; - public int func = 513; - } - - @Environment(EnvType.CLIENT) - @DontObfuscate - public static enum DestFactor { - CONSTANT_ALPHA(32771), - CONSTANT_COLOR(32769), - DST_ALPHA(772), - DST_COLOR(774), - ONE(1), - ONE_MINUS_CONSTANT_ALPHA(32772), - ONE_MINUS_CONSTANT_COLOR(32770), - ONE_MINUS_DST_ALPHA(773), - ONE_MINUS_DST_COLOR(775), - ONE_MINUS_SRC_ALPHA(771), - ONE_MINUS_SRC_COLOR(769), - SRC_ALPHA(770), - SRC_COLOR(768), - ZERO(0); - - public final int value; - - private DestFactor(final int value) { - this.value = value; - } - } - - @Environment(EnvType.CLIENT) - static class FramebufferState { - public int binding; - - public boolean update(int i) { - if (i != this.binding) { - this.binding = i; - return true; - } else { - return false; - } - } - } - - @Environment(EnvType.CLIENT) - public static enum LogicOp { - AND(5377), - AND_INVERTED(5380), - AND_REVERSE(5378), - CLEAR(5376), - COPY(5379), - COPY_INVERTED(5388), - EQUIV(5385), - INVERT(5386), - NAND(5390), - NOOP(5381), - NOR(5384), - OR(5383), - OR_INVERTED(5389), - OR_REVERSE(5387), - SET(5391), - XOR(5382); - - public final int value; - - private LogicOp(final int value) { - this.value = value; - } - } - - @Environment(EnvType.CLIENT) - static class PolygonOffsetState { - public final GlStateManager.BooleanState fill = new GlStateManager.BooleanState(32823); - public final GlStateManager.BooleanState line = new GlStateManager.BooleanState(10754); - public float factor; - public float units; - } - - @Environment(EnvType.CLIENT) - static class ScissorState { - public final GlStateManager.BooleanState mode = new GlStateManager.BooleanState(3089); - } - - @Environment(EnvType.CLIENT) - @DontObfuscate - public static enum SourceFactor { - CONSTANT_ALPHA(32771), - CONSTANT_COLOR(32769), - DST_ALPHA(772), - DST_COLOR(774), - ONE(1), - ONE_MINUS_CONSTANT_ALPHA(32772), - ONE_MINUS_CONSTANT_COLOR(32770), - ONE_MINUS_DST_ALPHA(773), - ONE_MINUS_DST_COLOR(775), - ONE_MINUS_SRC_ALPHA(771), - ONE_MINUS_SRC_COLOR(769), - SRC_ALPHA(770), - SRC_ALPHA_SATURATE(776), - SRC_COLOR(768), - ZERO(0); - - public final int value; - - private SourceFactor(final int value) { - this.value = value; - } - } - - @Environment(EnvType.CLIENT) - static class StencilFunc { - public int func = 519; - public int ref; - public int mask = -1; - } - - @Environment(EnvType.CLIENT) - static class StencilState { - public final GlStateManager.StencilFunc func = new GlStateManager.StencilFunc(); - public int mask = -1; - public int fail = 7680; - public int zfail = 7680; - public int zpass = 7680; - } - - @Environment(EnvType.CLIENT) - static class TextureState { - public int binding; - } - - @Environment(EnvType.CLIENT) - public static enum Viewport { - INSTANCE; - - protected int x; - protected int y; - protected int width; - protected int height; - - public static int x() { - return INSTANCE.x; - } - - public static int y() { - return INSTANCE.y; - } - - public static int width() { - return INSTANCE.width; - } - - public static int height() { - return INSTANCE.height; - } - } -} diff --git a/com/mojang/blaze3d/platform/GlUtil.java b/com/mojang/blaze3d/platform/GlUtil.java deleted file mode 100644 index 024ab096..00000000 --- a/com/mojang/blaze3d/platform/GlUtil.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.mojang.blaze3d.platform; - -import java.nio.Buffer; -import java.nio.ByteBuffer; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import org.lwjgl.system.MemoryUtil; - -@Environment(EnvType.CLIENT) -public class GlUtil { - public static ByteBuffer allocateMemory(int size) { - return MemoryUtil.memAlloc(size); - } - - public static void freeMemory(Buffer buffer) { - MemoryUtil.memFree(buffer); - } - - public static String getVendor() { - return GlStateManager._getString(7936); - } - - public static String getCpuInfo() { - return GLX._getCpuInfo(); - } - - public static String getRenderer() { - return GlStateManager._getString(7937); - } - - public static String getOpenGLVersion() { - return GlStateManager._getString(7938); - } -} diff --git a/com/mojang/blaze3d/platform/LogicOp.java b/com/mojang/blaze3d/platform/LogicOp.java new file mode 100644 index 00000000..5007400b --- /dev/null +++ b/com/mojang/blaze3d/platform/LogicOp.java @@ -0,0 +1,12 @@ +package com.mojang.blaze3d.platform; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum LogicOp { + NONE, + OR_REVERSE; +} diff --git a/com/mojang/blaze3d/platform/NativeImage.java b/com/mojang/blaze3d/platform/NativeImage.java index b9d03f50..00229d9f 100644 --- a/com/mojang/blaze3d/platform/NativeImage.java +++ b/com/mojang/blaze3d/platform/NativeImage.java @@ -1,6 +1,5 @@ package com.mojang.blaze3d.platform; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.jtracy.MemoryPool; import com.mojang.jtracy.TracyClient; import com.mojang.logging.LogUtils; @@ -77,7 +76,7 @@ public final class NativeImage implements AutoCloseable { } } - private NativeImage(NativeImage.Format format, int width, int height, boolean useStbFree, long pixels) { + public NativeImage(NativeImage.Format format, int width, int height, boolean useStbFree, long pixels) { if (width > 0 && height > 0) { this.format = format; this.width = width; @@ -123,15 +122,34 @@ public final class NativeImage implements AutoCloseable { } public static NativeImage read(byte[] bytes) throws IOException { - NativeImage var3; - try (MemoryStack memoryStack = MemoryStack.stackPush()) { - ByteBuffer byteBuffer = memoryStack.malloc(bytes.length); - byteBuffer.put(bytes); - byteBuffer.rewind(); - var3 = read(byteBuffer); - } + MemoryStack memoryStack = MemoryStack.stackGet(); + int i = memoryStack.getPointer(); + if (i < bytes.length) { + ByteBuffer byteBuffer = MemoryUtil.memAlloc(bytes.length); - return var3; + NativeImage var13; + try { + var13 = putAndRead(byteBuffer, bytes); + } finally { + MemoryUtil.memFree(byteBuffer); + } + + return var13; + } else { + NativeImage var5; + try (MemoryStack memoryStack2 = MemoryStack.stackPush()) { + ByteBuffer byteBuffer2 = memoryStack2.malloc(bytes.length); + var5 = putAndRead(byteBuffer2, bytes); + } + + return var5; + } + } + + private static NativeImage putAndRead(ByteBuffer buffer, byte[] bytes) throws IOException { + buffer.put(bytes); + buffer.rewind(); + return read(buffer); } public static NativeImage read(@Nullable NativeImage.Format format, ByteBuffer textureData) throws IOException { @@ -161,17 +179,6 @@ public final class NativeImage implements AutoCloseable { } } - private static void setFilter(boolean linear, boolean mipmap) { - RenderSystem.assertOnRenderThreadOrInit(); - if (linear) { - GlStateManager._texParameter(3553, 10241, mipmap ? 9987 : 9729); - GlStateManager._texParameter(3553, 10240, 9729); - } else { - GlStateManager._texParameter(3553, 10241, mipmap ? 9986 : 9728); - GlStateManager._texParameter(3553, 10240, 9728); - } - } - private void checkAllocated() { if (this.pixels == 0L) { throw new IllegalStateException("Image is not allocated."); @@ -204,36 +211,36 @@ public final class NativeImage implements AutoCloseable { return this.format; } - private int getPixelABGR(int i, int j) { + private int getPixelABGR(int x, int y) { if (this.format != NativeImage.Format.RGBA) { throw new IllegalArgumentException(String.format(Locale.ROOT, "getPixelRGBA only works on RGBA images; have %s", this.format)); - } else if (this.isOutsideBounds(i, j)) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", i, j, this.width, this.height)); + } else if (this.isOutsideBounds(x, y)) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", x, y, this.width, this.height)); } else { this.checkAllocated(); - long l = (i + (long)j * this.width) * 4L; + long l = (x + (long)y * this.width) * 4L; return MemoryUtil.memGetInt(this.pixels + l); } } - public int getPixel(int i, int j) { - return ARGB.fromABGR(this.getPixelABGR(i, j)); + public int getPixel(int x, int y) { + return ARGB.fromABGR(this.getPixelABGR(x, y)); } - private void setPixelABGR(int i, int j, int k) { + public void setPixelABGR(int x, int y, int color) { if (this.format != NativeImage.Format.RGBA) { throw new IllegalArgumentException(String.format(Locale.ROOT, "setPixelRGBA only works on RGBA images; have %s", this.format)); - } else if (this.isOutsideBounds(i, j)) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", i, j, this.width, this.height)); + } else if (this.isOutsideBounds(x, y)) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", x, y, this.width, this.height)); } else { this.checkAllocated(); - long l = (i + (long)j * this.width) * 4L; - MemoryUtil.memPutInt(this.pixels + l, k); + long l = (x + (long)y * this.width) * 4L; + MemoryUtil.memPutInt(this.pixels + l, color); } } - public void setPixel(int i, int j, int k) { - this.setPixelABGR(i, j, ARGB.toABGR(k)); + public void setPixel(int x, int y, int color) { + this.setPixelABGR(x, y, ARGB.toABGR(color)); } public NativeImage mappedCopy(IntUnaryOperator function) { @@ -256,22 +263,6 @@ public final class NativeImage implements AutoCloseable { } } - public void applyToAllPixels(IntUnaryOperator function) { - if (this.format != NativeImage.Format.RGBA) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "function application only works on RGBA images; have %s", this.format)); - } else { - this.checkAllocated(); - int i = this.width * this.height; - IntBuffer intBuffer = MemoryUtil.memIntBuffer(this.pixels, i); - - for (int j = 0; j < i; j++) { - int k = ARGB.fromABGR(intBuffer.get(j)); - int l = function.applyAsInt(k); - intBuffer.put(j, ARGB.toABGR(l)); - } - } - } - public int[] getPixelsABGR() { if (this.format != NativeImage.Format.RGBA) { throw new IllegalArgumentException(String.format(Locale.ROOT, "getPixels only works on RGBA images; have %s", this.format)); @@ -322,103 +313,6 @@ public final class NativeImage implements AutoCloseable { } } - public void upload(int level, int xOffset, int yOffset, boolean mipmap) { - this.upload(level, xOffset, yOffset, 0, 0, this.width, this.height, false, mipmap); - } - - public void upload(int level, int xOffset, int yOffset, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean mipmap, boolean autoClose) { - this.upload(level, xOffset, yOffset, unpackSkipPixels, unpackSkipRows, width, height, false, false, mipmap, autoClose); - } - - public void upload( - int level, - int xOffset, - int yOffset, - int unpackSkipPixels, - int unpackSkipRows, - int width, - int height, - boolean blur, - boolean clamp, - boolean mipmap, - boolean autoClose - ) { - if (!RenderSystem.isOnRenderThreadOrInit()) { - RenderSystem.recordRenderCall(() -> this._upload(level, xOffset, yOffset, unpackSkipPixels, unpackSkipRows, width, height, blur, clamp, mipmap, autoClose)); - } else { - this._upload(level, xOffset, yOffset, unpackSkipPixels, unpackSkipRows, width, height, blur, clamp, mipmap, autoClose); - } - } - - private void _upload( - int level, - int xOffset, - int yOffset, - int unpackSkipPixels, - int unpackSkipRows, - int width, - int height, - boolean blur, - boolean clamp, - boolean mipmap, - boolean autoClose - ) { - try { - RenderSystem.assertOnRenderThreadOrInit(); - this.checkAllocated(); - setFilter(blur, mipmap); - if (width == this.getWidth()) { - GlStateManager._pixelStore(3314, 0); - } else { - GlStateManager._pixelStore(3314, this.getWidth()); - } - - GlStateManager._pixelStore(3316, unpackSkipPixels); - GlStateManager._pixelStore(3315, unpackSkipRows); - this.format.setUnpackPixelStoreState(); - GlStateManager._texSubImage2D(3553, level, xOffset, yOffset, width, height, this.format.glFormat(), 5121, this.pixels); - if (clamp) { - GlStateManager._texParameter(3553, 10242, 33071); - GlStateManager._texParameter(3553, 10243, 33071); - } - } finally { - if (autoClose) { - this.close(); - } - } - } - - public void downloadTexture(int level, boolean opaque) { - RenderSystem.assertOnRenderThread(); - this.checkAllocated(); - this.format.setPackPixelStoreState(); - GlStateManager._getTexImage(3553, level, this.format.glFormat(), 5121, this.pixels); - if (opaque && this.format.hasAlpha()) { - for (int i = 0; i < this.getHeight(); i++) { - for (int j = 0; j < this.getWidth(); j++) { - this.setPixelABGR(j, i, this.getPixelABGR(j, i) | 255 << this.format.alphaOffset()); - } - } - } - } - - public void downloadDepthBuffer(float unused) { - RenderSystem.assertOnRenderThread(); - if (this.format.components() != 1) { - throw new IllegalStateException("Depth buffer must be stored in NativeImage with 1 component."); - } else { - this.checkAllocated(); - this.format.setPackPixelStoreState(); - GlStateManager._readPixels(0, 0, this.width, this.height, 6402, 5121, this.pixels); - } - } - - public void drawPixels() { - RenderSystem.assertOnRenderThread(); - this.format.setUnpackPixelStoreState(); - GlStateManager._glDrawPixels(this.width, this.height, this.format.glFormat(), 5121, this.pixels); - } - public void writeToFile(File file) throws IOException { this.writeToFile(file.toPath()); } @@ -545,25 +439,6 @@ public final class NativeImage implements AutoCloseable { } } - public void flipY() { - this.checkAllocated(); - int i = this.format.components(); - int j = this.getWidth() * i; - long l = MemoryUtil.nmemAlloc(j); - - try { - for (int k = 0; k < this.getHeight() / 2; k++) { - int m = k * this.getWidth() * i; - int n = (this.getHeight() - 1 - k) * this.getWidth() * i; - MemoryUtil.memCopy(this.pixels + m, l, j); - MemoryUtil.memCopy(this.pixels + n, this.pixels + m, j); - MemoryUtil.memCopy(l, this.pixels + n, j); - } - } finally { - MemoryUtil.nmemFree(l); - } - } - public void resizeSubRectTo(int x, int y, int width, int height, NativeImage image) { this.checkAllocated(); if (image.format() != this.format) { @@ -580,15 +455,18 @@ public final class NativeImage implements AutoCloseable { DebugMemoryUntracker.untrack(this.pixels); } + public long getPointer() { + return this.pixels; + } + @Environment(EnvType.CLIENT) public static enum Format { - RGBA(4, 6408, true, true, true, false, true, 0, 8, 16, 255, 24, true), - RGB(3, 6407, true, true, true, false, false, 0, 8, 16, 255, 255, true), - LUMINANCE_ALPHA(2, 33319, false, false, false, true, true, 255, 255, 255, 0, 8, true), - LUMINANCE(1, 6403, false, false, false, true, false, 0, 0, 0, 0, 255, true); + RGBA(4, true, true, true, false, true, 0, 8, 16, 255, 24, true), + RGB(3, true, true, true, false, false, 0, 8, 16, 255, 255, true), + LUMINANCE_ALPHA(2, false, false, false, true, true, 255, 255, 255, 0, 8, true), + LUMINANCE(1, false, false, false, true, false, 0, 0, 0, 0, 255, true); final int components; - private final int glFormat; private final boolean hasRed; private final boolean hasGreen; private final boolean hasBlue; @@ -603,7 +481,6 @@ public final class NativeImage implements AutoCloseable { private Format( final int components, - final int glFormat, final boolean hasRed, final boolean hasGreen, final boolean hasBlue, @@ -617,7 +494,6 @@ public final class NativeImage implements AutoCloseable { final boolean supportedByStb ) { this.components = components; - this.glFormat = glFormat; this.hasRed = hasRed; this.hasGreen = hasGreen; this.hasBlue = hasBlue; @@ -635,20 +511,6 @@ public final class NativeImage implements AutoCloseable { return this.components; } - public void setPackPixelStoreState() { - RenderSystem.assertOnRenderThread(); - GlStateManager._pixelStore(3333, this.components()); - } - - public void setUnpackPixelStoreState() { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._pixelStore(3317, this.components()); - } - - public int glFormat() { - return this.glFormat; - } - public boolean hasRed() { return this.hasRed; } @@ -740,24 +602,6 @@ public final class NativeImage implements AutoCloseable { } } - @Environment(EnvType.CLIENT) - public static enum InternalGlFormat { - RGBA(6408), - RGB(6407), - RG(33319), - RED(6403); - - private final int glFormat; - - private InternalGlFormat(final int glFormat) { - this.glFormat = glFormat; - } - - public int glFormat() { - return this.glFormat; - } - } - @Environment(EnvType.CLIENT) static class WriteCallback extends STBIWriteCallback { private final WritableByteChannel output; diff --git a/com/mojang/blaze3d/platform/PolygonMode.java b/com/mojang/blaze3d/platform/PolygonMode.java new file mode 100644 index 00000000..5e74c6f9 --- /dev/null +++ b/com/mojang/blaze3d/platform/PolygonMode.java @@ -0,0 +1,12 @@ +package com.mojang.blaze3d.platform; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum PolygonMode { + FILL, + WIREFRAME; +} diff --git a/com/mojang/blaze3d/platform/SourceFactor.java b/com/mojang/blaze3d/platform/SourceFactor.java new file mode 100644 index 00000000..62d321a9 --- /dev/null +++ b/com/mojang/blaze3d/platform/SourceFactor.java @@ -0,0 +1,25 @@ +package com.mojang.blaze3d.platform; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum SourceFactor { + CONSTANT_ALPHA, + CONSTANT_COLOR, + DST_ALPHA, + DST_COLOR, + ONE, + ONE_MINUS_CONSTANT_ALPHA, + ONE_MINUS_CONSTANT_COLOR, + ONE_MINUS_DST_ALPHA, + ONE_MINUS_DST_COLOR, + ONE_MINUS_SRC_ALPHA, + ONE_MINUS_SRC_COLOR, + SRC_ALPHA, + SRC_ALPHA_SATURATE, + SRC_COLOR, + ZERO; +} diff --git a/com/mojang/blaze3d/platform/TextureUtil.java b/com/mojang/blaze3d/platform/TextureUtil.java index 9c8983bc..1d5b8cf7 100644 --- a/com/mojang/blaze3d/platform/TextureUtil.java +++ b/com/mojang/blaze3d/platform/TextureUtil.java @@ -1,7 +1,12 @@ package com.mojang.blaze3d.platform; import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.systems.CommandEncoder; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.InputStream; @@ -10,12 +15,10 @@ import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; import java.nio.channels.SeekableByteChannel; import java.nio.file.Path; -import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.IntUnaryOperator; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.SharedConstants; -import org.jetbrains.annotations.Nullable; import org.lwjgl.system.MemoryUtil; import org.slf4j.Logger; @@ -26,56 +29,6 @@ public class TextureUtil { public static final int MIN_MIPMAP_LEVEL = 0; private static final int DEFAULT_IMAGE_BUFFER_SIZE = 8192; - public static int generateTextureId() { - RenderSystem.assertOnRenderThreadOrInit(); - if (SharedConstants.IS_RUNNING_IN_IDE) { - int[] is = new int[ThreadLocalRandom.current().nextInt(15) + 1]; - GlStateManager._genTextures(is); - int i = GlStateManager._genTexture(); - GlStateManager._deleteTextures(is); - return i; - } else { - return GlStateManager._genTexture(); - } - } - - public static void releaseTextureId(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._deleteTexture(i); - } - - public static void prepareImage(int i, int j, int k) { - prepareImage(NativeImage.InternalGlFormat.RGBA, i, 0, j, k); - } - - public static void prepareImage(NativeImage.InternalGlFormat internalGlFormat, int i, int j, int k) { - prepareImage(internalGlFormat, i, 0, j, k); - } - - public static void prepareImage(int i, int j, int k, int l) { - prepareImage(NativeImage.InternalGlFormat.RGBA, i, j, k, l); - } - - public static void prepareImage(NativeImage.InternalGlFormat internalGlFormat, int i, int j, int k, int l) { - RenderSystem.assertOnRenderThreadOrInit(); - bind(i); - if (j >= 0) { - GlStateManager._texParameter(3553, 33085, j); - GlStateManager._texParameter(3553, 33082, 0); - GlStateManager._texParameter(3553, 33083, j); - GlStateManager._texParameter(3553, 34049, 0.0F); - } - - for (int m = 0; m <= j; m++) { - GlStateManager._texImage2D(3553, m, internalGlFormat.glFormat(), k >> m, l >> m, 0, 6408, 5121, null); - } - } - - private static void bind(int i) { - RenderSystem.assertOnRenderThreadOrInit(); - GlStateManager._bindTexture(i); - } - public static ByteBuffer readResource(InputStream inputStream) throws IOException { ReadableByteChannel readableByteChannel = Channels.newChannel(inputStream); return readableByteChannel instanceof SeekableByteChannel seekableByteChannel @@ -100,30 +53,55 @@ public class TextureUtil { } } - public static void writeAsPNG(Path path, String string, int i, int j, int k, int l) { - writeAsPNG(path, string, i, j, k, l, null); - } - - public static void writeAsPNG(Path path, String string, int i, int j, int k, int l, @Nullable IntUnaryOperator intUnaryOperator) { + public static void writeAsPNG(Path path, String string, GpuTexture gpuTexture, int i, IntUnaryOperator intUnaryOperator) { RenderSystem.assertOnRenderThread(); - bind(i); + int j = 0; - for (int m = 0; m <= j; m++) { - int n = k >> m; - int o = l >> m; + for (int k = 0; k <= i; k++) { + j += gpuTexture.getFormat().pixelSize() * gpuTexture.getWidth(k) * gpuTexture.getHeight(k); + } - try (NativeImage nativeImage = new NativeImage(n, o, false)) { - nativeImage.downloadTexture(m, false); - if (intUnaryOperator != null) { - nativeImage.applyToAllPixels(intUnaryOperator); + GpuBuffer gpuBuffer = RenderSystem.getDevice().createBuffer(() -> "Texture output buffer", BufferType.PIXEL_PACK, BufferUsage.STATIC_READ, j); + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + Runnable runnable = () -> { + try (GpuBuffer.ReadView readView = commandEncoder.readBuffer(gpuBuffer)) { + int jx = 0; + + for (int k = 0; k <= i; k++) { + int lx = gpuTexture.getWidth(k); + int mx = gpuTexture.getHeight(k); + + try (NativeImage nativeImage = new NativeImage(lx, mx, false)) { + for (int n = 0; n < mx; n++) { + for (int o = 0; o < lx; o++) { + int p = readView.data().getInt(jx + (o + n * lx) * gpuTexture.getFormat().pixelSize()); + nativeImage.setPixelABGR(o, n, intUnaryOperator.applyAsInt(p)); + } + } + + Path path2 = path.resolve(string + "_" + k + ".png"); + nativeImage.writeToFile(path2); + LOGGER.debug("Exported png to: {}", path2.toAbsolutePath()); + } catch (IOException var19) { + LOGGER.debug("Unable to write: ", (Throwable)var19); + } + + jx += gpuTexture.getFormat().pixelSize() * lx * mx; } - - Path path2 = path.resolve(string + "_" + m + ".png"); - nativeImage.writeToFile(path2); - LOGGER.debug("Exported png to: {}", path2.toAbsolutePath()); - } catch (IOException var15) { - LOGGER.debug("Unable to write: ", (Throwable)var15); } + + gpuBuffer.close(); + }; + AtomicInteger atomicInteger = new AtomicInteger(); + int l = 0; + + for (int m = 0; m <= i; m++) { + commandEncoder.copyTextureToBuffer(gpuTexture, gpuBuffer, l, () -> { + if (atomicInteger.getAndIncrement() == i) { + runnable.run(); + } + }, m); + l += gpuTexture.getFormat().pixelSize() * gpuTexture.getWidth(m) * gpuTexture.getHeight(m); } } diff --git a/com/mojang/blaze3d/platform/Window.java b/com/mojang/blaze3d/platform/Window.java index 60e399ec..4b59d992 100644 --- a/com/mojang/blaze3d/platform/Window.java +++ b/com/mojang/blaze3d/platform/Window.java @@ -27,7 +27,6 @@ import org.lwjgl.glfw.GLFWErrorCallback; import org.lwjgl.glfw.GLFWImage; import org.lwjgl.glfw.GLFWWindowCloseCallback; import org.lwjgl.glfw.GLFWImage.Buffer; -import org.lwjgl.opengl.GL; import org.lwjgl.system.MemoryStack; import org.lwjgl.system.MemoryUtil; import org.lwjgl.util.tinyfd.TinyFileDialogs; @@ -62,6 +61,7 @@ public final class Window implements AutoCloseable { private boolean dirty; private boolean vsync; private boolean iconified; + private boolean minimized; public Window( WindowEventHandler eventHandler, ScreenManager screenManager, DisplayData displayData, @Nullable String preferredFullscreenVideoMode, String title @@ -73,16 +73,18 @@ public final class Window implements AutoCloseable { Optional optional = VideoMode.read(preferredFullscreenVideoMode); if (optional.isPresent()) { this.preferredFullscreenVideoMode = optional; - } else if (displayData.fullscreenWidth.isPresent() && displayData.fullscreenHeight.isPresent()) { - this.preferredFullscreenVideoMode = Optional.of(new VideoMode(displayData.fullscreenWidth.getAsInt(), displayData.fullscreenHeight.getAsInt(), 8, 8, 8, 60)); + } else if (displayData.fullscreenWidth().isPresent() && displayData.fullscreenHeight().isPresent()) { + this.preferredFullscreenVideoMode = Optional.of( + new VideoMode(displayData.fullscreenWidth().getAsInt(), displayData.fullscreenHeight().getAsInt(), 8, 8, 8, 60) + ); } else { this.preferredFullscreenVideoMode = Optional.empty(); } - this.actuallyFullscreen = this.fullscreen = displayData.isFullscreen; + this.actuallyFullscreen = this.fullscreen = displayData.isFullscreen(); Monitor monitor = screenManager.getMonitor(GLFW.glfwGetPrimaryMonitor()); - this.windowedWidth = this.width = displayData.width > 0 ? displayData.width : 1; - this.windowedHeight = this.height = displayData.height > 0 ? displayData.height : 1; + this.windowedWidth = this.width = Math.max(displayData.width(), 1); + this.windowedHeight = this.height = Math.max(displayData.height(), 1); GLFW.glfwDefaultWindowHints(); GLFW.glfwWindowHint(139265, 196609); GLFW.glfwWindowHint(139275, 221185); @@ -103,10 +105,6 @@ public final class Window implements AutoCloseable { this.windowedY = this.y = js[0]; } - GLFW.glfwMakeContextCurrent(this.window); - GL.createCapabilities(); - int i = RenderSystem.maxSupportedTextureSize(); - GLFW.glfwSetWindowSizeLimits(this.window, -1, -1, i, i); this.setMode(); this.refreshFramebufferSize(); GLFW.glfwSetFramebufferSizeCallback(this.window, this::onFramebufferResize); @@ -222,7 +220,7 @@ public final class Window implements AutoCloseable { } public void updateVsync(boolean vsync) { - RenderSystem.assertOnRenderThreadOrInit(); + RenderSystem.assertOnRenderThread(); this.vsync = vsync; GLFW.glfwSwapInterval(vsync ? 1 : 0); } @@ -245,6 +243,7 @@ public final class Window implements AutoCloseable { int i = this.getWidth(); int j = this.getHeight(); if (framebufferWidth != 0 && framebufferHeight != 0) { + this.minimized = false; this.framebufferWidth = framebufferWidth; this.framebufferHeight = framebufferHeight; if (this.getWidth() != i || this.getHeight() != j) { @@ -258,6 +257,8 @@ public final class Window implements AutoCloseable { throw new ReportedException(crashReport); } } + } else { + this.minimized = true; } } } @@ -290,8 +291,8 @@ public final class Window implements AutoCloseable { } } - private void onIconify(long l, boolean bl) { - this.iconified = bl; + private void onIconify(long window, boolean iconified) { + this.iconified = iconified; } public void updateDisplay(@Nullable TracyFrameCapture tracyFrameCapture) { @@ -371,13 +372,13 @@ public final class Window implements AutoCloseable { this.setMode(); } - private void updateFullscreen(boolean bl, @Nullable TracyFrameCapture tracyFrameCapture) { + private void updateFullscreen(boolean vsyncEnabled, @Nullable TracyFrameCapture tracyFrameCapture) { RenderSystem.assertOnRenderThread(); try { this.setMode(); this.eventHandler.resizeDisplay(); - this.updateVsync(bl); + this.updateVsync(vsyncEnabled); this.updateDisplay(tracyFrameCapture); } catch (Exception var4) { LOGGER.error("Couldn't toggle fullscreen", (Throwable)var4); @@ -484,13 +485,17 @@ public final class Window implements AutoCloseable { InputConstants.updateRawMouseInput(this.window, enableRawMouseMotion); } - public void setWindowCloseCallback(Runnable runnable) { - GLFWWindowCloseCallback gLFWWindowCloseCallback = GLFW.glfwSetWindowCloseCallback(this.window, l -> runnable.run()); + public void setWindowCloseCallback(Runnable windowCloseCallback) { + GLFWWindowCloseCallback gLFWWindowCloseCallback = GLFW.glfwSetWindowCloseCallback(this.window, l -> windowCloseCallback.run()); if (gLFWWindowCloseCallback != null) { gLFWWindowCloseCallback.free(); } } + public boolean isMinimized() { + return this.minimized; + } + @Environment(EnvType.CLIENT) public static class WindowInitFailed extends SilentInitException { WindowInitFailed(String string) { diff --git a/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java b/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java index fbd28cac..db19e142 100644 --- a/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java +++ b/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java @@ -126,13 +126,13 @@ public abstract class GlslPreprocessor { @Nullable public abstract String applyImport(boolean useFullPath, String directory); - public static String injectDefines(String string, ShaderDefines shaderDefines) { - if (shaderDefines.isEmpty()) { - return string; + public static String injectDefines(String shaderSource, ShaderDefines defines) { + if (defines.isEmpty()) { + return shaderSource; } else { - int i = string.indexOf(10); + int i = shaderSource.indexOf(10); int j = i + 1; - return string.substring(0, j) + shaderDefines.asSourceDirectives() + "#line 1 0\n" + string.substring(j); + return shaderSource.substring(0, j) + defines.asSourceDirectives() + "#line 1 0\n" + shaderSource.substring(j); } } diff --git a/com/mojang/blaze3d/resource/CrossFrameResourcePool.java b/com/mojang/blaze3d/resource/CrossFrameResourcePool.java index e2bfc9fd..861b434c 100644 --- a/com/mojang/blaze3d/resource/CrossFrameResourcePool.java +++ b/com/mojang/blaze3d/resource/CrossFrameResourcePool.java @@ -13,8 +13,8 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl private final int framesToKeepResource; private final Deque> pool = new ArrayDeque(); - public CrossFrameResourcePool(int i) { - this.framesToKeepResource = i; + public CrossFrameResourcePool(int framesToKeepResource) { + this.framesToKeepResource = framesToKeepResource; } public void endFrame() { @@ -30,23 +30,29 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl } @Override - public T acquire(ResourceDescriptor resourceDescriptor) { + public T acquire(ResourceDescriptor descriptor) { + T object = this.acquireWithoutPreparing(descriptor); + descriptor.prepare(object); + return object; + } + + private T acquireWithoutPreparing(ResourceDescriptor descriptor) { Iterator> iterator = this.pool.iterator(); while (iterator.hasNext()) { CrossFrameResourcePool.ResourceEntry resourceEntry = (CrossFrameResourcePool.ResourceEntry)iterator.next(); - if (resourceEntry.descriptor.equals(resourceDescriptor)) { + if (descriptor.canUsePhysicalResource(resourceEntry.descriptor)) { iterator.remove(); return (T)resourceEntry.value; } } - return resourceDescriptor.allocate(); + return descriptor.allocate(); } @Override - public void release(ResourceDescriptor resourceDescriptor, T object) { - this.pool.addFirst(new CrossFrameResourcePool.ResourceEntry<>(resourceDescriptor, object, this.framesToKeepResource)); + public void release(ResourceDescriptor descriptor, T value) { + this.pool.addFirst(new CrossFrameResourcePool.ResourceEntry<>(descriptor, value, this.framesToKeepResource)); } public void clear() { @@ -70,10 +76,10 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl final T value; int framesToLive; - ResourceEntry(ResourceDescriptor resourceDescriptor, T object, int i) { - this.descriptor = resourceDescriptor; - this.value = object; - this.framesToLive = i; + ResourceEntry(ResourceDescriptor descriptor, T value, int framesToLive) { + this.descriptor = descriptor; + this.value = value; + this.framesToLive = framesToLive; } public void close() { diff --git a/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java b/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java index 32e931a9..39bc36a6 100644 --- a/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java +++ b/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java @@ -7,17 +7,19 @@ import net.fabricmc.api.Environment; public interface GraphicsResourceAllocator { GraphicsResourceAllocator UNPOOLED = new GraphicsResourceAllocator() { @Override - public T acquire(ResourceDescriptor resourceDescriptor) { - return resourceDescriptor.allocate(); + public T acquire(ResourceDescriptor descriptor) { + T object = descriptor.allocate(); + descriptor.prepare(object); + return object; } @Override - public void release(ResourceDescriptor resourceDescriptor, T object) { - resourceDescriptor.free(object); + public void release(ResourceDescriptor descriptor, T value) { + descriptor.free(value); } }; - T acquire(ResourceDescriptor resourceDescriptor); + T acquire(ResourceDescriptor descriptor); - void release(ResourceDescriptor resourceDescriptor, T object); + void release(ResourceDescriptor descriptor, T value); } diff --git a/com/mojang/blaze3d/resource/RenderTargetDescriptor.java b/com/mojang/blaze3d/resource/RenderTargetDescriptor.java index 6faea1da..fdefec2e 100644 --- a/com/mojang/blaze3d/resource/RenderTargetDescriptor.java +++ b/com/mojang/blaze3d/resource/RenderTargetDescriptor.java @@ -2,16 +2,34 @@ package com.mojang.blaze3d.resource; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.pipeline.TextureTarget; +import com.mojang.blaze3d.systems.RenderSystem; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public record RenderTargetDescriptor(int width, int height, boolean useDepth) implements ResourceDescriptor { +public record RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor) implements ResourceDescriptor { public RenderTarget allocate() { - return new TextureTarget(this.width, this.height, this.useDepth); + return new TextureTarget(null, this.width, this.height, this.useDepth); + } + + public void prepare(RenderTarget renderTarget) { + if (this.useDepth) { + RenderSystem.getDevice() + .createCommandEncoder() + .clearColorAndDepthTextures(renderTarget.getColorTexture(), this.clearColor, renderTarget.getDepthTexture(), 1.0); + } else { + RenderSystem.getDevice().createCommandEncoder().clearColorTexture(renderTarget.getColorTexture(), this.clearColor); + } } public void free(RenderTarget renderTarget) { renderTarget.destroyBuffers(); } + + @Override + public boolean canUsePhysicalResource(ResourceDescriptor descriptor) { + return !(descriptor instanceof RenderTargetDescriptor renderTargetDescriptor) + ? false + : this.width == renderTargetDescriptor.width && this.height == renderTargetDescriptor.height && this.useDepth == renderTargetDescriptor.useDepth; + } } diff --git a/com/mojang/blaze3d/resource/ResourceDescriptor.java b/com/mojang/blaze3d/resource/ResourceDescriptor.java index 247684a4..c79a5b3b 100644 --- a/com/mojang/blaze3d/resource/ResourceDescriptor.java +++ b/com/mojang/blaze3d/resource/ResourceDescriptor.java @@ -7,5 +7,12 @@ import net.fabricmc.api.Environment; public interface ResourceDescriptor { T allocate(); - void free(T object); + default void prepare(T target) { + } + + void free(T target); + + default boolean canUsePhysicalResource(ResourceDescriptor descriptor) { + return this.equals(descriptor); + } } diff --git a/com/mojang/blaze3d/shaders/AbstractUniform.java b/com/mojang/blaze3d/shaders/AbstractUniform.java deleted file mode 100644 index 9f4c00c6..00000000 --- a/com/mojang/blaze3d/shaders/AbstractUniform.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.mojang.blaze3d.shaders; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import org.joml.Matrix3f; -import org.joml.Matrix4f; -import org.joml.Vector3f; -import org.joml.Vector4f; - -@Environment(EnvType.CLIENT) -public class AbstractUniform { - public void set(float x) { - } - - public void set(float x, float y) { - } - - public void set(float x, float y, float z) { - } - - public void set(float x, float y, float z, float w) { - } - - public void setSafe(float x, float y, float z, float w) { - } - - public void setSafe(int x, int y, int z, int w) { - } - - public void set(int x) { - } - - public void set(int x, int y) { - } - - public void set(int x, int y, int z) { - } - - public void set(int x, int y, int z, int w) { - } - - public void set(float[] valueArray) { - } - - public void set(Vector3f vector) { - } - - public void set(Vector4f vector) { - } - - public void setMat2x2(float m00, float m01, float m10, float m11) { - } - - public void setMat2x3(float m00, float m01, float m02, float m10, float m11, float m12) { - } - - public void setMat2x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13) { - } - - public void setMat3x2(float m00, float m01, float m10, float m11, float m20, float m21) { - } - - public void setMat3x3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) { - } - - public void setMat3x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23) { - } - - public void setMat4x2(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13) { - } - - public void setMat4x3(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23) { - } - - public void setMat4x4( - float m00, - float m01, - float m02, - float m03, - float m10, - float m11, - float m12, - float m13, - float m20, - float m21, - float m22, - float m23, - float m30, - float m31, - float m32, - float m33 - ) { - } - - public void set(Matrix4f matrix) { - } - - public void set(Matrix3f matrix) { - } -} diff --git a/com/mojang/blaze3d/shaders/CompiledShader.java b/com/mojang/blaze3d/shaders/CompiledShader.java deleted file mode 100644 index 2b7efbae..00000000 --- a/com/mojang/blaze3d/shaders/CompiledShader.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.mojang.blaze3d.shaders; - -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.ShaderManager; -import net.minecraft.resources.FileToIdConverter; -import net.minecraft.resources.ResourceLocation; -import org.apache.commons.lang3.StringUtils; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class CompiledShader implements AutoCloseable { - private static final int NOT_ALLOCATED = -1; - private final ResourceLocation id; - private int shaderId; - - private CompiledShader(int i, ResourceLocation resourceLocation) { - this.id = resourceLocation; - this.shaderId = i; - } - - public static CompiledShader compile(ResourceLocation resourceLocation, CompiledShader.Type type, String string) throws ShaderManager.CompilationException { - RenderSystem.assertOnRenderThread(); - int i = GlStateManager.glCreateShader(type.glType()); - GlStateManager.glShaderSource(i, string); - GlStateManager.glCompileShader(i); - if (GlStateManager.glGetShaderi(i, 35713) == 0) { - String string2 = StringUtils.trim(GlStateManager.glGetShaderInfoLog(i, 32768)); - throw new ShaderManager.CompilationException("Couldn't compile " + type.getName() + " shader (" + resourceLocation + ") : " + string2); - } else { - return new CompiledShader(i, resourceLocation); - } - } - - public void close() { - if (this.shaderId == -1) { - throw new IllegalStateException("Already closed"); - } else { - RenderSystem.assertOnRenderThread(); - GlStateManager.glDeleteShader(this.shaderId); - this.shaderId = -1; - } - } - - public ResourceLocation getId() { - return this.id; - } - - public int getShaderId() { - return this.shaderId; - } - - @Environment(EnvType.CLIENT) - public static enum Type { - VERTEX("vertex", ".vsh", 35633), - FRAGMENT("fragment", ".fsh", 35632); - - private static final CompiledShader.Type[] TYPES = values(); - private final String name; - private final String extension; - private final int glType; - - private Type(final String string2, final String string3, final int j) { - this.name = string2; - this.extension = string3; - this.glType = j; - } - - @Nullable - public static CompiledShader.Type byLocation(ResourceLocation resourceLocation) { - for (CompiledShader.Type type : TYPES) { - if (resourceLocation.getPath().endsWith(type.extension)) { - return type; - } - } - - return null; - } - - public String getName() { - return this.name; - } - - public int glType() { - return this.glType; - } - - public FileToIdConverter idConverter() { - return new FileToIdConverter("shaders", this.extension); - } - } -} diff --git a/com/mojang/blaze3d/shaders/ShaderType.java b/com/mojang/blaze3d/shaders/ShaderType.java new file mode 100644 index 00000000..9bded7ff --- /dev/null +++ b/com/mojang/blaze3d/shaders/ShaderType.java @@ -0,0 +1,43 @@ +package com.mojang.blaze3d.shaders; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.FileToIdConverter; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum ShaderType { + VERTEX("vertex", ".vsh"), + FRAGMENT("fragment", ".fsh"); + + private static final ShaderType[] TYPES = values(); + private final String name; + private final String extension; + + private ShaderType(final String string2, final String string3) { + this.name = string2; + this.extension = string3; + } + + @Nullable + public static ShaderType byLocation(ResourceLocation resourceLocation) { + for (ShaderType shaderType : TYPES) { + if (resourceLocation.getPath().endsWith(shaderType.extension)) { + return shaderType; + } + } + + return null; + } + + public String getName() { + return this.name; + } + + public FileToIdConverter idConverter() { + return new FileToIdConverter("shaders", this.extension); + } +} diff --git a/com/mojang/blaze3d/shaders/Uniform.java b/com/mojang/blaze3d/shaders/Uniform.java deleted file mode 100644 index ec403ea6..00000000 --- a/com/mojang/blaze3d/shaders/Uniform.java +++ /dev/null @@ -1,528 +0,0 @@ -package com.mojang.blaze3d.shaders; - -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.logging.LogUtils; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.util.Arrays; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.ShaderProgramConfig; -import org.joml.Matrix3f; -import org.joml.Matrix4f; -import org.joml.Vector3f; -import org.joml.Vector4f; -import org.lwjgl.system.MemoryUtil; -import org.slf4j.Logger; - -@Environment(EnvType.CLIENT) -public class Uniform extends AbstractUniform implements AutoCloseable { - private static final Logger LOGGER = LogUtils.getLogger(); - public static final int UT_INT1 = 0; - public static final int UT_INT2 = 1; - public static final int UT_INT3 = 2; - public static final int UT_INT4 = 3; - public static final int UT_FLOAT1 = 4; - public static final int UT_FLOAT2 = 5; - public static final int UT_FLOAT3 = 6; - public static final int UT_FLOAT4 = 7; - public static final int UT_MAT2 = 8; - public static final int UT_MAT3 = 9; - public static final int UT_MAT4 = 10; - private static final boolean TRANSPOSE_MATRICIES = false; - private int location; - private final int count; - private final int type; - private final IntBuffer intValues; - private final FloatBuffer floatValues; - private final String name; - - public Uniform(String string, int i, int j) { - this.name = string; - this.count = j; - this.type = i; - if (i <= 3) { - this.intValues = MemoryUtil.memAllocInt(j); - this.floatValues = null; - } else { - this.intValues = null; - this.floatValues = MemoryUtil.memAllocFloat(j); - } - - this.location = -1; - this.markDirty(); - } - - public static int glGetUniformLocation(int program, CharSequence name) { - return GlStateManager._glGetUniformLocation(program, name); - } - - public static void uploadInteger(int location, int value) { - RenderSystem.glUniform1i(location, value); - } - - public void setFromConfig(ShaderProgramConfig.Uniform uniform) { - this.setFromConfig(uniform.values(), uniform.count()); - } - - public void setFromConfig(List list, int i) { - float[] fs = new float[Math.max(i, 16)]; - if (list.size() == 1) { - Arrays.fill(fs, (Float)list.getFirst()); - } else { - for (int j = 0; j < list.size(); j++) { - fs[j] = (Float)list.get(j); - } - } - - if (this.type <= 3) { - this.setSafe((int)fs[0], (int)fs[1], (int)fs[2], (int)fs[3]); - } else if (this.type <= 7) { - this.setSafe(fs[0], fs[1], fs[2], fs[3]); - } else { - this.set(Arrays.copyOfRange(fs, 0, i)); - } - } - - public void close() { - if (this.intValues != null) { - MemoryUtil.memFree(this.intValues); - } - - if (this.floatValues != null) { - MemoryUtil.memFree(this.floatValues); - } - } - - private void markDirty() { - } - - public static int getTypeFromString(String typeName) { - int i = -1; - if ("int".equals(typeName)) { - i = 0; - } else if ("float".equals(typeName)) { - i = 4; - } else if (typeName.startsWith("matrix")) { - if (typeName.endsWith("2x2")) { - i = 8; - } else if (typeName.endsWith("3x3")) { - i = 9; - } else if (typeName.endsWith("4x4")) { - i = 10; - } - } - - return i; - } - - public void setLocation(int location) { - this.location = location; - } - - public String getName() { - return this.name; - } - - @Override - public final void set(float x) { - this.floatValues.position(0); - this.floatValues.put(0, x); - this.markDirty(); - } - - @Override - public final void set(float x, float y) { - this.floatValues.position(0); - this.floatValues.put(0, x); - this.floatValues.put(1, y); - this.markDirty(); - } - - public final void set(int index, float value) { - this.floatValues.position(0); - this.floatValues.put(index, value); - this.markDirty(); - } - - @Override - public final void set(float x, float y, float z) { - this.floatValues.position(0); - this.floatValues.put(0, x); - this.floatValues.put(1, y); - this.floatValues.put(2, z); - this.markDirty(); - } - - @Override - public final void set(Vector3f vector) { - this.floatValues.position(0); - vector.get(this.floatValues); - this.markDirty(); - } - - @Override - public final void set(float x, float y, float z, float w) { - this.floatValues.position(0); - this.floatValues.put(x); - this.floatValues.put(y); - this.floatValues.put(z); - this.floatValues.put(w); - this.floatValues.flip(); - this.markDirty(); - } - - @Override - public final void set(Vector4f vector) { - this.floatValues.position(0); - vector.get(this.floatValues); - this.markDirty(); - } - - @Override - public final void setSafe(float x, float y, float z, float w) { - this.floatValues.position(0); - if (this.type >= 4) { - this.floatValues.put(0, x); - } - - if (this.type >= 5) { - this.floatValues.put(1, y); - } - - if (this.type >= 6) { - this.floatValues.put(2, z); - } - - if (this.type >= 7) { - this.floatValues.put(3, w); - } - - this.markDirty(); - } - - @Override - public final void setSafe(int x, int y, int z, int w) { - this.intValues.position(0); - if (this.type >= 0) { - this.intValues.put(0, x); - } - - if (this.type >= 1) { - this.intValues.put(1, y); - } - - if (this.type >= 2) { - this.intValues.put(2, z); - } - - if (this.type >= 3) { - this.intValues.put(3, w); - } - - this.markDirty(); - } - - @Override - public final void set(int x) { - this.intValues.position(0); - this.intValues.put(0, x); - this.markDirty(); - } - - @Override - public final void set(int x, int y) { - this.intValues.position(0); - this.intValues.put(0, x); - this.intValues.put(1, y); - this.markDirty(); - } - - @Override - public final void set(int x, int y, int z) { - this.intValues.position(0); - this.intValues.put(0, x); - this.intValues.put(1, y); - this.intValues.put(2, z); - this.markDirty(); - } - - @Override - public final void set(int x, int y, int z, int w) { - this.intValues.position(0); - this.intValues.put(0, x); - this.intValues.put(1, y); - this.intValues.put(2, z); - this.intValues.put(3, w); - this.markDirty(); - } - - @Override - public final void set(float[] valueArray) { - if (valueArray.length < this.count) { - LOGGER.warn("Uniform.set called with a too-small value array (expected {}, got {}). Ignoring.", this.count, valueArray.length); - } else { - this.floatValues.position(0); - this.floatValues.put(valueArray); - this.floatValues.position(0); - this.markDirty(); - } - } - - @Override - public final void setMat2x2(float m00, float m01, float m10, float m11) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m10); - this.floatValues.put(3, m11); - this.markDirty(); - } - - @Override - public final void setMat2x3(float m00, float m01, float m02, float m10, float m11, float m12) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m10); - this.floatValues.put(4, m11); - this.floatValues.put(5, m12); - this.markDirty(); - } - - @Override - public final void setMat2x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m03); - this.floatValues.put(4, m10); - this.floatValues.put(5, m11); - this.floatValues.put(6, m12); - this.floatValues.put(7, m13); - this.markDirty(); - } - - @Override - public final void setMat3x2(float m00, float m01, float m10, float m11, float m20, float m21) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m10); - this.floatValues.put(3, m11); - this.floatValues.put(4, m20); - this.floatValues.put(5, m21); - this.markDirty(); - } - - @Override - public final void setMat3x3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m10); - this.floatValues.put(4, m11); - this.floatValues.put(5, m12); - this.floatValues.put(6, m20); - this.floatValues.put(7, m21); - this.floatValues.put(8, m22); - this.markDirty(); - } - - @Override - public final void setMat3x4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m03); - this.floatValues.put(4, m10); - this.floatValues.put(5, m11); - this.floatValues.put(6, m12); - this.floatValues.put(7, m13); - this.floatValues.put(8, m20); - this.floatValues.put(9, m21); - this.floatValues.put(10, m22); - this.floatValues.put(11, m23); - this.markDirty(); - } - - @Override - public final void setMat4x2(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m03); - this.floatValues.put(4, m10); - this.floatValues.put(5, m11); - this.floatValues.put(6, m12); - this.floatValues.put(7, m13); - this.markDirty(); - } - - @Override - public final void setMat4x3(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m03); - this.floatValues.put(4, m10); - this.floatValues.put(5, m11); - this.floatValues.put(6, m12); - this.floatValues.put(7, m13); - this.floatValues.put(8, m20); - this.floatValues.put(9, m21); - this.floatValues.put(10, m22); - this.floatValues.put(11, m23); - this.markDirty(); - } - - @Override - public final void setMat4x4( - float m00, - float m01, - float m02, - float m03, - float m10, - float m11, - float m12, - float m13, - float m20, - float m21, - float m22, - float m23, - float m30, - float m31, - float m32, - float m33 - ) { - this.floatValues.position(0); - this.floatValues.put(0, m00); - this.floatValues.put(1, m01); - this.floatValues.put(2, m02); - this.floatValues.put(3, m03); - this.floatValues.put(4, m10); - this.floatValues.put(5, m11); - this.floatValues.put(6, m12); - this.floatValues.put(7, m13); - this.floatValues.put(8, m20); - this.floatValues.put(9, m21); - this.floatValues.put(10, m22); - this.floatValues.put(11, m23); - this.floatValues.put(12, m30); - this.floatValues.put(13, m31); - this.floatValues.put(14, m32); - this.floatValues.put(15, m33); - this.markDirty(); - } - - @Override - public final void set(Matrix4f matrix) { - this.floatValues.position(0); - matrix.get(this.floatValues); - this.markDirty(); - } - - @Override - public final void set(Matrix3f matrix) { - this.floatValues.position(0); - matrix.get(this.floatValues); - this.markDirty(); - } - - public void upload() { - if (this.type <= 3) { - this.uploadAsInteger(); - } else if (this.type <= 7) { - this.uploadAsFloat(); - } else { - if (this.type > 10) { - LOGGER.warn("Uniform.upload called, but type value ({}) is not a valid type. Ignoring.", this.type); - return; - } - - this.uploadAsMatrix(); - } - } - - private void uploadAsInteger() { - this.intValues.rewind(); - switch (this.type) { - case 0: - RenderSystem.glUniform1(this.location, this.intValues); - break; - case 1: - RenderSystem.glUniform2(this.location, this.intValues); - break; - case 2: - RenderSystem.glUniform3(this.location, this.intValues); - break; - case 3: - RenderSystem.glUniform4(this.location, this.intValues); - break; - default: - LOGGER.warn("Uniform.upload called, but count value ({}) is not in the range of 1 to 4. Ignoring.", this.count); - } - } - - private void uploadAsFloat() { - this.floatValues.rewind(); - switch (this.type) { - case 4: - RenderSystem.glUniform1(this.location, this.floatValues); - break; - case 5: - RenderSystem.glUniform2(this.location, this.floatValues); - break; - case 6: - RenderSystem.glUniform3(this.location, this.floatValues); - break; - case 7: - RenderSystem.glUniform4(this.location, this.floatValues); - break; - default: - LOGGER.warn("Uniform.upload called, but count value ({}) is not in the range of 1 to 4. Ignoring.", this.count); - } - } - - private void uploadAsMatrix() { - this.floatValues.clear(); - switch (this.type) { - case 8: - RenderSystem.glUniformMatrix2(this.location, false, this.floatValues); - break; - case 9: - RenderSystem.glUniformMatrix3(this.location, false, this.floatValues); - break; - case 10: - RenderSystem.glUniformMatrix4(this.location, false, this.floatValues); - } - } - - public int getLocation() { - return this.location; - } - - public int getCount() { - return this.count; - } - - public int getType() { - return this.type; - } - - public IntBuffer getIntBuffer() { - return this.intValues; - } - - public FloatBuffer getFloatBuffer() { - return this.floatValues; - } -} diff --git a/com/mojang/blaze3d/shaders/UniformType.java b/com/mojang/blaze3d/shaders/UniformType.java new file mode 100644 index 00000000..130cf961 --- /dev/null +++ b/com/mojang/blaze3d/shaders/UniformType.java @@ -0,0 +1,42 @@ +package com.mojang.blaze3d.shaders; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.util.StringRepresentable; + +@Environment(EnvType.CLIENT) +public enum UniformType implements StringRepresentable { + INT(1, "int"), + IVEC3(3, "ivec3"), + FLOAT(1, "float"), + VEC2(2, "vec2"), + VEC3(3, "vec3"), + VEC4(4, "vec4"), + MATRIX4X4(16, "matrix4x4"); + + public static final StringRepresentable.EnumCodec CODEC = StringRepresentable.fromEnum(UniformType::values); + final int count; + final String name; + + private UniformType(final int count, final String name) { + this.count = count; + this.name = name; + } + + public int count() { + return this.count; + } + + public boolean isIntStorage() { + return this == INT || this == IVEC3; + } + + @Override + public String getSerializedName() { + return this.name; + } + + public int getCount() { + return this.count; + } +} diff --git a/com/mojang/blaze3d/systems/CommandEncoder.java b/com/mojang/blaze3d/systems/CommandEncoder.java new file mode 100644 index 00000000..9461ad0d --- /dev/null +++ b/com/mojang/blaze3d/systems/CommandEncoder.java @@ -0,0 +1,47 @@ +package com.mojang.blaze3d.systems; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.textures.GpuTexture; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.OptionalDouble; +import java.util.OptionalInt; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public interface CommandEncoder { + RenderPass createRenderPass(GpuTexture gpuTexture, OptionalInt optionalInt); + + RenderPass createRenderPass(GpuTexture gpuTexture, OptionalInt optionalInt, @Nullable GpuTexture gpuTexture2, OptionalDouble optionalDouble); + + void clearColorTexture(GpuTexture gpuTexture, int i); + + void clearColorAndDepthTextures(GpuTexture gpuTexture, int i, GpuTexture gpuTexture2, double d); + + void clearDepthTexture(GpuTexture gpuTexture, double d); + + void writeToBuffer(GpuBuffer gpuBuffer, ByteBuffer byteBuffer, int i); + + GpuBuffer.ReadView readBuffer(GpuBuffer gpuBuffer); + + GpuBuffer.ReadView readBuffer(GpuBuffer gpuBuffer, int i, int j); + + void writeToTexture(GpuTexture gpuTexture, NativeImage nativeImage); + + void writeToTexture(GpuTexture gpuTexture, NativeImage nativeImage, int i, int j, int k, int l, int m, int n, int o); + + void writeToTexture(GpuTexture gpuTexture, IntBuffer intBuffer, NativeImage.Format format, int i, int j, int k, int l, int m); + + void copyTextureToBuffer(GpuTexture gpuTexture, GpuBuffer gpuBuffer, int i, Runnable runnable, int j); + + void copyTextureToBuffer(GpuTexture gpuTexture, GpuBuffer gpuBuffer, int i, Runnable runnable, int j, int k, int l, int m, int n); + + void copyTextureToTexture(GpuTexture gpuTexture, GpuTexture gpuTexture2, int i, int j, int k, int l, int m, int n, int o); + + void presentTexture(GpuTexture gpuTexture); +} diff --git a/com/mojang/blaze3d/systems/GpuDevice.java b/com/mojang/blaze3d/systems/GpuDevice.java new file mode 100644 index 00000000..b4263729 --- /dev/null +++ b/com/mojang/blaze3d/systems/GpuDevice.java @@ -0,0 +1,61 @@ +package com.mojang.blaze3d.systems; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.CompiledRenderPipeline; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; +import java.nio.ByteBuffer; +import java.util.List; +import java.util.function.BiFunction; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public interface GpuDevice { + CommandEncoder createCommandEncoder(); + + GpuTexture createTexture(@Nullable Supplier supplier, TextureFormat textureFormat, int i, int j, int k); + + GpuTexture createTexture(@Nullable String string, TextureFormat textureFormat, int i, int j, int k); + + GpuBuffer createBuffer(@Nullable Supplier supplier, BufferType bufferType, BufferUsage bufferUsage, int i); + + GpuBuffer createBuffer(@Nullable Supplier supplier, BufferType bufferType, BufferUsage bufferUsage, ByteBuffer byteBuffer); + + String getImplementationInformation(); + + List getLastDebugMessages(); + + boolean isDebuggingEnabled(); + + String getVendor(); + + String getBackendName(); + + String getVersion(); + + String getRenderer(); + + int getMaxTextureSize(); + + default CompiledRenderPipeline precompilePipeline(RenderPipeline renderPipeline) { + return this.precompilePipeline(renderPipeline, null); + } + + CompiledRenderPipeline precompilePipeline(RenderPipeline renderPipeline, @Nullable BiFunction biFunction); + + void clearPipelineCache(); + + List getEnabledExtensions(); + + void close(); +} diff --git a/com/mojang/blaze3d/systems/RenderPass.java b/com/mojang/blaze3d/systems/RenderPass.java new file mode 100644 index 00000000..66877a1c --- /dev/null +++ b/com/mojang/blaze3d/systems/RenderPass.java @@ -0,0 +1,65 @@ +package com.mojang.blaze3d.systems; + +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.VertexFormat; +import java.util.Collection; +import java.util.function.Consumer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; +import org.joml.Matrix4f; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public interface RenderPass extends AutoCloseable { + void setPipeline(RenderPipeline renderPipeline); + + void bindSampler(String string, GpuTexture gpuTexture); + + void setUniform(String string, int... is); + + void setUniform(String string, float... fs); + + void setUniform(String string, Matrix4f matrix4f); + + void enableScissor(ScissorState scissorState); + + void enableScissor(int i, int j, int k, int l); + + void disableScissor(); + + void setVertexBuffer(int i, GpuBuffer gpuBuffer); + + void setIndexBuffer(GpuBuffer gpuBuffer, VertexFormat.IndexType indexType); + + void drawIndexed(int i, int j); + + void drawMultipleIndexed(Collection collection, @Nullable GpuBuffer gpuBuffer, @Nullable VertexFormat.IndexType indexType); + + void draw(int i, int j); + + void close(); + + @Environment(EnvType.CLIENT) + public record Draw( + int slot, + GpuBuffer vertexBuffer, + @Nullable GpuBuffer indexBuffer, + @Nullable VertexFormat.IndexType indexType, + int firstIndex, + int indexCount, + @Nullable Consumer uniformUploaderConsumer + ) { + public Draw(int slot, GpuBuffer vertexBuffer, GpuBuffer indexBuffer, VertexFormat.IndexType indexType, int firstIndex, int indexCount) { + this(slot, vertexBuffer, indexBuffer, indexType, firstIndex, indexCount, null); + } + } + + @Environment(EnvType.CLIENT) + public interface UniformUploader { + void upload(String string, float... fs); + } +} diff --git a/com/mojang/blaze3d/systems/RenderSystem.java b/com/mojang/blaze3d/systems/RenderSystem.java index dca18030..0e81ea35 100644 --- a/com/mojang/blaze3d/systems/RenderSystem.java +++ b/com/mojang/blaze3d/systems/RenderSystem.java @@ -1,38 +1,36 @@ package com.mojang.blaze3d.systems; -import com.google.common.collect.Queues; import com.mojang.blaze3d.DontObfuscate; import com.mojang.blaze3d.ProjectionType; import com.mojang.blaze3d.TracyFrameCapture; import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; import com.mojang.blaze3d.buffers.GpuBuffer; -import com.mojang.blaze3d.pipeline.RenderCall; +import com.mojang.blaze3d.buffers.GpuFence; +import com.mojang.blaze3d.opengl.GlDevice; import com.mojang.blaze3d.platform.GLX; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.shaders.ShaderType; import com.mojang.blaze3d.systems.RenderSystem.AutoStorageIndexBuffer.IndexGenerator; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.BufferBuilder; +import com.mojang.blaze3d.vertex.ByteBufferBuilder; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.logging.LogUtils; import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; import java.util.Locale; -import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -import java.util.function.Consumer; +import java.util.function.BiFunction; import java.util.function.IntConsumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.CompiledShaderProgram; import net.minecraft.client.renderer.FogParameters; -import net.minecraft.client.renderer.ShaderProgram; -import net.minecraft.client.renderer.texture.AbstractTexture; -import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ArrayListDeque; import net.minecraft.util.Mth; import net.minecraft.util.TimeSource.NanoTimeSource; import org.jetbrains.annotations.Nullable; @@ -47,26 +45,25 @@ import org.slf4j.Logger; @Environment(EnvType.CLIENT) @DontObfuscate public class RenderSystem { + public static final ScissorState SCISSOR_STATE = new ScissorState(); static final Logger LOGGER = LogUtils.getLogger(); - private static final ConcurrentLinkedQueue recordingQueue = Queues.newConcurrentLinkedQueue(); - private static final Tesselator RENDER_THREAD_TESSELATOR = new Tesselator(1536); - private static final int MINIMUM_ATLAS_TEXTURE_SIZE = 1024; + public static final int MINIMUM_ATLAS_TEXTURE_SIZE = 1024; @Nullable private static Thread renderThread; - private static int MAX_SUPPORTED_TEXTURE_SIZE = -1; - private static boolean isInInit; + @Nullable + private static GpuDevice DEVICE; private static double lastDrawTime = Double.MIN_VALUE; private static final RenderSystem.AutoStorageIndexBuffer sharedSequential = new RenderSystem.AutoStorageIndexBuffer(1, 1, IntConsumer::accept); private static final RenderSystem.AutoStorageIndexBuffer sharedSequentialQuad = new RenderSystem.AutoStorageIndexBuffer(4, 6, (intConsumer, i) -> { - intConsumer.accept(i + 0); + intConsumer.accept(i); intConsumer.accept(i + 1); intConsumer.accept(i + 2); intConsumer.accept(i + 2); intConsumer.accept(i + 3); - intConsumer.accept(i + 0); + intConsumer.accept(i); }); private static final RenderSystem.AutoStorageIndexBuffer sharedSequentialLines = new RenderSystem.AutoStorageIndexBuffer(4, 6, (intConsumer, i) -> { - intConsumer.accept(i + 0); + intConsumer.accept(i); intConsumer.accept(i + 1); intConsumer.accept(i + 2); intConsumer.accept(i + 3); @@ -79,18 +76,21 @@ public class RenderSystem { private static ProjectionType savedProjectionType = ProjectionType.PERSPECTIVE; private static final Matrix4fStack modelViewStack = new Matrix4fStack(16); private static Matrix4f textureMatrix = new Matrix4f(); - private static final int[] shaderTextures = new int[12]; + public static final int TEXTURE_COUNT = 12; + private static final GpuTexture[] shaderTextures = new GpuTexture[12]; private static final float[] shaderColor = new float[]{1.0F, 1.0F, 1.0F, 1.0F}; private static float shaderGlintAlpha = 1.0F; private static FogParameters shaderFog = FogParameters.NO_FOG; private static final Vector3f[] shaderLightDirections = new Vector3f[2]; private static float shaderGameTime; + private static final Vector3f modelOffset = new Vector3f(); private static float shaderLineWidth = 1.0F; private static String apiDescription = "Unknown"; - @Nullable - private static CompiledShaderProgram shader; private static final AtomicLong pollEventsWaitStart = new AtomicLong(); private static final AtomicBoolean pollingEvents = new AtomicBoolean(false); + @Nullable + private static GpuBuffer QUAD_VERTEX_BUFFER; + private static final ArrayListDeque PENDING_FENCES = new ArrayListDeque<>(); public static void initRenderThread() { if (renderThread != null) { @@ -104,16 +104,6 @@ public class RenderSystem { return Thread.currentThread() == renderThread; } - public static boolean isOnRenderThreadOrInit() { - return isInInit || isOnRenderThread(); - } - - public static void assertOnRenderThreadOrInit() { - if (!isInInit && !isOnRenderThread()) { - throw constructThreadException(); - } - } - public static void assertOnRenderThread() { if (!isOnRenderThread()) { throw constructThreadException(); @@ -124,10 +114,6 @@ public class RenderSystem { return new IllegalStateException("Rendersystem called from wrong thread"); } - public static void recordRenderCall(RenderCall renderCall) { - recordingQueue.add(renderCall); - } - private static void pollEvents() { pollEventsWaitStart.set(Util.getMillis()); pollingEvents.set(true); @@ -141,7 +127,6 @@ public class RenderSystem { public static void flipFrame(long l, @Nullable TracyFrameCapture tracyFrameCapture) { pollEvents(); - replayQueue(); Tesselator.getInstance().clear(); GLFW.glfwSwapBuffers(l); if (tracyFrameCapture != null) { @@ -151,13 +136,6 @@ public class RenderSystem { pollEvents(); } - public static void replayQueue() { - while (!recordingQueue.isEmpty()) { - RenderCall renderCall = (RenderCall)recordingQueue.poll(); - renderCall.execute(); - } - } - public static void limitDisplayFPS(int i) { double d = lastDrawTime + 1.0 / i; @@ -169,179 +147,12 @@ public class RenderSystem { lastDrawTime = e; } - public static void disableDepthTest() { - assertOnRenderThread(); - GlStateManager._disableDepthTest(); - } - - public static void enableDepthTest() { - GlStateManager._enableDepthTest(); - } - public static void enableScissor(int i, int j, int k, int l) { - GlStateManager._enableScissorTest(); - GlStateManager._scissorBox(i, j, k, l); + SCISSOR_STATE.enable(i, j, k, l); } public static void disableScissor() { - GlStateManager._disableScissorTest(); - } - - public static void depthFunc(int i) { - assertOnRenderThread(); - GlStateManager._depthFunc(i); - } - - public static void depthMask(boolean bl) { - assertOnRenderThread(); - GlStateManager._depthMask(bl); - } - - public static void enableBlend() { - assertOnRenderThread(); - GlStateManager._enableBlend(); - } - - public static void disableBlend() { - assertOnRenderThread(); - GlStateManager._disableBlend(); - } - - public static void blendFunc(GlStateManager.SourceFactor sourceFactor, GlStateManager.DestFactor destFactor) { - assertOnRenderThread(); - GlStateManager._blendFunc(sourceFactor.value, destFactor.value); - } - - public static void blendFunc(int i, int j) { - assertOnRenderThread(); - GlStateManager._blendFunc(i, j); - } - - public static void blendFuncSeparate( - GlStateManager.SourceFactor sourceFactor, - GlStateManager.DestFactor destFactor, - GlStateManager.SourceFactor sourceFactor2, - GlStateManager.DestFactor destFactor2 - ) { - assertOnRenderThread(); - GlStateManager._blendFuncSeparate(sourceFactor.value, destFactor.value, sourceFactor2.value, destFactor2.value); - } - - public static void blendFuncSeparate(int i, int j, int k, int l) { - assertOnRenderThread(); - GlStateManager._blendFuncSeparate(i, j, k, l); - } - - public static void blendEquation(int i) { - assertOnRenderThread(); - GlStateManager._blendEquation(i); - } - - public static void enableCull() { - assertOnRenderThread(); - GlStateManager._enableCull(); - } - - public static void disableCull() { - assertOnRenderThread(); - GlStateManager._disableCull(); - } - - public static void polygonMode(int i, int j) { - assertOnRenderThread(); - GlStateManager._polygonMode(i, j); - } - - public static void enablePolygonOffset() { - assertOnRenderThread(); - GlStateManager._enablePolygonOffset(); - } - - public static void disablePolygonOffset() { - assertOnRenderThread(); - GlStateManager._disablePolygonOffset(); - } - - public static void polygonOffset(float f, float g) { - assertOnRenderThread(); - GlStateManager._polygonOffset(f, g); - } - - public static void enableColorLogicOp() { - assertOnRenderThread(); - GlStateManager._enableColorLogicOp(); - } - - public static void disableColorLogicOp() { - assertOnRenderThread(); - GlStateManager._disableColorLogicOp(); - } - - public static void logicOp(GlStateManager.LogicOp logicOp) { - assertOnRenderThread(); - GlStateManager._logicOp(logicOp.value); - } - - public static void activeTexture(int i) { - assertOnRenderThread(); - GlStateManager._activeTexture(i); - } - - public static void texParameter(int i, int j, int k) { - GlStateManager._texParameter(i, j, k); - } - - public static void deleteTexture(int i) { - GlStateManager._deleteTexture(i); - } - - public static void bindTextureForSetup(int i) { - bindTexture(i); - } - - public static void bindTexture(int i) { - GlStateManager._bindTexture(i); - } - - public static void viewport(int i, int j, int k, int l) { - GlStateManager._viewport(i, j, k, l); - } - - public static void colorMask(boolean bl, boolean bl2, boolean bl3, boolean bl4) { - assertOnRenderThread(); - GlStateManager._colorMask(bl, bl2, bl3, bl4); - } - - public static void stencilFunc(int i, int j, int k) { - assertOnRenderThread(); - GlStateManager._stencilFunc(i, j, k); - } - - public static void stencilMask(int i) { - assertOnRenderThread(); - GlStateManager._stencilMask(i); - } - - public static void stencilOp(int i, int j, int k) { - assertOnRenderThread(); - GlStateManager._stencilOp(i, j, k); - } - - public static void clearDepth(double d) { - GlStateManager._clearDepth(d); - } - - public static void clearColor(float f, float g, float h, float i) { - GlStateManager._clearColor(f, g, h, i); - } - - public static void clearStencil(int i) { - assertOnRenderThread(); - GlStateManager._clearStencil(i); - } - - public static void clear(int i) { - GlStateManager._clear(i); + SCISSOR_STATE.disable(); } public static void setShaderFog(FogParameters fogParameters) { @@ -374,15 +185,8 @@ public class RenderSystem { shaderLightDirections[1] = vector3f2; } - public static void setupShaderLights(CompiledShaderProgram compiledShaderProgram) { - assertOnRenderThread(); - if (compiledShaderProgram.LIGHT0_DIRECTION != null) { - compiledShaderProgram.LIGHT0_DIRECTION.set(shaderLightDirections[0]); - } - - if (compiledShaderProgram.LIGHT1_DIRECTION != null) { - compiledShaderProgram.LIGHT1_DIRECTION.set(shaderLightDirections[1]); - } + public static Vector3f[] getShaderLights() { + return shaderLightDirections; } public static void setShaderColor(float f, float g, float h, float i) { @@ -398,11 +202,6 @@ public class RenderSystem { return shaderColor; } - public static void drawElements(int i, int j, int k) { - assertOnRenderThread(); - GlStateManager._drawElements(i, j, k, 0L); - } - public static void lineWidth(float f) { assertOnRenderThread(); shaderLineWidth = f; @@ -413,20 +212,6 @@ public class RenderSystem { return shaderLineWidth; } - public static void pixelStore(int i, int j) { - GlStateManager._pixelStore(i, j); - } - - public static void readPixels(int i, int j, int k, int l, int m, int n, ByteBuffer byteBuffer) { - assertOnRenderThread(); - GlStateManager._readPixels(i, j, k, l, m, n, byteBuffer); - } - - public static void getString(int i, Consumer consumer) { - assertOnRenderThread(); - consumer.accept(GlStateManager._getString(i)); - } - public static String getBackendDescription() { return String.format(Locale.ROOT, "LWJGL version %s", GLX._getLWJGLVersion()); } @@ -439,148 +224,42 @@ public class RenderSystem { return GLX._initGlfw()::getAsLong; } - public static void initRenderer(int i, boolean bl) { - GLX._init(i, bl); - apiDescription = GLX.getOpenGLVersionString(); + public static void initRenderer(long l, int i, boolean bl, BiFunction biFunction, boolean bl2) { + DEVICE = new GlDevice(l, i, bl, biFunction, bl2); + apiDescription = getDevice().getImplementationInformation(); + + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(DefaultVertexFormat.POSITION.getVertexSize() * 4)) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION); + bufferBuilder.addVertex(0.0F, 0.0F, 0.0F); + bufferBuilder.addVertex(1.0F, 0.0F, 0.0F); + bufferBuilder.addVertex(1.0F, 1.0F, 0.0F); + bufferBuilder.addVertex(0.0F, 1.0F, 0.0F); + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + QUAD_VERTEX_BUFFER = getDevice().createBuffer(() -> "Quad", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); + } + } } public static void setErrorCallback(GLFWErrorCallbackI gLFWErrorCallbackI) { GLX._setGlfwErrorCallback(gLFWErrorCallbackI); } - public static void renderCrosshair(int i) { - assertOnRenderThread(); - GLX._renderCrosshair(i, true, true, true); - } - - public static String getCapsString() { - assertOnRenderThread(); - return "Using framebuffer using OpenGL 3.2"; - } - - public static void setupDefaultState(int i, int j, int k, int l) { - GlStateManager._clearDepth(1.0); - GlStateManager._enableDepthTest(); - GlStateManager._depthFunc(515); + public static void setupDefaultState() { projectionMatrix.identity(); savedProjectionMatrix.identity(); modelViewStack.clear(); textureMatrix.identity(); - GlStateManager._viewport(i, j, k, l); } - public static int maxSupportedTextureSize() { - if (MAX_SUPPORTED_TEXTURE_SIZE == -1) { - assertOnRenderThreadOrInit(); - int i = GlStateManager._getInteger(3379); - - for (int j = Math.max(32768, i); j >= 1024; j >>= 1) { - GlStateManager._texImage2D(32868, 0, 6408, j, j, 0, 6408, 5121, null); - int k = GlStateManager._getTexLevelParameter(32868, 0, 4096); - if (k != 0) { - MAX_SUPPORTED_TEXTURE_SIZE = j; - return j; - } - } - - MAX_SUPPORTED_TEXTURE_SIZE = Math.max(i, 1024); - LOGGER.info("Failed to determine maximum texture size by probing, trying GL_MAX_TEXTURE_SIZE = {}", MAX_SUPPORTED_TEXTURE_SIZE); - } - - return MAX_SUPPORTED_TEXTURE_SIZE; - } - - public static void glBindBuffer(int i, int j) { - GlStateManager._glBindBuffer(i, j); - } - - public static void glBindVertexArray(int i) { - GlStateManager._glBindVertexArray(i); - } - - public static void glBufferData(int i, ByteBuffer byteBuffer, int j) { - assertOnRenderThreadOrInit(); - GlStateManager._glBufferData(i, byteBuffer, j); - } - - public static void glDeleteBuffers(int i) { + public static void setupOverlayColor(@Nullable GpuTexture gpuTexture) { assertOnRenderThread(); - GlStateManager._glDeleteBuffers(i); - } - - public static void glDeleteVertexArrays(int i) { - assertOnRenderThread(); - GlStateManager._glDeleteVertexArrays(i); - } - - public static void glUniform1i(int i, int j) { - assertOnRenderThread(); - GlStateManager._glUniform1i(i, j); - } - - public static void glUniform1(int i, IntBuffer intBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform1(i, intBuffer); - } - - public static void glUniform2(int i, IntBuffer intBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform2(i, intBuffer); - } - - public static void glUniform3(int i, IntBuffer intBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform3(i, intBuffer); - } - - public static void glUniform4(int i, IntBuffer intBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform4(i, intBuffer); - } - - public static void glUniform1(int i, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform1(i, floatBuffer); - } - - public static void glUniform2(int i, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform2(i, floatBuffer); - } - - public static void glUniform3(int i, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform3(i, floatBuffer); - } - - public static void glUniform4(int i, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniform4(i, floatBuffer); - } - - public static void glUniformMatrix2(int i, boolean bl, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniformMatrix2(i, bl, floatBuffer); - } - - public static void glUniformMatrix3(int i, boolean bl, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniformMatrix3(i, bl, floatBuffer); - } - - public static void glUniformMatrix4(int i, boolean bl, FloatBuffer floatBuffer) { - assertOnRenderThread(); - GlStateManager._glUniformMatrix4(i, bl, floatBuffer); - } - - public static void setupOverlayColor(int i, int j) { - assertOnRenderThread(); - setShaderTexture(1, i); + setShaderTexture(1, gpuTexture); } public static void teardownOverlayColor() { assertOnRenderThread(); - setShaderTexture(1, 0); + setShaderTexture(1, null); } public static void setupLevelDiffuseLighting(Vector3f vector3f, Vector3f vector3f2) { @@ -590,87 +269,30 @@ public class RenderSystem { public static void setupGuiFlatDiffuseLighting(Vector3f vector3f, Vector3f vector3f2) { assertOnRenderThread(); - GlStateManager.setupGuiFlatDiffuseLighting(vector3f, vector3f2); + Matrix4f matrix4f = new Matrix4f().rotationY((float) (-Math.PI / 8)).rotateX((float) (Math.PI * 3.0 / 4.0)); + setShaderLights(matrix4f.transformDirection(vector3f, new Vector3f()), matrix4f.transformDirection(vector3f2, new Vector3f())); } public static void setupGui3DDiffuseLighting(Vector3f vector3f, Vector3f vector3f2) { assertOnRenderThread(); - GlStateManager.setupGui3DDiffuseLighting(vector3f, vector3f2); + Matrix4f matrix4f = new Matrix4f() + .scaling(1.0F, -1.0F, 1.0F) + .rotateYXZ(1.0821041F, 3.2375858F, 0.0F) + .rotateYXZ((float) (-Math.PI / 8), (float) (Math.PI * 3.0 / 4.0), 0.0F); + setShaderLights(matrix4f.transformDirection(vector3f, new Vector3f()), matrix4f.transformDirection(vector3f2, new Vector3f())); } - public static void beginInitialization() { - isInInit = true; - } - - public static void finishInitialization() { - isInInit = false; - if (!recordingQueue.isEmpty()) { - replayQueue(); - } - - if (!recordingQueue.isEmpty()) { - throw new IllegalStateException("Recorded to render queue during initialization"); - } - } - - public static Tesselator renderThreadTesselator() { + public static void setShaderTexture(int i, @Nullable GpuTexture gpuTexture) { assertOnRenderThread(); - return RENDER_THREAD_TESSELATOR; - } - - public static void defaultBlendFunc() { - blendFuncSeparate( - GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO - ); - } - - public static void overlayBlendFunc() { - blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); + if (i >= 0 && i < shaderTextures.length) { + shaderTextures[i] = gpuTexture; + } } @Nullable - public static CompiledShaderProgram setShader(ShaderProgram shaderProgram) { + public static GpuTexture getShaderTexture(int i) { assertOnRenderThread(); - CompiledShaderProgram compiledShaderProgram = Minecraft.getInstance().getShaderManager().getProgram(shaderProgram); - shader = compiledShaderProgram; - return compiledShaderProgram; - } - - public static void setShader(CompiledShaderProgram compiledShaderProgram) { - assertOnRenderThread(); - shader = compiledShaderProgram; - } - - public static void clearShader() { - assertOnRenderThread(); - shader = null; - } - - @Nullable - public static CompiledShaderProgram getShader() { - assertOnRenderThread(); - return shader; - } - - public static void setShaderTexture(int i, ResourceLocation resourceLocation) { - assertOnRenderThread(); - if (i >= 0 && i < shaderTextures.length) { - TextureManager textureManager = Minecraft.getInstance().getTextureManager(); - AbstractTexture abstractTexture = textureManager.getTexture(resourceLocation); - shaderTextures[i] = abstractTexture.getId(); - } - } - - public static void setShaderTexture(int i, int j) { - assertOnRenderThread(); - if (i >= 0 && i < shaderTextures.length) { - shaderTextures[i] = j; - } - } - - public static int getShaderTexture(int i) { - assertOnRenderThread(); - return i >= 0 && i < shaderTextures.length ? shaderTextures[i] : 0; + return i >= 0 && i < shaderTextures.length ? shaderTextures[i] : null; } public static void setProjectionMatrix(Matrix4f matrix4f, ProjectionType projectionType) { @@ -746,6 +368,62 @@ public class RenderSystem { return projectionType; } + public static GpuBuffer getQuadVertexBuffer() { + if (QUAD_VERTEX_BUFFER == null) { + throw new IllegalStateException("Can't getQuadVertexBuffer() before renderer was initialized"); + } else { + return QUAD_VERTEX_BUFFER; + } + } + + public static void setModelOffset(float f, float g, float h) { + assertOnRenderThread(); + modelOffset.set(f, g, h); + } + + public static void resetModelOffset() { + assertOnRenderThread(); + modelOffset.set(0.0F, 0.0F, 0.0F); + } + + public static Vector3f getModelOffset() { + assertOnRenderThread(); + return modelOffset; + } + + public static void queueFencedTask(Runnable runnable) { + PENDING_FENCES.addLast(new RenderSystem.GpuAsyncTask(runnable, new GpuFence())); + } + + public static void executePendingTasks() { + for (RenderSystem.GpuAsyncTask gpuAsyncTask = PENDING_FENCES.peekFirst(); gpuAsyncTask != null; gpuAsyncTask = PENDING_FENCES.peekFirst()) { + if (!gpuAsyncTask.fence.awaitCompletion(0L)) { + return; + } + + try { + gpuAsyncTask.callback.run(); + } finally { + gpuAsyncTask.fence.close(); + } + + PENDING_FENCES.removeFirst(); + } + } + + public static GpuDevice getDevice() { + if (DEVICE == null) { + throw new IllegalStateException("Can't getDevice() before it was initialized"); + } else { + return DEVICE; + } + } + + @Nullable + public static GpuDevice tryGetDevice() { + return DEVICE; + } + @Environment(EnvType.CLIENT) public static final class AutoStorageIndexBuffer { private final int vertexStride; @@ -766,13 +444,9 @@ public class RenderSystem { return index <= this.indexCount; } - public void bind(int index) { - if (this.buffer == null) { - this.buffer = new GpuBuffer(BufferType.INDICES, BufferUsage.DYNAMIC_WRITE, 0); - } - - this.buffer.bind(); + public GpuBuffer getBuffer(int index) { this.ensureStorage(index); + return this.buffer; } private void ensureStorage(int neededIndexCount) { @@ -794,8 +468,11 @@ public class RenderSystem { } byteBuffer.flip(); - this.buffer.resize(k); - this.buffer.write(byteBuffer, 0); + if (this.buffer != null) { + this.buffer.close(); + } + + this.buffer = RenderSystem.getDevice().createBuffer(() -> "Auto Storage index buffer", BufferType.INDICES, BufferUsage.DYNAMIC_WRITE, byteBuffer); } finally { MemoryUtil.memFree(byteBuffer); } @@ -818,4 +495,8 @@ public class RenderSystem { return this.type; } } + + @Environment(EnvType.CLIENT) + record GpuAsyncTask(Runnable callback, GpuFence fence) { + } } diff --git a/com/mojang/blaze3d/systems/ScissorState.java b/com/mojang/blaze3d/systems/ScissorState.java new file mode 100644 index 00000000..05c0127f --- /dev/null +++ b/com/mojang/blaze3d/systems/ScissorState.java @@ -0,0 +1,55 @@ +package com.mojang.blaze3d.systems; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public class ScissorState { + private boolean enabled; + private int x; + private int y; + private int width; + private int height; + + public void enable(int i, int j, int k, int l) { + this.enabled = true; + this.x = i; + this.y = j; + this.width = k; + this.height = l; + } + + public void disable() { + this.enabled = false; + } + + public boolean isEnabled() { + return this.enabled; + } + + public int getX() { + return this.x; + } + + public int getY() { + return this.y; + } + + public int getWidth() { + return this.width; + } + + public int getHeight() { + return this.height; + } + + public void copyFrom(ScissorState scissorState) { + this.enabled = scissorState.enabled; + this.x = scissorState.x; + this.y = scissorState.y; + this.width = scissorState.width; + this.height = scissorState.height; + } +} diff --git a/com/mojang/blaze3d/textures/AddressMode.java b/com/mojang/blaze3d/textures/AddressMode.java new file mode 100644 index 00000000..d0e7ab2a --- /dev/null +++ b/com/mojang/blaze3d/textures/AddressMode.java @@ -0,0 +1,12 @@ +package com.mojang.blaze3d.textures; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum AddressMode { + REPEAT, + CLAMP_TO_EDGE; +} diff --git a/com/mojang/blaze3d/textures/FilterMode.java b/com/mojang/blaze3d/textures/FilterMode.java new file mode 100644 index 00000000..31be850d --- /dev/null +++ b/com/mojang/blaze3d/textures/FilterMode.java @@ -0,0 +1,12 @@ +package com.mojang.blaze3d.textures; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum FilterMode { + NEAREST, + LINEAR; +} diff --git a/com/mojang/blaze3d/textures/GpuTexture.java b/com/mojang/blaze3d/textures/GpuTexture.java new file mode 100644 index 00000000..fc4c75f8 --- /dev/null +++ b/com/mojang/blaze3d/textures/GpuTexture.java @@ -0,0 +1,71 @@ +package com.mojang.blaze3d.textures; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public abstract class GpuTexture implements AutoCloseable { + private final TextureFormat format; + private final int width; + private final int height; + private final int mipLevels; + private final String label; + protected AddressMode addressModeU = AddressMode.REPEAT; + protected AddressMode addressModeV = AddressMode.REPEAT; + protected FilterMode minFilter = FilterMode.NEAREST; + protected FilterMode magFilter = FilterMode.LINEAR; + protected boolean useMipmaps = true; + + public GpuTexture(String string, TextureFormat textureFormat, int i, int j, int k) { + this.label = string; + this.format = textureFormat; + this.width = i; + this.height = j; + this.mipLevels = k; + } + + public int getWidth(int i) { + return this.width >> i; + } + + public int getHeight(int i) { + return this.height >> i; + } + + public int getMipLevels() { + return this.mipLevels; + } + + public TextureFormat getFormat() { + return this.format; + } + + public void setAddressMode(AddressMode addressMode) { + this.setAddressMode(addressMode, addressMode); + } + + public void setAddressMode(AddressMode addressMode, AddressMode addressMode2) { + this.addressModeU = addressMode; + this.addressModeV = addressMode2; + } + + public void setTextureFilter(FilterMode filterMode, boolean bl) { + this.setTextureFilter(filterMode, filterMode, bl); + } + + public void setTextureFilter(FilterMode filterMode, FilterMode filterMode2, boolean bl) { + this.minFilter = filterMode; + this.magFilter = filterMode2; + this.useMipmaps = bl; + } + + public String getLabel() { + return this.label; + } + + public abstract void close(); + + public abstract boolean isClosed(); +} diff --git a/com/mojang/blaze3d/textures/TextureFormat.java b/com/mojang/blaze3d/textures/TextureFormat.java new file mode 100644 index 00000000..bbd7722b --- /dev/null +++ b/com/mojang/blaze3d/textures/TextureFormat.java @@ -0,0 +1,31 @@ +package com.mojang.blaze3d.textures; + +import com.mojang.blaze3d.DontObfuscate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +@DontObfuscate +public enum TextureFormat { + RGBA8(4), + RED8(1), + DEPTH32(4); + + private final int pixelSize; + + private TextureFormat(final int j) { + this.pixelSize = j; + } + + public int pixelSize() { + return this.pixelSize; + } + + public boolean hasColorAspect() { + return this == RGBA8 || this == RED8; + } + + public boolean hasDepthAspect() { + return this == DEPTH32; + } +} diff --git a/com/mojang/blaze3d/textures/package-info.java b/com/mojang/blaze3d/textures/package-info.java new file mode 100644 index 00000000..1b8fc399 --- /dev/null +++ b/com/mojang/blaze3d/textures/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package com.mojang.blaze3d.textures; + +import com.mojang.blaze3d.FieldsAreNonnullByDefault; +import com.mojang.blaze3d.MethodsReturnNonnullByDefault; +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; diff --git a/com/mojang/blaze3d/vertex/BufferBuilder.java b/com/mojang/blaze3d/vertex/BufferBuilder.java index 5d65dc35..805dbf09 100644 --- a/com/mojang/blaze3d/vertex/BufferBuilder.java +++ b/com/mojang/blaze3d/vertex/BufferBuilder.java @@ -1,5 +1,6 @@ package com.mojang.blaze3d.vertex; +import com.mojang.blaze3d.vertex.ByteBufferBuilder.Result; import com.mojang.blaze3d.vertex.MeshData.DrawState; import java.nio.ByteOrder; import java.util.stream.Collectors; @@ -75,7 +76,7 @@ public class BufferBuilder implements VertexConsumer { if (this.vertices == 0) { return null; } else { - ByteBufferBuilder.Result result = this.buffer.build(); + Result result = this.buffer.build(); if (result == null) { return null; } else { diff --git a/com/mojang/blaze3d/vertex/BufferUploader.java b/com/mojang/blaze3d/vertex/BufferUploader.java deleted file mode 100644 index 632117a4..00000000 --- a/com/mojang/blaze3d/vertex/BufferUploader.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.mojang.blaze3d.vertex; - -import com.mojang.blaze3d.systems.RenderSystem; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class BufferUploader { - @Nullable - private static VertexBuffer lastImmediateBuffer; - - public static void reset() { - if (lastImmediateBuffer != null) { - invalidate(); - VertexBuffer.unbind(); - } - } - - public static void invalidate() { - lastImmediateBuffer = null; - } - - public static void drawWithShader(MeshData meshData) { - RenderSystem.assertOnRenderThread(); - VertexBuffer vertexBuffer = upload(meshData); - vertexBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); - } - - public static void draw(MeshData meshData) { - RenderSystem.assertOnRenderThread(); - VertexBuffer vertexBuffer = upload(meshData); - vertexBuffer.draw(); - } - - private static VertexBuffer upload(MeshData meshData) { - VertexBuffer vertexBuffer = bindImmediateBuffer(meshData.drawState().format()); - vertexBuffer.upload(meshData); - return vertexBuffer; - } - - private static VertexBuffer bindImmediateBuffer(VertexFormat format) { - VertexBuffer vertexBuffer = format.getImmediateDrawVertexBuffer(); - bindImmediateBuffer(vertexBuffer); - return vertexBuffer; - } - - private static void bindImmediateBuffer(VertexBuffer buffer) { - if (buffer != lastImmediateBuffer) { - buffer.bind(); - lastImmediateBuffer = buffer; - } - } -} diff --git a/com/mojang/blaze3d/vertex/PoseStack.java b/com/mojang/blaze3d/vertex/PoseStack.java index 23427f97..ebd42a4f 100644 --- a/com/mojang/blaze3d/vertex/PoseStack.java +++ b/com/mojang/blaze3d/vertex/PoseStack.java @@ -1,120 +1,103 @@ package com.mojang.blaze3d.vertex; -import com.google.common.collect.Queues; import com.mojang.math.MatrixUtil; -import java.util.Deque; +import java.util.ArrayList; +import java.util.List; +import java.util.NoSuchElementException; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.Util; import net.minecraft.world.phys.Vec3; import org.joml.Matrix3f; import org.joml.Matrix4f; -import org.joml.Quaternionf; +import org.joml.Matrix4fc; +import org.joml.Quaternionfc; import org.joml.Vector3f; +import org.joml.Vector3fc; @Environment(EnvType.CLIENT) public class PoseStack { - private final Deque poseStack = Util.make(Queues.newArrayDeque(), arrayDeque -> { - Matrix4f matrix4f = new Matrix4f(); - Matrix3f matrix3f = new Matrix3f(); - arrayDeque.add(new PoseStack.Pose(matrix4f, matrix3f)); - }); + private final List poses = new ArrayList(16); + private int lastIndex; + + public PoseStack() { + this.poses.add(new PoseStack.Pose()); + } public void translate(double x, double y, double z) { this.translate((float)x, (float)y, (float)z); } public void translate(float x, float y, float z) { - PoseStack.Pose pose = (PoseStack.Pose)this.poseStack.getLast(); - pose.pose.translate(x, y, z); + this.last().translate(x, y, z); } - public void translate(Vec3 vec3) { - this.translate(vec3.x, vec3.y, vec3.z); + public void translate(Vec3 vector) { + this.translate(vector.x, vector.y, vector.z); } public void scale(float x, float y, float z) { - PoseStack.Pose pose = (PoseStack.Pose)this.poseStack.getLast(); - pose.pose.scale(x, y, z); - if (Math.abs(x) == Math.abs(y) && Math.abs(y) == Math.abs(z)) { - if (x < 0.0F || y < 0.0F || z < 0.0F) { - pose.normal.scale(Math.signum(x), Math.signum(y), Math.signum(z)); - } - } else { - pose.normal.scale(1.0F / x, 1.0F / y, 1.0F / z); - pose.trustedNormals = false; - } + this.last().scale(x, y, z); } - public void mulPose(Quaternionf quaternion) { - PoseStack.Pose pose = (PoseStack.Pose)this.poseStack.getLast(); - pose.pose.rotate(quaternion); - pose.normal.rotate(quaternion); + public void mulPose(Quaternionfc pose) { + this.last().rotate(pose); } - public void rotateAround(Quaternionf quaternion, float x, float y, float z) { - PoseStack.Pose pose = (PoseStack.Pose)this.poseStack.getLast(); - pose.pose.rotateAround(quaternion, x, y, z); - pose.normal.rotate(quaternion); + public void rotateAround(Quaternionfc quaternion, float x, float y, float z) { + this.last().rotateAround(quaternion, x, y, z); } public void pushPose() { - this.poseStack.addLast(new PoseStack.Pose((PoseStack.Pose)this.poseStack.getLast())); + PoseStack.Pose pose = this.last(); + this.lastIndex++; + if (this.lastIndex >= this.poses.size()) { + this.poses.add(pose.copy()); + } else { + ((PoseStack.Pose)this.poses.get(this.lastIndex)).set(pose); + } } public void popPose() { - this.poseStack.removeLast(); + if (this.lastIndex == 0) { + throw new NoSuchElementException(); + } else { + this.lastIndex--; + } } public PoseStack.Pose last() { - return (PoseStack.Pose)this.poseStack.getLast(); + return (PoseStack.Pose)this.poses.get(this.lastIndex); } - public boolean clear() { - return this.poseStack.size() == 1; + public boolean isEmpty() { + return this.lastIndex == 0; } public void setIdentity() { - PoseStack.Pose pose = (PoseStack.Pose)this.poseStack.getLast(); - pose.pose.identity(); - pose.normal.identity(); - pose.trustedNormals = true; + this.last().setIdentity(); } - public void mulPose(Matrix4f pose) { - PoseStack.Pose pose2 = (PoseStack.Pose)this.poseStack.getLast(); - pose2.pose.mul(pose); - if (!MatrixUtil.isPureTranslation(pose)) { - if (MatrixUtil.isOrthonormal(pose)) { - pose2.normal.mul(new Matrix3f(pose)); - } else { - pose2.computeNormalMatrix(); - } - } + public void mulPose(Matrix4fc pose) { + this.last().mulPose(pose); } @Environment(EnvType.CLIENT) public static final class Pose { - final Matrix4f pose; - final Matrix3f normal; - boolean trustedNormals = true; + private final Matrix4f pose = new Matrix4f(); + private final Matrix3f normal = new Matrix3f(); + private boolean trustedNormals = true; - Pose(Matrix4f pose, Matrix3f normal) { - this.pose = pose; - this.normal = normal; - } - - Pose(PoseStack.Pose pose) { - this.pose = new Matrix4f(pose.pose); - this.normal = new Matrix3f(pose.normal); - this.trustedNormals = pose.trustedNormals; - } - - void computeNormalMatrix() { + private void computeNormalMatrix() { this.normal.set(this.pose).invert().transpose(); this.trustedNormals = false; } + void set(PoseStack.Pose pose) { + this.pose.set(pose.pose); + this.normal.set(pose.normal); + this.trustedNormals = pose.trustedNormals; + } + public Matrix4f pose() { return this.pose; } @@ -123,8 +106,8 @@ public class PoseStack { return this.normal; } - public Vector3f transformNormal(Vector3f vector, Vector3f destination) { - return this.transformNormal(vector.x, vector.y, vector.z, destination); + public Vector3f transformNormal(Vector3fc pos, Vector3f destination) { + return this.transformNormal(pos.x(), pos.y(), pos.z(), destination); } public Vector3f transformNormal(float x, float y, float z, Vector3f destination) { @@ -132,8 +115,53 @@ public class PoseStack { return this.trustedNormals ? vector3f : vector3f.normalize(); } + public Matrix4f translate(float x, float y, float z) { + return this.pose.translate(x, y, z); + } + + public void scale(float x, float y, float z) { + this.pose.scale(x, y, z); + if (Math.abs(x) == Math.abs(y) && Math.abs(y) == Math.abs(z)) { + if (x < 0.0F || y < 0.0F || z < 0.0F) { + this.normal.scale(Math.signum(x), Math.signum(y), Math.signum(z)); + } + } else { + this.normal.scale(1.0F / x, 1.0F / y, 1.0F / z); + this.trustedNormals = false; + } + } + + public void rotate(Quaternionfc pose) { + this.pose.rotate(pose); + this.normal.rotate(pose); + } + + public void rotateAround(Quaternionfc pose, float x, float y, float z) { + this.pose.rotateAround(pose, x, y, z); + this.normal.rotate(pose); + } + + public void setIdentity() { + this.pose.identity(); + this.normal.identity(); + this.trustedNormals = true; + } + + public void mulPose(Matrix4fc pose) { + this.pose.mul(pose); + if (!MatrixUtil.isPureTranslation(pose)) { + if (MatrixUtil.isOrthonormal(pose)) { + this.normal.mul(new Matrix3f(pose)); + } else { + this.computeNormalMatrix(); + } + } + } + public PoseStack.Pose copy() { - return new PoseStack.Pose(this); + PoseStack.Pose pose = new PoseStack.Pose(); + pose.set(this); + return pose; } } } diff --git a/com/mojang/blaze3d/vertex/VertexBuffer.java b/com/mojang/blaze3d/vertex/VertexBuffer.java deleted file mode 100644 index c4736fdb..00000000 --- a/com/mojang/blaze3d/vertex/VertexBuffer.java +++ /dev/null @@ -1,211 +0,0 @@ -package com.mojang.blaze3d.vertex; - -import com.mojang.blaze3d.buffers.BufferType; -import com.mojang.blaze3d.buffers.BufferUsage; -import com.mojang.blaze3d.buffers.GpuBuffer; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.MeshData.DrawState; -import java.nio.ByteBuffer; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.CompiledShaderProgram; -import org.jetbrains.annotations.Nullable; -import org.joml.Matrix4f; - -@Environment(EnvType.CLIENT) -public class VertexBuffer implements AutoCloseable { - private final BufferUsage usage; - private final GpuBuffer vertexBuffer; - @Nullable - private GpuBuffer indexBuffer = null; - private int arrayObjectId; - @Nullable - private VertexFormat format; - @Nullable - private RenderSystem.AutoStorageIndexBuffer sequentialIndices; - private VertexFormat.IndexType indexType; - private int indexCount; - private VertexFormat.Mode mode; - - public VertexBuffer(BufferUsage bufferUsage) { - this.usage = bufferUsage; - RenderSystem.assertOnRenderThread(); - this.vertexBuffer = new GpuBuffer(BufferType.VERTICES, bufferUsage, 0); - this.arrayObjectId = GlStateManager._glGenVertexArrays(); - } - - public void upload(MeshData meshData) { - MeshData var2 = meshData; - - label40: { - try { - if (this.isInvalid()) { - break label40; - } - - RenderSystem.assertOnRenderThread(); - DrawState drawState = meshData.drawState(); - this.format = this.uploadVertexBuffer(drawState, meshData.vertexBuffer()); - this.sequentialIndices = this.uploadIndexBuffer(drawState, meshData.indexBuffer()); - this.indexCount = drawState.indexCount(); - this.indexType = drawState.indexType(); - this.mode = drawState.mode(); - } catch (Throwable var6) { - if (meshData != null) { - try { - var2.close(); - } catch (Throwable var5) { - var6.addSuppressed(var5); - } - } - - throw var6; - } - - if (meshData != null) { - meshData.close(); - } - - return; - } - - if (meshData != null) { - meshData.close(); - } - } - - public void uploadIndexBuffer(ByteBufferBuilder.Result result) { - ByteBufferBuilder.Result var2 = result; - - label46: { - try { - if (this.isInvalid()) { - break label46; - } - - RenderSystem.assertOnRenderThread(); - if (this.indexBuffer != null) { - this.indexBuffer.close(); - } - - this.indexBuffer = new GpuBuffer(BufferType.INDICES, this.usage, result.byteBuffer()); - this.sequentialIndices = null; - } catch (Throwable var6) { - if (result != null) { - try { - var2.close(); - } catch (Throwable var5) { - var6.addSuppressed(var5); - } - } - - throw var6; - } - - if (result != null) { - result.close(); - } - - return; - } - - if (result != null) { - result.close(); - } - } - - private VertexFormat uploadVertexBuffer(DrawState drawState, @Nullable ByteBuffer buffer) { - boolean bl = false; - if (!drawState.format().equals(this.format)) { - if (this.format != null) { - this.format.clearBufferState(); - } - - this.vertexBuffer.bind(); - drawState.format().setupBufferState(); - bl = true; - } - - if (buffer != null) { - if (!bl) { - this.vertexBuffer.bind(); - } - - this.vertexBuffer.resize(buffer.remaining()); - this.vertexBuffer.write(buffer, 0); - } - - return drawState.format(); - } - - @Nullable - private RenderSystem.AutoStorageIndexBuffer uploadIndexBuffer(DrawState drawState, @Nullable ByteBuffer buffer) { - if (buffer != null) { - if (this.indexBuffer != null) { - this.indexBuffer.close(); - } - - this.indexBuffer = new GpuBuffer(BufferType.INDICES, this.usage, buffer); - return null; - } else { - RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(drawState.mode()); - if (autoStorageIndexBuffer != this.sequentialIndices || !autoStorageIndexBuffer.hasStorage(drawState.indexCount())) { - autoStorageIndexBuffer.bind(drawState.indexCount()); - } - - return autoStorageIndexBuffer; - } - } - - public void bind() { - BufferUploader.invalidate(); - GlStateManager._glBindVertexArray(this.arrayObjectId); - } - - public static void unbind() { - BufferUploader.invalidate(); - GlStateManager._glBindVertexArray(0); - } - - public void draw() { - RenderSystem.drawElements(this.mode.asGLMode, this.indexCount, this.getIndexType().asGLType); - } - - private VertexFormat.IndexType getIndexType() { - RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = this.sequentialIndices; - return autoStorageIndexBuffer != null ? autoStorageIndexBuffer.type() : this.indexType; - } - - public void drawWithShader(Matrix4f matrix4f, Matrix4f matrix4f2, @Nullable CompiledShaderProgram compiledShaderProgram) { - if (compiledShaderProgram != null) { - RenderSystem.assertOnRenderThread(); - compiledShaderProgram.setDefaultUniforms(this.mode, matrix4f, matrix4f2, Minecraft.getInstance().getWindow()); - compiledShaderProgram.apply(); - this.draw(); - compiledShaderProgram.clear(); - } - } - - public void close() { - this.vertexBuffer.close(); - if (this.indexBuffer != null) { - this.indexBuffer.close(); - this.indexBuffer = null; - } - - if (this.arrayObjectId >= 0) { - RenderSystem.glDeleteVertexArrays(this.arrayObjectId); - this.arrayObjectId = -1; - } - } - - public VertexFormat getFormat() { - return this.format; - } - - public boolean isInvalid() { - return this.arrayObjectId == -1; - } -} diff --git a/com/mojang/blaze3d/vertex/VertexConsumer.java b/com/mojang/blaze3d/vertex/VertexConsumer.java index 428b2688..f8593b83 100644 --- a/com/mojang/blaze3d/vertex/VertexConsumer.java +++ b/com/mojang/blaze3d/vertex/VertexConsumer.java @@ -6,10 +6,10 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.core.Vec3i; import net.minecraft.util.ARGB; import org.joml.Matrix4f; import org.joml.Vector3f; +import org.joml.Vector3fc; import org.lwjgl.system.MemoryStack; @Environment(EnvType.CLIENT) @@ -80,16 +80,16 @@ public interface VertexConsumer { float alpha, int[] lightmap, int packedOverlay, - boolean readAlpha + boolean readExistingColor ) { - int[] is = quad.getVertices(); - Vec3i vec3i = quad.getDirection().getUnitVec3i(); + int[] is = quad.vertices(); + Vector3fc vector3fc = quad.direction().getUnitVec3f(); Matrix4f matrix4f = pose.pose(); - Vector3f vector3f = pose.transformNormal(vec3i.getX(), vec3i.getY(), vec3i.getZ(), new Vector3f()); + Vector3f vector3f = pose.transformNormal(vector3fc, new Vector3f()); int i = 8; int j = is.length / 8; int k = (int)(alpha * 255.0F); - int l = quad.getLightEmission(); + int l = quad.lightEmission(); try (MemoryStack memoryStack = MemoryStack.stackPush()) { ByteBuffer byteBuffer = memoryStack.malloc(DefaultVertexFormat.BLOCK.getVertexSize()); @@ -104,7 +104,7 @@ public interface VertexConsumer { float q; float r; float s; - if (readAlpha) { + if (readExistingColor) { float n = byteBuffer.get(12) & 255; float o = byteBuffer.get(13) & 255; float p = byteBuffer.get(14) & 255; @@ -149,7 +149,7 @@ public interface VertexConsumer { return this.setNormal(vector3f.x(), vector3f.y(), vector3f.z()); } - default VertexConsumer setNormal(PoseStack.Pose pose, Vector3f vector3f) { - return this.setNormal(pose, vector3f.x(), vector3f.y(), vector3f.z()); + default VertexConsumer setNormal(PoseStack.Pose pose, Vector3f normalVector) { + return this.setNormal(pose, normalVector.x(), normalVector.y(), normalVector.z()); } } diff --git a/com/mojang/blaze3d/vertex/VertexFormat.java b/com/mojang/blaze3d/vertex/VertexFormat.java index 6edaaa6b..54b31292 100644 --- a/com/mojang/blaze3d/vertex/VertexFormat.java +++ b/com/mojang/blaze3d/vertex/VertexFormat.java @@ -2,11 +2,16 @@ package com.mojang.blaze3d.vertex; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.mojang.blaze3d.DontObfuscate; +import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.GpuDevice; import com.mojang.blaze3d.systems.RenderSystem; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.ints.IntList; +import java.nio.ByteBuffer; import java.util.Arrays; import java.util.List; import net.fabricmc.api.EnvType; @@ -14,6 +19,7 @@ import net.fabricmc.api.Environment; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) +@DontObfuscate public class VertexFormat { public static final int UNKNOWN_ELEMENT = -1; private final List elements; @@ -22,18 +28,20 @@ public class VertexFormat { private final int elementsMask; private final int[] offsetsByElement = new int[32]; @Nullable - private VertexBuffer immediateDrawVertexBuffer; + private GpuBuffer immediateDrawVertexBuffer; + @Nullable + private GpuBuffer immediateDrawIndexBuffer; - VertexFormat(List elements, List names, IntList offsets, int vertexSize) { - this.elements = elements; - this.names = names; - this.vertexSize = vertexSize; - this.elementsMask = elements.stream().mapToInt(VertexFormatElement::mask).reduce(0, (ix, jx) -> ix | jx); + VertexFormat(List list, List list2, IntList intList, int i) { + this.elements = list; + this.names = list2; + this.vertexSize = i; + this.elementsMask = list.stream().mapToInt(VertexFormatElement::mask).reduce(0, (ix, jx) -> ix | jx); - for (int i = 0; i < this.offsetsByElement.length; i++) { - VertexFormatElement vertexFormatElement = VertexFormatElement.byId(i); - int j = vertexFormatElement != null ? elements.indexOf(vertexFormatElement) : -1; - this.offsetsByElement[i] = j != -1 ? offsets.getInt(j) : -1; + for (int j = 0; j < this.offsetsByElement.length; j++) { + VertexFormatElement vertexFormatElement = VertexFormatElement.byId(j); + int k = vertexFormatElement != null ? list.indexOf(vertexFormatElement) : -1; + this.offsetsByElement[j] = k != -1 ? intList.getInt(k) : -1; } } @@ -41,15 +49,6 @@ public class VertexFormat { return new VertexFormat.Builder(); } - public void bindAttributes(int i) { - int j = 0; - - for (String string : this.getElementAttributeNames()) { - GlStateManager._glBindAttribLocation(i, j, string); - j++; - } - } - public String toString() { return "VertexFormat" + this.names; } @@ -70,22 +69,22 @@ public class VertexFormat { return this.offsetsByElement; } - public int getOffset(VertexFormatElement element) { - return this.offsetsByElement[element.id()]; + public int getOffset(VertexFormatElement vertexFormatElement) { + return this.offsetsByElement[vertexFormatElement.id()]; } - public boolean contains(VertexFormatElement element) { - return (this.elementsMask & element.mask()) != 0; + public boolean contains(VertexFormatElement vertexFormatElement) { + return (this.elementsMask & vertexFormatElement.mask()) != 0; } public int getElementsMask() { return this.elementsMask; } - public String getElementName(VertexFormatElement element) { - int i = this.elements.indexOf(element); + public String getElementName(VertexFormatElement vertexFormatElement) { + int i = this.elements.indexOf(vertexFormatElement); if (i == -1) { - throw new IllegalArgumentException(element + " is not contained in format"); + throw new IllegalArgumentException(vertexFormatElement + " is not contained in format"); } else { return (String)this.names.get(i); } @@ -105,35 +104,48 @@ public class VertexFormat { return this.elementsMask * 31 + Arrays.hashCode(this.offsetsByElement); } - public void setupBufferState() { - RenderSystem.assertOnRenderThread(); - int i = this.getVertexSize(); - - for (int j = 0; j < this.elements.size(); j++) { - GlStateManager._enableVertexAttribArray(j); - VertexFormatElement vertexFormatElement = (VertexFormatElement)this.elements.get(j); - vertexFormatElement.setupBufferState(j, this.getOffset(vertexFormatElement), i); + public GpuBuffer uploadImmediateVertexBuffer(ByteBuffer byteBuffer) { + GpuDevice gpuDevice = RenderSystem.getDevice(); + if (this.immediateDrawVertexBuffer == null) { + this.immediateDrawVertexBuffer = gpuDevice.createBuffer( + () -> "Immediate vertex buffer for " + this, BufferType.VERTICES, BufferUsage.DYNAMIC_WRITE, byteBuffer + ); + } else { + CommandEncoder commandEncoder = gpuDevice.createCommandEncoder(); + if (this.immediateDrawVertexBuffer.size() < byteBuffer.remaining()) { + this.immediateDrawVertexBuffer.close(); + this.immediateDrawVertexBuffer = gpuDevice.createBuffer( + () -> "Immediate vertex buffer for " + this, BufferType.VERTICES, BufferUsage.DYNAMIC_WRITE, byteBuffer + ); + } else { + commandEncoder.writeToBuffer(this.immediateDrawVertexBuffer, byteBuffer, 0); + } } + + return this.immediateDrawVertexBuffer; } - public void clearBufferState() { - RenderSystem.assertOnRenderThread(); - - for (int i = 0; i < this.elements.size(); i++) { - GlStateManager._disableVertexAttribArray(i); - } - } - - public VertexBuffer getImmediateDrawVertexBuffer() { - VertexBuffer vertexBuffer = this.immediateDrawVertexBuffer; - if (vertexBuffer == null) { - this.immediateDrawVertexBuffer = vertexBuffer = new VertexBuffer(BufferUsage.DYNAMIC_WRITE); + public GpuBuffer uploadImmediateIndexBuffer(ByteBuffer byteBuffer) { + GpuDevice gpuDevice = RenderSystem.getDevice(); + if (this.immediateDrawIndexBuffer == null) { + this.immediateDrawIndexBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Immediate index buffer for " + this, BufferType.INDICES, BufferUsage.DYNAMIC_WRITE, byteBuffer); + } else { + CommandEncoder commandEncoder = gpuDevice.createCommandEncoder(); + if (this.immediateDrawIndexBuffer.size() < byteBuffer.remaining()) { + this.immediateDrawIndexBuffer.close(); + this.immediateDrawIndexBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Immediate index buffer for " + this, BufferType.INDICES, BufferUsage.DYNAMIC_WRITE, byteBuffer); + } else { + commandEncoder.writeToBuffer(this.immediateDrawIndexBuffer, byteBuffer, 0); + } } - return vertexBuffer; + return this.immediateDrawIndexBuffer; } @Environment(EnvType.CLIENT) + @DontObfuscate public static class Builder { private final ImmutableMap.Builder elements = ImmutableMap.builder(); private final IntList offsets = new IntArrayList(); @@ -142,15 +154,15 @@ public class VertexFormat { Builder() { } - public VertexFormat.Builder add(String name, VertexFormatElement element) { - this.elements.put(name, element); + public VertexFormat.Builder add(String string, VertexFormatElement vertexFormatElement) { + this.elements.put(string, vertexFormatElement); this.offsets.add(this.offset); - this.offset = this.offset + element.byteSize(); + this.offset = this.offset + vertexFormatElement.byteSize(); return this; } - public VertexFormat.Builder padding(int padding) { - this.offset += padding; + public VertexFormat.Builder padding(int i) { + this.offset += i; return this; } @@ -164,14 +176,12 @@ public class VertexFormat { @Environment(EnvType.CLIENT) public static enum IndexType { - SHORT(5123, 2), - INT(5125, 4); + SHORT(2), + INT(4); - public final int asGLType; public final int bytes; - private IndexType(final int asGLType, final int bytes) { - this.asGLType = asGLType; + private IndexType(final int bytes) { this.bytes = bytes; } @@ -182,22 +192,20 @@ public class VertexFormat { @Environment(EnvType.CLIENT) public static enum Mode { - LINES(4, 2, 2, false), - LINE_STRIP(5, 2, 1, true), - DEBUG_LINES(1, 2, 2, false), - DEBUG_LINE_STRIP(3, 2, 1, true), - TRIANGLES(4, 3, 3, false), - TRIANGLE_STRIP(5, 3, 1, true), - TRIANGLE_FAN(6, 3, 1, true), - QUADS(4, 4, 4, false); + LINES(2, 2, false), + LINE_STRIP(2, 1, true), + DEBUG_LINES(2, 2, false), + DEBUG_LINE_STRIP(2, 1, true), + TRIANGLES(3, 3, false), + TRIANGLE_STRIP(3, 1, true), + TRIANGLE_FAN(3, 1, true), + QUADS(4, 4, false); - public final int asGLMode; public final int primitiveLength; public final int primitiveStride; public final boolean connectedPrimitives; - private Mode(final int asGLMode, final int primitiveLength, final int primitiveStride, final boolean connectedPrimitives) { - this.asGLMode = asGLMode; + private Mode(final int primitiveLength, final int primitiveStride, final boolean connectedPrimitives) { this.primitiveLength = primitiveLength; this.primitiveStride = primitiveStride; this.connectedPrimitives = connectedPrimitives; diff --git a/com/mojang/blaze3d/vertex/VertexFormatElement.java b/com/mojang/blaze3d/vertex/VertexFormatElement.java index bcbaa792..842e17ac 100644 --- a/com/mojang/blaze3d/vertex/VertexFormatElement.java +++ b/com/mojang/blaze3d/vertex/VertexFormatElement.java @@ -1,6 +1,6 @@ package com.mojang.blaze3d.vertex; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.DontObfuscate; import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; @@ -9,6 +9,7 @@ import net.fabricmc.api.Environment; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) +@DontObfuscate public record VertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) { public static final int MAX_COUNT = 32; private static final VertexFormatElement[] BY_ID = new VertexFormatElement[32]; @@ -35,19 +36,19 @@ public record VertexFormatElement(int id, int index, VertexFormatElement.Type ty } } - public static VertexFormatElement register(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) { - VertexFormatElement vertexFormatElement = new VertexFormatElement(id, index, type, usage, count); - if (BY_ID[id] != null) { - throw new IllegalArgumentException("Duplicate element registration for: " + id); + public static VertexFormatElement register(int i, int j, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int k) { + VertexFormatElement vertexFormatElement = new VertexFormatElement(i, j, type, usage, k); + if (BY_ID[i] != null) { + throw new IllegalArgumentException("Duplicate element registration for: " + i); } else { - BY_ID[id] = vertexFormatElement; + BY_ID[i] = vertexFormatElement; ELEMENTS.add(vertexFormatElement); return vertexFormatElement; } } - private boolean supportsUsage(int index, VertexFormatElement.Usage usage) { - return index == 0 || usage == VertexFormatElement.Usage.UV; + private boolean supportsUsage(int i, VertexFormatElement.Usage usage) { + return i == 0 || usage == VertexFormatElement.Usage.UV; } public String toString() { @@ -62,82 +63,60 @@ public record VertexFormatElement(int id, int index, VertexFormatElement.Type ty return this.type.size() * this.count; } - public void setupBufferState(int stateIndex, long offset, int stride) { - this.usage.setupState.setupBufferState(this.count, this.type.glType(), stride, offset, stateIndex); - } - @Nullable - public static VertexFormatElement byId(int id) { - return BY_ID[id]; + public static VertexFormatElement byId(int i) { + return BY_ID[i]; } - public static Stream elementsFromMask(int mask) { - return ELEMENTS.stream().filter(vertexFormatElement -> vertexFormatElement != null && (mask & vertexFormatElement.mask()) != 0); + public static Stream elementsFromMask(int i) { + return ELEMENTS.stream().filter(vertexFormatElement -> vertexFormatElement != null && (i & vertexFormatElement.mask()) != 0); } @Environment(EnvType.CLIENT) + @DontObfuscate public static enum Type { - FLOAT(4, "Float", 5126), - UBYTE(1, "Unsigned Byte", 5121), - BYTE(1, "Byte", 5120), - USHORT(2, "Unsigned Short", 5123), - SHORT(2, "Short", 5122), - UINT(4, "Unsigned Int", 5125), - INT(4, "Int", 5124); + FLOAT(4, "Float"), + UBYTE(1, "Unsigned Byte"), + BYTE(1, "Byte"), + USHORT(2, "Unsigned Short"), + SHORT(2, "Short"), + UINT(4, "Unsigned Int"), + INT(4, "Int"); private final int size; private final String name; - private final int glType; - private Type(final int size, final String name, final int glType) { - this.size = size; - this.name = name; - this.glType = glType; + private Type(final int j, final String string2) { + this.size = j; + this.name = string2; } public int size() { return this.size; } - public int glType() { - return this.glType; - } - public String toString() { return this.name; } } @Environment(EnvType.CLIENT) + @DontObfuscate public static enum Usage { - POSITION("Position", (i, j, k, l, m) -> GlStateManager._vertexAttribPointer(m, i, j, false, k, l)), - NORMAL("Normal", (i, j, k, l, m) -> GlStateManager._vertexAttribPointer(m, i, j, true, k, l)), - COLOR("Vertex Color", (i, j, k, l, m) -> GlStateManager._vertexAttribPointer(m, i, j, true, k, l)), - UV("UV", (i, j, k, l, m) -> { - if (j == 5126) { - GlStateManager._vertexAttribPointer(m, i, j, false, k, l); - } else { - GlStateManager._vertexAttribIPointer(m, i, j, k, l); - } - }), - GENERIC("Generic", (i, j, k, l, m) -> GlStateManager._vertexAttribPointer(m, i, j, false, k, l)); + POSITION("Position"), + NORMAL("Normal"), + COLOR("Vertex Color"), + UV("UV"), + GENERIC("Generic"); private final String name; - final VertexFormatElement.Usage.SetupState setupState; - private Usage(final String name, final VertexFormatElement.Usage.SetupState setupState) { - this.name = name; - this.setupState = setupState; + private Usage(final String string2) { + this.name = string2; } public String toString() { return this.name; } - - @FunctionalInterface - @Environment(EnvType.CLIENT) - interface SetupState { - void setupBufferState(int i, int j, int k, long l, int m); - } } } diff --git a/com/mojang/math/MatrixUtil.java b/com/mojang/math/MatrixUtil.java index 58b41263..72f37228 100644 --- a/com/mojang/math/MatrixUtil.java +++ b/com/mojang/math/MatrixUtil.java @@ -4,6 +4,7 @@ import org.apache.commons.lang3.tuple.Triple; import org.joml.Math; import org.joml.Matrix3f; import org.joml.Matrix4f; +import org.joml.Matrix4fc; import org.joml.Quaternionf; import org.joml.Vector3f; @@ -35,9 +36,9 @@ public class MatrixUtil { ); } - private static GivensParameters approxGivensQuat(float f, float g, float h) { - float i = 2.0F * (f - h); - return G * g * g < i * i ? GivensParameters.fromUnnormalized(g, i) : PI_4; + private static GivensParameters approxGivensQuat(float topCorner, float oppositeDiagonalAverage, float bottomCorner) { + float f = 2.0F * (topCorner - bottomCorner); + return G * oppositeDiagonalAverage * oppositeDiagonalAverage < f * f ? GivensParameters.fromUnnormalized(oppositeDiagonalAverage, f) : PI_4; } private static GivensParameters qrGivensQuat(float input1, float input2) { @@ -147,11 +148,30 @@ public class MatrixUtil { return Triple.of(quaternionf2, vector3f, quaternionf.conjugate()); } - public static boolean isPureTranslation(Matrix4f matrix) { - return (matrix.properties() & 8) != 0; + private static boolean checkPropertyRaw(Matrix4fc matrix, int property) { + return (matrix.properties() & property) != 0; } - public static boolean isOrthonormal(Matrix4f matrix) { - return (matrix.properties() & 16) != 0; + public static boolean checkProperty(Matrix4fc matrix, int property) { + if (checkPropertyRaw(matrix, property)) { + return true; + } else if (matrix instanceof Matrix4f matrix4f) { + matrix4f.determineProperties(); + return checkPropertyRaw(matrix, property); + } else { + return false; + } + } + + public static boolean isIdentity(Matrix4fc matrix) { + return checkProperty(matrix, 4); + } + + public static boolean isPureTranslation(Matrix4fc matrix) { + return checkProperty(matrix, 8); + } + + public static boolean isOrthonormal(Matrix4fc matrix) { + return checkProperty(matrix, 16); } } diff --git a/com/mojang/math/OctahedralGroup.java b/com/mojang/math/OctahedralGroup.java index 2bfa03d3..74d1d685 100644 --- a/com/mojang/math/OctahedralGroup.java +++ b/com/mojang/math/OctahedralGroup.java @@ -1,6 +1,5 @@ package com.mojang.math; -import com.google.common.collect.Maps; import com.mojang.datafixers.util.Pair; import it.unimi.dsi.fastutil.booleans.BooleanArrayList; import it.unimi.dsi.fastutil.booleans.BooleanList; @@ -13,6 +12,7 @@ import net.minecraft.core.FrontAndTop; import net.minecraft.util.StringRepresentable; import org.jetbrains.annotations.Nullable; import org.joml.Matrix3f; +import org.joml.Matrix3fc; public enum OctahedralGroup implements StringRepresentable { IDENTITY("identity", SymmetricGroup3.P123, false, false, false), @@ -64,7 +64,8 @@ public enum OctahedralGroup implements StringRepresentable { ROT_90_REF_Z_NEG("rot_90_ref_z_neg", SymmetricGroup3.P213, false, true, true), ROT_90_REF_Z_POS("rot_90_ref_z_pos", SymmetricGroup3.P213, true, false, true); - private final Matrix3f transformation; + private static final Direction.Axis[] AXES = Direction.Axis.values(); + private final Matrix3fc transformation; private final String name; @Nullable private Map rotatedDirections; @@ -72,7 +73,7 @@ public enum OctahedralGroup implements StringRepresentable { private final boolean invertY; private final boolean invertZ; private final SymmetricGroup3 permutation; - private static final OctahedralGroup[][] cayleyTable = Util.make( + private static final OctahedralGroup[][] CAYLEY_TABLE = Util.make( new OctahedralGroup[values().length][values().length], octahedralGroups -> { Map, OctahedralGroup> map = (Map, OctahedralGroup>)Arrays.stream(values()) @@ -96,7 +97,7 @@ public enum OctahedralGroup implements StringRepresentable { } } ); - private static final OctahedralGroup[] inverseTable = (OctahedralGroup[])Arrays.stream(values()) + private static final OctahedralGroup[] INVERSE_TABLE = (OctahedralGroup[])Arrays.stream(values()) .map( octahedralGroup -> (OctahedralGroup)Arrays.stream(values()) .filter(octahedralGroup2 -> octahedralGroup.compose(octahedralGroup2) == IDENTITY) @@ -104,6 +105,23 @@ public enum OctahedralGroup implements StringRepresentable { .get() ) .toArray(OctahedralGroup[]::new); + private static final OctahedralGroup[][] XY_TABLE = Util.make(new OctahedralGroup[Quadrant.values().length][Quadrant.values().length], octahedralGroups -> { + for (Quadrant quadrant : Quadrant.values()) { + for (Quadrant quadrant2 : Quadrant.values()) { + OctahedralGroup octahedralGroup = IDENTITY; + + for (int i = 0; i < quadrant2.shift; i++) { + octahedralGroup = octahedralGroup.compose(ROT_90_Y_NEG); + } + + for (int i = 0; i < quadrant.shift; i++) { + octahedralGroup = octahedralGroup.compose(ROT_90_X_NEG); + } + + octahedralGroups[quadrant.ordinal()][quadrant2.ordinal()] = octahedralGroup; + } + } + }); private OctahedralGroup(final String name, final SymmetricGroup3 permutation, final boolean invertX, final boolean invertY, final boolean invertZ) { this.name = name; @@ -111,8 +129,9 @@ public enum OctahedralGroup implements StringRepresentable { this.invertY = invertY; this.invertZ = invertZ; this.permutation = permutation; - this.transformation = new Matrix3f().scaling(invertX ? -1.0F : 1.0F, invertY ? -1.0F : 1.0F, invertZ ? -1.0F : 1.0F); - this.transformation.mul(permutation.transformation()); + Matrix3f matrix3f = new Matrix3f().scaling(invertX ? -1.0F : 1.0F, invertY ? -1.0F : 1.0F, invertZ ? -1.0F : 1.0F); + matrix3f.mul(permutation.transformation()); + this.transformation = matrix3f; } private BooleanList packInversions() { @@ -120,15 +139,15 @@ public enum OctahedralGroup implements StringRepresentable { } public OctahedralGroup compose(OctahedralGroup other) { - return cayleyTable[this.ordinal()][other.ordinal()]; + return CAYLEY_TABLE[this.ordinal()][other.ordinal()]; } public OctahedralGroup inverse() { - return inverseTable[this.ordinal()]; + return INVERSE_TABLE[this.ordinal()]; } - public Matrix3f transformation() { - return new Matrix3f(this.transformation); + public Matrix3fc transformation() { + return this.transformation; } public String toString() { @@ -142,35 +161,35 @@ public enum OctahedralGroup implements StringRepresentable { public Direction rotate(Direction direction) { if (this.rotatedDirections == null) { - this.rotatedDirections = Maps.newEnumMap(Direction.class); - Direction.Axis[] axiss = Direction.Axis.values(); - - for (Direction direction2 : Direction.values()) { - Direction.Axis axis = direction2.getAxis(); - Direction.AxisDirection axisDirection = direction2.getAxisDirection(); - Direction.Axis axis2 = axiss[this.permutation.permutation(axis.ordinal())]; + this.rotatedDirections = Util.makeEnumMap(Direction.class, directionx -> { + Direction.Axis axis = directionx.getAxis(); + Direction.AxisDirection axisDirection = directionx.getAxisDirection(); + Direction.Axis axis2 = this.permute(axis); Direction.AxisDirection axisDirection2 = this.inverts(axis2) ? axisDirection.opposite() : axisDirection; - Direction direction3 = Direction.fromAxisAndDirection(axis2, axisDirection2); - this.rotatedDirections.put(direction2, direction3); - } + return Direction.fromAxisAndDirection(axis2, axisDirection2); + }); } return (Direction)this.rotatedDirections.get(direction); } public boolean inverts(Direction.Axis axis) { - switch (axis) { - case X: - return this.invertX; - case Y: - return this.invertY; - case Z: - default: - return this.invertZ; - } + return switch (axis) { + case X -> this.invertX; + case Y -> this.invertY; + case Z -> this.invertZ; + }; + } + + public Direction.Axis permute(Direction.Axis axis) { + return AXES[this.permutation.permutation(axis.ordinal())]; } public FrontAndTop rotate(FrontAndTop frontAndTop) { return FrontAndTop.fromFrontAndTop(this.rotate(frontAndTop.front()), this.rotate(frontAndTop.top())); } + + public static OctahedralGroup fromXYAngles(Quadrant x, Quadrant y) { + return XY_TABLE[x.ordinal()][y.ordinal()]; + } } diff --git a/com/mojang/math/Quadrant.java b/com/mojang/math/Quadrant.java new file mode 100644 index 00000000..1d38a8a3 --- /dev/null +++ b/com/mojang/math/Quadrant.java @@ -0,0 +1,50 @@ +package com.mojang.math; + +import com.google.gson.JsonParseException; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import net.minecraft.util.Mth; + +public enum Quadrant { + R0(0), + R90(1), + R180(2), + R270(3); + + public static final Codec CODEC = Codec.INT.comapFlatMap(integer -> { + return switch (Mth.positiveModulo(integer, 360)) { + case 0 -> DataResult.success(R0); + case 90 -> DataResult.success(R90); + case 180 -> DataResult.success(R180); + case 270 -> DataResult.success(R270); + default -> DataResult.error(() -> "Invalid rotation " + integer + " found, only 0/90/180/270 allowed"); + }; + }, quadrant -> { + return switch (quadrant) { + case R0 -> 0; + case R90 -> 90; + case R180 -> 180; + case R270 -> 270; + }; + }); + public final int shift; + + private Quadrant(final int shift) { + this.shift = shift; + } + + @Deprecated + public static Quadrant parseJson(int rotation) { + return switch (Mth.positiveModulo(rotation, 360)) { + case 0 -> R0; + case 90 -> R90; + case 180 -> R180; + case 270 -> R270; + default -> throw new JsonParseException("Invalid rotation " + rotation + " found, only 0/90/180/270 allowed"); + }; + } + + public int rotateVertexIndex(int shift) { + return (shift + this.shift) % 4; + } +} diff --git a/com/mojang/math/SymmetricGroup3.java b/com/mojang/math/SymmetricGroup3.java index d5c66800..68766a57 100644 --- a/com/mojang/math/SymmetricGroup3.java +++ b/com/mojang/math/SymmetricGroup3.java @@ -3,6 +3,7 @@ package com.mojang.math; import java.util.Arrays; import net.minecraft.Util; import org.joml.Matrix3f; +import org.joml.Matrix3fc; /** * The symmetric group S3, also known as all the permutation orders of three elements. @@ -16,9 +17,9 @@ public enum SymmetricGroup3 { P321(2, 1, 0); private final int[] permutation; - private final Matrix3f transformation; + private final Matrix3fc transformation; private static final int ORDER = 3; - private static final SymmetricGroup3[][] cayleyTable = Util.make( + private static final SymmetricGroup3[][] CAYLEY_TABLE = Util.make( new SymmetricGroup3[values().length][values().length], symmetricGroup3s -> { for (SymmetricGroup3 symmetricGroup3 : values()) { @@ -41,21 +42,22 @@ public enum SymmetricGroup3 { private SymmetricGroup3(final int first, final int second, final int third) { this.permutation = new int[]{first, second, third}; - this.transformation = new Matrix3f(); - this.transformation.set(this.permutation(0), 0, 1.0F); - this.transformation.set(this.permutation(1), 1, 1.0F); - this.transformation.set(this.permutation(2), 2, 1.0F); + Matrix3f matrix3f = new Matrix3f().zero(); + matrix3f.set(this.permutation(0), 0, 1.0F); + matrix3f.set(this.permutation(1), 1, 1.0F); + matrix3f.set(this.permutation(2), 2, 1.0F); + this.transformation = matrix3f; } public SymmetricGroup3 compose(SymmetricGroup3 other) { - return cayleyTable[this.ordinal()][other.ordinal()]; + return CAYLEY_TABLE[this.ordinal()][other.ordinal()]; } public int permutation(int element) { return this.permutation[element]; } - public Matrix3f transformation() { + public Matrix3fc transformation() { return this.transformation; } } diff --git a/com/mojang/math/Transformation.java b/com/mojang/math/Transformation.java index a8e399c0..8621a995 100644 --- a/com/mojang/math/Transformation.java +++ b/com/mojang/math/Transformation.java @@ -9,11 +9,12 @@ import org.apache.commons.lang3.tuple.Triple; import org.jetbrains.annotations.Nullable; import org.joml.Matrix3f; import org.joml.Matrix4f; +import org.joml.Matrix4fc; import org.joml.Quaternionf; import org.joml.Vector3f; public final class Transformation { - private final Matrix4f matrix; + private final Matrix4fc matrix; public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( ExtraCodecs.VECTOR3F.fieldOf("translation").forGetter(transformation -> transformation.translation), @@ -45,7 +46,7 @@ public final class Transformation { return transformation; }); - public Transformation(@Nullable Matrix4f matrix) { + public Transformation(@Nullable Matrix4fc matrix) { if (matrix == null) { this.matrix = new Matrix4f(); } else { @@ -67,7 +68,7 @@ public final class Transformation { } public Transformation compose(Transformation other) { - Matrix4f matrix4f = this.getMatrix(); + Matrix4f matrix4f = this.getMatrixCopy(); matrix4f.mul(other.getMatrix()); return new Transformation(matrix4f); } @@ -77,7 +78,7 @@ public final class Transformation { if (this == IDENTITY) { return this; } else { - Matrix4f matrix4f = this.getMatrix().invert(); + Matrix4f matrix4f = this.getMatrixCopy().invertAffine(); return matrix4f.isFinite() ? new Transformation(matrix4f) : null; } } @@ -117,7 +118,11 @@ public final class Transformation { return matrix4f; } - public Matrix4f getMatrix() { + public Matrix4fc getMatrix() { + return this.matrix; + } + + public Matrix4f getMatrixCopy() { return new Matrix4f(this.matrix); } diff --git a/com/mojang/realmsclient/RealmsAvailability.java b/com/mojang/realmsclient/RealmsAvailability.java index 9d54a067..6291eacf 100644 --- a/com/mojang/realmsclient/RealmsAvailability.java +++ b/com/mojang/realmsclient/RealmsAvailability.java @@ -43,7 +43,7 @@ public class RealmsAvailability { ? CompletableFuture.completedFuture(new RealmsAvailability.Result(RealmsAvailability.Type.AUTHENTICATION_ERROR)) : CompletableFuture.supplyAsync( () -> { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { if (realmsClient.clientCompatible() != RealmsClient.CompatibleVersionResponse.COMPATIBLE) { diff --git a/com/mojang/realmsclient/RealmsMainScreen.java b/com/mojang/realmsclient/RealmsMainScreen.java index e6d7e435..26414b7b 100644 --- a/com/mojang/realmsclient/RealmsMainScreen.java +++ b/com/mojang/realmsclient/RealmsMainScreen.java @@ -14,6 +14,7 @@ import com.mojang.realmsclient.dto.RealmsServerPlayerLists; import com.mojang.realmsclient.dto.RegionPingResult; import com.mojang.realmsclient.dto.RealmsNotification.InfoPopup; import com.mojang.realmsclient.dto.RealmsNotification.VisitUrl; +import com.mojang.realmsclient.dto.RealmsServer.State; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.gui.RealmsDataFetcher; import com.mojang.realmsclient.gui.RealmsServerList; @@ -59,10 +60,11 @@ import net.minecraft.client.gui.components.MultiLineTextWidget; import net.minecraft.client.gui.components.ObjectSelectionList; import net.minecraft.client.gui.components.PlayerFaceRenderer; import net.minecraft.client.gui.components.PopupScreen; -import net.minecraft.client.gui.components.SpriteIconButton; import net.minecraft.client.gui.components.Tooltip; import net.minecraft.client.gui.components.WidgetSprites; import net.minecraft.client.gui.components.WidgetTooltipHolder; +import net.minecraft.client.gui.components.Button.OnPress; +import net.minecraft.client.gui.components.SpriteIconButton.CenteredIcon; import net.minecraft.client.gui.layouts.FrameLayout; import net.minecraft.client.gui.layouts.GridLayout; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; @@ -75,7 +77,7 @@ import net.minecraft.client.gui.navigation.CommonInputs; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.screens.ConfirmLinkScreen; import net.minecraft.client.gui.screens.Screen; -import net.minecraft.client.gui.screens.inventory.tooltip.ClientActivePlayersTooltip; +import net.minecraft.client.gui.screens.inventory.tooltip.ClientActivePlayersTooltip.ActivePlayersTooltip; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.resources.sounds.SimpleSoundInstance; import net.minecraft.network.chat.CommonComponents; @@ -336,7 +338,7 @@ public class RealmsMainScreen extends RealmsScreen { } boolean shouldPlayButtonBeActive(RealmsServer realmsServer) { - boolean bl = !realmsServer.expired && realmsServer.state == RealmsServer.State.OPEN; + boolean bl = !realmsServer.expired && realmsServer.state == State.OPEN; return bl && (realmsServer.isCompatible() || realmsServer.needsUpgrade() || isSelfOwnedServer(realmsServer)); } @@ -345,7 +347,7 @@ public class RealmsMainScreen extends RealmsScreen { } private boolean shouldConfigureButtonBeActive(RealmsServer realmsServer) { - return isSelfOwnedServer(realmsServer) && realmsServer.state != RealmsServer.State.UNINITIALIZED; + return isSelfOwnedServer(realmsServer) && realmsServer.state != State.UNINITIALIZED; } private boolean shouldLeaveButtonBeActive(RealmsServer realmsServer) { @@ -450,7 +452,7 @@ public class RealmsMainScreen extends RealmsScreen { Minecraft minecraft = Minecraft.getInstance(); CompletableFuture.supplyAsync(() -> { try { - return call.request(RealmsClient.create(minecraft)); + return call.request(RealmsClient.getOrCreate(minecraft)); } catch (RealmsServiceException var3) { throw new RuntimeException(var3); } @@ -469,7 +471,7 @@ public class RealmsMainScreen extends RealmsScreen { private void pingRegions() { new Thread(() -> { List list = Ping.pingAllRegions(); - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); PingResult pingResult = new PingResult(); pingResult.pingResults = list; pingResult.realmIds = this.getOwnedNonExpiredRealmIds(); @@ -524,7 +526,7 @@ public class RealmsMainScreen extends RealmsScreen { (new Thread("Realms-leave-server") { public void run() { try { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); realmsClient.uninviteMyselfFrom(server.id); RealmsMainScreen.this.minecraft.execute(RealmsMainScreen::refreshServerList); } catch (RealmsServiceException var2) { @@ -677,8 +679,8 @@ public class RealmsMainScreen extends RealmsScreen { return (Component)(StringUtils.isBlank(version) ? CommonComponents.EMPTY : Component.literal(version).withColor(color)); } - public static Component getGameModeComponent(int i, boolean bl) { - return (Component)(bl ? Component.translatable("gameMode.hardcore").withColor(-65536) : GameType.byId(i).getLongDisplayName()); + public static Component getGameModeComponent(int gamemode, boolean hardcore) { + return (Component)(hardcore ? Component.translatable("gameMode.hardcore").withColor(-65536) : GameType.byId(gamemode).getLongDisplayName()); } static boolean isSelfOwnedServer(RealmsServer server) { @@ -694,7 +696,7 @@ public class RealmsMainScreen extends RealmsScreen { guiGraphics.pose().translate((float)(this.width / 2 - 25), 20.0F, 0.0F); guiGraphics.pose().mulPose(Axis.ZP.rotationDegrees(-20.0F)); guiGraphics.pose().scale(1.5F, 1.5F, 1.5F); - guiGraphics.drawString(this.font, text, 0, 0, color, false); + guiGraphics.drawString(this.font, text, 0, 0, color); guiGraphics.pose().popPose(); } @@ -735,7 +737,7 @@ public class RealmsMainScreen extends RealmsScreen { public boolean keyPressed(int keyCode, int scanCode, int modifiers) { if (CommonInputs.selected(keyCode)) { this.addSnapshotRealm(); - return true; + return false; } else { return super.keyPressed(keyCode, scanCode, modifiers); } @@ -810,7 +812,7 @@ public class RealmsMainScreen extends RealmsScreen { ResourceLocation.withDefaultNamespace("widget/cross_button"), ResourceLocation.withDefaultNamespace("widget/cross_button_highlighted") ); - protected CrossButton(Button.OnPress onPress, Component message) { + protected CrossButton(OnPress onPress, Component message) { super(0, 0, 14, 14, SPRITES, onPress); this.setTooltip(Tooltip.create(message)); } @@ -840,7 +842,7 @@ public class RealmsMainScreen extends RealmsScreen { int j = y + 2; if (realmsServer.expired) { this.drawRealmStatus(guiGraphics, i, j, mouseX, mouseY, RealmsMainScreen.EXPIRED_SPRITE, () -> RealmsMainScreen.SERVER_EXPIRED_TOOLTIP); - } else if (realmsServer.state == RealmsServer.State.CLOSED) { + } else if (realmsServer.state == State.CLOSED) { this.drawRealmStatus(guiGraphics, i, j, mouseX, mouseY, RealmsMainScreen.CLOSED_SPRITE, () -> RealmsMainScreen.SERVER_CLOSED_TOOLTIP); } else if (RealmsMainScreen.isSelfOwnedServer(realmsServer) && realmsServer.daysLeft < 7) { this.drawRealmStatus( @@ -860,7 +862,7 @@ public class RealmsMainScreen extends RealmsScreen { } } ); - } else if (realmsServer.state == RealmsServer.State.OPEN) { + } else if (realmsServer.state == State.OPEN) { this.drawRealmStatus(guiGraphics, i, j, mouseX, mouseY, RealmsMainScreen.OPEN_SPRITE, () -> RealmsMainScreen.SERVER_OPEN_TOOLTIP); } } @@ -879,10 +881,10 @@ public class RealmsMainScreen extends RealmsScreen { int j = this.firstLineY(top); int k = this.thirdLineY(j); if (!RealmsMainScreen.isSelfOwnedServer(server)) { - guiGraphics.drawString(RealmsMainScreen.this.font, server.owner, i, this.thirdLineY(j), -8355712, false); + guiGraphics.drawString(RealmsMainScreen.this.font, server.owner, i, this.thirdLineY(j), -8355712); } else if (server.expired) { Component component = server.expiredTrial ? RealmsMainScreen.TRIAL_EXPIRED_TEXT : RealmsMainScreen.SUBSCRIPTION_EXPIRED_TEXT; - guiGraphics.drawString(RealmsMainScreen.this.font, component, i, k, -2142128, false); + guiGraphics.drawString(RealmsMainScreen.this.font, component, i, k, -2142128); } } @@ -891,9 +893,9 @@ public class RealmsMainScreen extends RealmsScreen { int i = maxX - minX; if (RealmsMainScreen.this.font.width(text) > i) { String string = RealmsMainScreen.this.font.plainSubstrByWidth(text, i - RealmsMainScreen.this.font.width("... ")); - guiGraphics.drawString(RealmsMainScreen.this.font, string + "...", minX, y, color, false); + guiGraphics.drawString(RealmsMainScreen.this.font, string + "...", minX, y, color); } else { - guiGraphics.drawString(RealmsMainScreen.this.font, text, minX, y, color, false); + guiGraphics.drawString(RealmsMainScreen.this.font, text, minX, y, color); } } } @@ -902,26 +904,26 @@ public class RealmsMainScreen extends RealmsScreen { return left + width - RealmsMainScreen.this.font.width(versionComponent) - 20; } - protected int gameModeTextX(int i, int j, Component component) { - return i + j - RealmsMainScreen.this.font.width(component) - 20; + protected int gameModeTextX(int left, int width, Component component) { + return left + width - RealmsMainScreen.this.font.width(component) - 20; } - protected int renderGameMode(RealmsServer realmsServer, GuiGraphics guiGraphics, int i, int j, int k) { - boolean bl = realmsServer.isHardcore; - int l = realmsServer.gameMode; - int m = i; - if (GameType.isValidId(l)) { - Component component = RealmsMainScreen.getGameModeComponent(l, bl); - m = this.gameModeTextX(i, j, component); - guiGraphics.drawString(RealmsMainScreen.this.font, component, m, this.secondLineY(k), -8355712, false); + protected int renderGameMode(RealmsServer server, GuiGraphics guiGraphics, int left, int width, int firstLineY) { + boolean bl = server.isHardcore; + int i = server.gameMode; + int j = left; + if (GameType.isValidId(i)) { + Component component = RealmsMainScreen.getGameModeComponent(i, bl); + j = this.gameModeTextX(left, width, component); + guiGraphics.drawString(RealmsMainScreen.this.font, component, j, this.secondLineY(firstLineY), -8355712); } if (bl) { - m -= 10; - guiGraphics.blitSprite(RenderType::guiTextured, RealmsMainScreen.HARDCORE_MODE_SPRITE, m, this.secondLineY(k), 8, 8); + j -= 10; + guiGraphics.blitSprite(RenderType::guiTextured, RealmsMainScreen.HARDCORE_MODE_SPRITE, j, this.secondLineY(firstLineY), 8, 8); } - return m; + return j; } protected int firstLineY(int top) { @@ -953,7 +955,7 @@ public class RealmsMainScreen extends RealmsScreen { } @Environment(EnvType.CLIENT) - static class NotificationButton extends SpriteIconButton.CenteredIcon { + static class NotificationButton extends CenteredIcon { private static final ResourceLocation[] NOTIFICATION_ICONS = new ResourceLocation[]{ ResourceLocation.withDefaultNamespace("notification/1"), ResourceLocation.withDefaultNamespace("notification/2"), @@ -967,7 +969,7 @@ public class RealmsMainScreen extends RealmsScreen { private static final int SPRITE_SIZE = 14; private int notificationCount; - public NotificationButton(Component message, ResourceLocation sprite, Button.OnPress onPress) { + public NotificationButton(Component message, ResourceLocation sprite, OnPress onPress) { super(20, 20, message, 14, 14, sprite, onPress, null); } @@ -1109,7 +1111,7 @@ public class RealmsMainScreen extends RealmsScreen { int k = this.versionTextX(left, width, component); this.renderClampedString(guiGraphics, this.server.getName(), i, j, k, -8355712); if (component != CommonComponents.EMPTY) { - guiGraphics.drawString(RealmsMainScreen.this.font, component, k, j, -8355712, false); + guiGraphics.drawString(RealmsMainScreen.this.font, component, k, j, -8355712); } int l = left; @@ -1145,55 +1147,55 @@ public class RealmsMainScreen extends RealmsScreen { return 300; } - void refreshEntries(RealmsMainScreen realmsMainScreen, @Nullable RealmsServer realmsServer) { + void refreshEntries(RealmsMainScreen screen, @Nullable RealmsServer server) { this.clearEntries(); for (RealmsNotification realmsNotification : RealmsMainScreen.this.notifications) { if (realmsNotification instanceof VisitUrl visitUrl) { - this.addEntriesForNotification(visitUrl, realmsMainScreen); + this.addEntriesForNotification(visitUrl, screen); RealmsMainScreen.this.markNotificationsAsSeen(List.of(realmsNotification)); break; } } - this.refreshServerEntries(realmsServer); + this.refreshServerEntries(server); } - private void refreshServerEntries(@Nullable RealmsServer realmsServer) { - for (RealmsServer realmsServer2 : RealmsMainScreen.this.availableSnapshotServers) { - this.addEntry(RealmsMainScreen.this.new AvailableSnapshotEntry(realmsServer2)); + private void refreshServerEntries(@Nullable RealmsServer server) { + for (RealmsServer realmsServer : RealmsMainScreen.this.availableSnapshotServers) { + this.addEntry(RealmsMainScreen.this.new AvailableSnapshotEntry(realmsServer)); } - for (RealmsServer realmsServer2 : RealmsMainScreen.this.serverList) { + for (RealmsServer realmsServer : RealmsMainScreen.this.serverList) { RealmsMainScreen.Entry entry; - if (RealmsMainScreen.isSnapshot() && !realmsServer2.isSnapshotRealm()) { - if (realmsServer2.state == RealmsServer.State.UNINITIALIZED) { + if (RealmsMainScreen.isSnapshot() && !realmsServer.isSnapshotRealm()) { + if (realmsServer.state == State.UNINITIALIZED) { continue; } - entry = RealmsMainScreen.this.new ParentEntry(realmsServer2); + entry = RealmsMainScreen.this.new ParentEntry(realmsServer); } else { - entry = RealmsMainScreen.this.new ServerEntry(realmsServer2); + entry = RealmsMainScreen.this.new ServerEntry(realmsServer); } this.addEntry(entry); - if (realmsServer != null && realmsServer.id == realmsServer2.id) { + if (server != null && server.id == realmsServer.id) { this.setSelected(entry); } } } - private void addEntriesForNotification(VisitUrl visitUrl, RealmsMainScreen realmsMainScreen) { - Component component = visitUrl.getMessage(); + private void addEntriesForNotification(VisitUrl url, RealmsMainScreen mainScreen) { + Component component = url.getMessage(); int i = RealmsMainScreen.this.font.wordWrapHeight(component, 216); int j = Mth.positiveCeilDiv(i + 7, 36) - 1; - this.addEntry(RealmsMainScreen.this.new NotificationMessageEntry(component, j + 2, visitUrl)); + this.addEntry(RealmsMainScreen.this.new NotificationMessageEntry(component, j + 2, url)); for (int k = 0; k < j; k++) { this.addEntry(RealmsMainScreen.this.new EmptyEntry()); } - this.addEntry(RealmsMainScreen.this.new ButtonEntry(visitUrl.buildOpenLinkButton(realmsMainScreen))); + this.addEntry(RealmsMainScreen.this.new ButtonEntry(url.buildOpenLinkButton(mainScreen))); } } @@ -1222,7 +1224,7 @@ public class RealmsMainScreen extends RealmsScreen { @Override public void render(GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) { - if (this.serverData.state == RealmsServer.State.UNINITIALIZED) { + if (this.serverData.state == State.UNINITIALIZED) { guiGraphics.blitSprite(RenderType::guiTextured, RealmsMainScreen.NEW_REALM_SPRITE, left - 5, top + height / 2 - 10, 40, 20); int i = top + height / 2 - 9 / 2; guiGraphics.drawString(RealmsMainScreen.this.font, RealmsMainScreen.SERVER_UNITIALIZED_TEXT, left + 40 - 2, i, 8388479); @@ -1247,22 +1249,22 @@ public class RealmsMainScreen extends RealmsScreen { int k = this.versionTextX(left, width, component); this.renderClampedString(guiGraphics, this.serverData.getName(), i, j, k, -1); if (component != CommonComponents.EMPTY && !this.serverData.isMinigameActive()) { - guiGraphics.drawString(RealmsMainScreen.this.font, component, k, j, -8355712, false); + guiGraphics.drawString(RealmsMainScreen.this.font, component, k, j, -8355712); } } - private void renderSecondLine(GuiGraphics guiGraphics, int i, int j, int k) { - int l = this.textX(j); - int m = this.firstLineY(i); - int n = this.secondLineY(m); + private void renderSecondLine(GuiGraphics guiGraphics, int top, int left, int width) { + int i = this.textX(left); + int j = this.firstLineY(top); + int k = this.secondLineY(j); String string = this.serverData.getMinigameName(); boolean bl = this.serverData.isMinigameActive(); if (bl && string != null) { Component component = Component.literal(string).withStyle(ChatFormatting.GRAY); - guiGraphics.drawString(RealmsMainScreen.this.font, Component.translatable("mco.selectServer.minigameName", component).withColor(-171), l, n, -1, false); + guiGraphics.drawString(RealmsMainScreen.this.font, Component.translatable("mco.selectServer.minigameName", component).withColor(-171), i, k, -1); } else { - int o = this.renderGameMode(this.serverData, guiGraphics, j, k, m); - this.renderClampedString(guiGraphics, this.serverData.getDescription(), l, this.secondLineY(m), o, -8355712); + int l = this.renderGameMode(this.serverData, guiGraphics, left, width, j); + this.renderClampedString(guiGraphics, this.serverData.getDescription(), i, this.secondLineY(j), l, -8355712); } } @@ -1279,13 +1281,7 @@ public class RealmsMainScreen extends RealmsScreen { } if (mouseX >= k && mouseX <= i && mouseY >= j && mouseY <= j + 9) { - guiGraphics.renderTooltip( - RealmsMainScreen.this.font, - List.of(ONLINE_PLAYERS_TOOLTIP_HEADER), - Optional.of(new ClientActivePlayersTooltip.ActivePlayersTooltip(list)), - mouseX, - mouseY - ); + guiGraphics.renderTooltip(RealmsMainScreen.this.font, List.of(ONLINE_PLAYERS_TOOLTIP_HEADER), Optional.of(new ActivePlayersTooltip(list)), mouseX, mouseY); return true; } } @@ -1306,7 +1302,7 @@ public class RealmsMainScreen extends RealmsScreen { @Override public boolean mouseClicked(double mouseX, double mouseY, int button) { - if (this.serverData.state == RealmsServer.State.UNINITIALIZED) { + if (this.serverData.state == State.UNINITIALIZED) { this.createUnitializedRealm(); } else if (RealmsMainScreen.this.shouldPlayButtonBeActive(this.serverData)) { if (Util.getMillis() - RealmsMainScreen.this.lastClickTime < 250L && this.isFocused()) { @@ -1322,7 +1318,7 @@ public class RealmsMainScreen extends RealmsScreen { @Override public boolean keyPressed(int keyCode, int scanCode, int modifiers) { if (CommonInputs.selected(keyCode)) { - if (this.serverData.state == RealmsServer.State.UNINITIALIZED) { + if (this.serverData.state == State.UNINITIALIZED) { this.createUnitializedRealm(); return true; } @@ -1338,7 +1334,7 @@ public class RealmsMainScreen extends RealmsScreen { @Override public Component getNarration() { - return (Component)(this.serverData.state == RealmsServer.State.UNINITIALIZED + return (Component)(this.serverData.state == State.UNINITIALIZED ? RealmsMainScreen.UNITIALIZED_WORLD_NARRATION : Component.translatable("narrator.select", Objects.requireNonNullElse(this.serverData.name, "unknown server"))); } diff --git a/com/mojang/realmsclient/client/FileUpload.java b/com/mojang/realmsclient/client/FileUpload.java index 2a54d6e5..bec4fada 100644 --- a/com/mojang/realmsclient/client/FileUpload.java +++ b/com/mojang/realmsclient/client/FileUpload.java @@ -6,6 +6,7 @@ import com.mojang.logging.LogUtils; import com.mojang.realmsclient.client.worldupload.RealmsUploadCanceledException; import com.mojang.realmsclient.dto.UploadInfo; import com.mojang.realmsclient.gui.screens.UploadResult; +import com.mojang.realmsclient.gui.screens.UploadResult.Builder; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -69,12 +70,12 @@ public class FileUpload { public UploadResult upload() { if (this.uploadTask != null) { - return new UploadResult.Builder().build(); + return new Builder().build(); } else { this.uploadTask = CompletableFuture.supplyAsync(() -> this.requestUpload(0), Util.backgroundExecutor()); if (this.cancelled.get()) { this.cancel(); - return new UploadResult.Builder().build(); + return new Builder().build(); } else { return (UploadResult)this.uploadTask.join(); } @@ -89,7 +90,7 @@ public class FileUpload { * @param retries The number of times this upload has already been attempted */ private UploadResult requestUpload(int retries) { - UploadResult.Builder builder = new UploadResult.Builder(); + Builder builder = new Builder(); if (this.cancelled.get()) { return builder.build(); } else { @@ -155,7 +156,7 @@ public class FileUpload { post.setEntity(customInputStreamEntity); } - private void handleResponse(HttpResponse response, UploadResult.Builder uploadResult) throws IOException { + private void handleResponse(HttpResponse response, Builder uploadResult) throws IOException { int i = response.getStatusLine().getStatusCode(); if (i == 401) { LOGGER.debug("Realms server returned 401: {}", response.getFirstHeader("WWW-Authenticate")); @@ -199,10 +200,10 @@ public class FileUpload { private final InputStream content; private final UploadStatus uploadStatus; - public CustomInputStreamEntity(final InputStream inputStream, final long l, final UploadStatus uploadStatus) { - super(inputStream); - this.content = inputStream; - this.length = l; + public CustomInputStreamEntity(final InputStream content, final long length, final UploadStatus uploadStatus) { + super(content); + this.content = content; + this.length = length; this.uploadStatus = uploadStatus; } diff --git a/com/mojang/realmsclient/client/RealmsClient.java b/com/mojang/realmsclient/client/RealmsClient.java index 43ee5455..315856bb 100644 --- a/com/mojang/realmsclient/client/RealmsClient.java +++ b/com/mojang/realmsclient/client/RealmsClient.java @@ -1,6 +1,8 @@ package com.mojang.realmsclient.client; import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; import com.mojang.logging.LogUtils; import com.mojang.realmsclient.RealmsMainScreen; import com.mojang.realmsclient.client.RealmsError.AuthenticationError; @@ -26,6 +28,7 @@ import com.mojang.realmsclient.dto.Subscription; import com.mojang.realmsclient.dto.UploadInfo; import com.mojang.realmsclient.dto.WorldDownload; import com.mojang.realmsclient.dto.WorldTemplatePaginatedList; +import com.mojang.realmsclient.dto.RealmsServer.WorldType; import com.mojang.realmsclient.exception.RealmsHttpException; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.exception.RetryCallException; @@ -38,8 +41,11 @@ import java.util.Locale; import java.util.Optional; import java.util.Set; import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.minecraft.SharedConstants; +import net.minecraft.Util; import net.minecraft.client.Minecraft; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -51,6 +57,9 @@ public class RealmsClient { .flatMap(RealmsClient.Environment::byName) .orElse(RealmsClient.Environment.PRODUCTION); private static final Logger LOGGER = LogUtils.getLogger(); + @Nullable + private static volatile RealmsClient realmsClientInstance = null; + private final CompletableFuture> featureFlags; private final String sessionId; private final String username; private final Minecraft minecraft; @@ -63,6 +72,7 @@ public class RealmsClient { private static final String REGIONS_RESOURCE = "regions/ping/stat"; private static final String TRIALS_RESOURCE = "trial"; private static final String NOTIFICATIONS_RESOURCE = "notifications"; + private static final String FEATURE_FLAGS_RESOURCE = "feature/v1"; private static final String PATH_LIST_ALL_REALMS = "/listUserWorldsOfType/any"; private static final String PATH_CREATE_SNAPSHOT_REALM = "/$PARENT_WORLD_ID/createPrereleaseRealm"; private static final String PATH_SNAPSHOT_ELIGIBLE_REALMS = "/listPrereleaseEligibleWorlds"; @@ -99,22 +109,59 @@ public class RealmsClient { private static final String PATH_DISMISS_NOTIFICATIONS = "/dismiss"; private static final GuardedSerializer GSON = new GuardedSerializer(); - public static RealmsClient create() { + public static RealmsClient getOrCreate() { Minecraft minecraft = Minecraft.getInstance(); - return create(minecraft); + return getOrCreate(minecraft); } - public static RealmsClient create(Minecraft minecraft) { + public static RealmsClient getOrCreate(Minecraft minecraft) { String string = minecraft.getUser().getName(); String string2 = minecraft.getUser().getSessionId(); - return new RealmsClient(string2, string, minecraft); + RealmsClient realmsClient = realmsClientInstance; + if (realmsClient != null) { + return realmsClient; + } else { + synchronized (RealmsClient.class) { + RealmsClient realmsClient2 = realmsClientInstance; + if (realmsClient2 != null) { + return realmsClient2; + } else { + realmsClient2 = new RealmsClient(string2, string, minecraft); + realmsClientInstance = realmsClient2; + return realmsClient2; + } + } + } } - public RealmsClient(String sessionId, String username, Minecraft minecraft) { + private RealmsClient(String sessionId, String username, Minecraft minecraft) { this.sessionId = sessionId; this.username = username; this.minecraft = minecraft; RealmsClientConfig.setProxy(minecraft.getProxy()); + this.featureFlags = CompletableFuture.supplyAsync(this::fetchFeatureFlags, Util.nonCriticalIoPool()); + } + + public Set getFeatureFlags() { + return (Set)this.featureFlags.join(); + } + + private Set fetchFeatureFlags() { + String string = url("feature/v1", null, false); + + try { + String string2 = this.execute(Request.get(string, 5000, 10000)); + JsonArray jsonArray = JsonParser.parseString(string2).getAsJsonArray(); + Set set = (Set)jsonArray.asList().stream().map(JsonElement::getAsString).collect(Collectors.toSet()); + LOGGER.debug("Fetched Realms feature flags: {}", set); + return set; + } catch (RealmsServiceException var5) { + LOGGER.error("Failed to fetch Realms feature flags", (Throwable)var5); + } catch (Exception var6) { + LOGGER.error("Could not parse Realms feature flags", (Throwable)var6); + } + + return Set.of(); } public RealmsServerList listRealms() throws RealmsServiceException { @@ -264,7 +311,7 @@ public class RealmsClient { this.execute(Request.put(string, "", 40000, 600000)); } - public WorldTemplatePaginatedList fetchWorldTemplates(int page, int pageSize, RealmsServer.WorldType worldType) throws RealmsServiceException { + public WorldTemplatePaginatedList fetchWorldTemplates(int page, int pageSize, WorldType worldType) throws RealmsServiceException { String string = this.url( "worlds" + "/templates/$WORLD_TYPE".replace("$WORLD_TYPE", worldType.toString()), String.format(Locale.ROOT, "page=%d&pageSize=%d", page, pageSize) ); @@ -345,12 +392,12 @@ public class RealmsClient { } @Nullable - public UploadInfo requestUploadInfo(long l) throws RealmsServiceException { - String string = this.url("worlds" + "/$WORLD_ID/backups/upload".replace("$WORLD_ID", String.valueOf(l))); - String string2 = UploadTokenCache.get(l); + public UploadInfo requestUploadInfo(long worldId) throws RealmsServiceException { + String string = this.url("worlds" + "/$WORLD_ID/backups/upload".replace("$WORLD_ID", String.valueOf(worldId))); + String string2 = UploadTokenCache.get(worldId); UploadInfo uploadInfo = UploadInfo.parse(this.execute(Request.put(string, UploadInfo.createRequest(string2)))); if (uploadInfo != null) { - UploadTokenCache.put(l, uploadInfo.getToken()); + UploadTokenCache.put(worldId, uploadInfo.getToken()); } return uploadInfo; @@ -388,13 +435,17 @@ public class RealmsClient { this.execute(Request.delete(string)); } - private String url(String path) { + private String url(String path) throws RealmsServiceException { return this.url(path, null); } - private String url(String path, @Nullable String query) { + private String url(String path, @Nullable String query) throws RealmsServiceException { + return url(path, query, this.getFeatureFlags().contains("realms_in_aks")); + } + + private static String url(String path, @Nullable String query, boolean useAlternativeUrl) { try { - return new URI(ENVIRONMENT.protocol, ENVIRONMENT.baseUrl, "/" + path, query, null).toASCIIString(); + return new URI(ENVIRONMENT.protocol, useAlternativeUrl ? ENVIRONMENT.alternativeUrl : ENVIRONMENT.baseUrl, "/" + path, query, null).toASCIIString(); } catch (URISyntaxException var4) { throw new IllegalArgumentException(path, var4); } @@ -438,15 +489,17 @@ public class RealmsClient { @net.fabricmc.api.Environment(EnvType.CLIENT) public static enum Environment { - PRODUCTION("pc.realms.minecraft.net", "https"), - STAGE("pc-stage.realms.minecraft.net", "https"), - LOCAL("localhost:8080", "http"); + PRODUCTION("pc.realms.minecraft.net", "java.frontendlegacy.realms.minecraft-services.net", "https"), + STAGE("pc-stage.realms.minecraft.net", "java.frontendlegacy.stage-c2a40e62.realms.minecraft-services.net", "https"), + LOCAL("localhost:8080", "localhost:8080", "http"); public final String baseUrl; + public final String alternativeUrl; public final String protocol; - private Environment(final String baseUrl, final String protocol) { + private Environment(final String baseUrl, final String alternativeUrl, final String protocol) { this.baseUrl = baseUrl; + this.alternativeUrl = alternativeUrl; this.protocol = protocol; } diff --git a/com/mojang/realmsclient/client/UploadStatus.java b/com/mojang/realmsclient/client/UploadStatus.java index a4e4fcdc..7e2aa47c 100644 --- a/com/mojang/realmsclient/client/UploadStatus.java +++ b/com/mojang/realmsclient/client/UploadStatus.java @@ -12,8 +12,8 @@ public class UploadStatus { private long previousBytesWritten; private long bytesPerSecond; - public void setTotalBytes(long l) { - this.totalBytes = l; + public void setTotalBytes(long totalBytes) { + this.totalBytes = totalBytes; } public long getTotalBytes() { @@ -24,8 +24,8 @@ public class UploadStatus { return this.bytesWritten; } - public void onWrite(long l) { - this.bytesWritten += l; + public void onWrite(long bytes) { + this.bytesWritten += bytes; } public boolean uploadStarted() { diff --git a/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java b/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java index cefede14..e28dd3bc 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java @@ -33,26 +33,26 @@ public class RealmsCreateWorldFlow { private static final Logger LOGGER = LogUtils.getLogger(); public static void createWorld( - Minecraft minecraft, Screen screen, Screen screen2, int i, RealmsServer realmsServer, @Nullable RealmCreationTask realmCreationTask + Minecraft minecraft, Screen lastScreen, Screen resetWorldScreen, int slot, RealmsServer server, @Nullable RealmCreationTask realmCreationTask ) { CreateWorldScreen.openFresh( minecraft, - screen, + lastScreen, (createWorldScreen, layeredRegistryAccess, primaryLevelData, path) -> { Path path2; try { path2 = createTemporaryWorldFolder(layeredRegistryAccess, primaryLevelData, path); } catch (IOException var13) { LOGGER.warn("Failed to create temporary world folder."); - minecraft.setScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), screen2)); + minecraft.setScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), resetWorldScreen)); return true; } RealmsWorldOptions realmsWorldOptions = RealmsWorldOptions.createFromSettings( - primaryLevelData.getLevelSettings(), SharedConstants.getCurrentVersion().getName() + primaryLevelData.getLevelSettings(), primaryLevelData.getLevelSettings().allowCommands(), SharedConstants.getCurrentVersion().getName() ); RealmsWorldUpload realmsWorldUpload = new RealmsWorldUpload( - path2, realmsWorldOptions, minecraft.getUser(), realmsServer.id, i, RealmsWorldUploadStatusTracker.noOp() + path2, realmsWorldOptions, minecraft.getUser(), server.id, slot, RealmsWorldUploadStatusTracker.noOp() ); minecraft.forceSetScreen( new AlertScreen(realmsWorldUpload::cancel, Component.translatable("mco.create.world.reset.title"), Component.empty(), CommonComponents.GUI_CANCEL, false) @@ -68,7 +68,7 @@ public class RealmsCreateWorldFlow { } if (throwable instanceof RealmsUploadCanceledException) { - minecraft.forceSetScreen(screen2); + minecraft.forceSetScreen(resetWorldScreen); } else { if (throwable instanceof RealmsUploadFailedException realmsUploadFailedException) { LOGGER.warn("Failed to create realms world {}", realmsUploadFailedException.getStatusMessage()); @@ -76,17 +76,17 @@ public class RealmsCreateWorldFlow { LOGGER.warn("Failed to create realms world {}", throwable.getMessage()); } - minecraft.forceSetScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), screen2)); + minecraft.forceSetScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), resetWorldScreen)); } } else { - if (screen instanceof RealmsConfigureWorldScreen realmsConfigureWorldScreen) { - realmsConfigureWorldScreen.fetchServerData(realmsServer.id); + if (lastScreen instanceof RealmsConfigureWorldScreen realmsConfigureWorldScreen) { + realmsConfigureWorldScreen.fetchServerData(server.id); } if (realmCreationTask != null) { - RealmsMainScreen.play(realmsServer, screen, true); + RealmsMainScreen.play(server, lastScreen, true); } else { - minecraft.forceSetScreen(screen); + minecraft.forceSetScreen(lastScreen); } RealmsMainScreen.refreshServerList(); @@ -99,19 +99,17 @@ public class RealmsCreateWorldFlow { ); } - private static Path createTemporaryWorldFolder( - LayeredRegistryAccess layeredRegistryAccess, PrimaryLevelData primaryLevelData, @Nullable Path path - ) throws IOException { - Path path2 = Files.createTempDirectory("minecraft_realms_world_upload"); - if (path != null) { - Files.move(path, path2.resolve("datapacks")); + private static Path createTemporaryWorldFolder(LayeredRegistryAccess registryAccess, PrimaryLevelData levelData, @Nullable Path tempDatapackDir) throws IOException { + Path path = Files.createTempDirectory("minecraft_realms_world_upload"); + if (tempDatapackDir != null) { + Files.move(tempDatapackDir, path.resolve("datapacks")); } - CompoundTag compoundTag = primaryLevelData.createTag(layeredRegistryAccess.compositeAccess(), null); + CompoundTag compoundTag = levelData.createTag(registryAccess.compositeAccess(), null); CompoundTag compoundTag2 = new CompoundTag(); compoundTag2.put("Data", compoundTag); - Path path3 = Files.createFile(path2.resolve("level.dat")); - NbtIo.writeCompressed(compoundTag2, path3); - return path2; + Path path2 = Files.createFile(path.resolve("level.dat")); + NbtIo.writeCompressed(compoundTag2, path2); + return path; } } diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java index c19bb614..308f2ca5 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java @@ -8,12 +8,12 @@ import net.minecraft.network.chat.Component; public class RealmsUploadFailedException extends RealmsUploadException { private final Component errorMessage; - public RealmsUploadFailedException(Component component) { - this.errorMessage = component; + public RealmsUploadFailedException(Component errorMessage) { + this.errorMessage = errorMessage; } - public RealmsUploadFailedException(String string) { - this(Component.literal(string)); + public RealmsUploadFailedException(String errorMessage) { + this(Component.literal(errorMessage)); } @Override diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java index bf0b102f..0aa0a741 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java @@ -9,8 +9,8 @@ import net.minecraft.network.chat.Component; public class RealmsUploadTooLargeException extends RealmsUploadException { final long sizeLimit; - public RealmsUploadTooLargeException(long l) { - this.sizeLimit = l; + public RealmsUploadTooLargeException(long sizeLimit) { + this.sizeLimit = sizeLimit; } @Override diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java index f787ad0d..09f2993a 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java @@ -20,13 +20,13 @@ public class RealmsUploadWorldPacker { private final BooleanSupplier isCanceled; private final Path directoryToPack; - public static File pack(Path path, BooleanSupplier booleanSupplier) throws IOException { - return new RealmsUploadWorldPacker(path, booleanSupplier).tarGzipArchive(); + public static File pack(Path directoryToPack, BooleanSupplier isCanceled) throws IOException { + return new RealmsUploadWorldPacker(directoryToPack, isCanceled).tarGzipArchive(); } - private RealmsUploadWorldPacker(Path path, BooleanSupplier booleanSupplier) { - this.isCanceled = booleanSupplier; - this.directoryToPack = path; + private RealmsUploadWorldPacker(Path directoryToPack, BooleanSupplier isCanceled) { + this.isCanceled = isCanceled; + this.directoryToPack = directoryToPack; } private File tarGzipArchive() throws IOException { @@ -54,20 +54,20 @@ public class RealmsUploadWorldPacker { return var3; } - private void addFileToTarGz(TarArchiveOutputStream tarArchiveOutputStream, Path path, String string, boolean bl) throws IOException { + private void addFileToTarGz(TarArchiveOutputStream stream, Path directory, String prefix, boolean isRootDirectory) throws IOException { if (this.isCanceled.getAsBoolean()) { throw new RealmsUploadCanceledException(); } else { - this.verifyBelowSizeLimit(tarArchiveOutputStream.getBytesWritten()); - File file = path.toFile(); - String string2 = bl ? string : string + file.getName(); - TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(file, string2); - tarArchiveOutputStream.putArchiveEntry(tarArchiveEntry); + this.verifyBelowSizeLimit(stream.getBytesWritten()); + File file = directory.toFile(); + String string = isRootDirectory ? prefix : prefix + file.getName(); + TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(file, string); + stream.putArchiveEntry(tarArchiveEntry); if (file.isFile()) { InputStream inputStream = new FileInputStream(file); try { - inputStream.transferTo(tarArchiveOutputStream); + inputStream.transferTo(stream); } catch (Throwable var14) { try { inputStream.close(); @@ -79,21 +79,21 @@ public class RealmsUploadWorldPacker { } inputStream.close(); - tarArchiveOutputStream.closeArchiveEntry(); + stream.closeArchiveEntry(); } else { - tarArchiveOutputStream.closeArchiveEntry(); + stream.closeArchiveEntry(); File[] files = file.listFiles(); if (files != null) { for (File file2 : files) { - this.addFileToTarGz(tarArchiveOutputStream, file2.toPath(), string2 + "/", false); + this.addFileToTarGz(stream, file2.toPath(), string + "/", false); } } } } } - private void verifyBelowSizeLimit(long l) { - if (l > 5368709120L) { + private void verifyBelowSizeLimit(long size) { + if (size > 5368709120L) { throw new RealmsUploadTooLargeException(5368709120L); } } diff --git a/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java b/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java index 14619aa1..251a7f75 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java @@ -26,7 +26,7 @@ import org.slf4j.Logger; public class RealmsWorldUpload { private static final Logger LOGGER = LogUtils.getLogger(); public static final int UPLOAD_RETRIES = 20; - private final RealmsClient client = RealmsClient.create(); + private final RealmsClient client = RealmsClient.getOrCreate(); private final Path worldFolder; private final RealmsWorldOptions worldOptions; private final User user; @@ -37,15 +37,13 @@ public class RealmsWorldUpload { @Nullable private FileUpload uploadTask; - public RealmsWorldUpload( - Path path, RealmsWorldOptions realmsWorldOptions, User user, long l, int i, RealmsWorldUploadStatusTracker realmsWorldUploadStatusTracker - ) { - this.worldFolder = path; - this.worldOptions = realmsWorldOptions; + public RealmsWorldUpload(Path worldFolder, RealmsWorldOptions worldOptions, User user, long realmId, int slotId, RealmsWorldUploadStatusTracker statusCallback) { + this.worldFolder = worldFolder; + this.worldOptions = worldOptions; this.user = user; - this.realmId = l; - this.slotId = i; - this.statusCallback = realmsWorldUploadStatusTracker; + this.realmId = realmId; + this.slotId = slotId; + this.statusCallback = statusCallback; } public CompletableFuture packAndUpload() { diff --git a/com/mojang/realmsclient/dto/RealmsServer.java b/com/mojang/realmsclient/dto/RealmsServer.java index 0c2de1e8..36dc3706 100644 --- a/com/mojang/realmsclient/dto/RealmsServer.java +++ b/com/mojang/realmsclient/dto/RealmsServer.java @@ -20,6 +20,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.multiplayer.ServerData; +import net.minecraft.client.multiplayer.ServerData.Type; import org.apache.commons.lang3.builder.EqualsBuilder; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -185,11 +186,11 @@ public class RealmsServer extends ValueObject { return map; } - private static RealmsSettings parseSettings(JsonElement jsonElement) { + private static RealmsSettings parseSettings(JsonElement json) { boolean bl = false; - if (jsonElement.isJsonArray()) { - for (JsonElement jsonElement2 : jsonElement.getAsJsonArray()) { - JsonObject jsonObject = jsonElement2.getAsJsonObject(); + if (json.isJsonArray()) { + for (JsonElement jsonElement : json.getAsJsonArray()) { + JsonObject jsonObject = jsonElement.getAsJsonObject(); bl = readBoolean(jsonObject, "hardcore", bl); } } @@ -197,9 +198,9 @@ public class RealmsServer extends ValueObject { return new RealmsSettings(bl); } - private static boolean readBoolean(JsonObject jsonObject, String string, boolean bl) { - String string2 = JsonUtils.getStringOr("name", jsonObject, null); - return string2 != null && string2.equals(string) ? JsonUtils.getBooleanOr("value", jsonObject, bl) : bl; + private static boolean readBoolean(JsonObject json, String memberName, boolean defaultValue) { + String string = JsonUtils.getStringOr("name", json, null); + return string != null && string.equals(memberName) ? JsonUtils.getBooleanOr("value", json, defaultValue) : defaultValue; } private static Map createEmptySlots() { @@ -333,7 +334,7 @@ public class RealmsServer extends ValueObject { } public ServerData toServerData(String ip) { - return new ServerData((String)Objects.requireNonNullElse(this.name, "unknown server"), ip, ServerData.Type.REALM); + return new ServerData((String)Objects.requireNonNullElse(this.name, "unknown server"), ip, Type.REALM); } @Environment(EnvType.CLIENT) diff --git a/com/mojang/realmsclient/dto/RealmsWorldOptions.java b/com/mojang/realmsclient/dto/RealmsWorldOptions.java index 7da362e7..3856049a 100644 --- a/com/mojang/realmsclient/dto/RealmsWorldOptions.java +++ b/com/mojang/realmsclient/dto/RealmsWorldOptions.java @@ -1,6 +1,7 @@ package com.mojang.realmsclient.dto; import com.google.gson.JsonObject; +import com.mojang.realmsclient.dto.RealmsServer.Compatibility; import com.mojang.realmsclient.util.JsonUtils; import java.util.Objects; import net.fabricmc.api.EnvType; @@ -24,7 +25,7 @@ public class RealmsWorldOptions extends ValueObject { public final boolean hardcore; private final String slotName; public final String version; - public final RealmsServer.Compatibility compatibility; + public final Compatibility compatibility; public long templateId; @Nullable public String templateImage; @@ -39,23 +40,33 @@ public class RealmsWorldOptions extends ValueObject { private static final boolean DEFAULT_HARDCORE_MODE = false; private static final String DEFAULT_SLOT_NAME = ""; private static final String DEFAULT_VERSION = ""; - private static final RealmsServer.Compatibility DEFAULT_COMPATIBILITY = RealmsServer.Compatibility.UNVERIFIABLE; + private static final Compatibility DEFAULT_COMPATIBILITY = Compatibility.UNVERIFIABLE; private static final long DEFAULT_TEMPLATE_ID = -1L; private static final String DEFAULT_TEMPLATE_IMAGE = null; public RealmsWorldOptions( - boolean bl, boolean bl2, int i, boolean bl3, int j, int k, boolean bl4, boolean bl5, String string, String string2, RealmsServer.Compatibility compatibility + boolean pvp, + boolean spawnMonsters, + int spawnProtection, + boolean commandBlocks, + int difficulty, + int gameMode, + boolean hardcore, + boolean forceGameMode, + String slotName, + String version, + Compatibility compatibility ) { - this.pvp = bl; - this.spawnMonsters = bl2; - this.spawnProtection = i; - this.commandBlocks = bl3; - this.difficulty = j; - this.gameMode = k; - this.hardcore = bl4; - this.forceGameMode = bl5; - this.slotName = string; - this.version = string2; + this.pvp = pvp; + this.spawnMonsters = spawnMonsters; + this.spawnProtection = spawnProtection; + this.commandBlocks = commandBlocks; + this.difficulty = difficulty; + this.gameMode = gameMode; + this.hardcore = hardcore; + this.forceGameMode = forceGameMode; + this.slotName = slotName; + this.version = version; this.compatibility = compatibility; } @@ -63,12 +74,14 @@ public class RealmsWorldOptions extends ValueObject { return new RealmsWorldOptions(true, true, 0, false, 2, 0, false, false, "", "", DEFAULT_COMPATIBILITY); } - public static RealmsWorldOptions createDefaultsWith(GameType gameType, Difficulty difficulty, boolean bl, String string, String string2) { - return new RealmsWorldOptions(true, true, 0, false, difficulty.getId(), gameType.getId(), bl, false, string2, string, DEFAULT_COMPATIBILITY); + public static RealmsWorldOptions createDefaultsWith( + GameType gameType, boolean commandBlocks, Difficulty difficulty, boolean hardcore, String version, String slotName + ) { + return new RealmsWorldOptions(true, true, 0, commandBlocks, difficulty.getId(), gameType.getId(), hardcore, false, slotName, version, DEFAULT_COMPATIBILITY); } - public static RealmsWorldOptions createFromSettings(LevelSettings levelSettings, String string) { - return createDefaultsWith(levelSettings.gameType(), levelSettings.difficulty(), levelSettings.hardcore(), string, levelSettings.levelName()); + public static RealmsWorldOptions createFromSettings(LevelSettings levelSettings, boolean commandBlocks, String version) { + return createDefaultsWith(levelSettings.gameType(), commandBlocks, levelSettings.difficulty(), levelSettings.hardcore(), version, levelSettings.levelName()); } public static RealmsWorldOptions createEmptyDefaults() { @@ -81,22 +94,22 @@ public class RealmsWorldOptions extends ValueObject { this.empty = empty; } - public static RealmsWorldOptions parse(JsonObject jsonObject, RealmsSettings realmsSettings) { + public static RealmsWorldOptions parse(JsonObject json, RealmsSettings realmsSettings) { RealmsWorldOptions realmsWorldOptions = new RealmsWorldOptions( - JsonUtils.getBooleanOr("pvp", jsonObject, true), - JsonUtils.getBooleanOr("spawnMonsters", jsonObject, true), - JsonUtils.getIntOr("spawnProtection", jsonObject, 0), - JsonUtils.getBooleanOr("commandBlocks", jsonObject, false), - JsonUtils.getIntOr("difficulty", jsonObject, 2), - JsonUtils.getIntOr("gameMode", jsonObject, 0), + JsonUtils.getBooleanOr("pvp", json, true), + JsonUtils.getBooleanOr("spawnMonsters", json, true), + JsonUtils.getIntOr("spawnProtection", json, 0), + JsonUtils.getBooleanOr("commandBlocks", json, false), + JsonUtils.getIntOr("difficulty", json, 2), + JsonUtils.getIntOr("gameMode", json, 0), realmsSettings.hardcore(), - JsonUtils.getBooleanOr("forceGameMode", jsonObject, false), - JsonUtils.getRequiredStringOr("slotName", jsonObject, ""), - JsonUtils.getRequiredStringOr("version", jsonObject, ""), - RealmsServer.getCompatibility(JsonUtils.getRequiredStringOr("compatibility", jsonObject, RealmsServer.Compatibility.UNVERIFIABLE.name())) + JsonUtils.getBooleanOr("forceGameMode", json, false), + JsonUtils.getRequiredStringOr("slotName", json, ""), + JsonUtils.getRequiredStringOr("version", json, ""), + RealmsServer.getCompatibility(JsonUtils.getRequiredStringOr("compatibility", json, Compatibility.UNVERIFIABLE.name())) ); - realmsWorldOptions.templateId = JsonUtils.getLongOr("worldTemplateId", jsonObject, -1L); - realmsWorldOptions.templateImage = JsonUtils.getStringOr("worldTemplateImage", jsonObject, DEFAULT_TEMPLATE_IMAGE); + realmsWorldOptions.templateId = JsonUtils.getLongOr("worldTemplateId", json, -1L); + realmsWorldOptions.templateImage = JsonUtils.getStringOr("worldTemplateImage", json, DEFAULT_TEMPLATE_IMAGE); return realmsWorldOptions; } diff --git a/com/mojang/realmsclient/gui/RowButton.java b/com/mojang/realmsclient/gui/RowButton.java index a3bb9bf7..733b0901 100644 --- a/com/mojang/realmsclient/gui/RowButton.java +++ b/com/mojang/realmsclient/gui/RowButton.java @@ -40,28 +40,30 @@ public abstract class RowButton { public abstract void onClick(int index); - public static void drawButtonsInRow(GuiGraphics guiGraphics, List list, AbstractSelectionList abstractSelectionList, int i, int j, int k, int l) { - for (RowButton rowButton : list) { - if (abstractSelectionList.getRowWidth() > rowButton.getRight()) { - rowButton.drawForRowAt(guiGraphics, i, j, k, l); + public static void drawButtonsInRow( + GuiGraphics guiGraphics, List rowButtons, AbstractSelectionList pendingInvitations, int x, int y, int mouseX, int mouseY + ) { + for (RowButton rowButton : rowButtons) { + if (pendingInvitations.getRowWidth() > rowButton.getRight()) { + rowButton.drawForRowAt(guiGraphics, x, y, mouseX, mouseY); } } } public static void rowButtonMouseClicked( - AbstractSelectionList abstractSelectionList, ObjectSelectionList.Entry entry, List list, int i, double d, double e + AbstractSelectionList pendingInvitations, ObjectSelectionList.Entry entry, List rowButtons, int button, double mouseX, double mouseY ) { - int j = abstractSelectionList.children().indexOf(entry); - if (j > -1) { - abstractSelectionList.setSelectedIndex(j); - int k = abstractSelectionList.getRowLeft(); - int l = abstractSelectionList.getRowTop(j); - int m = (int)(d - k); - int n = (int)(e - l); + int i = pendingInvitations.children().indexOf(entry); + if (i > -1) { + pendingInvitations.setSelectedIndex(i); + int j = pendingInvitations.getRowLeft(); + int k = pendingInvitations.getRowTop(i); + int l = (int)(mouseX - j); + int m = (int)(mouseY - k); - for (RowButton rowButton : list) { - if (m >= rowButton.xOffset && m <= rowButton.getRight() && n >= rowButton.yOffset && n <= rowButton.getBottom()) { - rowButton.onClick(j); + for (RowButton rowButton : rowButtons) { + if (l >= rowButton.xOffset && l <= rowButton.getRight() && m >= rowButton.yOffset && m <= rowButton.getBottom()) { + rowButton.onClick(i); } } } diff --git a/com/mojang/realmsclient/gui/screens/AddRealmPopupScreen.java b/com/mojang/realmsclient/gui/screens/AddRealmPopupScreen.java index 20972e8a..8045646a 100644 --- a/com/mojang/realmsclient/gui/screens/AddRealmPopupScreen.java +++ b/com/mojang/realmsclient/gui/screens/AddRealmPopupScreen.java @@ -1,5 +1,6 @@ package com.mojang.realmsclient.gui.screens; +import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.systems.RenderSystem; import java.util.Collection; import java.util.List; @@ -89,7 +90,7 @@ public class AddRealmPopupScreen extends RealmsScreen { this.right() - 10 - 100, this.top() + 10, 100, i, POPUP_TEXT, this.font ); if (fittingMultiLineTextWidget.showingScrollBar()) { - fittingMultiLineTextWidget.setWidth(100 - fittingMultiLineTextWidget.scrollbarWidth()); + fittingMultiLineTextWidget.setWidth(94); } this.addRenderableWidget(fittingMultiLineTextWidget); @@ -126,7 +127,8 @@ public class AddRealmPopupScreen extends RealmsScreen { public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { this.backgroundScreen.render(guiGraphics, -1, -1, partialTick); guiGraphics.flush(); - RenderSystem.clear(256); + RenderTarget renderTarget = this.minecraft.getMainRenderTarget(); + RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(renderTarget.getDepthTexture(), 1.0); this.clearTooltipForNextRenderPass(); this.renderTransparentBackground(guiGraphics); guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, this.left(), this.top(), 320, 172); diff --git a/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.java b/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.java index 6ce0aa22..78bdb234 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsBackupScreen.java @@ -80,12 +80,7 @@ public class RealmsBackupScreen extends RealmsScreen { super.render(guiGraphics, mouseX, mouseY, partialTick); if (this.noBackups && this.backupList != null) { guiGraphics.drawString( - this.font, - NO_BACKUPS_LABEL, - this.width / 2 - this.font.width(NO_BACKUPS_LABEL) / 2, - this.backupList.getY() + this.backupList.getHeight() / 2 - 9 / 2, - -1, - false + this.font, NO_BACKUPS_LABEL, this.width / 2 - this.font.width(NO_BACKUPS_LABEL) / 2, this.backupList.getY() + this.backupList.getHeight() / 2 - 9 / 2, -1 ); } } @@ -101,7 +96,7 @@ public class RealmsBackupScreen extends RealmsScreen { private void fetchRealmsBackups() { (new Thread("Realms-fetch-backups") { public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { List list = realmsClient.backupsFor(RealmsBackupScreen.this.serverData.id).backups; @@ -286,10 +281,9 @@ public class RealmsBackupScreen extends RealmsScreen { Component.translatable("mco.backup.entry", RealmsUtil.convertToAgePresentationFromInstant(this.backup.lastModifiedDate)), left, j, - l, - false + l ); - guiGraphics.drawString(RealmsBackupScreen.this.font, this.getMediumDatePresentation(this.backup.lastModifiedDate), left, k, 5000268, false); + guiGraphics.drawString(RealmsBackupScreen.this.font, this.getMediumDatePresentation(this.backup.lastModifiedDate), left, k, 5000268); int m = 0; int n = top + height / 2 - 10; if (this.restoreButton != null) { diff --git a/com/mojang/realmsclient/gui/screens/RealmsBrokenWorldScreen.java b/com/mojang/realmsclient/gui/screens/RealmsBrokenWorldScreen.java index dc6eff97..685b80e7 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsBrokenWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsBrokenWorldScreen.java @@ -7,6 +7,7 @@ import com.mojang.realmsclient.client.RealmsClient; import com.mojang.realmsclient.dto.RealmsServer; import com.mojang.realmsclient.dto.RealmsWorldOptions; import com.mojang.realmsclient.dto.WorldDownload; +import com.mojang.realmsclient.dto.RealmsServer.State; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.gui.RealmsWorldSlotButton; import com.mojang.realmsclient.util.RealmsTextureManager; @@ -163,7 +164,7 @@ public class RealmsBrokenWorldScreen extends RealmsScreen { private void fetchServerData(long serverId) { new Thread(() -> { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { this.serverData = realmsClient.getOwnRealm(serverId); @@ -178,8 +179,8 @@ public class RealmsBrokenWorldScreen extends RealmsScreen { public void doSwitchOrReset() { new Thread( () -> { - RealmsClient realmsClient = RealmsClient.create(); - if (this.serverData.state == RealmsServer.State.CLOSED) { + RealmsClient realmsClient = RealmsClient.getOrCreate(); + if (this.serverData.state == State.CLOSED) { this.minecraft .execute(() -> this.minecraft.setScreen(new RealmsLongRunningMcoTaskScreen(this, new OpenServerTask(this.serverData, this, true, this.minecraft)))); } else { @@ -197,7 +198,7 @@ public class RealmsBrokenWorldScreen extends RealmsScreen { } private void downloadWorld(int slotIndex) { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { WorldDownload worldDownload = realmsClient.requestDownloadInfo(this.serverData.id, slotIndex); diff --git a/com/mojang/realmsclient/gui/screens/RealmsConfigureWorldScreen.java b/com/mojang/realmsclient/gui/screens/RealmsConfigureWorldScreen.java index 4808453b..e2495370 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsConfigureWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsConfigureWorldScreen.java @@ -7,9 +7,11 @@ import com.mojang.realmsclient.client.RealmsClient; import com.mojang.realmsclient.dto.RealmsServer; import com.mojang.realmsclient.dto.RealmsWorldOptions; import com.mojang.realmsclient.dto.WorldTemplate; +import com.mojang.realmsclient.dto.RealmsServer.WorldType; import com.mojang.realmsclient.dto.WorldTemplate.WorldTemplateType; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.gui.RealmsWorldSlotButton; +import com.mojang.realmsclient.gui.RealmsWorldSlotButton.State; import com.mojang.realmsclient.util.task.CloseServerTask; import com.mojang.realmsclient.util.task.OpenServerTask; import com.mojang.realmsclient.util.task.SwitchMinigameTask; @@ -112,9 +114,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { Component.translatable("mco.configure.world.buttons.switchminigame"), button -> this.minecraft .setScreen( - new RealmsSelectWorldTemplateScreen( - Component.translatable("mco.template.title.minigame"), this::templateSelectionCallback, RealmsServer.WorldType.MINIGAME - ) + new RealmsSelectWorldTemplateScreen(Component.translatable("mco.template.title.minigame"), this::templateSelectionCallback, WorldType.MINIGAME) ) ) .bounds(this.leftButton(0), row(13) - 5, 100, 20) @@ -174,7 +174,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { int i = this.frame(index); int j = row(5) + 5; RealmsWorldSlotButton realmsWorldSlotButton = new RealmsWorldSlotButton(i, j, 80, 80, index, button -> { - RealmsWorldSlotButton.State state = ((RealmsWorldSlotButton)button).getState(); + State state = ((RealmsWorldSlotButton)button).getState(); if (state != null) { switch (state.action) { case NOTHING: @@ -221,7 +221,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { } else { String string = (String)Objects.requireNonNullElse(this.serverData.getName(), ""); int i = this.font.width(string); - int j = this.serverData.state == RealmsServer.State.CLOSED ? -6250336 : 8388479; + int j = this.serverData.state == com.mojang.realmsclient.dto.RealmsServer.State.CLOSED ? -6250336 : 8388479; int k = this.font.width(this.title); guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 12, -1); guiGraphics.drawCenteredString(this.font, string, this.width / 2, 24, j); @@ -230,7 +230,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { if (this.isMinigame()) { String string2 = this.serverData.getMinigameName(); if (string2 != null) { - guiGraphics.drawString(this.font, Component.translatable("mco.configure.world.minigame", string2), this.leftX + 80 + 20 + 10, row(13), -1, false); + guiGraphics.drawString(this.font, Component.translatable("mco.configure.world.minigame", string2), this.leftX + 80 + 20 + 10, row(13), -1); } } } @@ -250,7 +250,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { public void fetchServerData(long serverId) { new Thread(() -> { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { RealmsServer realmsServer = realmsClient.getOwnRealm(serverId); @@ -286,7 +286,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { } private void joinRealm(RealmsServer server) { - if (this.serverData.state == RealmsServer.State.OPEN) { + if (this.serverData.state == com.mojang.realmsclient.dto.RealmsServer.State.OPEN) { RealmsMainScreen.play(server, this); } else { this.openTheWorld(true); @@ -295,7 +295,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { private void switchToMinigame() { RealmsSelectWorldTemplateScreen realmsSelectWorldTemplateScreen = new RealmsSelectWorldTemplateScreen( - Component.translatable("mco.template.title.minigame"), this::templateSelectionCallback, RealmsServer.WorldType.MINIGAME + Component.translatable("mco.template.title.minigame"), this::templateSelectionCallback, WorldType.MINIGAME ); realmsSelectWorldTemplateScreen.setWarning(Component.translatable("mco.minigame.world.info.line1"), Component.translatable("mco.minigame.world.info.line2")); this.minecraft.setScreen(realmsSelectWorldTemplateScreen); @@ -340,9 +340,9 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { private void drawServerStatus(GuiGraphics guiGraphics, int x, int y, int mouseX, int mouseY) { if (this.serverData.expired) { this.drawRealmStatus(guiGraphics, x, y, mouseX, mouseY, EXPIRED_SPRITE, () -> SERVER_EXPIRED_TOOLTIP); - } else if (this.serverData.state == RealmsServer.State.CLOSED) { + } else if (this.serverData.state == com.mojang.realmsclient.dto.RealmsServer.State.CLOSED) { this.drawRealmStatus(guiGraphics, x, y, mouseX, mouseY, CLOSED_SPRITE, () -> SERVER_CLOSED_TOOLTIP); - } else if (this.serverData.state == RealmsServer.State.OPEN) { + } else if (this.serverData.state == com.mojang.realmsclient.dto.RealmsServer.State.OPEN) { if (this.serverData.daysLeft < 7) { this.drawRealmStatus( guiGraphics, @@ -400,7 +400,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { RealmsWorldOptions realmsWorldOptions = (RealmsWorldOptions)this.serverData.slots.get(this.serverData.activeSlot); worldOptions.templateId = realmsWorldOptions.templateId; worldOptions.templateImage = realmsWorldOptions.templateImage; - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { realmsClient.updateSlot(this.serverData.id, this.serverData.activeSlot, worldOptions); @@ -419,7 +419,7 @@ public class RealmsConfigureWorldScreen extends RealmsScreen { public void saveSettings(String key, String value) { String string = StringUtil.isBlank(value) ? "" : value; - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { realmsClient.update(this.serverData.id, key, string); diff --git a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java index 12f81820..78fecb6e 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java @@ -35,10 +35,10 @@ public class RealmsCreateRealmScreen extends RealmsScreen { private EditBox descriptionBox; private final Runnable createWorldRunnable; - public RealmsCreateRealmScreen(RealmsMainScreen realmsMainScreen, RealmsServer realmsServer, boolean bl) { + public RealmsCreateRealmScreen(RealmsMainScreen lastScreen, RealmsServer server, boolean isSnapshor) { super(CREATE_REALM_TEXT); - this.lastScreen = realmsMainScreen; - this.createWorldRunnable = () -> this.createWorld(realmsServer, bl); + this.lastScreen = lastScreen; + this.createWorldRunnable = () -> this.createWorld(server, isSnapshor); } @Override @@ -71,17 +71,17 @@ public class RealmsCreateRealmScreen extends RealmsScreen { this.layout.arrangeElements(); } - private void createWorld(RealmsServer realmsServer, boolean bl) { - if (!realmsServer.isSnapshotRealm() && bl) { + private void createWorld(RealmsServer server, boolean isSnapshot) { + if (!server.isSnapshotRealm() && isSnapshot) { AtomicBoolean atomicBoolean = new AtomicBoolean(); this.minecraft.setScreen(new AlertScreen(() -> { atomicBoolean.set(true); this.lastScreen.resetScreen(); this.minecraft.setScreen(this.lastScreen); }, Component.translatable("mco.upload.preparing"), Component.empty())); - CompletableFuture.supplyAsync(() -> createSnapshotRealm(realmsServer), Util.backgroundExecutor()).thenAcceptAsync(realmsServerx -> { + CompletableFuture.supplyAsync(() -> createSnapshotRealm(server), Util.backgroundExecutor()).thenAcceptAsync(realmsServer -> { if (!atomicBoolean.get()) { - this.showResetWorldScreen(realmsServerx); + this.showResetWorldScreen(realmsServer); } }, this.minecraft).exceptionallyAsync(throwable -> { this.lastScreen.resetScreen(); @@ -96,28 +96,26 @@ public class RealmsCreateRealmScreen extends RealmsScreen { return null; }, this.minecraft); } else { - this.showResetWorldScreen(realmsServer); + this.showResetWorldScreen(server); } } - private static RealmsServer createSnapshotRealm(RealmsServer realmsServer) { - RealmsClient realmsClient = RealmsClient.create(); + private static RealmsServer createSnapshotRealm(RealmsServer server) { + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { - return realmsClient.createSnapshotRealm(realmsServer.id); + return realmsClient.createSnapshotRealm(server.id); } catch (RealmsServiceException var3) { throw new RuntimeException(var3); } } - private void showResetWorldScreen(RealmsServer realmsServer) { - RealmCreationTask realmCreationTask = new RealmCreationTask(realmsServer.id, this.nameBox.getValue(), this.descriptionBox.getValue()); - RealmsResetWorldScreen realmsResetWorldScreen = RealmsResetWorldScreen.forNewRealm( - this, realmsServer, realmCreationTask, () -> this.minecraft.execute(() -> { - RealmsMainScreen.refreshServerList(); - this.minecraft.setScreen(this.lastScreen); - }) - ); + private void showResetWorldScreen(RealmsServer server) { + RealmCreationTask realmCreationTask = new RealmCreationTask(server.id, this.nameBox.getValue(), this.descriptionBox.getValue()); + RealmsResetWorldScreen realmsResetWorldScreen = RealmsResetWorldScreen.forNewRealm(this, server, realmCreationTask, () -> this.minecraft.execute(() -> { + RealmsMainScreen.refreshServerList(); + this.minecraft.setScreen(this.lastScreen); + })); this.minecraft.setScreen(realmsResetWorldScreen); } diff --git a/com/mojang/realmsclient/gui/screens/RealmsDownloadLatestWorldScreen.java b/com/mojang/realmsclient/gui/screens/RealmsDownloadLatestWorldScreen.java index c4987c6d..9ee9a828 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsDownloadLatestWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsDownloadLatestWorldScreen.java @@ -159,7 +159,7 @@ public class RealmsDownloadLatestWorldScreen extends RealmsScreen { this.dotIndex++; } - guiGraphics.drawString(this.font, DOTS[this.dotIndex % DOTS.length], this.width / 2 + i / 2 + 5, 50, -1, false); + guiGraphics.drawString(this.font, DOTS[this.dotIndex % DOTS.length], this.width / 2 + i / 2 + 5, 50, -1); } private void drawProgressBar(GuiGraphics guiGraphics) { @@ -194,9 +194,7 @@ public class RealmsDownloadLatestWorldScreen extends RealmsScreen { private void drawDownloadSpeed0(GuiGraphics guiGraphics, long bytesPerSecond) { if (bytesPerSecond > 0L) { int i = this.font.width(this.progress); - guiGraphics.drawString( - this.font, Component.translatable("mco.download.speed", Unit.humanReadable(bytesPerSecond)), this.width / 2 + i / 2 + 15, 84, -1, false - ); + guiGraphics.drawString(this.font, Component.translatable("mco.download.speed", Unit.humanReadable(bytesPerSecond)), this.width / 2 + i / 2 + 15, 84, -1); } } diff --git a/com/mojang/realmsclient/gui/screens/RealmsInviteScreen.java b/com/mojang/realmsclient/gui/screens/RealmsInviteScreen.java index a151686f..29ddbf30 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsInviteScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsInviteScreen.java @@ -80,7 +80,7 @@ public class RealmsInviteScreen extends RealmsScreen { this.showMessage(INVITING_PLAYER_TEXT); CompletableFuture.supplyAsync(() -> { try { - return RealmsClient.create().invite(l, string); + return RealmsClient.getOrCreate().invite(l, string); } catch (Exception var4) { LOGGER.error("Couldn't invite user"); return null; diff --git a/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java b/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java index c2a1eccd..bb1ef1c5 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java @@ -41,7 +41,7 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { private final Screen lastScreen; private final CompletableFuture> pendingInvites = CompletableFuture.supplyAsync(() -> { try { - return RealmsClient.create().pendingInvites().pendingInvites; + return RealmsClient.getOrCreate().pendingInvites().pendingInvites; } catch (RealmsServiceException var1) { LOGGER.error("Couldn't list invites", (Throwable)var1); return List.of(); @@ -85,13 +85,13 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { this.minecraft.setScreen(this.lastScreen); } - void handleInvitation(boolean bl) { + void handleInvitation(boolean accept) { if (this.pendingInvitationSelectionList.getSelected() instanceof RealmsPendingInvitesScreen.Entry entry) { String string = entry.pendingInvite.invitationId; CompletableFuture.supplyAsync(() -> { try { - RealmsClient realmsClient = RealmsClient.create(); - if (bl) { + RealmsClient realmsClient = RealmsClient.getOrCreate(); + if (accept) { realmsClient.acceptInvitation(string); } else { realmsClient.rejectInvitation(string); @@ -107,7 +107,7 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { this.pendingInvitationSelectionList.removeInvitation(entry); this.updateButtonStates(); RealmsDataFetcher realmsDataFetcher = this.minecraft.realmsDataFetcher(); - if (bl) { + if (accept) { realmsDataFetcher.serverListUpdateTask.reset(); } @@ -160,11 +160,9 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { } private void renderPendingInvitationItem(GuiGraphics guiGraphics, PendingInvite pendingInvite, int x, int y, int mouseX, int mouseY) { - guiGraphics.drawString(RealmsPendingInvitesScreen.this.font, pendingInvite.realmName, x + 38, y + 1, -1, false); - guiGraphics.drawString(RealmsPendingInvitesScreen.this.font, pendingInvite.realmOwnerName, x + 38, y + 12, 7105644, false); - guiGraphics.drawString( - RealmsPendingInvitesScreen.this.font, RealmsUtil.convertToAgePresentationFromInstant(pendingInvite.date), x + 38, y + 24, 7105644, false - ); + guiGraphics.drawString(RealmsPendingInvitesScreen.this.font, pendingInvite.realmName, x + 38, y + 1, -1); + guiGraphics.drawString(RealmsPendingInvitesScreen.this.font, pendingInvite.realmOwnerName, x + 38, y + 12, 7105644); + guiGraphics.drawString(RealmsPendingInvitesScreen.this.font, RealmsUtil.convertToAgePresentationFromInstant(pendingInvite.date), x + 38, y + 24, 7105644); RowButton.drawButtonsInRow(guiGraphics, this.rowButtons, RealmsPendingInvitesScreen.this.pendingInvitationSelectionList, x, y, mouseX, mouseY); RealmsUtil.renderPlayerFace(guiGraphics, x, y, 32, pendingInvite.realmOwnerUuid); } @@ -192,8 +190,8 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { } @Override - public void setSelectedIndex(int i) { - super.setSelectedIndex(i); + public void setSelectedIndex(int selected) { + super.setSelectedIndex(selected); RealmsPendingInvitesScreen.this.updateButtonStates(); } diff --git a/com/mojang/realmsclient/gui/screens/RealmsPlayerScreen.java b/com/mojang/realmsclient/gui/screens/RealmsPlayerScreen.java index 72d1e9b4..c01f73ba 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsPlayerScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsPlayerScreen.java @@ -151,7 +151,7 @@ public class RealmsPlayerScreen extends RealmsScreen { } private void op(int index) { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); UUID uUID = ((PlayerInfo)RealmsPlayerScreen.this.serverData.players.get(index)).getUuid(); try { @@ -161,10 +161,11 @@ public class RealmsPlayerScreen extends RealmsScreen { } this.updateOpButtons(); + this.setFocused(this.removeOpButton); } private void deop(int index) { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); UUID uUID = ((PlayerInfo)RealmsPlayerScreen.this.serverData.players.get(index)).getUuid(); try { @@ -174,6 +175,7 @@ public class RealmsPlayerScreen extends RealmsScreen { } this.updateOpButtons(); + this.setFocused(this.makeOpButton); } private void uninvite(int index) { @@ -181,7 +183,7 @@ public class RealmsPlayerScreen extends RealmsScreen { PlayerInfo playerInfo = (PlayerInfo)RealmsPlayerScreen.this.serverData.players.get(index); RealmsConfirmScreen realmsConfirmScreen = new RealmsConfirmScreen(bl -> { if (bl) { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { realmsClient.uninvite(RealmsPlayerScreen.this.serverData.id, playerInfo.getUuid()); @@ -239,7 +241,7 @@ public class RealmsPlayerScreen extends RealmsScreen { int j = top + height / 2 - 16; RealmsUtil.renderPlayerFace(guiGraphics, left, j, 32, this.playerInfo.getUuid()); int k = top + height / 2 - 9 / 2; - guiGraphics.drawString(RealmsPlayerScreen.this.font, this.playerInfo.getName(), left + 8 + 32, k, i, false); + guiGraphics.drawString(RealmsPlayerScreen.this.font, this.playerInfo.getName(), left + 8 + 32, k, i); int l = top + height / 2 - 10; int m = left + width - this.removeButton.getWidth(); this.removeButton.setPosition(m, l); @@ -262,16 +264,16 @@ public class RealmsPlayerScreen extends RealmsScreen { RealmsPlayerScreen.this.width, RealmsPlayerScreen.this.layout.getContentHeight(), RealmsPlayerScreen.this.layout.getHeaderHeight(), - 36 + 36, + (int)(9.0F * 1.5F) ); - this.setRenderHeader(true, (int)(9.0F * 1.5F)); } @Override protected void renderHeader(GuiGraphics guiGraphics, int x, int y) { String string = RealmsPlayerScreen.this.serverData.players != null ? Integer.toString(RealmsPlayerScreen.this.serverData.players.size()) : "0"; Component component = Component.translatable("mco.configure.world.invited.number", string).withStyle(ChatFormatting.UNDERLINE); - guiGraphics.drawString(RealmsPlayerScreen.this.font, component, x + this.getRowWidth() / 2 - RealmsPlayerScreen.this.font.width(component) / 2, y, -1, false); + guiGraphics.drawString(RealmsPlayerScreen.this.font, component, x + this.getRowWidth() / 2 - RealmsPlayerScreen.this.font.width(component) / 2, y, -1); } @Override diff --git a/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java b/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java index 8f8ac4f9..c1b7447d 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java @@ -7,6 +7,7 @@ import com.mojang.realmsclient.client.worldupload.RealmsCreateWorldFlow; import com.mojang.realmsclient.dto.RealmsServer; import com.mojang.realmsclient.dto.WorldTemplate; import com.mojang.realmsclient.dto.WorldTemplatePaginatedList; +import com.mojang.realmsclient.dto.RealmsServer.WorldType; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.util.task.LongRunningTask; import com.mojang.realmsclient.util.task.RealmCreationTask; @@ -21,6 +22,7 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.StringWidget; +import net.minecraft.client.gui.components.Button.OnPress; import net.minecraft.client.gui.layouts.GridLayout; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; import net.minecraft.client.gui.layouts.LayoutSettings; @@ -143,13 +145,13 @@ public class RealmsResetWorldScreen extends RealmsScreen { linearLayout.addChild(new StringWidget(this.subtitle, this.font).setColor(this.subtitleColor), LayoutSettings::alignHorizontallyCenter); (new Thread("Realms-reset-world-fetcher") { public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { - WorldTemplatePaginatedList worldTemplatePaginatedList = realmsClient.fetchWorldTemplates(1, 10, RealmsServer.WorldType.NORMAL); - WorldTemplatePaginatedList worldTemplatePaginatedList2 = realmsClient.fetchWorldTemplates(1, 10, RealmsServer.WorldType.ADVENTUREMAP); - WorldTemplatePaginatedList worldTemplatePaginatedList3 = realmsClient.fetchWorldTemplates(1, 10, RealmsServer.WorldType.EXPERIENCE); - WorldTemplatePaginatedList worldTemplatePaginatedList4 = realmsClient.fetchWorldTemplates(1, 10, RealmsServer.WorldType.INSPIRATION); + WorldTemplatePaginatedList worldTemplatePaginatedList = realmsClient.fetchWorldTemplates(1, 10, WorldType.NORMAL); + WorldTemplatePaginatedList worldTemplatePaginatedList2 = realmsClient.fetchWorldTemplates(1, 10, WorldType.ADVENTUREMAP); + WorldTemplatePaginatedList worldTemplatePaginatedList3 = realmsClient.fetchWorldTemplates(1, 10, WorldType.EXPERIENCE); + WorldTemplatePaginatedList worldTemplatePaginatedList4 = realmsClient.fetchWorldTemplates(1, 10, WorldType.INSPIRATION); RealmsResetWorldScreen.this.minecraft.execute(() -> { RealmsResetWorldScreen.this.templates = worldTemplatePaginatedList; RealmsResetWorldScreen.this.adventuremaps = worldTemplatePaginatedList2; @@ -186,7 +188,7 @@ public class RealmsResetWorldScreen extends RealmsScreen { WORLD_TEMPLATES_TITLE, SURVIVAL_SPAWN_LOCATION, button -> this.minecraft - .setScreen(new RealmsSelectWorldTemplateScreen(WORLD_TEMPLATES_TITLE, this::templateSelectionCallback, RealmsServer.WorldType.NORMAL, this.templates)) + .setScreen(new RealmsSelectWorldTemplateScreen(WORLD_TEMPLATES_TITLE, this::templateSelectionCallback, WorldType.NORMAL, this.templates)) ) ); rowHelper.addChild(SpacerElement.height(16), 3); @@ -196,7 +198,7 @@ public class RealmsResetWorldScreen extends RealmsScreen { ADVENTURES_TITLE, ADVENTURE_MAP_LOCATION, button -> this.minecraft - .setScreen(new RealmsSelectWorldTemplateScreen(ADVENTURES_TITLE, this::templateSelectionCallback, RealmsServer.WorldType.ADVENTUREMAP, this.adventuremaps)) + .setScreen(new RealmsSelectWorldTemplateScreen(ADVENTURES_TITLE, this::templateSelectionCallback, WorldType.ADVENTUREMAP, this.adventuremaps)) ) ); rowHelper.addChild( @@ -205,7 +207,7 @@ public class RealmsResetWorldScreen extends RealmsScreen { EXPERIENCES_TITLE, EXPERIENCE_LOCATION, button -> this.minecraft - .setScreen(new RealmsSelectWorldTemplateScreen(EXPERIENCES_TITLE, this::templateSelectionCallback, RealmsServer.WorldType.EXPERIENCE, this.experiences)) + .setScreen(new RealmsSelectWorldTemplateScreen(EXPERIENCES_TITLE, this::templateSelectionCallback, WorldType.EXPERIENCE, this.experiences)) ) ); rowHelper.addChild( @@ -214,7 +216,7 @@ public class RealmsResetWorldScreen extends RealmsScreen { INSPIRATION_TITLE, INSPIRATION_LOCATION, button -> this.minecraft - .setScreen(new RealmsSelectWorldTemplateScreen(INSPIRATION_TITLE, this::templateSelectionCallback, RealmsServer.WorldType.INSPIRATION, this.inspirations)) + .setScreen(new RealmsSelectWorldTemplateScreen(INSPIRATION_TITLE, this::templateSelectionCallback, WorldType.INSPIRATION, this.inspirations)) ) ); this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, button -> this.onClose()).build()); @@ -270,7 +272,7 @@ public class RealmsResetWorldScreen extends RealmsScreen { private static final int IMAGE_SIZE = 56; private final ResourceLocation image; - FrameButton(final Font font, final Component message, final ResourceLocation image, final Button.OnPress onPress) { + FrameButton(final Font font, final Component message, final ResourceLocation image, final OnPress onPress) { super(0, 0, 60, 60 + 9, message, onPress, DEFAULT_NARRATION); this.image = image; } diff --git a/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen.java b/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen.java index 3f140346..25e917ad 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSelectFileToUploadScreen.java @@ -29,8 +29,6 @@ public class RealmsSelectFileToUploadScreen extends RealmsScreen { public static final Component TITLE = Component.translatable("mco.upload.select.world.title"); private static final Component UNABLE_TO_LOAD_WORLD = Component.translatable("selectWorld.unable_to_load"); static final Component WORLD_TEXT = Component.translatable("selectWorld.world"); - private static final Component HARDCORE_TEXT = Component.translatable("mco.upload.hardcore").withColor(-65536); - private static final Component COMMANDS_TEXT = Component.translatable("selectWorld.commands"); private static final DateFormat DATE_FORMAT = new SimpleDateFormat(); @Nullable private final RealmCreationTask realmCreationTask; @@ -93,7 +91,7 @@ public class RealmsSelectFileToUploadScreen extends RealmsScreen { } private void upload() { - if (this.selectedWorld != -1 && !((LevelSummary)this.levelList.get(this.selectedWorld)).isHardcore()) { + if (this.selectedWorld != -1) { LevelSummary levelSummary = (LevelSummary)this.levelList.get(this.selectedWorld); this.minecraft.setScreen(new RealmsUploadScreen(this.realmCreationTask, this.realmId, this.slotId, this.lastScreen, levelSummary)); } @@ -156,9 +154,9 @@ public class RealmsSelectFileToUploadScreen extends RealmsScreen { string = this.name; } - guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, string, x + 2, y + 1, 16777215, false); - guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, this.id, x + 2, y + 12, -8355712, false); - guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, this.info, x + 2, y + 12 + 10, -8355712, false); + guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, string, x + 2, y + 1, -1); + guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, this.id, x + 2, y + 12, -8355712); + guiGraphics.drawString(RealmsSelectFileToUploadScreen.this.font, this.info, x + 2, y + 12 + 10, -8355712); } @Override @@ -188,12 +186,11 @@ public class RealmsSelectFileToUploadScreen extends RealmsScreen { this.addEntry(RealmsSelectFileToUploadScreen.this.new Entry(levelSummary)); } - public void setSelected(@Nullable RealmsSelectFileToUploadScreen.Entry selected) { - super.setSelected(selected); - RealmsSelectFileToUploadScreen.this.selectedWorld = this.children().indexOf(selected); + public void setSelected(@Nullable RealmsSelectFileToUploadScreen.Entry entry) { + super.setSelected(entry); + RealmsSelectFileToUploadScreen.this.selectedWorld = this.children().indexOf(entry); RealmsSelectFileToUploadScreen.this.uploadButton.active = RealmsSelectFileToUploadScreen.this.selectedWorld >= 0 - && RealmsSelectFileToUploadScreen.this.selectedWorld < this.getItemCount() - && !((LevelSummary)RealmsSelectFileToUploadScreen.this.levelList.get(RealmsSelectFileToUploadScreen.this.selectedWorld)).isHardcore(); + && RealmsSelectFileToUploadScreen.this.selectedWorld < this.getItemCount(); } @Override diff --git a/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java b/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java index 40f6474d..70b46687 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java @@ -4,9 +4,9 @@ import com.google.common.collect.Lists; import com.mojang.datafixers.util.Either; import com.mojang.logging.LogUtils; import com.mojang.realmsclient.client.RealmsClient; -import com.mojang.realmsclient.dto.RealmsServer; import com.mojang.realmsclient.dto.WorldTemplate; import com.mojang.realmsclient.dto.WorldTemplatePaginatedList; +import com.mojang.realmsclient.dto.RealmsServer.WorldType; import com.mojang.realmsclient.exception.RealmsServiceException; import com.mojang.realmsclient.util.RealmsTextureManager; import com.mojang.realmsclient.util.TextRenderingUtils; @@ -53,7 +53,7 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen { private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this); final Consumer callback; RealmsSelectWorldTemplateScreen.WorldTemplateList worldTemplateList; - private final RealmsServer.WorldType worldType; + private final WorldType worldType; private Button selectButton; private Button trailerButton; private Button publisherButton; @@ -66,12 +66,12 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen { @Nullable List noTemplatesMessage; - public RealmsSelectWorldTemplateScreen(Component title, Consumer callback, RealmsServer.WorldType worldType) { + public RealmsSelectWorldTemplateScreen(Component title, Consumer callback, WorldType worldType) { this(title, callback, worldType, null); } public RealmsSelectWorldTemplateScreen( - Component title, Consumer callback, RealmsServer.WorldType worldType, @Nullable WorldTemplatePaginatedList worldTemplatePaginatedList + Component title, Consumer callback, WorldType worldType, @Nullable WorldTemplatePaginatedList worldTemplatePaginatedList ) { super(title); this.callback = callback; @@ -156,7 +156,7 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen { (new Thread("realms-template-fetcher") { public void run() { WorldTemplatePaginatedList worldTemplatePaginatedList = output; - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); while (worldTemplatePaginatedList != null) { Either either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldTemplatePaginatedList, realmsClient); @@ -315,11 +315,11 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen { int k = left + 45 + 20; int l = top + 5; - guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.name, k, l, -1, false); - guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.version, left + width - j - 5, l, 7105644, false); - guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.author, k, l + 9 + 5, -6250336, false); + guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.name, k, l, -1); + guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.version, left + width - j - 5, l, 7105644); + guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.author, k, l + 9 + 5, -6250336); if (!this.template.recommendedPlayers.isBlank()) { - guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.recommendedPlayers, k, top + height - 9 / 2 - 5, 5000268, false); + guiGraphics.drawString(RealmsSelectWorldTemplateScreen.this.font, this.template.recommendedPlayers, k, top + height - 9 / 2 - 5, 5000268); } } @@ -366,9 +366,9 @@ public class RealmsSelectWorldTemplateScreen extends RealmsScreen { } } - public void setSelected(@Nullable RealmsSelectWorldTemplateScreen.Entry selected) { - super.setSelected(selected); - RealmsSelectWorldTemplateScreen.this.selectedTemplate = selected == null ? null : selected.template; + public void setSelected(@Nullable RealmsSelectWorldTemplateScreen.Entry entry) { + super.setSelected(entry); + RealmsSelectWorldTemplateScreen.this.selectedTemplate = entry == null ? null : entry.template; RealmsSelectWorldTemplateScreen.this.updateButtonStates(); } diff --git a/com/mojang/realmsclient/gui/screens/RealmsSettingsScreen.java b/com/mojang/realmsclient/gui/screens/RealmsSettingsScreen.java index 6fb5e55a..370948fa 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsSettingsScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSettingsScreen.java @@ -1,6 +1,7 @@ package com.mojang.realmsclient.gui.screens; import com.mojang.realmsclient.dto.RealmsServer; +import com.mojang.realmsclient.dto.RealmsServer.State; import java.util.Objects; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -31,11 +32,11 @@ public class RealmsSettingsScreen extends RealmsScreen { @Override public void init() { int i = this.width / 2 - 106; - String string = this.serverData.state == RealmsServer.State.OPEN ? "mco.configure.world.buttons.close" : "mco.configure.world.buttons.open"; + String string = this.serverData.state == State.OPEN ? "mco.configure.world.buttons.close" : "mco.configure.world.buttons.open"; Button button = Button.builder( Component.translatable(string), buttonx -> { - if (this.serverData.state == RealmsServer.State.OPEN) { + if (this.serverData.state == State.OPEN) { this.minecraft .setScreen( RealmsPopups.infoPopupScreen( @@ -79,8 +80,8 @@ public class RealmsSettingsScreen extends RealmsScreen { public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { super.render(guiGraphics, mouseX, mouseY, partialTick); guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 17, -1); - guiGraphics.drawString(this.font, NAME_LABEL, this.width / 2 - 106, row(3), -1, false); - guiGraphics.drawString(this.font, DESCRIPTION_LABEL, this.width / 2 - 106, row(7), -1, false); + guiGraphics.drawString(this.font, NAME_LABEL, this.width / 2 - 106, row(3), -1); + guiGraphics.drawString(this.font, DESCRIPTION_LABEL, this.width / 2 - 106, row(7), -1); } public void save() { diff --git a/com/mojang/realmsclient/gui/screens/RealmsSlotOptionsScreen.java b/com/mojang/realmsclient/gui/screens/RealmsSlotOptionsScreen.java index edc8c348..d8eb8128 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsSlotOptionsScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSlotOptionsScreen.java @@ -1,8 +1,8 @@ package com.mojang.realmsclient.gui.screens; import com.google.common.collect.ImmutableList; -import com.mojang.realmsclient.dto.RealmsServer; import com.mojang.realmsclient.dto.RealmsWorldOptions; +import com.mojang.realmsclient.dto.RealmsServer.WorldType; import java.util.List; import java.util.function.Consumer; import net.fabricmc.api.EnvType; @@ -12,6 +12,7 @@ import net.minecraft.client.gui.components.AbstractSliderButton; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.CycleButton; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.components.CycleButton.OnValueChange; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.realms.RealmsLabel; @@ -33,7 +34,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { private int column1X; private int columnWidth; private final RealmsWorldOptions options; - private final RealmsServer.WorldType worldType; + private final WorldType worldType; private Difficulty difficulty; private GameType gameMode; private final String defaultSlotName; @@ -45,7 +46,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { private boolean forceGameMode; RealmsSlotOptionsScreen.SettingsSlider spawnProtectionButton; - public RealmsSlotOptionsScreen(RealmsConfigureWorldScreen parent, RealmsWorldOptions options, RealmsServer.WorldType worldType, int activeSlot) { + public RealmsSlotOptionsScreen(RealmsConfigureWorldScreen parent, RealmsWorldOptions options, WorldType worldType, int activeSlot) { super(Component.translatable("mco.configure.world.buttons.options")); this.parentScreen = parent; this.options = options; @@ -54,7 +55,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { this.gameMode = findByIndex(GAME_MODES, options.gameMode, 0); this.defaultSlotName = options.getDefaultSlotName(activeSlot); this.setWorldName(options.getSlotName(activeSlot)); - if (worldType == RealmsServer.WorldType.NORMAL) { + if (worldType == WorldType.NORMAL) { this.pvp = options.pvp; this.spawnProtection = options.spawnProtection; this.forceGameMode = options.forceGameMode; @@ -92,11 +93,11 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { this.columnWidth = 170; this.column1X = this.width / 2 - this.columnWidth; int i = this.width / 2 + 10; - if (this.worldType != RealmsServer.WorldType.NORMAL) { + if (this.worldType != WorldType.NORMAL) { Component component; - if (this.worldType == RealmsServer.WorldType.ADVENTUREMAP) { + if (this.worldType == WorldType.ADVENTUREMAP) { component = Component.translatable("mco.configure.world.edit.subscreen.adventuremap"); - } else if (this.worldType == RealmsServer.WorldType.INSPIRATION) { + } else if (this.worldType == WorldType.INSPIRATION) { component = Component.translatable("mco.configure.world.edit.subscreen.inspiration"); } else { component = Component.translatable("mco.configure.world.edit.subscreen.experience"); @@ -108,7 +109,6 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { this.nameEdit = this.addWidget( new EditBox(this.minecraft.font, this.column1X, row(1), this.columnWidth, 20, null, Component.translatable("mco.configure.world.edit.slot.name")) ); - this.nameEdit.setMaxLength(10); this.nameEdit.setValue(this.worldName); this.nameEdit.setResponder(this::setWorldName); CycleButton cycleButton = this.addRenderableWidget( @@ -140,7 +140,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { .withInitialValue(this.difficulty) .create(this.column1X, row(5), this.columnWidth, 20, Component.translatable("options.difficulty"), (cycleButton2x, difficulty) -> { this.difficulty = difficulty; - if (this.worldType == RealmsServer.WorldType.NORMAL) { + if (this.worldType == WorldType.NORMAL) { boolean bl = this.difficulty != Difficulty.PEACEFUL; cycleButton2.active = bl; cycleButton2.setValue(bl && this.spawnMonsters); @@ -165,7 +165,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { i, row(7), this.columnWidth, 20, Component.translatable("mco.configure.world.commandBlocks"), (cycleButtonx, boolean_) -> this.commandBlocks = boolean_ ) ); - if (this.worldType != RealmsServer.WorldType.NORMAL) { + if (this.worldType != WorldType.NORMAL) { cycleButton.active = false; cycleButton2.active = false; this.spawnProtectionButton.active = false; @@ -185,7 +185,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { this.addRenderableWidget(Button.builder(CommonComponents.GUI_CANCEL, button -> this.onClose()).bounds(i, row(13), this.columnWidth, 20).build()); } - private CycleButton.OnValueChange confirmDangerousOption(Component question, Consumer onPress) { + private OnValueChange confirmDangerousOption(Component question, Consumer onPress) { return (cycleButton, boolean_) -> { if (boolean_) { onPress.accept(true); @@ -207,7 +207,7 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { super.render(guiGraphics, mouseX, mouseY, partialTick); guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 17, -1); - guiGraphics.drawString(this.font, NAME_LABEL, this.column1X + this.columnWidth / 2 - this.font.width(NAME_LABEL) / 2, row(0) - 5, -1, false); + guiGraphics.drawString(this.font, NAME_LABEL, this.column1X + this.columnWidth / 2 - this.font.width(NAME_LABEL) / 2, row(0) - 5, -1); this.nameEdit.render(guiGraphics, mouseX, mouseY, partialTick); } @@ -222,10 +222,8 @@ public class RealmsSlotOptionsScreen extends RealmsScreen { private void saveSettings() { int i = findIndex(DIFFICULTIES, this.difficulty, 2); int j = findIndex(GAME_MODES, this.gameMode, 0); - if (this.worldType != RealmsServer.WorldType.ADVENTUREMAP - && this.worldType != RealmsServer.WorldType.EXPERIENCE - && this.worldType != RealmsServer.WorldType.INSPIRATION) { - boolean bl = this.worldType == RealmsServer.WorldType.NORMAL && this.difficulty != Difficulty.PEACEFUL && this.spawnMonsters; + if (this.worldType != WorldType.ADVENTUREMAP && this.worldType != WorldType.EXPERIENCE && this.worldType != WorldType.INSPIRATION) { + boolean bl = this.worldType == WorldType.NORMAL && this.difficulty != Difficulty.PEACEFUL && this.spawnMonsters; this.parentScreen .saveSlotSettings( new RealmsWorldOptions( diff --git a/com/mojang/realmsclient/gui/screens/RealmsSubscriptionInfoScreen.java b/com/mojang/realmsclient/gui/screens/RealmsSubscriptionInfoScreen.java index b6b49924..ce164769 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsSubscriptionInfoScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSubscriptionInfoScreen.java @@ -95,7 +95,7 @@ public class RealmsSubscriptionInfoScreen extends RealmsScreen { (new Thread("Realms-delete-realm") { public void run() { try { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); realmsClient.deleteRealm(RealmsSubscriptionInfoScreen.this.serverData.id); } catch (RealmsServiceException var2) { RealmsSubscriptionInfoScreen.LOGGER.error("Couldn't delete world", (Throwable)var2); @@ -110,7 +110,7 @@ public class RealmsSubscriptionInfoScreen extends RealmsScreen { } private void getSubscription(long serverId) { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { Subscription subscription = realmsClient.subscriptionFor(serverId); @@ -139,15 +139,15 @@ public class RealmsSubscriptionInfoScreen extends RealmsScreen { super.render(guiGraphics, mouseX, mouseY, partialTick); int i = this.width / 2 - 100; guiGraphics.drawCenteredString(this.font, SUBSCRIPTION_TITLE, this.width / 2, 17, -1); - guiGraphics.drawString(this.font, SUBSCRIPTION_START_LABEL, i, row(0), -6250336, false); - guiGraphics.drawString(this.font, this.startDate, i, row(1), -1, false); + guiGraphics.drawString(this.font, SUBSCRIPTION_START_LABEL, i, row(0), -6250336); + guiGraphics.drawString(this.font, this.startDate, i, row(1), -1); if (this.type == SubscriptionType.NORMAL) { - guiGraphics.drawString(this.font, TIME_LEFT_LABEL, i, row(3), -6250336, false); + guiGraphics.drawString(this.font, TIME_LEFT_LABEL, i, row(3), -6250336); } else if (this.type == SubscriptionType.RECURRING) { - guiGraphics.drawString(this.font, DAYS_LEFT_LABEL, i, row(3), -6250336, false); + guiGraphics.drawString(this.font, DAYS_LEFT_LABEL, i, row(3), -6250336); } - guiGraphics.drawString(this.font, this.daysLeft, i, row(4), -1, false); + guiGraphics.drawString(this.font, this.daysLeft, i, row(4), -1); } private Component daysLeftPresentation(int daysLeft) { diff --git a/com/mojang/realmsclient/gui/screens/RealmsTermsScreen.java b/com/mojang/realmsclient/gui/screens/RealmsTermsScreen.java index c1d3fdc6..1f47b4c4 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsTermsScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsTermsScreen.java @@ -64,7 +64,7 @@ public class RealmsTermsScreen extends RealmsScreen { } private void agreedToTos() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { realmsClient.agreeToTos(); @@ -94,13 +94,13 @@ public class RealmsTermsScreen extends RealmsScreen { public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { super.render(guiGraphics, mouseX, mouseY, partialTick); guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 17, -1); - guiGraphics.drawString(this.font, TERMS_STATIC_TEXT, this.width / 2 - 120, row(5), -1, false); + guiGraphics.drawString(this.font, TERMS_STATIC_TEXT, this.width / 2 - 120, row(5), -1); int i = this.font.width(TERMS_STATIC_TEXT); int j = this.width / 2 - 121 + i; int k = row(5); int l = j + this.font.width(TERMS_LINK_TEXT) + 1; int m = k + 1 + 9; this.onLink = j <= mouseX && mouseX <= l && k <= mouseY && mouseY <= m; - guiGraphics.drawString(this.font, TERMS_LINK_TEXT, this.width / 2 - 120 + i, row(5), this.onLink ? 7107012 : 3368635, false); + guiGraphics.drawString(this.font, TERMS_LINK_TEXT, this.width / 2 - 120 + i, row(5), this.onLink ? 7107012 : 3368635); } } diff --git a/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java b/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java index 4dfa8ff0..1ab7c905 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java @@ -157,7 +157,7 @@ public class RealmsUploadScreen extends RealmsScreen implements RealmsWorldUploa guiGraphics.drawCenteredString(this.font, this.status, this.width / 2, 50, -1); if (this.showDots) { - guiGraphics.drawString(this.font, DOTS[this.tickCount / 10 % DOTS.length], this.width / 2 + this.font.width(this.status) / 2 + 5, 50, -1, false); + guiGraphics.drawString(this.font, DOTS[this.tickCount / 10 % DOTS.length], this.width / 2 + this.font.width(this.status) / 2 + 5, 50, -1); } if (this.uploadStatus.uploadStarted() && !this.cancelled) { @@ -192,7 +192,7 @@ public class RealmsUploadScreen extends RealmsScreen implements RealmsWorldUploa if (bytesPerSecond > 0L && string != null) { int i = this.font.width(string); String string2 = "(" + Unit.humanReadable(bytesPerSecond) + "/s)"; - guiGraphics.drawString(this.font, string2, this.width / 2 + i / 2 + 15, 84, -1, false); + guiGraphics.drawString(this.font, string2, this.width / 2 + i / 2 + 15, 84, -1); } } @@ -225,7 +225,7 @@ public class RealmsUploadScreen extends RealmsScreen implements RealmsWorldUploa private void upload() { Path path = this.minecraft.gameDirectory.toPath().resolve("saves").resolve(this.selectedLevel.getLevelId()); RealmsWorldOptions realmsWorldOptions = RealmsWorldOptions.createFromSettings( - this.selectedLevel.getSettings(), this.selectedLevel.levelVersion().minecraftVersionName() + this.selectedLevel.getSettings(), true, this.selectedLevel.levelVersion().minecraftVersionName() ); RealmsWorldUpload realmsWorldUpload = new RealmsWorldUpload(path, realmsWorldOptions, this.minecraft.getUser(), this.realmId, this.slotId, this); if (!this.currentUpload.compareAndSet(null, realmsWorldUpload)) { diff --git a/com/mojang/realmsclient/util/RealmsTextureManager.java b/com/mojang/realmsclient/util/RealmsTextureManager.java index 94cd6a2a..dbb19779 100644 --- a/com/mojang/realmsclient/util/RealmsTextureManager.java +++ b/com/mojang/realmsclient/util/RealmsTextureManager.java @@ -39,7 +39,7 @@ public class RealmsTextureManager { return resourceLocation; } else { ResourceLocation resourceLocation = ResourceLocation.fromNamespaceAndPath("realms", "dynamic/" + key); - Minecraft.getInstance().getTextureManager().register(resourceLocation, new DynamicTexture(nativeImage)); + Minecraft.getInstance().getTextureManager().register(resourceLocation, new DynamicTexture(resourceLocation::toString, nativeImage)); TEXTURES.put(key, new RealmsTextureManager.RealmsTexture(image, resourceLocation)); return resourceLocation; } diff --git a/com/mojang/realmsclient/util/task/CloseServerTask.java b/com/mojang/realmsclient/util/task/CloseServerTask.java index 164c1b63..14264519 100644 --- a/com/mojang/realmsclient/util/task/CloseServerTask.java +++ b/com/mojang/realmsclient/util/task/CloseServerTask.java @@ -3,6 +3,7 @@ package com.mojang.realmsclient.util.task; import com.mojang.logging.LogUtils; import com.mojang.realmsclient.client.RealmsClient; import com.mojang.realmsclient.dto.RealmsServer; +import com.mojang.realmsclient.dto.RealmsServer.State; import com.mojang.realmsclient.exception.RetryCallException; import com.mojang.realmsclient.gui.screens.RealmsConfigureWorldScreen; import net.fabricmc.api.EnvType; @@ -23,7 +24,7 @@ public class CloseServerTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); for (int i = 0; i < 25; i++) { if (this.aborted()) { @@ -34,7 +35,7 @@ public class CloseServerTask extends LongRunningTask { boolean bl = realmsClient.close(this.serverData.id); if (bl) { this.configureScreen.stateChanged(); - this.serverData.state = RealmsServer.State.CLOSED; + this.serverData.state = State.CLOSED; setScreen(this.configureScreen); break; } diff --git a/com/mojang/realmsclient/util/task/DownloadTask.java b/com/mojang/realmsclient/util/task/DownloadTask.java index 4ed2fb5f..ba4406f4 100644 --- a/com/mojang/realmsclient/util/task/DownloadTask.java +++ b/com/mojang/realmsclient/util/task/DownloadTask.java @@ -30,7 +30,7 @@ public class DownloadTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); int i = 0; while (i < 25) { diff --git a/com/mojang/realmsclient/util/task/GetServerDetailsTask.java b/com/mojang/realmsclient/util/task/GetServerDetailsTask.java index d438711c..fa82fc16 100644 --- a/com/mojang/realmsclient/util/task/GetServerDetailsTask.java +++ b/com/mojang/realmsclient/util/task/GetServerDetailsTask.java @@ -104,7 +104,7 @@ public class GetServerDetailsTask extends LongRunningTask { } private RealmsServerAddress fetchServerAddress() throws RealmsServiceException, TimeoutException, CancellationException { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); for (int i = 0; i < 40; i++) { if (this.aborted()) { @@ -140,9 +140,9 @@ public class GetServerDetailsTask extends LongRunningTask { private CompletableFuture scheduleResourcePackDownload(RealmsServerAddress serverAddress, UUID id) { try { - if (serverAddress.resourcePackUrl != null) { + if (serverAddress.resourcePackUrl == null) { return CompletableFuture.failedFuture(new IllegalStateException("resourcePackUrl was null")); - } else if (serverAddress.resourcePackHash != null) { + } else if (serverAddress.resourcePackHash == null) { return CompletableFuture.failedFuture(new IllegalStateException("resourcePackHash was null")); } else { DownloadedPackSource downloadedPackSource = Minecraft.getInstance().getDownloadedPackSource(); diff --git a/com/mojang/realmsclient/util/task/OpenServerTask.java b/com/mojang/realmsclient/util/task/OpenServerTask.java index b060f304..37a489c8 100644 --- a/com/mojang/realmsclient/util/task/OpenServerTask.java +++ b/com/mojang/realmsclient/util/task/OpenServerTask.java @@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils; import com.mojang.realmsclient.RealmsMainScreen; import com.mojang.realmsclient.client.RealmsClient; import com.mojang.realmsclient.dto.RealmsServer; +import com.mojang.realmsclient.dto.RealmsServer.State; import com.mojang.realmsclient.exception.RetryCallException; import com.mojang.realmsclient.gui.screens.RealmsConfigureWorldScreen; import net.fabricmc.api.EnvType; @@ -30,7 +31,7 @@ public class OpenServerTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); for (int i = 0; i < 25; i++) { if (this.aborted()) { @@ -45,7 +46,7 @@ public class OpenServerTask extends LongRunningTask { ((RealmsConfigureWorldScreen)this.returnScreen).stateChanged(); } - this.serverData.state = RealmsServer.State.OPEN; + this.serverData.state = State.OPEN; if (this.join) { RealmsMainScreen.play(this.serverData, this.returnScreen); } else { diff --git a/com/mojang/realmsclient/util/task/RealmCreationTask.java b/com/mojang/realmsclient/util/task/RealmCreationTask.java index 27470ffe..47250a72 100644 --- a/com/mojang/realmsclient/util/task/RealmCreationTask.java +++ b/com/mojang/realmsclient/util/task/RealmCreationTask.java @@ -23,7 +23,7 @@ public class RealmCreationTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); try { realmsClient.initializeRealm(this.realmId, this.name, this.motd); diff --git a/com/mojang/realmsclient/util/task/ResettingWorldTask.java b/com/mojang/realmsclient/util/task/ResettingWorldTask.java index 27125dd9..c849bd97 100644 --- a/com/mojang/realmsclient/util/task/ResettingWorldTask.java +++ b/com/mojang/realmsclient/util/task/ResettingWorldTask.java @@ -25,7 +25,7 @@ public abstract class ResettingWorldTask extends LongRunningTask { protected abstract void sendResetRequest(RealmsClient client, long serverId) throws RealmsServiceException; public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); int i = 0; while (i < 25) { diff --git a/com/mojang/realmsclient/util/task/RestoreTask.java b/com/mojang/realmsclient/util/task/RestoreTask.java index a25ca9a7..9863d94b 100644 --- a/com/mojang/realmsclient/util/task/RestoreTask.java +++ b/com/mojang/realmsclient/util/task/RestoreTask.java @@ -27,7 +27,7 @@ public class RestoreTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); int i = 0; while (i < 25) { diff --git a/com/mojang/realmsclient/util/task/SwitchMinigameTask.java b/com/mojang/realmsclient/util/task/SwitchMinigameTask.java index f4ccd121..0fa6cc89 100644 --- a/com/mojang/realmsclient/util/task/SwitchMinigameTask.java +++ b/com/mojang/realmsclient/util/task/SwitchMinigameTask.java @@ -25,7 +25,7 @@ public class SwitchMinigameTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); for (int i = 0; i < 25; i++) { try { diff --git a/com/mojang/realmsclient/util/task/SwitchSlotTask.java b/com/mojang/realmsclient/util/task/SwitchSlotTask.java index 9ac03d4c..e8cd7859 100644 --- a/com/mojang/realmsclient/util/task/SwitchSlotTask.java +++ b/com/mojang/realmsclient/util/task/SwitchSlotTask.java @@ -23,7 +23,7 @@ public class SwitchSlotTask extends LongRunningTask { } public void run() { - RealmsClient realmsClient = RealmsClient.create(); + RealmsClient realmsClient = RealmsClient.getOrCreate(); for (int i = 0; i < 25; i++) { try { diff --git a/data/minecraft/advancement/adventure/adventuring_time.json b/data/minecraft/advancement/adventure/adventuring_time.json index 698b3745..46fcc672 100644 --- a/data/minecraft/advancement/adventure/adventuring_time.json +++ b/data/minecraft/advancement/adventure/adventuring_time.json @@ -529,6 +529,22 @@ }, "trigger": "minecraft:location" }, + "minecraft:pale_garden": { + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "location": { + "biomes": "minecraft:pale_garden" + } + } + } + ] + }, + "trigger": "minecraft:location" + }, "minecraft:plains": { "conditions": { "player": [ @@ -954,6 +970,9 @@ [ "minecraft:dark_forest" ], + [ + "minecraft:pale_garden" + ], [ "minecraft:savanna_plateau" ], diff --git a/data/minecraft/advancement/adventure/hero_of_the_village.json b/data/minecraft/advancement/adventure/hero_of_the_village.json index 1380cf76..7c7f7e09 100644 --- a/data/minecraft/advancement/adventure/hero_of_the_village.json +++ b/data/minecraft/advancement/adventure/hero_of_the_village.json @@ -47,9 +47,15 @@ "pattern": "minecraft:border" } ], - "minecraft:hide_additional_tooltip": {}, - "minecraft:item_name": "{\"translate\":\"block.minecraft.ominous_banner\"}", - "minecraft:rarity": "uncommon" + "minecraft:item_name": { + "translate": "block.minecraft.ominous_banner" + }, + "minecraft:rarity": "uncommon", + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:banner_patterns" + ] + } }, "count": 1, "id": "minecraft:white_banner" diff --git a/data/minecraft/advancement/adventure/kill_a_mob.json b/data/minecraft/advancement/adventure/kill_a_mob.json index 85ac6c83..ceda2e68 100644 --- a/data/minecraft/advancement/adventure/kill_a_mob.json +++ b/data/minecraft/advancement/adventure/kill_a_mob.json @@ -57,6 +57,20 @@ }, "trigger": "minecraft:player_killed_entity" }, + "minecraft:creaking": { + "conditions": { + "entity": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type": "minecraft:creaking" + } + } + ] + }, + "trigger": "minecraft:player_killed_entity" + }, "minecraft:creeper": { "conditions": { "entity": [ @@ -524,6 +538,7 @@ "minecraft:bogged", "minecraft:breeze", "minecraft:cave_spider", + "minecraft:creaking", "minecraft:creeper", "minecraft:drowned", "minecraft:elder_guardian", diff --git a/data/minecraft/advancement/adventure/kill_all_mobs.json b/data/minecraft/advancement/adventure/kill_all_mobs.json index e7ffa09a..06894711 100644 --- a/data/minecraft/advancement/adventure/kill_all_mobs.json +++ b/data/minecraft/advancement/adventure/kill_all_mobs.json @@ -57,6 +57,20 @@ }, "trigger": "minecraft:player_killed_entity" }, + "minecraft:creaking": { + "conditions": { + "entity": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type": "minecraft:creaking" + } + } + ] + }, + "trigger": "minecraft:player_killed_entity" + }, "minecraft:creeper": { "conditions": { "entity": [ @@ -532,6 +546,9 @@ [ "minecraft:cave_spider" ], + [ + "minecraft:creaking" + ], [ "minecraft:creeper" ], diff --git a/data/minecraft/advancement/adventure/root.json b/data/minecraft/advancement/adventure/root.json index a6b28551..2031f8d7 100644 --- a/data/minecraft/advancement/adventure/root.json +++ b/data/minecraft/advancement/adventure/root.json @@ -9,7 +9,7 @@ }, "display": { "announce_to_chat": false, - "background": "minecraft:textures/gui/advancements/backgrounds/adventure.png", + "background": "minecraft:gui/advancements/backgrounds/adventure", "description": { "translate": "advancements.adventure.root.description" }, diff --git a/data/minecraft/advancement/nether/use_lodestone.json b/data/minecraft/advancement/adventure/use_lodestone.json similarity index 80% rename from data/minecraft/advancement/nether/use_lodestone.json rename to data/minecraft/advancement/adventure/use_lodestone.json index dfa084db..43c871f0 100644 --- a/data/minecraft/advancement/nether/use_lodestone.json +++ b/data/minecraft/advancement/adventure/use_lodestone.json @@ -1,5 +1,5 @@ { - "parent": "minecraft:nether/obtain_ancient_debris", + "parent": "minecraft:adventure/root", "criteria": { "use_lodestone": { "conditions": { @@ -25,14 +25,14 @@ }, "display": { "description": { - "translate": "advancements.nether.use_lodestone.description" + "translate": "advancements.adventure.use_lodestone.description" }, "icon": { "count": 1, "id": "minecraft:lodestone" }, "title": { - "translate": "advancements.nether.use_lodestone.title" + "translate": "advancements.adventure.use_lodestone.title" } }, "requirements": [ diff --git a/data/minecraft/advancement/adventure/voluntary_exile.json b/data/minecraft/advancement/adventure/voluntary_exile.json index 20b1b0a1..ab42e819 100644 --- a/data/minecraft/advancement/adventure/voluntary_exile.json +++ b/data/minecraft/advancement/adventure/voluntary_exile.json @@ -46,7 +46,9 @@ "pattern": "minecraft:border" } ], - "minecraft:item_name": "{\"translate\":\"block.minecraft.ominous_banner\"}" + "minecraft:item_name": { + "translate": "block.minecraft.ominous_banner" + } }, "items": "minecraft:white_banner" } @@ -99,9 +101,15 @@ "pattern": "minecraft:border" } ], - "minecraft:hide_additional_tooltip": {}, - "minecraft:item_name": "{\"translate\":\"block.minecraft.ominous_banner\"}", - "minecraft:rarity": "uncommon" + "minecraft:item_name": { + "translate": "block.minecraft.ominous_banner" + }, + "minecraft:rarity": "uncommon", + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:banner_patterns" + ] + } }, "count": 1, "id": "minecraft:white_banner" diff --git a/data/minecraft/advancement/end/root.json b/data/minecraft/advancement/end/root.json index 9d788a5d..809e7c3f 100644 --- a/data/minecraft/advancement/end/root.json +++ b/data/minecraft/advancement/end/root.json @@ -9,7 +9,7 @@ }, "display": { "announce_to_chat": false, - "background": "minecraft:textures/gui/advancements/backgrounds/end.png", + "background": "minecraft:gui/advancements/backgrounds/end", "description": { "translate": "advancements.end.root.description" }, diff --git a/data/minecraft/advancement/husbandry/complete_catalogue.json b/data/minecraft/advancement/husbandry/complete_catalogue.json index 31749d55..94767cc8 100644 --- a/data/minecraft/advancement/husbandry/complete_catalogue.json +++ b/data/minecraft/advancement/husbandry/complete_catalogue.json @@ -8,9 +8,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:all_black" + "components": { + "minecraft:cat/variant": "minecraft:all_black" } } } @@ -25,9 +24,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:black" + "components": { + "minecraft:cat/variant": "minecraft:black" } } } @@ -42,9 +40,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:british_shorthair" + "components": { + "minecraft:cat/variant": "minecraft:british_shorthair" } } } @@ -59,9 +56,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:calico" + "components": { + "minecraft:cat/variant": "minecraft:calico" } } } @@ -76,9 +72,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:jellie" + "components": { + "minecraft:cat/variant": "minecraft:jellie" } } } @@ -93,9 +88,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:persian" + "components": { + "minecraft:cat/variant": "minecraft:persian" } } } @@ -110,9 +104,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:ragdoll" + "components": { + "minecraft:cat/variant": "minecraft:ragdoll" } } } @@ -127,9 +120,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:red" + "components": { + "minecraft:cat/variant": "minecraft:red" } } } @@ -144,9 +136,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:siamese" + "components": { + "minecraft:cat/variant": "minecraft:siamese" } } } @@ -161,9 +152,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:tabby" + "components": { + "minecraft:cat/variant": "minecraft:tabby" } } } @@ -178,9 +168,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:cat", - "variant": "minecraft:white" + "components": { + "minecraft:cat/variant": "minecraft:white" } } } diff --git a/data/minecraft/advancement/husbandry/leash_all_frog_variants.json b/data/minecraft/advancement/husbandry/leash_all_frog_variants.json index 52a2ded0..ad618421 100644 --- a/data/minecraft/advancement/husbandry/leash_all_frog_variants.json +++ b/data/minecraft/advancement/husbandry/leash_all_frog_variants.json @@ -9,9 +9,8 @@ "entity": "this", "predicate": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:cold" + "components": { + "minecraft:frog/variant": "minecraft:cold" } } } @@ -30,9 +29,8 @@ "entity": "this", "predicate": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:temperate" + "components": { + "minecraft:frog/variant": "minecraft:temperate" } } } @@ -51,9 +49,8 @@ "entity": "this", "predicate": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:warm" + "components": { + "minecraft:frog/variant": "minecraft:warm" } } } @@ -78,14 +75,14 @@ } }, "requirements": [ + [ + "minecraft:cold" + ], [ "minecraft:temperate" ], [ "minecraft:warm" - ], - [ - "minecraft:cold" ] ], "sends_telemetry_event": true diff --git a/data/minecraft/advancement/husbandry/root.json b/data/minecraft/advancement/husbandry/root.json index 4061aa9b..5dc3be4d 100644 --- a/data/minecraft/advancement/husbandry/root.json +++ b/data/minecraft/advancement/husbandry/root.json @@ -6,7 +6,7 @@ }, "display": { "announce_to_chat": false, - "background": "minecraft:textures/gui/advancements/backgrounds/husbandry.png", + "background": "minecraft:gui/advancements/backgrounds/husbandry", "description": { "translate": "advancements.husbandry.root.description" }, diff --git a/data/minecraft/advancement/husbandry/whole_pack.json b/data/minecraft/advancement/husbandry/whole_pack.json index 26a20d57..c0a5a589 100644 --- a/data/minecraft/advancement/husbandry/whole_pack.json +++ b/data/minecraft/advancement/husbandry/whole_pack.json @@ -8,9 +8,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:ashen" + "components": { + "minecraft:wolf/variant": "minecraft:ashen" } } } @@ -25,9 +24,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:black" + "components": { + "minecraft:wolf/variant": "minecraft:black" } } } @@ -42,9 +40,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:chestnut" + "components": { + "minecraft:wolf/variant": "minecraft:chestnut" } } } @@ -59,9 +56,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:pale" + "components": { + "minecraft:wolf/variant": "minecraft:pale" } } } @@ -76,9 +72,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:rusty" + "components": { + "minecraft:wolf/variant": "minecraft:rusty" } } } @@ -93,9 +88,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:snowy" + "components": { + "minecraft:wolf/variant": "minecraft:snowy" } } } @@ -110,9 +104,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:spotted" + "components": { + "minecraft:wolf/variant": "minecraft:spotted" } } } @@ -127,9 +120,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:striped" + "components": { + "minecraft:wolf/variant": "minecraft:striped" } } } @@ -144,9 +136,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:wolf", - "variant": "minecraft:woods" + "components": { + "minecraft:wolf/variant": "minecraft:woods" } } } diff --git a/data/minecraft/advancement/nether/root.json b/data/minecraft/advancement/nether/root.json index 6ef424ea..5b6074a2 100644 --- a/data/minecraft/advancement/nether/root.json +++ b/data/minecraft/advancement/nether/root.json @@ -9,7 +9,7 @@ }, "display": { "announce_to_chat": false, - "background": "minecraft:textures/gui/advancements/backgrounds/nether.png", + "background": "minecraft:gui/advancements/backgrounds/nether", "description": { "translate": "advancements.nether.root.description" }, diff --git a/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks.json b/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks.json new file mode 100644 index 00000000..f57d5e4a --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_brick_slab": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_brick_slab" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:chiseled_resin_bricks" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_brick_slab" + ] + ], + "rewards": { + "recipes": [ + "minecraft:chiseled_resin_bricks" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks_from_resin_bricks_stonecutting.json b/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..77b8a16e --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/chiseled_resin_bricks_from_resin_bricks_stonecutting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:chiseled_resin_bricks_from_resin_bricks_stonecutting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:chiseled_resin_bricks_from_resin_bricks_stonecutting" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_planks.json b/data/minecraft/advancement/recipes/building_blocks/pale_oak_planks.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_planks.json rename to data/minecraft/advancement/recipes/building_blocks/pale_oak_planks.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_slab.json b/data/minecraft/advancement/recipes/building_blocks/pale_oak_slab.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_slab.json rename to data/minecraft/advancement/recipes/building_blocks/pale_oak_slab.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_stairs.json b/data/minecraft/advancement/recipes/building_blocks/pale_oak_stairs.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_stairs.json rename to data/minecraft/advancement/recipes/building_blocks/pale_oak_stairs.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_wood.json b/data/minecraft/advancement/recipes/building_blocks/pale_oak_wood.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/pale_oak_wood.json rename to data/minecraft/advancement/recipes/building_blocks/pale_oak_wood.json diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_block.json b/data/minecraft/advancement/recipes/building_blocks/resin_block.json new file mode 100644 index 00000000..22188009 --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_block.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_clump": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_clump" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_block" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_clump" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_block" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab.json b/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab.json new file mode 100644 index 00000000..b5ea3c4b --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_slab" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_slab" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab_from_resin_bricks_stonecutting.json b/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..0d4173bd --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_brick_slab_from_resin_bricks_stonecutting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_slab_from_resin_bricks_stonecutting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_slab_from_resin_bricks_stonecutting" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs.json b/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs.json new file mode 100644 index 00000000..25305d7e --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_stairs" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs_from_resin_bricks_stonecutting.json b/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..5acd47e3 --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_brick_stairs_from_resin_bricks_stonecutting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_stairs_from_resin_bricks_stonecutting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_stairs_from_resin_bricks_stonecutting" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/building_blocks/resin_bricks.json b/data/minecraft/advancement/recipes/building_blocks/resin_bricks.json new file mode 100644 index 00000000..1b20dfcd --- /dev/null +++ b/data/minecraft/advancement/recipes/building_blocks/resin_bricks.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_brick": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_brick" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_bricks" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_brick" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_bricks" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/stripped_pale_oak_wood.json b/data/minecraft/advancement/recipes/building_blocks/stripped_pale_oak_wood.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/building_blocks/stripped_pale_oak_wood.json rename to data/minecraft/advancement/recipes/building_blocks/stripped_pale_oak_wood.json diff --git a/data/minecraft/advancement/recipes/decorations/lodestone.json b/data/minecraft/advancement/recipes/decorations/lodestone.json index 3ccf8e6e..de00977e 100644 --- a/data/minecraft/advancement/recipes/decorations/lodestone.json +++ b/data/minecraft/advancement/recipes/decorations/lodestone.json @@ -1,11 +1,21 @@ { "parent": "minecraft:recipes/root", "criteria": { - "has_netherite_ingot": { + "has_iron_ingot": { "conditions": { "items": [ { - "items": "minecraft:netherite_ingot" + "items": "minecraft:iron_ingot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_lodestone": { + "conditions": { + "items": [ + { + "items": "minecraft:lodestone" } ] }, @@ -21,7 +31,8 @@ "requirements": [ [ "has_the_recipe", - "has_netherite_ingot" + "has_iron_ingot", + "has_lodestone" ] ], "rewards": { diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_moss_carpet.json b/data/minecraft/advancement/recipes/decorations/pale_moss_carpet.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_moss_carpet.json rename to data/minecraft/advancement/recipes/decorations/pale_moss_carpet.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_fence.json b/data/minecraft/advancement/recipes/decorations/pale_oak_fence.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_fence.json rename to data/minecraft/advancement/recipes/decorations/pale_oak_fence.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_hanging_sign.json b/data/minecraft/advancement/recipes/decorations/pale_oak_hanging_sign.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_hanging_sign.json rename to data/minecraft/advancement/recipes/decorations/pale_oak_hanging_sign.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_sign.json b/data/minecraft/advancement/recipes/decorations/pale_oak_sign.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/decorations/pale_oak_sign.json rename to data/minecraft/advancement/recipes/decorations/pale_oak_sign.json diff --git a/data/minecraft/advancement/recipes/decorations/resin_brick_wall.json b/data/minecraft/advancement/recipes/decorations/resin_brick_wall.json new file mode 100644 index 00000000..64cdcde5 --- /dev/null +++ b/data/minecraft/advancement/recipes/decorations/resin_brick_wall.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_wall" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_wall" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/decorations/resin_brick_wall_from_resin_bricks_stonecutting.json b/data/minecraft/advancement/recipes/decorations/resin_brick_wall_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..d6871b65 --- /dev/null +++ b/data/minecraft/advancement/recipes/decorations/resin_brick_wall_from_resin_bricks_stonecutting.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_bricks": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_bricks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick_wall_from_resin_bricks_stonecutting" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_bricks" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick_wall_from_resin_bricks_stonecutting" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/food/cake.json b/data/minecraft/advancement/recipes/food/cake.json index 1eaf9249..beb3219d 100644 --- a/data/minecraft/advancement/recipes/food/cake.json +++ b/data/minecraft/advancement/recipes/food/cake.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "items": "minecraft:egg" + "items": "#minecraft:eggs" } ] }, diff --git a/data/minecraft/advancement/recipes/food/suspicious_stew_from_closed_eyeblossom.json b/data/minecraft/advancement/recipes/food/suspicious_stew_from_closed_eyeblossom.json new file mode 100644 index 00000000..86399a3a --- /dev/null +++ b/data/minecraft/advancement/recipes/food/suspicious_stew_from_closed_eyeblossom.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_closed_eyeblossom": { + "conditions": { + "items": [ + { + "items": "minecraft:closed_eyeblossom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:suspicious_stew_from_closed_eyeblossom" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_closed_eyeblossom" + ] + ], + "rewards": { + "recipes": [ + "minecraft:suspicious_stew_from_closed_eyeblossom" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/food/suspicious_stew_from_open_eyeblossom.json b/data/minecraft/advancement/recipes/food/suspicious_stew_from_open_eyeblossom.json new file mode 100644 index 00000000..54e096cb --- /dev/null +++ b/data/minecraft/advancement/recipes/food/suspicious_stew_from_open_eyeblossom.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_open_eyeblossom": { + "conditions": { + "items": [ + { + "items": "minecraft:open_eyeblossom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:suspicious_stew_from_open_eyeblossom" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_open_eyeblossom" + ] + ], + "rewards": { + "recipes": [ + "minecraft:suspicious_stew_from_open_eyeblossom" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/creaking_heart.json b/data/minecraft/advancement/recipes/misc/creaking_heart.json new file mode 100644 index 00000000..cffc161a --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/creaking_heart.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_block": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_block" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:creaking_heart" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_block" + ] + ], + "rewards": { + "recipes": [ + "minecraft:creaking_heart" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/gray_dye_from_closed_eyeblossom.json b/data/minecraft/advancement/recipes/misc/gray_dye_from_closed_eyeblossom.json new file mode 100644 index 00000000..4b28341d --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/gray_dye_from_closed_eyeblossom.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_closed_eyeblossom": { + "conditions": { + "items": [ + { + "items": "minecraft:closed_eyeblossom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:gray_dye_from_closed_eyeblossom" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_closed_eyeblossom" + ] + ], + "rewards": { + "recipes": [ + "minecraft:gray_dye_from_closed_eyeblossom" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/leaf_litter.json b/data/minecraft/advancement/recipes/misc/leaf_litter.json new file mode 100644 index 00000000..c6b83cb4 --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/leaf_litter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_leaves": { + "conditions": { + "items": [ + { + "items": "#minecraft:leaves" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:leaf_litter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_leaves" + ] + ], + "rewards": { + "recipes": [ + "minecraft:leaf_litter" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/orange_dye_from_open_eyeblossom.json b/data/minecraft/advancement/recipes/misc/orange_dye_from_open_eyeblossom.json new file mode 100644 index 00000000..2183c653 --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/orange_dye_from_open_eyeblossom.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_open_eyeblossom": { + "conditions": { + "items": [ + { + "items": "minecraft:open_eyeblossom" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:orange_dye_from_open_eyeblossom" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_open_eyeblossom" + ] + ], + "rewards": { + "recipes": [ + "minecraft:orange_dye_from_open_eyeblossom" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/pink_dye_from_cactus_flower.json b/data/minecraft/advancement/recipes/misc/pink_dye_from_cactus_flower.json new file mode 100644 index 00000000..37b918ae --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/pink_dye_from_cactus_flower.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cactus_flower": { + "conditions": { + "items": [ + { + "items": "minecraft:cactus_flower" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:pink_dye_from_cactus_flower" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_cactus_flower" + ] + ], + "rewards": { + "recipes": [ + "minecraft:pink_dye_from_cactus_flower" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/resin_brick.json b/data/minecraft/advancement/recipes/misc/resin_brick.json new file mode 100644 index 00000000..1a30bf38 --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/resin_brick.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_clump": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_clump" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_brick" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_clump" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_brick" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/resin_clump.json b/data/minecraft/advancement/recipes/misc/resin_clump.json new file mode 100644 index 00000000..9a5c3895 --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/resin_clump.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_resin_block": { + "conditions": { + "items": [ + { + "items": "minecraft:resin_block" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:resin_clump" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_resin_block" + ] + ], + "rewards": { + "recipes": [ + "minecraft:resin_clump" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/advancement/recipes/misc/yellow_dye_from_wildflowers.json b/data/minecraft/advancement/recipes/misc/yellow_dye_from_wildflowers.json new file mode 100644 index 00000000..872f6c51 --- /dev/null +++ b/data/minecraft/advancement/recipes/misc/yellow_dye_from_wildflowers.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:yellow_dye_from_wildflowers" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "has_wildflowers": { + "conditions": { + "items": [ + { + "items": "minecraft:wildflowers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_wildflowers" + ] + ], + "rewards": { + "recipes": [ + "minecraft:yellow_dye_from_wildflowers" + ] + } +} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_button.json b/data/minecraft/advancement/recipes/redstone/pale_oak_button.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_button.json rename to data/minecraft/advancement/recipes/redstone/pale_oak_button.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_door.json b/data/minecraft/advancement/recipes/redstone/pale_oak_door.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_door.json rename to data/minecraft/advancement/recipes/redstone/pale_oak_door.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_fence_gate.json b/data/minecraft/advancement/recipes/redstone/pale_oak_fence_gate.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_fence_gate.json rename to data/minecraft/advancement/recipes/redstone/pale_oak_fence_gate.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_pressure_plate.json b/data/minecraft/advancement/recipes/redstone/pale_oak_pressure_plate.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_pressure_plate.json rename to data/minecraft/advancement/recipes/redstone/pale_oak_pressure_plate.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_trapdoor.json b/data/minecraft/advancement/recipes/redstone/pale_oak_trapdoor.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/redstone/pale_oak_trapdoor.json rename to data/minecraft/advancement/recipes/redstone/pale_oak_trapdoor.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/transportation/pale_oak_boat.json b/data/minecraft/advancement/recipes/transportation/pale_oak_boat.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/transportation/pale_oak_boat.json rename to data/minecraft/advancement/recipes/transportation/pale_oak_boat.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/transportation/pale_oak_chest_boat.json b/data/minecraft/advancement/recipes/transportation/pale_oak_chest_boat.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/advancement/recipes/transportation/pale_oak_chest_boat.json rename to data/minecraft/advancement/recipes/transportation/pale_oak_chest_boat.json diff --git a/data/minecraft/advancement/story/root.json b/data/minecraft/advancement/story/root.json index 0526a2bf..1be297f6 100644 --- a/data/minecraft/advancement/story/root.json +++ b/data/minecraft/advancement/story/root.json @@ -13,7 +13,7 @@ }, "display": { "announce_to_chat": false, - "background": "minecraft:textures/gui/advancements/backgrounds/stone.png", + "background": "minecraft:gui/advancements/backgrounds/stone", "description": { "translate": "advancements.story.root.description" }, diff --git a/data/minecraft/cat_variant/all_black.json b/data/minecraft/cat_variant/all_black.json new file mode 100644 index 00000000..c4446236 --- /dev/null +++ b/data/minecraft/cat_variant/all_black.json @@ -0,0 +1,21 @@ +{ + "asset_id": "minecraft:entity/cat/all_black", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:structure", + "structures": "#minecraft:cats_spawn_as_black" + }, + "priority": 1 + }, + { + "condition": { + "type": "minecraft:moon_brightness", + "range": { + "min": 0.9 + } + }, + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/black.json b/data/minecraft/cat_variant/black.json new file mode 100644 index 00000000..32f6664a --- /dev/null +++ b/data/minecraft/cat_variant/black.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/black", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/british_shorthair.json b/data/minecraft/cat_variant/british_shorthair.json new file mode 100644 index 00000000..a65e0be1 --- /dev/null +++ b/data/minecraft/cat_variant/british_shorthair.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/british_shorthair", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/calico.json b/data/minecraft/cat_variant/calico.json new file mode 100644 index 00000000..1e8eca7e --- /dev/null +++ b/data/minecraft/cat_variant/calico.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/calico", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/jellie.json b/data/minecraft/cat_variant/jellie.json new file mode 100644 index 00000000..86d9e4a1 --- /dev/null +++ b/data/minecraft/cat_variant/jellie.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/jellie", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/persian.json b/data/minecraft/cat_variant/persian.json new file mode 100644 index 00000000..fa4b3c5b --- /dev/null +++ b/data/minecraft/cat_variant/persian.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/persian", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/ragdoll.json b/data/minecraft/cat_variant/ragdoll.json new file mode 100644 index 00000000..2b98489a --- /dev/null +++ b/data/minecraft/cat_variant/ragdoll.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/ragdoll", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/red.json b/data/minecraft/cat_variant/red.json new file mode 100644 index 00000000..cf2ec42b --- /dev/null +++ b/data/minecraft/cat_variant/red.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/red", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/siamese.json b/data/minecraft/cat_variant/siamese.json new file mode 100644 index 00000000..1449d8b3 --- /dev/null +++ b/data/minecraft/cat_variant/siamese.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/siamese", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/tabby.json b/data/minecraft/cat_variant/tabby.json new file mode 100644 index 00000000..640eeb72 --- /dev/null +++ b/data/minecraft/cat_variant/tabby.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/tabby", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cat_variant/white.json b/data/minecraft/cat_variant/white.json new file mode 100644 index 00000000..ef736feb --- /dev/null +++ b/data/minecraft/cat_variant/white.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cat/white", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/chicken_variant/cold.json b/data/minecraft/chicken_variant/cold.json new file mode 100644 index 00000000..6f259ff7 --- /dev/null +++ b/data/minecraft/chicken_variant/cold.json @@ -0,0 +1,13 @@ +{ + "asset_id": "minecraft:entity/chicken/cold_chicken", + "model": "cold", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_cold_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/chicken_variant/temperate.json b/data/minecraft/chicken_variant/temperate.json new file mode 100644 index 00000000..703a10cf --- /dev/null +++ b/data/minecraft/chicken_variant/temperate.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/chicken/temperate_chicken", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/chicken_variant/warm.json b/data/minecraft/chicken_variant/warm.json new file mode 100644 index 00000000..49fc1c7f --- /dev/null +++ b/data/minecraft/chicken_variant/warm.json @@ -0,0 +1,12 @@ +{ + "asset_id": "minecraft:entity/chicken/warm_chicken", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_warm_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cow_variant/cold.json b/data/minecraft/cow_variant/cold.json new file mode 100644 index 00000000..e5cfffd7 --- /dev/null +++ b/data/minecraft/cow_variant/cold.json @@ -0,0 +1,13 @@ +{ + "asset_id": "minecraft:entity/cow/cold_cow", + "model": "cold", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_cold_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cow_variant/temperate.json b/data/minecraft/cow_variant/temperate.json new file mode 100644 index 00000000..fea2f406 --- /dev/null +++ b/data/minecraft/cow_variant/temperate.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/cow/temperate_cow", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/cow_variant/warm.json b/data/minecraft/cow_variant/warm.json new file mode 100644 index 00000000..67e49298 --- /dev/null +++ b/data/minecraft/cow_variant/warm.json @@ -0,0 +1,13 @@ +{ + "asset_id": "minecraft:entity/cow/warm_cow", + "model": "warm", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_warm_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/datapacks/minecart_improvements/pack.mcmeta b/data/minecraft/datapacks/minecart_improvements/pack.mcmeta index 5aa6ede3..4252c522 100644 --- a/data/minecraft/datapacks/minecart_improvements/pack.mcmeta +++ b/data/minecraft/datapacks/minecart_improvements/pack.mcmeta @@ -8,6 +8,6 @@ "description": { "translate": "dataPack.minecart_improvements.description" }, - "pack_format": 57 + "pack_format": 71 } } \ No newline at end of file diff --git a/data/minecraft/datapacks/redstone_experiments/pack.mcmeta b/data/minecraft/datapacks/redstone_experiments/pack.mcmeta index 10177ea5..7a9a5460 100644 --- a/data/minecraft/datapacks/redstone_experiments/pack.mcmeta +++ b/data/minecraft/datapacks/redstone_experiments/pack.mcmeta @@ -8,6 +8,6 @@ "description": { "translate": "dataPack.redstone_experiments.description" }, - "pack_format": 57 + "pack_format": 71 } } \ No newline at end of file diff --git a/data/minecraft/datapacks/trade_rebalance/pack.mcmeta b/data/minecraft/datapacks/trade_rebalance/pack.mcmeta index 21d85752..67223954 100644 --- a/data/minecraft/datapacks/trade_rebalance/pack.mcmeta +++ b/data/minecraft/datapacks/trade_rebalance/pack.mcmeta @@ -8,6 +8,6 @@ "description": { "translate": "dataPack.trade_rebalance.description" }, - "pack_format": 57 + "pack_format": 71 } } \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/adventuring_time.json b/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/adventuring_time.json deleted file mode 100644 index 5e301dc3..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/adventuring_time.json +++ /dev/null @@ -1,1050 +0,0 @@ -{ - "parent": "minecraft:adventure/sleep_in_bed", - "criteria": { - "minecraft:badlands": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:badlands" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:bamboo_jungle": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:bamboo_jungle" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:beach": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:beach" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:birch_forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:birch_forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:cherry_grove": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:cherry_grove" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:cold_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:cold_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:dark_forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:dark_forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:deep_cold_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:deep_cold_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:deep_dark": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:deep_dark" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:deep_frozen_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:deep_frozen_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:deep_lukewarm_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:deep_lukewarm_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:deep_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:deep_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:desert": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:desert" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:dripstone_caves": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:dripstone_caves" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:eroded_badlands": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:eroded_badlands" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:flower_forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:flower_forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:frozen_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:frozen_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:frozen_peaks": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:frozen_peaks" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:frozen_river": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:frozen_river" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:grove": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:grove" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:ice_spikes": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:ice_spikes" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:jagged_peaks": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:jagged_peaks" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:jungle": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:jungle" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:lukewarm_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:lukewarm_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:lush_caves": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:lush_caves" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:mangrove_swamp": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:mangrove_swamp" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:meadow": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:meadow" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:mushroom_fields": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:mushroom_fields" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:old_growth_birch_forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:old_growth_birch_forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:old_growth_pine_taiga": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:old_growth_pine_taiga" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:old_growth_spruce_taiga": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:old_growth_spruce_taiga" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:pale_garden": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:pale_garden" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:plains": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:plains" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:river": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:river" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:savanna": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:savanna" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:savanna_plateau": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:savanna_plateau" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:snowy_beach": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:snowy_beach" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:snowy_plains": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:snowy_plains" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:snowy_slopes": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:snowy_slopes" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:snowy_taiga": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:snowy_taiga" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:sparse_jungle": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:sparse_jungle" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:stony_peaks": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:stony_peaks" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:stony_shore": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:stony_shore" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:sunflower_plains": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:sunflower_plains" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:swamp": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:swamp" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:taiga": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:taiga" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:warm_ocean": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:warm_ocean" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:windswept_forest": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:windswept_forest" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:windswept_gravelly_hills": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:windswept_gravelly_hills" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:windswept_hills": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:windswept_hills" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:windswept_savanna": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:windswept_savanna" - } - } - } - ] - }, - "trigger": "minecraft:location" - }, - "minecraft:wooded_badlands": { - "conditions": { - "player": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "location": { - "biomes": "minecraft:wooded_badlands" - } - } - } - ] - }, - "trigger": "minecraft:location" - } - }, - "display": { - "description": { - "translate": "advancements.adventure.adventuring_time.description" - }, - "frame": "challenge", - "icon": { - "count": 1, - "id": "minecraft:diamond_boots" - }, - "title": { - "translate": "advancements.adventure.adventuring_time.title" - } - }, - "requirements": [ - [ - "minecraft:mushroom_fields" - ], - [ - "minecraft:deep_frozen_ocean" - ], - [ - "minecraft:frozen_ocean" - ], - [ - "minecraft:deep_cold_ocean" - ], - [ - "minecraft:cold_ocean" - ], - [ - "minecraft:deep_ocean" - ], - [ - "minecraft:ocean" - ], - [ - "minecraft:deep_lukewarm_ocean" - ], - [ - "minecraft:lukewarm_ocean" - ], - [ - "minecraft:warm_ocean" - ], - [ - "minecraft:stony_shore" - ], - [ - "minecraft:swamp" - ], - [ - "minecraft:mangrove_swamp" - ], - [ - "minecraft:snowy_slopes" - ], - [ - "minecraft:snowy_plains" - ], - [ - "minecraft:snowy_beach" - ], - [ - "minecraft:windswept_gravelly_hills" - ], - [ - "minecraft:grove" - ], - [ - "minecraft:windswept_hills" - ], - [ - "minecraft:snowy_taiga" - ], - [ - "minecraft:windswept_forest" - ], - [ - "minecraft:taiga" - ], - [ - "minecraft:plains" - ], - [ - "minecraft:meadow" - ], - [ - "minecraft:beach" - ], - [ - "minecraft:forest" - ], - [ - "minecraft:old_growth_spruce_taiga" - ], - [ - "minecraft:flower_forest" - ], - [ - "minecraft:birch_forest" - ], - [ - "minecraft:dark_forest" - ], - [ - "minecraft:savanna_plateau" - ], - [ - "minecraft:savanna" - ], - [ - "minecraft:jungle" - ], - [ - "minecraft:badlands" - ], - [ - "minecraft:desert" - ], - [ - "minecraft:wooded_badlands" - ], - [ - "minecraft:jagged_peaks" - ], - [ - "minecraft:stony_peaks" - ], - [ - "minecraft:frozen_river" - ], - [ - "minecraft:river" - ], - [ - "minecraft:ice_spikes" - ], - [ - "minecraft:old_growth_pine_taiga" - ], - [ - "minecraft:sunflower_plains" - ], - [ - "minecraft:old_growth_birch_forest" - ], - [ - "minecraft:sparse_jungle" - ], - [ - "minecraft:bamboo_jungle" - ], - [ - "minecraft:eroded_badlands" - ], - [ - "minecraft:windswept_savanna" - ], - [ - "minecraft:cherry_grove" - ], - [ - "minecraft:pale_garden" - ], - [ - "minecraft:frozen_peaks" - ], - [ - "minecraft:dripstone_caves" - ], - [ - "minecraft:lush_caves" - ], - [ - "minecraft:deep_dark" - ] - ], - "rewards": { - "experience": 500 - }, - "sends_telemetry_event": true -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_a_mob.json b/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_a_mob.json deleted file mode 100644 index ba17fb7e..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_a_mob.json +++ /dev/null @@ -1,577 +0,0 @@ -{ - "parent": "minecraft:adventure/root", - "criteria": { - "minecraft:blaze": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:blaze" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:bogged": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:bogged" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:breeze": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:breeze" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:cave_spider": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:cave_spider" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:creaking_transient": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:creaking_transient" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:creeper": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:creeper" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:drowned": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:drowned" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:elder_guardian": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:elder_guardian" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ender_dragon": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ender_dragon" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:enderman": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:enderman" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:endermite": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:endermite" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:evoker": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:evoker" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ghast": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ghast" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:guardian": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:guardian" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:hoglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:hoglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:husk": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:husk" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:magma_cube": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:magma_cube" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:phantom": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:phantom" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:piglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:piglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:piglin_brute": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:piglin_brute" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:pillager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:pillager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ravager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ravager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:shulker": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:shulker" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:silverfish": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:silverfish" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:skeleton": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:skeleton" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:slime": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:slime" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:spider": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:spider" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:stray": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:stray" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:vex": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:vex" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:vindicator": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:vindicator" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:witch": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:witch" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:wither": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:wither" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:wither_skeleton": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:wither_skeleton" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zoglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zoglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombie": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombie" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombie_villager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombie_villager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombified_piglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombified_piglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - } - }, - "display": { - "description": { - "translate": "advancements.adventure.kill_a_mob.description" - }, - "icon": { - "count": 1, - "id": "minecraft:iron_sword" - }, - "title": { - "translate": "advancements.adventure.kill_a_mob.title" - } - }, - "requirements": [ - [ - "minecraft:blaze", - "minecraft:bogged", - "minecraft:breeze", - "minecraft:cave_spider", - "minecraft:creeper", - "minecraft:drowned", - "minecraft:elder_guardian", - "minecraft:ender_dragon", - "minecraft:enderman", - "minecraft:endermite", - "minecraft:evoker", - "minecraft:ghast", - "minecraft:guardian", - "minecraft:hoglin", - "minecraft:husk", - "minecraft:magma_cube", - "minecraft:phantom", - "minecraft:piglin", - "minecraft:piglin_brute", - "minecraft:pillager", - "minecraft:ravager", - "minecraft:shulker", - "minecraft:silverfish", - "minecraft:skeleton", - "minecraft:slime", - "minecraft:spider", - "minecraft:stray", - "minecraft:vex", - "minecraft:vindicator", - "minecraft:witch", - "minecraft:wither_skeleton", - "minecraft:wither", - "minecraft:zoglin", - "minecraft:zombie_villager", - "minecraft:zombie", - "minecraft:zombified_piglin", - "minecraft:creaking_transient" - ] - ], - "sends_telemetry_event": true -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_all_mobs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_all_mobs.json deleted file mode 100644 index a4ab20a9..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/advancement/adventure/kill_all_mobs.json +++ /dev/null @@ -1,653 +0,0 @@ -{ - "parent": "minecraft:adventure/kill_a_mob", - "criteria": { - "minecraft:blaze": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:blaze" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:bogged": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:bogged" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:breeze": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:breeze" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:cave_spider": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:cave_spider" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:creaking_transient": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:creaking_transient" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:creeper": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:creeper" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:drowned": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:drowned" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:elder_guardian": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:elder_guardian" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ender_dragon": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ender_dragon" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:enderman": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:enderman" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:endermite": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:endermite" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:evoker": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:evoker" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ghast": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ghast" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:guardian": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:guardian" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:hoglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:hoglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:husk": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:husk" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:magma_cube": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:magma_cube" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:phantom": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:phantom" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:piglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:piglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:piglin_brute": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:piglin_brute" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:pillager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:pillager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:ravager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:ravager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:shulker": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:shulker" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:silverfish": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:silverfish" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:skeleton": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:skeleton" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:slime": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:slime" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:spider": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:spider" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:stray": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:stray" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:vex": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:vex" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:vindicator": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:vindicator" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:witch": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:witch" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:wither": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:wither" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:wither_skeleton": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:wither_skeleton" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zoglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zoglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombie": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombie" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombie_villager": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombie_villager" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - }, - "minecraft:zombified_piglin": { - "conditions": { - "entity": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "type": "minecraft:zombified_piglin" - } - } - ] - }, - "trigger": "minecraft:player_killed_entity" - } - }, - "display": { - "description": { - "translate": "advancements.adventure.kill_all_mobs.description" - }, - "frame": "challenge", - "icon": { - "count": 1, - "id": "minecraft:diamond_sword" - }, - "title": { - "translate": "advancements.adventure.kill_all_mobs.title" - } - }, - "requirements": [ - [ - "minecraft:blaze" - ], - [ - "minecraft:bogged" - ], - [ - "minecraft:breeze" - ], - [ - "minecraft:cave_spider" - ], - [ - "minecraft:creeper" - ], - [ - "minecraft:drowned" - ], - [ - "minecraft:elder_guardian" - ], - [ - "minecraft:ender_dragon" - ], - [ - "minecraft:enderman" - ], - [ - "minecraft:endermite" - ], - [ - "minecraft:evoker" - ], - [ - "minecraft:ghast" - ], - [ - "minecraft:guardian" - ], - [ - "minecraft:hoglin" - ], - [ - "minecraft:husk" - ], - [ - "minecraft:magma_cube" - ], - [ - "minecraft:phantom" - ], - [ - "minecraft:piglin" - ], - [ - "minecraft:piglin_brute" - ], - [ - "minecraft:pillager" - ], - [ - "minecraft:ravager" - ], - [ - "minecraft:shulker" - ], - [ - "minecraft:silverfish" - ], - [ - "minecraft:skeleton" - ], - [ - "minecraft:slime" - ], - [ - "minecraft:spider" - ], - [ - "minecraft:stray" - ], - [ - "minecraft:vex" - ], - [ - "minecraft:vindicator" - ], - [ - "minecraft:witch" - ], - [ - "minecraft:wither_skeleton" - ], - [ - "minecraft:wither" - ], - [ - "minecraft:zoglin" - ], - [ - "minecraft:zombie_villager" - ], - [ - "minecraft:zombie" - ], - [ - "minecraft:zombified_piglin" - ], - [ - "minecraft:creaking_transient" - ] - ], - "rewards": { - "experience": 100 - }, - "sends_telemetry_event": true -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/creaking_heart.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/creaking_heart.json deleted file mode 100644 index 0cd62c71..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/creaking_heart.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "predicates": { - "minecraft:enchantments": [ - { - "enchantments": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:creaking_heart" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/creaking_heart" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_hanging_moss.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_hanging_moss.json deleted file mode 100644 index 6f06ee04..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_hanging_moss.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:any_of", - "terms": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "items": "minecraft:shears" - } - }, - { - "condition": "minecraft:match_tool", - "predicate": { - "predicates": { - "minecraft:enchantments": [ - { - "enchantments": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - } - ] - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_hanging_moss" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_hanging_moss" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_block.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_block.json deleted file mode 100644 index 8a535930..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_block.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_moss_block" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_moss_block" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_carpet.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_carpet.json deleted file mode 100644 index 609106a6..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_moss_carpet.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:item", - "conditions": [ - { - "block": "minecraft:pale_moss_carpet", - "condition": "minecraft:block_state_property", - "properties": { - "bottom": "true" - } - } - ], - "functions": [ - { - "function": "minecraft:explosion_decay" - } - ], - "name": "minecraft:pale_moss_carpet" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_moss_carpet" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_button.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_button.json deleted file mode 100644 index 3782634d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_button.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_button" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_button" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_door.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_door.json deleted file mode 100644 index e54f21a6..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_door.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "conditions": [ - { - "block": "minecraft:pale_oak_door", - "condition": "minecraft:block_state_property", - "properties": { - "half": "lower" - } - } - ], - "name": "minecraft:pale_oak_door" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_door" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence.json deleted file mode 100644 index 443e0156..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_fence" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_fence" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json deleted file mode 100644 index 7614cd5c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_fence_gate" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_fence_gate" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json deleted file mode 100644 index 93f5c08e..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_hanging_sign" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_hanging_sign" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_leaves.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_leaves.json deleted file mode 100644 index 1122938a..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_leaves.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "conditions": [ - { - "condition": "minecraft:any_of", - "terms": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "items": "minecraft:shears" - } - }, - { - "condition": "minecraft:match_tool", - "predicate": { - "predicates": { - "minecraft:enchantments": [ - { - "enchantments": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - } - ] - } - ], - "name": "minecraft:pale_oak_leaves" - }, - { - "type": "minecraft:item", - "conditions": [ - { - "condition": "minecraft:survives_explosion" - }, - { - "chances": [ - 0.05, - 0.0625, - 0.083333336, - 0.1 - ], - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune" - } - ], - "name": "minecraft:pale_oak_sapling" - } - ] - } - ], - "rolls": 1.0 - }, - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:inverted", - "term": { - "condition": "minecraft:any_of", - "terms": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "items": "minecraft:shears" - } - }, - { - "condition": "minecraft:match_tool", - "predicate": { - "predicates": { - "minecraft:enchantments": [ - { - "enchantments": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - } - ] - } - } - ], - "entries": [ - { - "type": "minecraft:item", - "conditions": [ - { - "chances": [ - 0.02, - 0.022222223, - 0.025, - 0.033333335, - 0.1 - ], - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune" - } - ], - "functions": [ - { - "add": false, - "count": { - "type": "minecraft:uniform", - "max": 2.0, - "min": 1.0 - }, - "function": "minecraft:set_count" - }, - { - "function": "minecraft:explosion_decay" - } - ], - "name": "minecraft:stick" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_leaves" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_log.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_log.json deleted file mode 100644 index 4dc2e078..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_log.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_log" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_log" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_planks.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_planks.json deleted file mode 100644 index 0097b5e0..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_planks.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_planks" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_planks" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json deleted file mode 100644 index 45f4fc49..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_pressure_plate" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_pressure_plate" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sapling.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sapling.json deleted file mode 100644 index 960d922b..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sapling.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_sapling" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_sapling" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sign.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sign.json deleted file mode 100644 index d46ce7a9..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_sign.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_sign" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_sign" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_slab.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_slab.json deleted file mode 100644 index 6170569b..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_slab.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "entries": [ - { - "type": "minecraft:item", - "functions": [ - { - "add": false, - "conditions": [ - { - "block": "minecraft:pale_oak_slab", - "condition": "minecraft:block_state_property", - "properties": { - "type": "double" - } - } - ], - "count": 2.0, - "function": "minecraft:set_count" - }, - { - "function": "minecraft:explosion_decay" - } - ], - "name": "minecraft:pale_oak_slab" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_slab" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_stairs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_stairs.json deleted file mode 100644 index d64c5bf7..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_stairs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_stairs" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_stairs" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json deleted file mode 100644 index 9acb6ce1..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_trapdoor" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_trapdoor" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_wood.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_wood.json deleted file mode 100644 index 128fc986..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/pale_oak_wood.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_wood" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/pale_oak_wood" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json deleted file mode 100644 index 7ebed877..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:flower_pot" - } - ], - "rolls": 1.0 - }, - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:pale_oak_sapling" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/potted_pale_oak_sapling" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json deleted file mode 100644 index 5254c198..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stripped_pale_oak_log" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/stripped_pale_oak_log" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json b/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json deleted file mode 100644 index ac053b60..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "bonus_rolls": 0.0, - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], - "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stripped_pale_oak_wood" - } - ], - "rolls": 1.0 - } - ], - "random_sequence": "minecraft:blocks/stripped_pale_oak_wood" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/ceiling_hanging_signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/ceiling_hanging_signs.json deleted file mode 100644 index b446dbd0..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/ceiling_hanging_signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_hanging_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/combination_step_sound_blocks.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/combination_step_sound_blocks.json deleted file mode 100644 index be02e6ad..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/combination_step_sound_blocks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_moss_carpet" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/dirt.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/dirt.json deleted file mode 100644 index 39ea165c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/dirt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_moss_block" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/fence_gates.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/fence_gates.json deleted file mode 100644 index 3ff6469d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/fence_gates.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_fence_gate" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/flower_pots.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/flower_pots.json deleted file mode 100644 index 28754e83..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/flower_pots.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:potted_pale_oak_sapling" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/leaves.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/leaves.json deleted file mode 100644 index 8eee584d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/leaves.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_leaves" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/logs_that_burn.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/logs_that_burn.json deleted file mode 100644 index 9729f24d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/logs_that_burn.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "#minecraft:pale_oak_logs" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/axe.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/axe.json deleted file mode 100644 index 7c0cd811..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/axe.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:creaking_heart" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/hoe.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/hoe.json deleted file mode 100644 index fb91ba32..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/mineable/hoe.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_leaves", - "minecraft:pale_moss_block", - "minecraft:pale_moss_carpet" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/overworld_natural_logs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/overworld_natural_logs.json deleted file mode 100644 index 50f65eb8..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/overworld_natural_logs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_log" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/planks.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/planks.json deleted file mode 100644 index 8091821d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/planks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_planks" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/saplings.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/saplings.json deleted file mode 100644 index caa562a2..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/saplings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_sapling" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/standing_signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/standing_signs.json deleted file mode 100644 index 2721611a..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/standing_signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/sword_efficient.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/sword_efficient.json deleted file mode 100644 index be02e6ad..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/sword_efficient.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_moss_carpet" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_hanging_signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_hanging_signs.json deleted file mode 100644 index f4a00a9f..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_hanging_signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_wall_hanging_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_signs.json deleted file mode 100644 index 37546445..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wall_signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_wall_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_buttons.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_buttons.json deleted file mode 100644 index 5bbbea72..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_buttons.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_button" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_doors.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_doors.json deleted file mode 100644 index 17036482..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_doors.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_door" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_fences.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_fences.json deleted file mode 100644 index 4010b73a..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_fences.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_fence" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_pressure_plates.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_pressure_plates.json deleted file mode 100644 index 057d1bbc..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_pressure_plates.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_pressure_plate" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_slabs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_slabs.json deleted file mode 100644 index 5542b1d4..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_slabs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_slab" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_stairs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_stairs.json deleted file mode 100644 index 009f67b7..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_stairs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_stairs" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_trapdoors.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_trapdoors.json deleted file mode 100644 index cc39955f..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/wooden_trapdoors.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_trapdoor" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/entity_type/boat.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/entity_type/boat.json deleted file mode 100644 index 78a3ec94..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/entity_type/boat.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_boat" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/boats.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/boats.json deleted file mode 100644 index 78a3ec94..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/boats.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_boat" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/chest_boats.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/chest_boats.json deleted file mode 100644 index 8b94bd21..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/chest_boats.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_chest_boat" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/dirt.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/dirt.json deleted file mode 100644 index 39ea165c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/dirt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_moss_block" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/fence_gates.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/fence_gates.json deleted file mode 100644 index 3ff6469d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/fence_gates.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_fence_gate" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/hanging_signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/hanging_signs.json deleted file mode 100644 index b446dbd0..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/hanging_signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_hanging_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/leaves.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/leaves.json deleted file mode 100644 index 8eee584d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/leaves.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_leaves" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/logs_that_burn.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/logs_that_burn.json deleted file mode 100644 index 9729f24d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/logs_that_burn.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "#minecraft:pale_oak_logs" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/planks.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/planks.json deleted file mode 100644 index 8091821d..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/planks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_planks" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/saplings.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/saplings.json deleted file mode 100644 index caa562a2..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/saplings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_sapling" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/signs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/signs.json deleted file mode 100644 index 2721611a..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/signs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_sign" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_buttons.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_buttons.json deleted file mode 100644 index 5bbbea72..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_buttons.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_button" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_doors.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_doors.json deleted file mode 100644 index 17036482..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_doors.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_door" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_fences.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_fences.json deleted file mode 100644 index 4010b73a..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_fences.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_fence" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_pressure_plates.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_pressure_plates.json deleted file mode 100644 index 057d1bbc..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_pressure_plates.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_pressure_plate" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_slabs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_slabs.json deleted file mode 100644 index 5542b1d4..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_slabs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_slab" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_stairs.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_stairs.json deleted file mode 100644 index 009f67b7..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_stairs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_stairs" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_trapdoors.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_trapdoors.json deleted file mode 100644 index cc39955f..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/wooden_trapdoors.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_oak_trapdoor" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json deleted file mode 100644 index 16abb77c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_garden" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_forest.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_forest.json deleted file mode 100644 index 16abb77c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_forest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_garden" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_overworld.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_overworld.json deleted file mode 100644 index 16abb77c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/is_overworld.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_garden" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json b/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json deleted file mode 100644 index 16abb77c..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "minecraft:pale_garden" - ] -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/multi_noise_biome_source_parameter_list/overworld.json b/data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/multi_noise_biome_source_parameter_list/overworld.json deleted file mode 100644 index 4acb5d56..00000000 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/multi_noise_biome_source_parameter_list/overworld.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "minecraft:overworld_winter_drop" -} \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/pack.mcmeta b/data/minecraft/datapacks/winter_drop/pack.mcmeta deleted file mode 100644 index cec534b4..00000000 --- a/data/minecraft/datapacks/winter_drop/pack.mcmeta +++ /dev/null @@ -1,13 +0,0 @@ -{ - "features": { - "enabled": [ - "minecraft:winter_drop" - ] - }, - "pack": { - "description": { - "translate": "dataPack.winter_drop.description" - }, - "pack_format": 57 - } -} \ No newline at end of file diff --git a/data/minecraft/enchantment/frost_walker.json b/data/minecraft/enchantment/frost_walker.json index d4313f5e..5bd83b7f 100644 --- a/data/minecraft/enchantment/frost_walker.json +++ b/data/minecraft/enchantment/frost_walker.json @@ -81,13 +81,28 @@ "trigger_game_event": "minecraft:block_place" }, "requirements": { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "flags": { - "is_on_ground": true + "condition": "minecraft:all_of", + "terms": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "flags": { + "is_on_ground": true + } + } + }, + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "vehicle": {} + } + } } - } + ] } } ] diff --git a/data/minecraft/enchantment/power.json b/data/minecraft/enchantment/power.json index 9f86f0e6..145936c2 100644 --- a/data/minecraft/enchantment/power.json +++ b/data/minecraft/enchantment/power.json @@ -10,7 +10,7 @@ "type": "minecraft:add", "value": { "type": "minecraft:linear", - "base": 0.5, + "base": 1.0, "per_level_above_first": 0.5 } }, diff --git a/data/minecraft/frog_variant/cold.json b/data/minecraft/frog_variant/cold.json new file mode 100644 index 00000000..b38ca55f --- /dev/null +++ b/data/minecraft/frog_variant/cold.json @@ -0,0 +1,12 @@ +{ + "asset_id": "minecraft:entity/frog/cold_frog", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_cold_variant_frogs" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/frog_variant/temperate.json b/data/minecraft/frog_variant/temperate.json new file mode 100644 index 00000000..0211c65d --- /dev/null +++ b/data/minecraft/frog_variant/temperate.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/frog/temperate_frog", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/frog_variant/warm.json b/data/minecraft/frog_variant/warm.json new file mode 100644 index 00000000..40c8adec --- /dev/null +++ b/data/minecraft/frog_variant/warm.json @@ -0,0 +1,12 @@ +{ + "asset_id": "minecraft:entity/frog/warm_frog", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_warm_variant_frogs" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/black_banner.json b/data/minecraft/loot_table/blocks/black_banner.json index 58bb186e..e4e07eaa 100644 --- a/data/minecraft/loot_table/blocks/black_banner.json +++ b/data/minecraft/loot_table/blocks/black_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/blue_banner.json b/data/minecraft/loot_table/blocks/blue_banner.json index c5579a8a..1afc9d7f 100644 --- a/data/minecraft/loot_table/blocks/blue_banner.json +++ b/data/minecraft/loot_table/blocks/blue_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/brown_banner.json b/data/minecraft/loot_table/blocks/brown_banner.json index 36beb1fc..77eee1c6 100644 --- a/data/minecraft/loot_table/blocks/brown_banner.json +++ b/data/minecraft/loot_table/blocks/brown_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/bush.json b/data/minecraft/loot_table/blocks/bush.json new file mode 100644 index 00000000..7c465247 --- /dev/null +++ b/data/minecraft/loot_table/blocks/bush.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:bush" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/bush" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/cactus_flower.json b/data/minecraft/loot_table/blocks/cactus_flower.json new file mode 100644 index 00000000..087ade13 --- /dev/null +++ b/data/minecraft/loot_table/blocks/cactus_flower.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:cactus_flower" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/cactus_flower" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/chiseled_resin_bricks.json b/data/minecraft/loot_table/blocks/chiseled_resin_bricks.json new file mode 100644 index 00000000..10f6ba15 --- /dev/null +++ b/data/minecraft/loot_table/blocks/chiseled_resin_bricks.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:chiseled_resin_bricks" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/chiseled_resin_bricks" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/closed_eyeblossom.json b/data/minecraft/loot_table/blocks/closed_eyeblossom.json new file mode 100644 index 00000000..a15cac59 --- /dev/null +++ b/data/minecraft/loot_table/blocks/closed_eyeblossom.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:closed_eyeblossom" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/closed_eyeblossom" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/creaking_heart.json b/data/minecraft/loot_table/blocks/creaking_heart.json index 3190c9a3..69ec1a69 100644 --- a/data/minecraft/loot_table/blocks/creaking_heart.json +++ b/data/minecraft/loot_table/blocks/creaking_heart.json @@ -1,4 +1,70 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ], + "name": "minecraft:creaking_heart" + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + }, + { + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "function": "minecraft:apply_bonus", + "parameters": { + "bonusMultiplier": 1 + } + }, + { + "function": "minecraft:limit_count", + "limit": { + "max": 9.0 + } + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:resin_clump" + } + ] + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/creaking_heart" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/cyan_banner.json b/data/minecraft/loot_table/blocks/cyan_banner.json index 45c30619..8e063f58 100644 --- a/data/minecraft/loot_table/blocks/cyan_banner.json +++ b/data/minecraft/loot_table/blocks/cyan_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/firefly_bush.json b/data/minecraft/loot_table/blocks/firefly_bush.json new file mode 100644 index 00000000..d0b166e7 --- /dev/null +++ b/data/minecraft/loot_table/blocks/firefly_bush.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:firefly_bush" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/firefly_bush" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/gray_banner.json b/data/minecraft/loot_table/blocks/gray_banner.json index bde4a17a..5aad6ec0 100644 --- a/data/minecraft/loot_table/blocks/gray_banner.json +++ b/data/minecraft/loot_table/blocks/gray_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/green_banner.json b/data/minecraft/loot_table/blocks/green_banner.json index f58d0453..ae4f34d9 100644 --- a/data/minecraft/loot_table/blocks/green_banner.json +++ b/data/minecraft/loot_table/blocks/green_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/leaf_litter.json b/data/minecraft/loot_table/blocks/leaf_litter.json new file mode 100644 index 00000000..20da2508 --- /dev/null +++ b/data/minecraft/loot_table/blocks/leaf_litter.json @@ -0,0 +1,77 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "conditions": [ + { + "block": "minecraft:leaf_litter", + "condition": "minecraft:block_state_property", + "properties": { + "segment_amount": "1" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:leaf_litter", + "condition": "minecraft:block_state_property", + "properties": { + "segment_amount": "2" + } + } + ], + "count": 2.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:leaf_litter", + "condition": "minecraft:block_state_property", + "properties": { + "segment_amount": "3" + } + } + ], + "count": 3.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:leaf_litter", + "condition": "minecraft:block_state_property", + "properties": { + "segment_amount": "4" + } + } + ], + "count": 4.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:leaf_litter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/leaf_litter" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/light_blue_banner.json b/data/minecraft/loot_table/blocks/light_blue_banner.json index 0c56fa54..457eb95d 100644 --- a/data/minecraft/loot_table/blocks/light_blue_banner.json +++ b/data/minecraft/loot_table/blocks/light_blue_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/light_gray_banner.json b/data/minecraft/loot_table/blocks/light_gray_banner.json index 9ca07510..c03d0d55 100644 --- a/data/minecraft/loot_table/blocks/light_gray_banner.json +++ b/data/minecraft/loot_table/blocks/light_gray_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/lime_banner.json b/data/minecraft/loot_table/blocks/lime_banner.json index 22be4355..5824e8b3 100644 --- a/data/minecraft/loot_table/blocks/lime_banner.json +++ b/data/minecraft/loot_table/blocks/lime_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/magenta_banner.json b/data/minecraft/loot_table/blocks/magenta_banner.json index 3c293a83..458a4fe0 100644 --- a/data/minecraft/loot_table/blocks/magenta_banner.json +++ b/data/minecraft/loot_table/blocks/magenta_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/open_eyeblossom.json b/data/minecraft/loot_table/blocks/open_eyeblossom.json new file mode 100644 index 00000000..7f02f9e1 --- /dev/null +++ b/data/minecraft/loot_table/blocks/open_eyeblossom.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:open_eyeblossom" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/open_eyeblossom" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/orange_banner.json b/data/minecraft/loot_table/blocks/orange_banner.json index d47a7827..4f1d0b77 100644 --- a/data/minecraft/loot_table/blocks/orange_banner.json +++ b/data/minecraft/loot_table/blocks/orange_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/pale_hanging_moss.json b/data/minecraft/loot_table/blocks/pale_hanging_moss.json index 34df4809..6f06ee04 100644 --- a/data/minecraft/loot_table/blocks/pale_hanging_moss.json +++ b/data/minecraft/loot_table/blocks/pale_hanging_moss.json @@ -1,4 +1,44 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_hanging_moss" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_hanging_moss" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_moss_block.json b/data/minecraft/loot_table/blocks/pale_moss_block.json index 2c6c2985..8a535930 100644 --- a/data/minecraft/loot_table/blocks/pale_moss_block.json +++ b/data/minecraft/loot_table/blocks/pale_moss_block.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_moss_block" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_moss_block" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_moss_carpet.json b/data/minecraft/loot_table/blocks/pale_moss_carpet.json index 11c440e7..609106a6 100644 --- a/data/minecraft/loot_table/blocks/pale_moss_carpet.json +++ b/data/minecraft/loot_table/blocks/pale_moss_carpet.json @@ -1,4 +1,30 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "block": "minecraft:pale_moss_carpet", + "condition": "minecraft:block_state_property", + "properties": { + "bottom": "true" + } + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:pale_moss_carpet" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_moss_carpet" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_button.json b/data/minecraft/loot_table/blocks/pale_oak_button.json index d74e70b3..3782634d 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_button.json +++ b/data/minecraft/loot_table/blocks/pale_oak_button.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_button" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_button" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_door.json b/data/minecraft/loot_table/blocks/pale_oak_door.json index b5c2c624..e54f21a6 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_door.json +++ b/data/minecraft/loot_table/blocks/pale_oak_door.json @@ -1,4 +1,30 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "block": "minecraft:pale_oak_door", + "condition": "minecraft:block_state_property", + "properties": { + "half": "lower" + } + } + ], + "name": "minecraft:pale_oak_door" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_door" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_fence.json b/data/minecraft/loot_table/blocks/pale_oak_fence.json index d4c2b074..443e0156 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_fence.json +++ b/data/minecraft/loot_table/blocks/pale_oak_fence.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_fence" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_fence" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json b/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json index 97468de5..7614cd5c 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json +++ b/data/minecraft/loot_table/blocks/pale_oak_fence_gate.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_fence_gate" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_fence_gate" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json b/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json index 5d01eff3..93f5c08e 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json +++ b/data/minecraft/loot_table/blocks/pale_oak_hanging_sign.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_hanging_sign" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_hanging_sign" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_leaves.json b/data/minecraft/loot_table/blocks/pale_oak_leaves.json index f5d266df..1122938a 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_leaves.json +++ b/data/minecraft/loot_table/blocks/pale_oak_leaves.json @@ -1,4 +1,136 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + ], + "name": "minecraft:pale_oak_leaves" + }, + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:survives_explosion" + }, + { + "chances": [ + 0.05, + 0.0625, + 0.083333336, + 0.1 + ], + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune" + } + ], + "name": "minecraft:pale_oak_sapling" + } + ] + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "chances": [ + 0.02, + 0.022222223, + 0.025, + 0.033333335, + 0.1 + ], + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune" + } + ], + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:stick" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_leaves" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_log.json b/data/minecraft/loot_table/blocks/pale_oak_log.json index d6dda4c7..4dc2e078 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_log.json +++ b/data/minecraft/loot_table/blocks/pale_oak_log.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_log" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_log" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_planks.json b/data/minecraft/loot_table/blocks/pale_oak_planks.json index 4bdf975a..0097b5e0 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_planks.json +++ b/data/minecraft/loot_table/blocks/pale_oak_planks.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_planks" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_planks" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json b/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json index 0868ed08..45f4fc49 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json +++ b/data/minecraft/loot_table/blocks/pale_oak_pressure_plate.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_pressure_plate" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_pressure_plate" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_sapling.json b/data/minecraft/loot_table/blocks/pale_oak_sapling.json index 6f40b964..960d922b 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_sapling.json +++ b/data/minecraft/loot_table/blocks/pale_oak_sapling.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_sapling" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_sapling" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_sign.json b/data/minecraft/loot_table/blocks/pale_oak_sign.json index 8ba6344a..d46ce7a9 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_sign.json +++ b/data/minecraft/loot_table/blocks/pale_oak_sign.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_sign" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_sign" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_slab.json b/data/minecraft/loot_table/blocks/pale_oak_slab.json index 4face22d..6170569b 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_slab.json +++ b/data/minecraft/loot_table/blocks/pale_oak_slab.json @@ -1,4 +1,35 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "conditions": [ + { + "block": "minecraft:pale_oak_slab", + "condition": "minecraft:block_state_property", + "properties": { + "type": "double" + } + } + ], + "count": 2.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:pale_oak_slab" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_slab" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_stairs.json b/data/minecraft/loot_table/blocks/pale_oak_stairs.json index 8fc8cc65..d64c5bf7 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_stairs.json +++ b/data/minecraft/loot_table/blocks/pale_oak_stairs.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_stairs" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_stairs" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json b/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json index 048ff598..9acb6ce1 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json +++ b/data/minecraft/loot_table/blocks/pale_oak_trapdoor.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_trapdoor" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_trapdoor" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pale_oak_wood.json b/data/minecraft/loot_table/blocks/pale_oak_wood.json index 487d4bd8..128fc986 100644 --- a/data/minecraft/loot_table/blocks/pale_oak_wood.json +++ b/data/minecraft/loot_table/blocks/pale_oak_wood.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_wood" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/pale_oak_wood" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/pink_banner.json b/data/minecraft/loot_table/blocks/pink_banner.json index 6d5c95c4..c46b2b28 100644 --- a/data/minecraft/loot_table/blocks/pink_banner.json +++ b/data/minecraft/loot_table/blocks/pink_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/potted_closed_eyeblossom.json b/data/minecraft/loot_table/blocks/potted_closed_eyeblossom.json new file mode 100644 index 00000000..2e7f5160 --- /dev/null +++ b/data/minecraft/loot_table/blocks/potted_closed_eyeblossom.json @@ -0,0 +1,36 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:flower_pot" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:closed_eyeblossom" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/potted_closed_eyeblossom" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/potted_open_eyeblossom.json b/data/minecraft/loot_table/blocks/potted_open_eyeblossom.json new file mode 100644 index 00000000..5b2e9d07 --- /dev/null +++ b/data/minecraft/loot_table/blocks/potted_open_eyeblossom.json @@ -0,0 +1,36 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:flower_pot" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:open_eyeblossom" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/potted_open_eyeblossom" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json b/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json index 23fb62c3..7ebed877 100644 --- a/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json +++ b/data/minecraft/loot_table/blocks/potted_pale_oak_sapling.json @@ -1,4 +1,36 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:flower_pot" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:pale_oak_sapling" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/potted_pale_oak_sapling" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/purple_banner.json b/data/minecraft/loot_table/blocks/purple_banner.json index e0d11afb..6435da02 100644 --- a/data/minecraft/loot_table/blocks/purple_banner.json +++ b/data/minecraft/loot_table/blocks/purple_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/red_banner.json b/data/minecraft/loot_table/blocks/red_banner.json index dcc1323c..9cd58ad2 100644 --- a/data/minecraft/loot_table/blocks/red_banner.json +++ b/data/minecraft/loot_table/blocks/red_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/resin_block.json b/data/minecraft/loot_table/blocks/resin_block.json new file mode 100644 index 00000000..aff47617 --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_block.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:resin_block" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_block" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/resin_brick_slab.json b/data/minecraft/loot_table/blocks/resin_brick_slab.json new file mode 100644 index 00000000..7b85e6d6 --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_brick_slab.json @@ -0,0 +1,35 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "conditions": [ + { + "block": "minecraft:resin_brick_slab", + "condition": "minecraft:block_state_property", + "properties": { + "type": "double" + } + } + ], + "count": 2.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:resin_brick_slab" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_brick_slab" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/resin_brick_stairs.json b/data/minecraft/loot_table/blocks/resin_brick_stairs.json new file mode 100644 index 00000000..45cac065 --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_brick_stairs.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:resin_brick_stairs" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_brick_stairs" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/resin_brick_wall.json b/data/minecraft/loot_table/blocks/resin_brick_wall.json new file mode 100644 index 00000000..8624725a --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_brick_wall.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:resin_brick_wall" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_brick_wall" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/resin_bricks.json b/data/minecraft/loot_table/blocks/resin_bricks.json new file mode 100644 index 00000000..10fb8963 --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_bricks.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:resin_bricks" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_bricks" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/resin_clump.json b/data/minecraft/loot_table/blocks/resin_clump.json new file mode 100644 index 00000000..d2f4b6f8 --- /dev/null +++ b/data/minecraft/loot_table/blocks/resin_clump.json @@ -0,0 +1,110 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "down": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "up": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "north": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "south": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "west": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "minecraft:resin_clump", + "condition": "minecraft:block_state_property", + "properties": { + "east": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "count": -1.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:resin_clump" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/resin_clump" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/short_dry_grass.json b/data/minecraft/loot_table/blocks/short_dry_grass.json new file mode 100644 index 00000000..e19e59db --- /dev/null +++ b/data/minecraft/loot_table/blocks/short_dry_grass.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:short_dry_grass" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/short_dry_grass" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json b/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json index 4dc6cf4a..5254c198 100644 --- a/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json +++ b/data/minecraft/loot_table/blocks/stripped_pale_oak_log.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stripped_pale_oak_log" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/stripped_pale_oak_log" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json b/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json index ff80a591..ac053b60 100644 --- a/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json +++ b/data/minecraft/loot_table/blocks/stripped_pale_oak_wood.json @@ -1,4 +1,21 @@ { "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stripped_pale_oak_wood" + } + ], + "rolls": 1.0 + } + ], "random_sequence": "minecraft:blocks/stripped_pale_oak_wood" } \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/tall_dry_grass.json b/data/minecraft/loot_table/blocks/tall_dry_grass.json new file mode 100644 index 00000000..7055b9e3 --- /dev/null +++ b/data/minecraft/loot_table/blocks/tall_dry_grass.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:tall_dry_grass" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/tall_dry_grass" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/white_banner.json b/data/minecraft/loot_table/blocks/white_banner.json index f6f334c2..d6b17c66 100644 --- a/data/minecraft/loot_table/blocks/white_banner.json +++ b/data/minecraft/loot_table/blocks/white_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/blocks/wildflowers.json b/data/minecraft/loot_table/blocks/wildflowers.json new file mode 100644 index 00000000..69787c38 --- /dev/null +++ b/data/minecraft/loot_table/blocks/wildflowers.json @@ -0,0 +1,77 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "conditions": [ + { + "block": "minecraft:wildflowers", + "condition": "minecraft:block_state_property", + "properties": { + "flower_amount": "1" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:wildflowers", + "condition": "minecraft:block_state_property", + "properties": { + "flower_amount": "2" + } + } + ], + "count": 2.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:wildflowers", + "condition": "minecraft:block_state_property", + "properties": { + "flower_amount": "3" + } + } + ], + "count": 3.0, + "function": "minecraft:set_count" + }, + { + "add": false, + "conditions": [ + { + "block": "minecraft:wildflowers", + "condition": "minecraft:block_state_property", + "properties": { + "flower_amount": "4" + } + } + ], + "count": 4.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:wildflowers" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/wildflowers" +} \ No newline at end of file diff --git a/data/minecraft/loot_table/blocks/yellow_banner.json b/data/minecraft/loot_table/blocks/yellow_banner.json index 7db122bd..9b36ed28 100644 --- a/data/minecraft/loot_table/blocks/yellow_banner.json +++ b/data/minecraft/loot_table/blocks/yellow_banner.json @@ -17,7 +17,7 @@ "include": [ "minecraft:custom_name", "minecraft:item_name", - "minecraft:hide_additional_tooltip", + "minecraft:tooltip_display", "minecraft:banner_patterns", "minecraft:rarity" ], diff --git a/data/minecraft/loot_table/chests/ruined_portal.json b/data/minecraft/loot_table/chests/ruined_portal.json index f2070e3b..671ecb07 100644 --- a/data/minecraft/loot_table/chests/ruined_portal.json +++ b/data/minecraft/loot_table/chests/ruined_portal.json @@ -274,6 +274,31 @@ "max": 8.0, "min": 4.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:empty" + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:lodestone", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/ruined_portal" diff --git a/data/minecraft/loot_table/chests/village/village_cartographer.json b/data/minecraft/loot_table/chests/village/village_cartographer.json index a13fa35c..06a3d7b8 100644 --- a/data/minecraft/loot_table/chests/village/village_cartographer.json +++ b/data/minecraft/loot_table/chests/village/village_cartographer.json @@ -79,6 +79,27 @@ "max": 5.0, "min": 1.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_cartographer" diff --git a/data/minecraft/loot_table/chests/village/village_desert_house.json b/data/minecraft/loot_table/chests/village/village_desert_house.json index 7c46181d..d18930c4 100644 --- a/data/minecraft/loot_table/chests/village/village_desert_house.json +++ b/data/minecraft/loot_table/chests/village/village_desert_house.json @@ -101,6 +101,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_desert_house" diff --git a/data/minecraft/loot_table/chests/village/village_plains_house.json b/data/minecraft/loot_table/chests/village/village_plains_house.json index d5839ba1..282170d9 100644 --- a/data/minecraft/loot_table/chests/village/village_plains_house.json +++ b/data/minecraft/loot_table/chests/village/village_plains_house.json @@ -122,6 +122,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_plains_house" diff --git a/data/minecraft/loot_table/chests/village/village_savanna_house.json b/data/minecraft/loot_table/chests/village/village_savanna_house.json index 156bbf26..2f7e410c 100644 --- a/data/minecraft/loot_table/chests/village/village_savanna_house.json +++ b/data/minecraft/loot_table/chests/village/village_savanna_house.json @@ -122,6 +122,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_savanna_house" diff --git a/data/minecraft/loot_table/chests/village/village_snowy_house.json b/data/minecraft/loot_table/chests/village/village_snowy_house.json index 9f554ad1..c044db9a 100644 --- a/data/minecraft/loot_table/chests/village/village_snowy_house.json +++ b/data/minecraft/loot_table/chests/village/village_snowy_house.json @@ -122,6 +122,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_snowy_house" diff --git a/data/minecraft/loot_table/chests/village/village_taiga_house.json b/data/minecraft/loot_table/chests/village/village_taiga_house.json index 3793b162..ee9225da 100644 --- a/data/minecraft/loot_table/chests/village/village_taiga_house.json +++ b/data/minecraft/loot_table/chests/village/village_taiga_house.json @@ -155,6 +155,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_taiga_house" diff --git a/data/minecraft/loot_table/chests/village/village_tannery.json b/data/minecraft/loot_table/chests/village/village_tannery.json index 26c09584..d6140128 100644 --- a/data/minecraft/loot_table/chests/village/village_tannery.json +++ b/data/minecraft/loot_table/chests/village/village_tannery.json @@ -80,6 +80,27 @@ "max": 5.0, "min": 1.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_tannery" diff --git a/data/minecraft/loot_table/chests/village/village_weaponsmith.json b/data/minecraft/loot_table/chests/village/village_weaponsmith.json index 195648aa..76b9fabe 100644 --- a/data/minecraft/loot_table/chests/village/village_weaponsmith.json +++ b/data/minecraft/loot_table/chests/village/village_weaponsmith.json @@ -169,6 +169,27 @@ "max": 8.0, "min": 3.0 } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bundle" + }, + { + "type": "minecraft:empty", + "weight": 2 + } + ], + "rolls": 1.0 } ], "random_sequence": "minecraft:chests/village/village_weaponsmith" diff --git a/data/minecraft/loot_table/chests/woodland_mansion.json b/data/minecraft/loot_table/chests/woodland_mansion.json index ad13eda0..38fdd555 100644 --- a/data/minecraft/loot_table/chests/woodland_mansion.json +++ b/data/minecraft/loot_table/chests/woodland_mansion.json @@ -207,6 +207,22 @@ ], "name": "minecraft:beetroot_seeds", "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:resin_clump", + "weight": 50 } ], "rolls": { diff --git a/data/minecraft/loot_table/entities/creaking_transient.json b/data/minecraft/loot_table/entities/creaking_transient.json deleted file mode 100644 index a318df2e..00000000 --- a/data/minecraft/loot_table/entities/creaking_transient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:entity", - "random_sequence": "minecraft:entities/creaking_transient" -} \ No newline at end of file diff --git a/data/minecraft/loot_table/entities/magma_cube.json b/data/minecraft/loot_table/entities/magma_cube.json index d560ee8b..56038643 100644 --- a/data/minecraft/loot_table/entities/magma_cube.json +++ b/data/minecraft/loot_table/entities/magma_cube.json @@ -61,9 +61,8 @@ "predicate": { "source_entity": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:warm" + "components": { + "minecraft:frog/variant": "minecraft:warm" } } } @@ -86,9 +85,8 @@ "predicate": { "source_entity": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:cold" + "components": { + "minecraft:frog/variant": "minecraft:cold" } } } @@ -111,9 +109,8 @@ "predicate": { "source_entity": { "type": "minecraft:frog", - "type_specific": { - "type": "minecraft:frog", - "variant": "minecraft:temperate" + "components": { + "minecraft:frog/variant": "minecraft:temperate" } } } diff --git a/data/minecraft/loot_table/entities/sheep.json b/data/minecraft/loot_table/entities/sheep.json index fa39ae74..5b8069f4 100644 --- a/data/minecraft/loot_table/entities/sheep.json +++ b/data/minecraft/loot_table/entities/sheep.json @@ -80,9 +80,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "white" + }, "type_specific": { "type": "minecraft:sheep", - "color": "white", "sheared": false } } @@ -97,9 +99,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "orange" + }, "type_specific": { "type": "minecraft:sheep", - "color": "orange", "sheared": false } } @@ -114,9 +118,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "magenta" + }, "type_specific": { "type": "minecraft:sheep", - "color": "magenta", "sheared": false } } @@ -131,9 +137,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "light_blue" + }, "type_specific": { "type": "minecraft:sheep", - "color": "light_blue", "sheared": false } } @@ -148,9 +156,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "yellow" + }, "type_specific": { "type": "minecraft:sheep", - "color": "yellow", "sheared": false } } @@ -165,9 +175,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "lime" + }, "type_specific": { "type": "minecraft:sheep", - "color": "lime", "sheared": false } } @@ -182,9 +194,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "pink" + }, "type_specific": { "type": "minecraft:sheep", - "color": "pink", "sheared": false } } @@ -199,9 +213,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "gray" + }, "type_specific": { "type": "minecraft:sheep", - "color": "gray", "sheared": false } } @@ -216,9 +232,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "light_gray" + }, "type_specific": { "type": "minecraft:sheep", - "color": "light_gray", "sheared": false } } @@ -233,9 +251,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "cyan" + }, "type_specific": { "type": "minecraft:sheep", - "color": "cyan", "sheared": false } } @@ -250,9 +270,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "purple" + }, "type_specific": { "type": "minecraft:sheep", - "color": "purple", "sheared": false } } @@ -267,9 +289,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "blue" + }, "type_specific": { "type": "minecraft:sheep", - "color": "blue", "sheared": false } } @@ -284,9 +308,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "brown" + }, "type_specific": { "type": "minecraft:sheep", - "color": "brown", "sheared": false } } @@ -301,9 +327,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "green" + }, "type_specific": { "type": "minecraft:sheep", - "color": "green", "sheared": false } } @@ -318,9 +346,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "red" + }, "type_specific": { "type": "minecraft:sheep", - "color": "red", "sheared": false } } @@ -335,9 +365,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "black" + }, "type_specific": { "type": "minecraft:sheep", - "color": "black", "sheared": false } } diff --git a/data/minecraft/loot_table/gameplay/chicken_lay.json b/data/minecraft/loot_table/gameplay/chicken_lay.json index 7c5b849d..1cbcbc49 100644 --- a/data/minecraft/loot_table/gameplay/chicken_lay.json +++ b/data/minecraft/loot_table/gameplay/chicken_lay.json @@ -5,8 +5,54 @@ "bonus_rolls": 0.0, "entries": [ { - "type": "minecraft:item", - "name": "minecraft:egg" + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "components": { + "minecraft:chicken/variant": "minecraft:temperate" + } + } + } + ], + "name": "minecraft:egg" + }, + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "components": { + "minecraft:chicken/variant": "minecraft:warm" + } + } + } + ], + "name": "minecraft:brown_egg" + }, + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "components": { + "minecraft:chicken/variant": "minecraft:cold" + } + } + } + ], + "name": "minecraft:blue_egg" + } + ] } ], "rolls": 1.0 diff --git a/data/minecraft/loot_table/shearing/mooshroom.json b/data/minecraft/loot_table/shearing/mooshroom.json index 85a56808..0c2c6225 100644 --- a/data/minecraft/loot_table/shearing/mooshroom.json +++ b/data/minecraft/loot_table/shearing/mooshroom.json @@ -14,9 +14,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:mooshroom", - "variant": "red" + "components": { + "minecraft:mooshroom/variant": "red" } } } @@ -30,9 +29,8 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { - "type_specific": { - "type": "minecraft:mooshroom", - "variant": "brown" + "components": { + "minecraft:mooshroom/variant": "brown" } } } diff --git a/data/minecraft/loot_table/shearing/sheep.json b/data/minecraft/loot_table/shearing/sheep.json index 684a083a..dfb6a5ba 100644 --- a/data/minecraft/loot_table/shearing/sheep.json +++ b/data/minecraft/loot_table/shearing/sheep.json @@ -14,9 +14,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "white" + }, "type_specific": { "type": "minecraft:sheep", - "color": "white", "sheared": false } } @@ -31,9 +33,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "orange" + }, "type_specific": { "type": "minecraft:sheep", - "color": "orange", "sheared": false } } @@ -48,9 +52,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "magenta" + }, "type_specific": { "type": "minecraft:sheep", - "color": "magenta", "sheared": false } } @@ -65,9 +71,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "light_blue" + }, "type_specific": { "type": "minecraft:sheep", - "color": "light_blue", "sheared": false } } @@ -82,9 +90,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "yellow" + }, "type_specific": { "type": "minecraft:sheep", - "color": "yellow", "sheared": false } } @@ -99,9 +109,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "lime" + }, "type_specific": { "type": "minecraft:sheep", - "color": "lime", "sheared": false } } @@ -116,9 +128,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "pink" + }, "type_specific": { "type": "minecraft:sheep", - "color": "pink", "sheared": false } } @@ -133,9 +147,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "gray" + }, "type_specific": { "type": "minecraft:sheep", - "color": "gray", "sheared": false } } @@ -150,9 +166,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "light_gray" + }, "type_specific": { "type": "minecraft:sheep", - "color": "light_gray", "sheared": false } } @@ -167,9 +185,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "cyan" + }, "type_specific": { "type": "minecraft:sheep", - "color": "cyan", "sheared": false } } @@ -184,9 +204,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "purple" + }, "type_specific": { "type": "minecraft:sheep", - "color": "purple", "sheared": false } } @@ -201,9 +223,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "blue" + }, "type_specific": { "type": "minecraft:sheep", - "color": "blue", "sheared": false } } @@ -218,9 +242,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "brown" + }, "type_specific": { "type": "minecraft:sheep", - "color": "brown", "sheared": false } } @@ -235,9 +261,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "green" + }, "type_specific": { "type": "minecraft:sheep", - "color": "green", "sheared": false } } @@ -252,9 +280,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "red" + }, "type_specific": { "type": "minecraft:sheep", - "color": "red", "sheared": false } } @@ -269,9 +299,11 @@ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { + "components": { + "minecraft:sheep/color": "black" + }, "type_specific": { "type": "minecraft:sheep", - "color": "black", "sheared": false } } diff --git a/data/minecraft/pig_variant/cold.json b/data/minecraft/pig_variant/cold.json new file mode 100644 index 00000000..d6045cb6 --- /dev/null +++ b/data/minecraft/pig_variant/cold.json @@ -0,0 +1,13 @@ +{ + "asset_id": "minecraft:entity/pig/cold_pig", + "model": "cold", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_cold_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/pig_variant/temperate.json b/data/minecraft/pig_variant/temperate.json new file mode 100644 index 00000000..4b769b17 --- /dev/null +++ b/data/minecraft/pig_variant/temperate.json @@ -0,0 +1,8 @@ +{ + "asset_id": "minecraft:entity/pig/temperate_pig", + "spawn_conditions": [ + { + "priority": 0 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/pig_variant/warm.json b/data/minecraft/pig_variant/warm.json new file mode 100644 index 00000000..abddfc3e --- /dev/null +++ b/data/minecraft/pig_variant/warm.json @@ -0,0 +1,12 @@ +{ + "asset_id": "minecraft:entity/pig/warm_pig", + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:spawns_warm_variant_farm_animals" + }, + "priority": 1 + } + ] +} \ No newline at end of file diff --git a/data/minecraft/recipe/black_bundle.json b/data/minecraft/recipe/black_bundle.json index ef2f7f28..fa0cafcc 100644 --- a/data/minecraft/recipe/black_bundle.json +++ b/data/minecraft/recipe/black_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:black_dye", - "result": "minecraft:black_bundle" + "result": { + "id": "minecraft:black_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/black_shulker_box.json b/data/minecraft/recipe/black_shulker_box.json index ece44b36..d093da54 100644 --- a/data/minecraft/recipe/black_shulker_box.json +++ b/data/minecraft/recipe/black_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:black_dye", - "result": "minecraft:black_shulker_box" + "result": { + "id": "minecraft:black_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/blue_bundle.json b/data/minecraft/recipe/blue_bundle.json index 3269a4cb..5f3f5e34 100644 --- a/data/minecraft/recipe/blue_bundle.json +++ b/data/minecraft/recipe/blue_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:blue_dye", - "result": "minecraft:blue_bundle" + "result": { + "id": "minecraft:blue_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/blue_shulker_box.json b/data/minecraft/recipe/blue_shulker_box.json index 1d4637f6..98749939 100644 --- a/data/minecraft/recipe/blue_shulker_box.json +++ b/data/minecraft/recipe/blue_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:blue_dye", - "result": "minecraft:blue_shulker_box" + "result": { + "id": "minecraft:blue_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/bolt_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/bolt_armor_trim_smithing_template_smithing_trim.json index e50e010c..357d46bc 100644 --- a/data/minecraft/recipe/bolt_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/bolt_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:bolt", "template": "minecraft:bolt_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/brown_bundle.json b/data/minecraft/recipe/brown_bundle.json index dfa2a323..2a8358aa 100644 --- a/data/minecraft/recipe/brown_bundle.json +++ b/data/minecraft/recipe/brown_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:brown_dye", - "result": "minecraft:brown_bundle" + "result": { + "id": "minecraft:brown_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/brown_shulker_box.json b/data/minecraft/recipe/brown_shulker_box.json index 344c6fc0..8f147e80 100644 --- a/data/minecraft/recipe/brown_shulker_box.json +++ b/data/minecraft/recipe/brown_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:brown_dye", - "result": "minecraft:brown_shulker_box" + "result": { + "id": "minecraft:brown_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/cake.json b/data/minecraft/recipe/cake.json index b840c821..db05e94e 100644 --- a/data/minecraft/recipe/cake.json +++ b/data/minecraft/recipe/cake.json @@ -5,7 +5,7 @@ "A": "minecraft:milk_bucket", "B": "minecraft:sugar", "C": "minecraft:wheat", - "E": "minecraft:egg" + "E": "#minecraft:eggs" }, "pattern": [ "AAA", diff --git a/data/minecraft/recipe/chiseled_resin_bricks.json b/data/minecraft/recipe/chiseled_resin_bricks.json new file mode 100644 index 00000000..c01b3930 --- /dev/null +++ b/data/minecraft/recipe/chiseled_resin_bricks.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "minecraft:resin_brick_slab" + }, + "pattern": [ + "#", + "#" + ], + "result": { + "count": 1, + "id": "minecraft:chiseled_resin_bricks" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/chiseled_resin_bricks_from_resin_bricks_stonecutting.json b/data/minecraft/recipe/chiseled_resin_bricks_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..747489c9 --- /dev/null +++ b/data/minecraft/recipe/chiseled_resin_bricks_from_resin_bricks_stonecutting.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "minecraft:resin_bricks", + "result": { + "count": 1, + "id": "minecraft:chiseled_resin_bricks" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/coast_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/coast_armor_trim_smithing_template_smithing_trim.json index 844df515..8097b2e5 100644 --- a/data/minecraft/recipe/coast_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/coast_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:coast", "template": "minecraft:coast_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/creaking_heart.json b/data/minecraft/recipe/creaking_heart.json new file mode 100644 index 00000000..3ce281cd --- /dev/null +++ b/data/minecraft/recipe/creaking_heart.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "L": "minecraft:pale_oak_log", + "R": "minecraft:resin_block" + }, + "pattern": [ + " L ", + " R ", + " L " + ], + "result": { + "count": 1, + "id": "minecraft:creaking_heart" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/cyan_bundle.json b/data/minecraft/recipe/cyan_bundle.json index 0f1c52ab..ed87c31d 100644 --- a/data/minecraft/recipe/cyan_bundle.json +++ b/data/minecraft/recipe/cyan_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:cyan_dye", - "result": "minecraft:cyan_bundle" + "result": { + "id": "minecraft:cyan_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/cyan_shulker_box.json b/data/minecraft/recipe/cyan_shulker_box.json index c45dbb68..1a461cd7 100644 --- a/data/minecraft/recipe/cyan_shulker_box.json +++ b/data/minecraft/recipe/cyan_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:cyan_dye", - "result": "minecraft:cyan_shulker_box" + "result": { + "id": "minecraft:cyan_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/dune_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/dune_armor_trim_smithing_template_smithing_trim.json index 264a25f8..4abdad1e 100644 --- a/data/minecraft/recipe/dune_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/dune_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:dune", "template": "minecraft:dune_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/eye_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/eye_armor_trim_smithing_template_smithing_trim.json index a7d5d3e8..2a770833 100644 --- a/data/minecraft/recipe/eye_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/eye_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:eye", "template": "minecraft:eye_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/flow_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/flow_armor_trim_smithing_template_smithing_trim.json index aa07def2..9dffe801 100644 --- a/data/minecraft/recipe/flow_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/flow_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:flow", "template": "minecraft:flow_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/gray_bundle.json b/data/minecraft/recipe/gray_bundle.json index 4220bb8b..f988d547 100644 --- a/data/minecraft/recipe/gray_bundle.json +++ b/data/minecraft/recipe/gray_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:gray_dye", - "result": "minecraft:gray_bundle" + "result": { + "id": "minecraft:gray_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/gray_dye.json b/data/minecraft/recipe/gray_dye.json index 91fa51bd..4f57d7bc 100644 --- a/data/minecraft/recipe/gray_dye.json +++ b/data/minecraft/recipe/gray_dye.json @@ -1,6 +1,7 @@ { "type": "minecraft:crafting_shapeless", "category": "misc", + "group": "gray_dye", "ingredients": [ "minecraft:black_dye", "minecraft:white_dye" diff --git a/data/minecraft/recipe/gray_dye_from_closed_eyeblossom.json b/data/minecraft/recipe/gray_dye_from_closed_eyeblossom.json new file mode 100644 index 00000000..22214909 --- /dev/null +++ b/data/minecraft/recipe/gray_dye_from_closed_eyeblossom.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "gray_dye", + "ingredients": [ + "minecraft:closed_eyeblossom" + ], + "result": { + "count": 1, + "id": "minecraft:gray_dye" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/gray_shulker_box.json b/data/minecraft/recipe/gray_shulker_box.json index d3eccbb0..731a0b68 100644 --- a/data/minecraft/recipe/gray_shulker_box.json +++ b/data/minecraft/recipe/gray_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:gray_dye", - "result": "minecraft:gray_shulker_box" + "result": { + "id": "minecraft:gray_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/green_bundle.json b/data/minecraft/recipe/green_bundle.json index f2cf2689..0872554a 100644 --- a/data/minecraft/recipe/green_bundle.json +++ b/data/minecraft/recipe/green_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:green_dye", - "result": "minecraft:green_bundle" + "result": { + "id": "minecraft:green_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/green_shulker_box.json b/data/minecraft/recipe/green_shulker_box.json index cc9b6d72..f8fca9c7 100644 --- a/data/minecraft/recipe/green_shulker_box.json +++ b/data/minecraft/recipe/green_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:green_dye", - "result": "minecraft:green_shulker_box" + "result": { + "id": "minecraft:green_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/host_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/host_armor_trim_smithing_template_smithing_trim.json index 0609cebb..b1933cfb 100644 --- a/data/minecraft/recipe/host_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/host_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:host", "template": "minecraft:host_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/leaf_litter.json b/data/minecraft/recipe/leaf_litter.json new file mode 100644 index 00000000..d5263e5f --- /dev/null +++ b/data/minecraft/recipe/leaf_litter.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smelting", + "category": "blocks", + "cookingtime": 200, + "experience": 0.1, + "ingredient": "#minecraft:leaves", + "result": { + "id": "minecraft:leaf_litter" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/light_blue_bundle.json b/data/minecraft/recipe/light_blue_bundle.json index a0a105d9..67e762c0 100644 --- a/data/minecraft/recipe/light_blue_bundle.json +++ b/data/minecraft/recipe/light_blue_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:light_blue_dye", - "result": "minecraft:light_blue_bundle" + "result": { + "id": "minecraft:light_blue_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/light_blue_shulker_box.json b/data/minecraft/recipe/light_blue_shulker_box.json index 53604ac0..28f79584 100644 --- a/data/minecraft/recipe/light_blue_shulker_box.json +++ b/data/minecraft/recipe/light_blue_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:light_blue_dye", - "result": "minecraft:light_blue_shulker_box" + "result": { + "id": "minecraft:light_blue_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/light_gray_bundle.json b/data/minecraft/recipe/light_gray_bundle.json index 6e416c06..7f4f6585 100644 --- a/data/minecraft/recipe/light_gray_bundle.json +++ b/data/minecraft/recipe/light_gray_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:light_gray_dye", - "result": "minecraft:light_gray_bundle" + "result": { + "id": "minecraft:light_gray_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/light_gray_shulker_box.json b/data/minecraft/recipe/light_gray_shulker_box.json index 3921cf87..d82ad3b7 100644 --- a/data/minecraft/recipe/light_gray_shulker_box.json +++ b/data/minecraft/recipe/light_gray_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:light_gray_dye", - "result": "minecraft:light_gray_shulker_box" + "result": { + "id": "minecraft:light_gray_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/lime_bundle.json b/data/minecraft/recipe/lime_bundle.json index 6c1a2969..8252846b 100644 --- a/data/minecraft/recipe/lime_bundle.json +++ b/data/minecraft/recipe/lime_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:lime_dye", - "result": "minecraft:lime_bundle" + "result": { + "id": "minecraft:lime_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/lime_shulker_box.json b/data/minecraft/recipe/lime_shulker_box.json index 5ca80d9c..eff96ea7 100644 --- a/data/minecraft/recipe/lime_shulker_box.json +++ b/data/minecraft/recipe/lime_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:lime_dye", - "result": "minecraft:lime_shulker_box" + "result": { + "id": "minecraft:lime_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/lodestone.json b/data/minecraft/recipe/lodestone.json index a83c3091..d3c1bb99 100644 --- a/data/minecraft/recipe/lodestone.json +++ b/data/minecraft/recipe/lodestone.json @@ -2,7 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": "minecraft:netherite_ingot", + "#": "minecraft:iron_ingot", "S": "minecraft:chiseled_stone_bricks" }, "pattern": [ diff --git a/data/minecraft/recipe/magenta_bundle.json b/data/minecraft/recipe/magenta_bundle.json index 4283ad14..f63d30a1 100644 --- a/data/minecraft/recipe/magenta_bundle.json +++ b/data/minecraft/recipe/magenta_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:magenta_dye", - "result": "minecraft:magenta_bundle" + "result": { + "id": "minecraft:magenta_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/magenta_shulker_box.json b/data/minecraft/recipe/magenta_shulker_box.json index f3542475..ae4337cc 100644 --- a/data/minecraft/recipe/magenta_shulker_box.json +++ b/data/minecraft/recipe/magenta_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:magenta_dye", - "result": "minecraft:magenta_shulker_box" + "result": { + "id": "minecraft:magenta_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/netherite_axe_smithing.json b/data/minecraft/recipe/netherite_axe_smithing.json index 29c79980..99903fa9 100644 --- a/data/minecraft/recipe/netherite_axe_smithing.json +++ b/data/minecraft/recipe/netherite_axe_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_axe", "result": { - "count": 1, "id": "minecraft:netherite_axe" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_boots_smithing.json b/data/minecraft/recipe/netherite_boots_smithing.json index da3c3f16..9c13806b 100644 --- a/data/minecraft/recipe/netherite_boots_smithing.json +++ b/data/minecraft/recipe/netherite_boots_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_boots", "result": { - "count": 1, "id": "minecraft:netherite_boots" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_chestplate_smithing.json b/data/minecraft/recipe/netherite_chestplate_smithing.json index 75c82ec2..5de05c02 100644 --- a/data/minecraft/recipe/netherite_chestplate_smithing.json +++ b/data/minecraft/recipe/netherite_chestplate_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_chestplate", "result": { - "count": 1, "id": "minecraft:netherite_chestplate" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_helmet_smithing.json b/data/minecraft/recipe/netherite_helmet_smithing.json index 23eff34f..50e7927c 100644 --- a/data/minecraft/recipe/netherite_helmet_smithing.json +++ b/data/minecraft/recipe/netherite_helmet_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_helmet", "result": { - "count": 1, "id": "minecraft:netherite_helmet" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_hoe_smithing.json b/data/minecraft/recipe/netherite_hoe_smithing.json index 702edabe..2fdc9a18 100644 --- a/data/minecraft/recipe/netherite_hoe_smithing.json +++ b/data/minecraft/recipe/netherite_hoe_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_hoe", "result": { - "count": 1, "id": "minecraft:netherite_hoe" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_leggings_smithing.json b/data/minecraft/recipe/netherite_leggings_smithing.json index c1400d30..e315e1a2 100644 --- a/data/minecraft/recipe/netherite_leggings_smithing.json +++ b/data/minecraft/recipe/netherite_leggings_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_leggings", "result": { - "count": 1, "id": "minecraft:netherite_leggings" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_pickaxe_smithing.json b/data/minecraft/recipe/netherite_pickaxe_smithing.json index 60b64e89..3193a208 100644 --- a/data/minecraft/recipe/netherite_pickaxe_smithing.json +++ b/data/minecraft/recipe/netherite_pickaxe_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_pickaxe", "result": { - "count": 1, "id": "minecraft:netherite_pickaxe" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_shovel_smithing.json b/data/minecraft/recipe/netherite_shovel_smithing.json index 01ce41ed..59ad7518 100644 --- a/data/minecraft/recipe/netherite_shovel_smithing.json +++ b/data/minecraft/recipe/netherite_shovel_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_shovel", "result": { - "count": 1, "id": "minecraft:netherite_shovel" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/netherite_sword_smithing.json b/data/minecraft/recipe/netherite_sword_smithing.json index 86a8e7ab..45ce0fb1 100644 --- a/data/minecraft/recipe/netherite_sword_smithing.json +++ b/data/minecraft/recipe/netherite_sword_smithing.json @@ -3,7 +3,6 @@ "addition": "#minecraft:netherite_tool_materials", "base": "minecraft:diamond_sword", "result": { - "count": 1, "id": "minecraft:netherite_sword" }, "template": "minecraft:netherite_upgrade_smithing_template" diff --git a/data/minecraft/recipe/orange_bundle.json b/data/minecraft/recipe/orange_bundle.json index 4aa80ccc..4c70b6c8 100644 --- a/data/minecraft/recipe/orange_bundle.json +++ b/data/minecraft/recipe/orange_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:orange_dye", - "result": "minecraft:orange_bundle" + "result": { + "id": "minecraft:orange_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/orange_dye_from_open_eyeblossom.json b/data/minecraft/recipe/orange_dye_from_open_eyeblossom.json new file mode 100644 index 00000000..39566d2e --- /dev/null +++ b/data/minecraft/recipe/orange_dye_from_open_eyeblossom.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "orange_dye", + "ingredients": [ + "minecraft:open_eyeblossom" + ], + "result": { + "count": 1, + "id": "minecraft:orange_dye" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/orange_shulker_box.json b/data/minecraft/recipe/orange_shulker_box.json index 203f8eeb..64a1aabf 100644 --- a/data/minecraft/recipe/orange_shulker_box.json +++ b/data/minecraft/recipe/orange_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:orange_dye", - "result": "minecraft:orange_shulker_box" + "result": { + "id": "minecraft:orange_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_moss_carpet.json b/data/minecraft/recipe/pale_moss_carpet.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_moss_carpet.json rename to data/minecraft/recipe/pale_moss_carpet.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_boat.json b/data/minecraft/recipe/pale_oak_boat.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_boat.json rename to data/minecraft/recipe/pale_oak_boat.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_button.json b/data/minecraft/recipe/pale_oak_button.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_button.json rename to data/minecraft/recipe/pale_oak_button.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_chest_boat.json b/data/minecraft/recipe/pale_oak_chest_boat.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_chest_boat.json rename to data/minecraft/recipe/pale_oak_chest_boat.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_door.json b/data/minecraft/recipe/pale_oak_door.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_door.json rename to data/minecraft/recipe/pale_oak_door.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_fence.json b/data/minecraft/recipe/pale_oak_fence.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_fence.json rename to data/minecraft/recipe/pale_oak_fence.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_fence_gate.json b/data/minecraft/recipe/pale_oak_fence_gate.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_fence_gate.json rename to data/minecraft/recipe/pale_oak_fence_gate.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_hanging_sign.json b/data/minecraft/recipe/pale_oak_hanging_sign.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_hanging_sign.json rename to data/minecraft/recipe/pale_oak_hanging_sign.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_planks.json b/data/minecraft/recipe/pale_oak_planks.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_planks.json rename to data/minecraft/recipe/pale_oak_planks.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_pressure_plate.json b/data/minecraft/recipe/pale_oak_pressure_plate.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_pressure_plate.json rename to data/minecraft/recipe/pale_oak_pressure_plate.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_sign.json b/data/minecraft/recipe/pale_oak_sign.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_sign.json rename to data/minecraft/recipe/pale_oak_sign.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_slab.json b/data/minecraft/recipe/pale_oak_slab.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_slab.json rename to data/minecraft/recipe/pale_oak_slab.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_stairs.json b/data/minecraft/recipe/pale_oak_stairs.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_stairs.json rename to data/minecraft/recipe/pale_oak_stairs.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_trapdoor.json b/data/minecraft/recipe/pale_oak_trapdoor.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_trapdoor.json rename to data/minecraft/recipe/pale_oak_trapdoor.json diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_wood.json b/data/minecraft/recipe/pale_oak_wood.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/pale_oak_wood.json rename to data/minecraft/recipe/pale_oak_wood.json diff --git a/data/minecraft/recipe/pink_bundle.json b/data/minecraft/recipe/pink_bundle.json index f08dafbb..4a815ba7 100644 --- a/data/minecraft/recipe/pink_bundle.json +++ b/data/minecraft/recipe/pink_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:pink_dye", - "result": "minecraft:pink_bundle" + "result": { + "id": "minecraft:pink_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/pink_dye_from_cactus_flower.json b/data/minecraft/recipe/pink_dye_from_cactus_flower.json new file mode 100644 index 00000000..4d40f861 --- /dev/null +++ b/data/minecraft/recipe/pink_dye_from_cactus_flower.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "pink_dye", + "ingredients": [ + "minecraft:cactus_flower" + ], + "result": { + "count": 1, + "id": "minecraft:pink_dye" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/pink_shulker_box.json b/data/minecraft/recipe/pink_shulker_box.json index 3916f886..87eb1b7d 100644 --- a/data/minecraft/recipe/pink_shulker_box.json +++ b/data/minecraft/recipe/pink_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:pink_dye", - "result": "minecraft:pink_shulker_box" + "result": { + "id": "minecraft:pink_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/pumpkin_pie.json b/data/minecraft/recipe/pumpkin_pie.json index 2f1064c4..715db8e6 100644 --- a/data/minecraft/recipe/pumpkin_pie.json +++ b/data/minecraft/recipe/pumpkin_pie.json @@ -4,7 +4,7 @@ "ingredients": [ "minecraft:pumpkin", "minecraft:sugar", - "minecraft:egg" + "#minecraft:eggs" ], "result": { "count": 1, diff --git a/data/minecraft/recipe/purple_bundle.json b/data/minecraft/recipe/purple_bundle.json index 41875b1e..15358b5d 100644 --- a/data/minecraft/recipe/purple_bundle.json +++ b/data/minecraft/recipe/purple_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:purple_dye", - "result": "minecraft:purple_bundle" + "result": { + "id": "minecraft:purple_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/purple_shulker_box.json b/data/minecraft/recipe/purple_shulker_box.json index 1fdcc2af..ac38ec61 100644 --- a/data/minecraft/recipe/purple_shulker_box.json +++ b/data/minecraft/recipe/purple_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:purple_dye", - "result": "minecraft:purple_shulker_box" + "result": { + "id": "minecraft:purple_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/raiser_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/raiser_armor_trim_smithing_template_smithing_trim.json index 1ad65dd0..7b931038 100644 --- a/data/minecraft/recipe/raiser_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/raiser_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:raiser", "template": "minecraft:raiser_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/red_bundle.json b/data/minecraft/recipe/red_bundle.json index 8f066354..24c2f1b5 100644 --- a/data/minecraft/recipe/red_bundle.json +++ b/data/minecraft/recipe/red_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:red_dye", - "result": "minecraft:red_bundle" + "result": { + "id": "minecraft:red_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/red_shulker_box.json b/data/minecraft/recipe/red_shulker_box.json index 7ffeeefa..35d35f1e 100644 --- a/data/minecraft/recipe/red_shulker_box.json +++ b/data/minecraft/recipe/red_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:red_dye", - "result": "minecraft:red_shulker_box" + "result": { + "id": "minecraft:red_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/resin_block.json b/data/minecraft/recipe/resin_block.json new file mode 100644 index 00000000..473c9e23 --- /dev/null +++ b/data/minecraft/recipe/resin_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "minecraft:resin_clump" + }, + "pattern": [ + "###", + "###", + "###" + ], + "result": { + "count": 1, + "id": "minecraft:resin_block" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick.json b/data/minecraft/recipe/resin_brick.json new file mode 100644 index 00000000..a686fe97 --- /dev/null +++ b/data/minecraft/recipe/resin_brick.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smelting", + "category": "misc", + "cookingtime": 200, + "experience": 0.1, + "ingredient": "minecraft:resin_clump", + "result": { + "id": "minecraft:resin_brick" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_slab.json b/data/minecraft/recipe/resin_brick_slab.json new file mode 100644 index 00000000..6ae5a421 --- /dev/null +++ b/data/minecraft/recipe/resin_brick_slab.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "minecraft:resin_bricks" + }, + "pattern": [ + "###" + ], + "result": { + "count": 6, + "id": "minecraft:resin_brick_slab" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_slab_from_resin_bricks_stonecutting.json b/data/minecraft/recipe/resin_brick_slab_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..f235fbf1 --- /dev/null +++ b/data/minecraft/recipe/resin_brick_slab_from_resin_bricks_stonecutting.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "minecraft:resin_bricks", + "result": { + "count": 2, + "id": "minecraft:resin_brick_slab" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_stairs.json b/data/minecraft/recipe/resin_brick_stairs.json new file mode 100644 index 00000000..29f45369 --- /dev/null +++ b/data/minecraft/recipe/resin_brick_stairs.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "minecraft:resin_bricks" + }, + "pattern": [ + "# ", + "## ", + "###" + ], + "result": { + "count": 4, + "id": "minecraft:resin_brick_stairs" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_stairs_from_resin_bricks_stonecutting.json b/data/minecraft/recipe/resin_brick_stairs_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..51523720 --- /dev/null +++ b/data/minecraft/recipe/resin_brick_stairs_from_resin_bricks_stonecutting.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "minecraft:resin_bricks", + "result": { + "count": 1, + "id": "minecraft:resin_brick_stairs" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_wall.json b/data/minecraft/recipe/resin_brick_wall.json new file mode 100644 index 00000000..d78e468a --- /dev/null +++ b/data/minecraft/recipe/resin_brick_wall.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "#": "minecraft:resin_bricks" + }, + "pattern": [ + "###", + "###" + ], + "result": { + "count": 6, + "id": "minecraft:resin_brick_wall" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_brick_wall_from_resin_bricks_stonecutting.json b/data/minecraft/recipe/resin_brick_wall_from_resin_bricks_stonecutting.json new file mode 100644 index 00000000..278b4dd1 --- /dev/null +++ b/data/minecraft/recipe/resin_brick_wall_from_resin_bricks_stonecutting.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": "minecraft:resin_bricks", + "result": { + "count": 1, + "id": "minecraft:resin_brick_wall" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_bricks.json b/data/minecraft/recipe/resin_bricks.json new file mode 100644 index 00000000..38d41654 --- /dev/null +++ b/data/minecraft/recipe/resin_bricks.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "minecraft:resin_brick" + }, + "pattern": [ + "##", + "##" + ], + "result": { + "count": 1, + "id": "minecraft:resin_bricks" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/resin_clump.json b/data/minecraft/recipe/resin_clump.json new file mode 100644 index 00000000..e11603f0 --- /dev/null +++ b/data/minecraft/recipe/resin_clump.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "minecraft:resin_block" + ], + "result": { + "count": 9, + "id": "minecraft:resin_clump" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/rib_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/rib_armor_trim_smithing_template_smithing_trim.json index cb18a0e3..6ca6e350 100644 --- a/data/minecraft/recipe/rib_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/rib_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:rib", "template": "minecraft:rib_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/sentry_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/sentry_armor_trim_smithing_template_smithing_trim.json index a3472bdf..9a5a14a8 100644 --- a/data/minecraft/recipe/sentry_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/sentry_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:sentry", "template": "minecraft:sentry_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/shaper_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/shaper_armor_trim_smithing_template_smithing_trim.json index 2f9b1ab6..9941c188 100644 --- a/data/minecraft/recipe/shaper_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/shaper_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:shaper", "template": "minecraft:shaper_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/silence_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/silence_armor_trim_smithing_template_smithing_trim.json index 8917ace5..33711f0f 100644 --- a/data/minecraft/recipe/silence_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/silence_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:silence", "template": "minecraft:silence_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/snout_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/snout_armor_trim_smithing_template_smithing_trim.json index 88d0dd13..fef00c3a 100644 --- a/data/minecraft/recipe/snout_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/snout_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:snout", "template": "minecraft:snout_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/spire_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/spire_armor_trim_smithing_template_smithing_trim.json index 628e1720..2fd3e875 100644 --- a/data/minecraft/recipe/spire_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/spire_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:spire", "template": "minecraft:spire_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/recipe/stripped_pale_oak_wood.json b/data/minecraft/recipe/stripped_pale_oak_wood.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/recipe/stripped_pale_oak_wood.json rename to data/minecraft/recipe/stripped_pale_oak_wood.json diff --git a/data/minecraft/recipe/suspicious_stew_from_allium.json b/data/minecraft/recipe/suspicious_stew_from_allium.json index a1a74114..931613c0 100644 --- a/data/minecraft/recipe/suspicious_stew_from_allium.json +++ b/data/minecraft/recipe/suspicious_stew_from_allium.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 80, + "duration": 60, "id": "minecraft:fire_resistance" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_azure_bluet.json b/data/minecraft/recipe/suspicious_stew_from_azure_bluet.json index 8d7a4cd7..0f3006c9 100644 --- a/data/minecraft/recipe/suspicious_stew_from_azure_bluet.json +++ b/data/minecraft/recipe/suspicious_stew_from_azure_bluet.json @@ -12,6 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { + "duration": 220, "id": "minecraft:blindness" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_closed_eyeblossom.json b/data/minecraft/recipe/suspicious_stew_from_closed_eyeblossom.json new file mode 100644 index 00000000..634b5159 --- /dev/null +++ b/data/minecraft/recipe/suspicious_stew_from_closed_eyeblossom.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "suspicious_stew", + "ingredients": [ + "minecraft:bowl", + "minecraft:brown_mushroom", + "minecraft:red_mushroom", + "minecraft:closed_eyeblossom" + ], + "result": { + "components": { + "minecraft:suspicious_stew_effects": [ + { + "duration": 140, + "id": "minecraft:nausea" + } + ] + }, + "count": 1, + "id": "minecraft:suspicious_stew" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/suspicious_stew_from_cornflower.json b/data/minecraft/recipe/suspicious_stew_from_cornflower.json index 22f6e150..2f05a427 100644 --- a/data/minecraft/recipe/suspicious_stew_from_cornflower.json +++ b/data/minecraft/recipe/suspicious_stew_from_cornflower.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 120, + "duration": 100, "id": "minecraft:jump_boost" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_lily_of_the_valley.json b/data/minecraft/recipe/suspicious_stew_from_lily_of_the_valley.json index 44e0dad1..d83720a0 100644 --- a/data/minecraft/recipe/suspicious_stew_from_lily_of_the_valley.json +++ b/data/minecraft/recipe/suspicious_stew_from_lily_of_the_valley.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 240, + "duration": 220, "id": "minecraft:poison" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_open_eyeblossom.json b/data/minecraft/recipe/suspicious_stew_from_open_eyeblossom.json new file mode 100644 index 00000000..2eba8b62 --- /dev/null +++ b/data/minecraft/recipe/suspicious_stew_from_open_eyeblossom.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "suspicious_stew", + "ingredients": [ + "minecraft:bowl", + "minecraft:brown_mushroom", + "minecraft:red_mushroom", + "minecraft:open_eyeblossom" + ], + "result": { + "components": { + "minecraft:suspicious_stew_effects": [ + { + "duration": 220, + "id": "minecraft:blindness" + } + ] + }, + "count": 1, + "id": "minecraft:suspicious_stew" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/suspicious_stew_from_orange_tulip.json b/data/minecraft/recipe/suspicious_stew_from_orange_tulip.json index 2188593b..ce565dd4 100644 --- a/data/minecraft/recipe/suspicious_stew_from_orange_tulip.json +++ b/data/minecraft/recipe/suspicious_stew_from_orange_tulip.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 180, + "duration": 140, "id": "minecraft:weakness" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_oxeye_daisy.json b/data/minecraft/recipe/suspicious_stew_from_oxeye_daisy.json index b1d419af..831f4f87 100644 --- a/data/minecraft/recipe/suspicious_stew_from_oxeye_daisy.json +++ b/data/minecraft/recipe/suspicious_stew_from_oxeye_daisy.json @@ -12,6 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { + "duration": 140, "id": "minecraft:regeneration" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_pink_tulip.json b/data/minecraft/recipe/suspicious_stew_from_pink_tulip.json index 173ecec6..2fcc231b 100644 --- a/data/minecraft/recipe/suspicious_stew_from_pink_tulip.json +++ b/data/minecraft/recipe/suspicious_stew_from_pink_tulip.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 180, + "duration": 140, "id": "minecraft:weakness" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_red_tulip.json b/data/minecraft/recipe/suspicious_stew_from_red_tulip.json index 72f6eec6..fa00489e 100644 --- a/data/minecraft/recipe/suspicious_stew_from_red_tulip.json +++ b/data/minecraft/recipe/suspicious_stew_from_red_tulip.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 180, + "duration": 140, "id": "minecraft:weakness" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_white_tulip.json b/data/minecraft/recipe/suspicious_stew_from_white_tulip.json index fc056df2..c0b77fc7 100644 --- a/data/minecraft/recipe/suspicious_stew_from_white_tulip.json +++ b/data/minecraft/recipe/suspicious_stew_from_white_tulip.json @@ -12,7 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { - "duration": 180, + "duration": 140, "id": "minecraft:weakness" } ] diff --git a/data/minecraft/recipe/suspicious_stew_from_wither_rose.json b/data/minecraft/recipe/suspicious_stew_from_wither_rose.json index 256de104..a6db3131 100644 --- a/data/minecraft/recipe/suspicious_stew_from_wither_rose.json +++ b/data/minecraft/recipe/suspicious_stew_from_wither_rose.json @@ -12,6 +12,7 @@ "components": { "minecraft:suspicious_stew_effects": [ { + "duration": 140, "id": "minecraft:wither" } ] diff --git a/data/minecraft/recipe/tide_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/tide_armor_trim_smithing_template_smithing_trim.json index f34049a3..6eca0d9b 100644 --- a/data/minecraft/recipe/tide_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/tide_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:tide", "template": "minecraft:tide_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/vex_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/vex_armor_trim_smithing_template_smithing_trim.json index f54e11a5..fc4bb7c0 100644 --- a/data/minecraft/recipe/vex_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/vex_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:vex", "template": "minecraft:vex_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/ward_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/ward_armor_trim_smithing_template_smithing_trim.json index 4da4029c..4dae63a1 100644 --- a/data/minecraft/recipe/ward_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/ward_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:ward", "template": "minecraft:ward_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/wayfinder_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/wayfinder_armor_trim_smithing_template_smithing_trim.json index 073870fc..465d06f2 100644 --- a/data/minecraft/recipe/wayfinder_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/wayfinder_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:wayfinder", "template": "minecraft:wayfinder_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/white_bundle.json b/data/minecraft/recipe/white_bundle.json index 7a533375..69880b90 100644 --- a/data/minecraft/recipe/white_bundle.json +++ b/data/minecraft/recipe/white_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:white_dye", - "result": "minecraft:white_bundle" + "result": { + "id": "minecraft:white_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/white_shulker_box.json b/data/minecraft/recipe/white_shulker_box.json index 5c7cbd79..210af526 100644 --- a/data/minecraft/recipe/white_shulker_box.json +++ b/data/minecraft/recipe/white_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:white_dye", - "result": "minecraft:white_shulker_box" + "result": { + "id": "minecraft:white_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/wild_armor_trim_smithing_template_smithing_trim.json b/data/minecraft/recipe/wild_armor_trim_smithing_template_smithing_trim.json index 14d650ea..ad95528d 100644 --- a/data/minecraft/recipe/wild_armor_trim_smithing_template_smithing_trim.json +++ b/data/minecraft/recipe/wild_armor_trim_smithing_template_smithing_trim.json @@ -2,5 +2,6 @@ "type": "minecraft:smithing_trim", "addition": "#minecraft:trim_materials", "base": "#minecraft:trimmable_armor", + "pattern": "minecraft:wild", "template": "minecraft:wild_armor_trim_smithing_template" } \ No newline at end of file diff --git a/data/minecraft/recipe/yellow_bundle.json b/data/minecraft/recipe/yellow_bundle.json index 47536709..9519bb8a 100644 --- a/data/minecraft/recipe/yellow_bundle.json +++ b/data/minecraft/recipe/yellow_bundle.json @@ -4,5 +4,7 @@ "group": "bundle_dye", "input": "#minecraft:bundles", "material": "minecraft:yellow_dye", - "result": "minecraft:yellow_bundle" + "result": { + "id": "minecraft:yellow_bundle" + } } \ No newline at end of file diff --git a/data/minecraft/recipe/yellow_dye_from_wildflowers.json b/data/minecraft/recipe/yellow_dye_from_wildflowers.json new file mode 100644 index 00000000..29f2d836 --- /dev/null +++ b/data/minecraft/recipe/yellow_dye_from_wildflowers.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "group": "yellow_dye", + "ingredients": [ + "minecraft:wildflowers" + ], + "result": { + "count": 1, + "id": "minecraft:yellow_dye" + } +} \ No newline at end of file diff --git a/data/minecraft/recipe/yellow_shulker_box.json b/data/minecraft/recipe/yellow_shulker_box.json index 0506c068..2f07a34f 100644 --- a/data/minecraft/recipe/yellow_shulker_box.json +++ b/data/minecraft/recipe/yellow_shulker_box.json @@ -4,5 +4,7 @@ "group": "shulker_box_dye", "input": "#minecraft:shulker_boxes", "material": "minecraft:yellow_dye", - "result": "minecraft:yellow_shulker_box" + "result": { + "id": "minecraft:yellow_shulker_box" + } } \ No newline at end of file diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt index 2502f2d2..a9bc2879 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a8dc7d2ae760a953cd8a30c67e79a4b9aeb7d5bf3d16e04f021f81402a86a6a +oid sha256:ee0fa7b8b4176657971c4f905da4854be8315a285b69ee5c31cfd5808d8f80fd size 9417 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt index 586aadfe..07cb40ba 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:212589fe67f54a249fcbeaab1fba2916ac399f2e57fa8975db17955822da5dca +oid sha256:0d3f4d080ff2c90cdee9d7db9c1776821c67992e44e399a0972b2c49f7c73329 size 9752 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt index c2f1149a..3352274f 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d133b97be9b950ae96db7187f9b74ca33354d017d6fa8f4687293a6830d08761 +oid sha256:0f6f566b21bf3654b87ad476a5541c4b63120874a782d0bad2507843b70b9336 size 13778 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt index 7c51382b..3ad59a96 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d024160bbea6f2a11d57f3b84c00051869275472134fc8f6a37addcd27322e9 +oid sha256:5f238dd1a12be504f21ae653d64312fbd4371541b0a6d94861ed6729839b17d4 size 12154 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt index a8b5c533..0654fedb 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6daab3606fb82a241c6ab704ce4e2c46d716e10b5dca4cee4aa10ead2725591 +oid sha256:7039093b5f35dfee9cd932bbea02681bceeeb0f8578ff90d184f559964ca2906 size 11789 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt index 45830bdb..1c7de10a 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc5920a054f2bd5076224984115dd574486769cff6219c044bffa911cda38fa9 +oid sha256:fc2c03b145ef26c7ec0852cb5cf44ce5e4bf8836824c015e16f63c8f40029cc6 size 9069 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt index 73736cea..facc54fe 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a26019bf220aec44430ca94df8e1c378b132b25aa60b0df75630ecf44db9bb8e +oid sha256:8c723283f0cb821497dc9d8d1c811378544e101106ef3453b0a445b3337a4467 size 26261 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt index d4fa16de..35b38b5a 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39c9896ed2ce61d72abf397741aa5f1f6c3d96dfed63125017046b846ef801c -size 26656 +oid sha256:33635c52b80ca60a97fafab1bc56fc22194ca44139d3b7ba87404382ce57692d +size 26678 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt index 2fdcc801..b4ad2168 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5298327fe66c0c11b302bb1075373c66a15270122050ce04a0229d9cec844b36 -size 26124 +oid sha256:e366f629275c98646f9a8375bc3db96d1201785c077d372e552bcb7d9fd05ace +size 26122 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt index a42116f9..9a5fad52 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0615b616738ecb279338e23a1b6a59633e7892ec8d4420699077f24573ddc7c0 +oid sha256:69e52e8e99199837dd980e3df61093cf1fe86941a6ba171c449b9c7bd7bdba4e size 7473 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt index 8da0c701..a7b19e1f 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c705fd6347bb71a50f5b76a5a413503f393049ea9c4ae2c94e53553833b436fc +oid sha256:94078cabc273db04ab20b5e65c275d213e720ee97af16e0eeb527b87f7b1806b size 7002 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt index 1c5667b0..50f484f5 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64fcb02fd4b1fe0ac087d53e68f910b4726e18e06371bc514824529141346e38 +oid sha256:f9133f57d994d4af77538bf371c37ac3bc04b181ba671a7a936c4efd26609ad6 size 2612 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt index d7bb095b..80f9a382 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61a6b3de519f234fd78cd0309922979c95c989279a0ce6979fdafabf3afb32b0 +oid sha256:8ce289950d788eac13a9cc58adaf61ef1580f2b7beb1261ccfa9be6a63590613 size 3048 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt index a71098bb..96e8fd69 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6cb4bf2743d71bcc65f4fb2faddcf144f57243696d9666ed68f9bf8a2f16481 +oid sha256:eba3507d4d5b4bae4fc583c8c06b22fc0202f2a097631c87ae18f6c9c428618d size 2597 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt index bd790581..28c3eed5 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d5bbbb6420c5aea54ff81029ab4c3ca737269098df1bb3f4490400c87e09fc2 +oid sha256:ed6dc2edad44446959f52f6d3ceba5f8d48fae950292c40e7094999a56cb5836 size 2668 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/left.nbt b/data/minecraft/structure/ancient_city/city_center/walls/left.nbt index b6e8e8d2..003cd6b6 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/left.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/left.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e14c7f5142707fcfdceceb3b32c659bd78d5ed6d88edb23e6181f9307f1804b1 +oid sha256:4fe65739864227b640fa28a720ef415f53258410c8037da3d77f6add16c35175 size 3183 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/right.nbt b/data/minecraft/structure/ancient_city/city_center/walls/right.nbt index b8708c73..cca00da8 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/right.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/right.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:103468df5068cf6ea91dbe2a239c6f723feb245605fcadd9b66b7cdd2c0f48b7 +oid sha256:6f48ddb70a8c75e76f1cc17cc27c283649aa85bce35c5003054deeb58b90a9dd size 3178 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top.nbt index 179e1525..e1fdf2ca 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f3d8632638d2cefffd5638367be21ffda5ca0cdeab183145a8403cda913eec9 -size 7119 +oid sha256:4eac1799b7c8ce71a121e2f473d974576805b8cca517fbf4d7f1957e4c837b6b +size 7120 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt index 46af2ffb..8a23f92a 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:729a5a5ba8563947fcc8f27148597662d848f6121d5225a4f24741e0388917b4 +oid sha256:8b96c6f181847d5f7b64fd460607c1bdc4e0e7be9b5d83ab0fd25ee1fadb71ce size 2598 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt index cfce6b3c..11f824c5 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23d883dae1dc8a3ec222c6cf86283c2b2043a9e29399459b3dbda9c3a3a79a4d +oid sha256:fb052e8d20aea7b2deca6296d26e0e229c2d4b3c23e7fbd60d0a29d9fbdc5c0e size 2644 diff --git a/data/minecraft/structure/ancient_city/structures/barracks.nbt b/data/minecraft/structure/ancient_city/structures/barracks.nbt index ffe1778d..7f8ff304 100644 --- a/data/minecraft/structure/ancient_city/structures/barracks.nbt +++ b/data/minecraft/structure/ancient_city/structures/barracks.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:538c882144edc446b9714131f2e70729e912faa98160dce95e09390ae5417ebe +oid sha256:4540518c61767941fe1c924f092263c2803e276826adcdad8e4dcd0c31365af8 size 5634 diff --git a/data/minecraft/structure/ancient_city/structures/camp_1.nbt b/data/minecraft/structure/ancient_city/structures/camp_1.nbt index 65983352..f80bde0d 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18d92cc2111559cab840f63e224ad6d747fb2a302c23752b2e9171a95cd186a3 -size 1164 +oid sha256:f5c527e9ae11f095e46e4bf9ff75ff21cedbdedf691a395ce428a7f7f4bc7213 +size 1165 diff --git a/data/minecraft/structure/ancient_city/structures/camp_2.nbt b/data/minecraft/structure/ancient_city/structures/camp_2.nbt index 66b69329..a74deaed 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08db6bfad499ccb7116e76b69c96b398879731892ce746d0aa80f5047d10b3e5 +oid sha256:effa8ed94fa63e5d4a7ab478aa046909ccc6018a58e4b85fbee326781fd56178 size 1274 diff --git a/data/minecraft/structure/ancient_city/structures/camp_3.nbt b/data/minecraft/structure/ancient_city/structures/camp_3.nbt index be8e5e82..3b756bc9 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a6c6defffdec1ab26f5d07035b129ea459659d425b9c9029170403710f98c7f +oid sha256:8ece7845e9cd5a24a189ca02b86f530fdc09ac860ec6e76d8c0dcdcfba60bfc4 size 1017 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_1.nbt b/data/minecraft/structure/ancient_city/structures/chamber_1.nbt index 5c3eeb60..c5478d04 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d22560aa348d1abea8647443a9ebfa2e3e0a9bf15799ec0d3e6e2e0141e19b7 +oid sha256:a43ad780063fb51a93ba8eb678ed2986baad6d37ec09f63fb1a8577bffcf151b size 2536 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_2.nbt b/data/minecraft/structure/ancient_city/structures/chamber_2.nbt index aee4a8ab..3a13e502 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:533090f11703e44574da05d0c9bcfe2f03edc2938e418d53210d287ca40be331 +oid sha256:01c4f5766ea37568f343de8a6a55f8c4bd3ee124998cd43b28bd8a3b204ac420 size 1312 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_3.nbt b/data/minecraft/structure/ancient_city/structures/chamber_3.nbt index 86576460..d22455bf 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8a203549665f7aeda4bc1ce0c74b10dfee643e7be074437ff235102f61cee21 +oid sha256:0d91d870ef88b2819562405aa9feb5a20565a28c59c93d112c76ea638e470269 size 1101 diff --git a/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt b/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt index bf2d95e0..854fe2e4 100644 --- a/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f5797e22cb822cc01e0f62477cfe74a507ae77e912d6b886999d671cc14a360 +oid sha256:c043032b6920fd60cefe64b27cbb72647a5a03a2cccb5a9caa3ca6b6cafd0f3a size 3908 diff --git a/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt b/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt index 3421f6e4..91b01d60 100644 --- a/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccf193403b7e5a55e43045068758acd8dcff67dd05c3e5a996ac4f047434f814 +oid sha256:1a44ffc00cde5b80a27eae33851f193780aee51f6840e23f399457656815455f size 1477 diff --git a/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt index 7709a6c6..45c4c461 100644 --- a/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db384e446acf117589e1d8ff9cefc7507cc8ca8077af05013e4280341bcfa8d0 +oid sha256:933c4ad7dace77403e7d1f89f24d5df2a08dd481c1cc25441e158f01e7c2beea size 398 diff --git a/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt b/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt index b9fec710..d9269d15 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59dd3b75ca061f24017f5f6256b7fce8f61f30546ec3e0d2383aefa41d50ea92 +oid sha256:56fc7422345bab3ce32eea7b615ef9f290a290233cc5a25d2456b87b5f8941ff size 960 diff --git a/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt index 0712acc9..c3d71a82 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef3b08752e6de7321dfd27453933053ec0e7ad8624373685fead4479ee732cc1 +oid sha256:6b5acdfebc43a1b35a2e9d55724cd1dbfa286a6980c02cffd7856771616f975c size 327 diff --git a/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt index cff9b0ad..d8191e8c 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e17787440c7a453b96a416ab4ad209af4f1e453233e61545478b4431aba94443 +oid sha256:eda44c0455b4c1ee349285749a95ecf7104c08c9261c56dbf94b3048cd4ee85d size 353 diff --git a/data/minecraft/structure/ancient_city/structures/sauna_1.nbt b/data/minecraft/structure/ancient_city/structures/sauna_1.nbt index 841d9181..5241bfb2 100644 --- a/data/minecraft/structure/ancient_city/structures/sauna_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/sauna_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d59cdc72d05d33ea6e1899f00495521dce7427c6c92be0a026ae8005d5699a50 +oid sha256:769a317936314d2fc3472b6c75b04a77e665b2115426a7b20c5ab3271315e7d3 size 6958 diff --git a/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt index d9b89bd1..8183c597 100644 --- a/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:691d8032a3fc1f297c41377402cec123cc27ef110a30b5ef9a8cfb9497392448 +oid sha256:15cc556b3d3b875d177af3791ad566a32aa1254e2e6380102845826c1b8ce35f size 315 diff --git a/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt index 8e362e71..b9170f29 100644 --- a/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89e0b66cac952002ed0df1566d3b7db25878ce702f68c34000a5cc8306da7bbb +oid sha256:4243646a68fea4468eb66e19551cd501d6ae9ed208cf3d6c4f28354b811b1cfd size 310 diff --git a/data/minecraft/structure/ancient_city/structures/small_statue.nbt b/data/minecraft/structure/ancient_city/structures/small_statue.nbt index 810e6079..11c21100 100644 --- a/data/minecraft/structure/ancient_city/structures/small_statue.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_statue.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9dd6bb02db736e9539c866377e86e3cee0d72a46cf8ec57cc9e8469ab79e68b +oid sha256:25556cf041678538a187a71e45c4fdf22bd53e1b798c33e5a78b300942878497 size 893 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt index 7844e702..c6a5dfa1 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:610e82982eb72c0a523e331d009ff7cf939866176aaaac1a5c26cf427f8d68bb +oid sha256:25be6dfe191366da2087f4f068263298fe6d33f01bc55f9c2a82df5c54f01b10 size 2794 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt index 7ceb7a6a..4fe47d41 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fd7fcab134a3f573023b91cb206235cd068efc3a9d17f16e32b2261deb82eef +oid sha256:ce6c30cf98a73caee2ee358000e4e1dbbee45c4387365c40073538d0800edaa3 size 3487 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt index 6dbc71bc..8636ce09 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7638bcb62df47ad050b7025dd056b8694be77b769529086ce557f887adc89670 -size 1522 +oid sha256:7cfcb7276ba2ca080e2d9d7f716b0cd6b97108459b11e1aa2e937256115e9e34 +size 1523 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt index c6bfcfc1..7e868b52 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b151e9f7f356811578eca7a3a496061383008ffc34cd60238dac7a0dc269ab2c +oid sha256:534afbf9e58d128c06d7fa80a4998188a7a4219197d57f6ca6b143179e9c3c99 size 2297 diff --git a/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt index 2fd6f659..cc40f206 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1673359af62b6e022db108cd638aa19174d89acade6f9619d23c093e862a31c9 +oid sha256:2b5ff101dcb81871374ab581da95de2a58360d72cfd9246795bfb384d8694106 size 3838 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt index 699199dc..7acf762b 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:841b590a3dd2ca6ea9b9ef706dfe443c3e409f20791d623df9c8e3b6264a0159 +oid sha256:531cf18f6b1ee9813bddc0fbd399a33819f4a393163b0a051f9a5662479fcaaa size 2027 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt index 9e9e01db..b7fadaf1 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07c405ad7be3156d5bcab4f564427cbf5f9dda6270fc65f77804480b54bd4151 -size 2006 +oid sha256:eb3bc45f5e95603c51a8bd4f6e12311a633e8b5dc8b828804b1a9bf47869e2d8 +size 2007 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt index 83a8bb2a..d991df7a 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb8c7714770976cf2dac81b8bab0777198d43a52801dfa634bd9a75131f0e2df +oid sha256:819864325016eb3fcc00922ecc89e2c297f9d3b373208419a7247b689ca2a891 size 2721 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt index acdf100d..7369bf9a 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49ae7a45313edf3daf5a5a1292d348d98091ba42a03551b52250be7f0c4ffdb7 +oid sha256:54502f7825dcc976b930f8f647b4ae5d08819aefe3bc100731b513b184483a20 size 1662 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt index 0dc5ddd9..2a5a3a43 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc951430505705617358df9e3431a51bb5d179ebabfba28f45f092429c26b6b0 +oid sha256:52f8b193f0ff952d07330c06bc06ebb53dcafa05fb1c770d299eb7ca6b83fbd0 size 2119 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt index 1f080f6a..ec85d51f 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63b387223d829b4d9134333b965a1b65cd8a702ce4a605e392cf2ff062a81e8b +oid sha256:3ccd3bfd8bd429aeb0c3659003fe857deb5827be30706a200429d9d3cd5697e9 size 2170 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt index d30b6615..d8d74606 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30535dcae9136523835d56c80ddba1c9fd274b446f598b2f70eaf2574cbd2309 +oid sha256:439dc54d299e2e4f31809bdd401167174f653bb3c0575d8219a46fd3a5dfb52a size 2157 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt index f277990d..3f356226 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8c379f4868ea677c7374893a678cdeb584ed9826af232f140a74dbe52170d75 +oid sha256:c4e827dc73e13ce87640842a91eb0c82564eea2f64e775ddb1ea1ecf818f8af5 size 2055 diff --git a/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt index 75f20619..a4d776af 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92b5dbcd0a2342e0b1d519bf8cedeada73dbf30fc1bf762e9af74a1bf1667c15 +oid sha256:63edbc16982c730a2251699361dd11288476ccdb740237ac06c82fb7cbc36ffa size 3126 diff --git a/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt index ca793fee..32aeaba8 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f52d66185b20bcb50052d25cd190b496cb60e3b40c9003be9fc421a17c9a76c2 +oid sha256:2289f0fa7d4be96cd905d62cdc514f9dda407697375c8dfff3e31eb0346de1b1 size 2385 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt index 713d3ef1..5be6a7e6 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c35f6cd9c7ef484d5aa90e3c678b83372b1403bca8793d5fcb6568a48d975c00 +oid sha256:dde81b0f18792cfef86a856e64a7c791e6c734280cd4083f0fa047c014be53e7 size 4171 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt index 65833e29..53524066 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84df0e62da6018e8ccd65ba7e28cddd5b726408668b7de963ec2c456043aa35f +oid sha256:b7e2f13d7560e7de1183bc206da8eba8a8991f4ae05f28af74cf0c404e37429a size 3305 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt index 22f64e58..735e5d40 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45abd5154777de99296df9af58eb46381da8a82d89735712980c53ac8b68b679 +oid sha256:f83b84c0f10f1a548c8345c0c57b3919398da8a58b332ed04b2824fe4b7b2a5a size 1491 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt index 1b3b60be..5502f0f0 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b321db3740964570125145db8e808717560814a9b9a4c1c391705cf5ffffd2a +oid sha256:9ff1e2c5ad32d4ee6213e0efc611846a21ab9354b5d63176ccea4c0c06cb29c7 size 1976 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt index 932c558c..f2f12aad 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c93cbf0d5b9173ef5d52875bc3b01d21f0144da1fa558ab8064fed68b90aeee6 +oid sha256:26f8477e011b1a47d91d4f476775edad99f985d12f6097266224a6378c93e33e size 1386 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt index 3acfeb89..23d3eb21 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:822bafb0bda1e34de196bb327380d6ff1df4465eec53eb238ab0327b8e34b8f0 +oid sha256:3680337be9682818cd0065ac2180036e99108ee59b04fb21d5a748735ea3be08 size 1341 diff --git a/data/minecraft/structure/bastion/blocks/air.nbt b/data/minecraft/structure/bastion/blocks/air.nbt index 6973ed4e..2bed24fe 100644 --- a/data/minecraft/structure/bastion/blocks/air.nbt +++ b/data/minecraft/structure/bastion/blocks/air.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b05f3935e9f480ba3c89f013dfb635b73eccab9439438555e3c612afe24f028 +oid sha256:1aec5b7ac1036bca3095a6975dc372ac40e090d676fe44283e1486a66a371d11 size 228 diff --git a/data/minecraft/structure/bastion/blocks/gold.nbt b/data/minecraft/structure/bastion/blocks/gold.nbt index 0e1bd5df..1730f3e7 100644 --- a/data/minecraft/structure/bastion/blocks/gold.nbt +++ b/data/minecraft/structure/bastion/blocks/gold.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09be59c40f4a031f97c1998ee1e3559e93c72873a97df209869fb05963573297 +oid sha256:0ac4e8087eb0c2fcb63b270b39d47693c16b2dbe155eaaa641fa4cdf392c4912 size 233 diff --git a/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt b/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt index 5b70f546..deea80bd 100644 --- a/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt +++ b/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f78d052c573805a0f9752e657abdc6ba5391a72cdb071d1240fc6fe4baa2bdd +oid sha256:0b4908a2f3a45e6ea97ed3da3a8eed53264ff45c1719231bbfaf1d92ec94b9df size 15687 diff --git a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt index fbcf6c35..e7877511 100644 --- a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt +++ b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edf1e4a057710d5a05796231d412ffccb7a7b9f0c1d72d82c3fdaccf560ead18 +oid sha256:9dfeeb903aa1eac05f3d4eb460a8d8fcd5bd5a7777280752f1503d593e92d4be size 1428 diff --git a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt index 4e414bf4..341a09bb 100644 --- a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt +++ b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44bcda96d03c4b2b5a4719993876610a207eff62cd962ca12ebf81716b6a69ef +oid sha256:fa6491fcc720d767cbe2f34b71eef992aa1bd45fd711d5f6244290423ec92151 size 1375 diff --git a/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt b/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt index 773b050f..3316a67f 100644 --- a/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt +++ b/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82b2e7744ad0647d62bfc46c2b562794726c3b06d788b54437cf84142dc0160e +oid sha256:a57d734a88735370dcf3eb568a60f58b6a598020090d57c45013b6034a8bc055 size 708 diff --git a/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt b/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt index 5dac4d3c..658088e9 100644 --- a/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt +++ b/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfcafded8afeded2039b3e8a4452df463a59e40ab58792b98bdae9c5093a2f7d +oid sha256:dd95099df065bebccc53cf3ac48f3e45a3630167480a9ea292b77626d7b3552e size 739 diff --git a/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt b/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt index df355974..675ebc3f 100644 --- a/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt +++ b/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb4692cb5bff03d922d95f913296286db4e497f202b47c3c3c657f2d5a1dd09a +oid sha256:a7aa884769bff6ac1b5de04fe5becb2b1e8945bf16f8a380670abb4f7eee0167 size 2055 diff --git a/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt b/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt index 9f20df81..b5afe57b 100644 --- a/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt +++ b/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:adc70786165af13c35ddcf59dc2f605b556f6067fa86eea794a13e58722bee1d -size 12579 +oid sha256:938ac11c4528667884f3627a126f1f7619ba00e1f53dae3b21a88506bad8f8b0 +size 12580 diff --git a/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt b/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt index b8711a8b..67c5419b 100644 --- a/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt +++ b/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b72d40571179a940c7e51a065fdec37b85797feee6bb69e3d2a87810d2cec15 +oid sha256:3be3273a36689907eda363401de27947579bd1ed0f723e53ac8eb14984ea1445 size 19410 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt index f0afcdb5..6eb4f19a 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b50261a5469ecc46709f82d19cbc6adee6d8f88650e8cbb02c57ea559db4c46b +oid sha256:d730d1eaafd8d59168e579879862ee5054fd04093004aa0519f322c21df4b020 size 41138 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt index 8f96a5d6..b9e3a413 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b86f53bf39dd9c986edc189c58ceaa5273b042734810ecd61e5ec9fbe034fa7 +oid sha256:f8b0760a6afd42907831f52d2063940d14e193e01dd51f932f369aa905b05840 size 45585 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt index 32adaea0..47002ff9 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8996947d054729ab4ec35f00157216e066d237430a617aa5ebe3180adc8524d5 +oid sha256:21e79f03ed40b160bf83bb327b925dbb0891699ff9dfb75258a8b2997a7a1879 size 2739 diff --git a/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt b/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt index 58fcbab4..f77143b2 100644 --- a/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt +++ b/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7e09633271176cb1a292fe2f73a5a6eabfbbe691be4d11e39569578fc4a1d22 -size 17433 +oid sha256:1af548531081e5e3cea7efc6529e8a64c0bacd546a185ee4d01c0e8815b8bc90 +size 17432 diff --git a/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt b/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt index 0e92c121..95403bf7 100644 --- a/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt +++ b/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d50b1b188442cd6d94097736ffb2ed40c8673489add2ab21efdc597770a92292 +oid sha256:5a08d918ef900b4ccb80025f8be322a4c2e63f5f6fffbe97f934a340d7c9e290 size 17260 diff --git a/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt b/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt index 46729992..6115e3f7 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1e79fae16de00ed11555449053504c2809b0de854590f2ae7f425381f63079d +oid sha256:96946897fb784ec66d70fc1c00ddaf102e1681aaaf28c2f2e06d3da00b9f7e66 size 80384 diff --git a/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt b/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt index 40272814..ff8e698c 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7265e6ad8056e1cf960c468031066e7354e53269fa10e639de767b59d7081d14 +oid sha256:14c2a5cb9967a2f98918a7f247f6bbafa6e6acbb0bf4bf35dcffc85f6205fa84 size 288 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt index 895a1f16..c0adfe98 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aeff3e7cc4b8a6db18dd91048d5d053582fc3b9f07c3b036a137c301636801b5 +oid sha256:0a967416a384f024982424bf0f25cceb8c2eb944d4588e6ddcce6f6d9591eb25 size 1880 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt index d3d3a5c7..87a19724 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a96b010f118b4da7bff6627c3271e850ca3615d92fb8560e5e5b5e5e378c7a73 -size 2076 +oid sha256:5fbd152b7bb57393fed5d07b380c2be9d5d1c810ee4da45316f3497f6be4f4ff +size 2077 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt index 5ef69bc6..590f3983 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1813829832fd5c1a913bedc42d3bdaffc9cb43ed1e630c9d6206623aa0a91561 +oid sha256:267c2d75ad0e73e33c6d96bff79eb7fb2c19b21bf175fce7030d66c7beff9467 size 2353 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt index 39802ec2..75f98a25 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa8cb9f4e9b154f07ffe1b7a57ce97e45698ae594bb6edd6dee4dcc51680ef71 -size 2399 +oid sha256:43caa18a6872b397cf064ecb508cda8c655439e0f9f86151e1c7e7e71ad553c3 +size 2400 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt index c23fcfb4..5741bd4e 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13fe683e9074a3294a32faf94276b6d42c84c0efa1a0a4bb2bbefa28c640e082 -size 2147 +oid sha256:44facb69403ddc6bfc17c87962a2c7d662aad3bc82b8e9135944371d2faf7f67 +size 2146 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt index 5455d144..2348d78a 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba37acd5a9f2c8287a9982c824ebb9ff4c70317b96d0dbec094c73f53aa8e162 -size 1965 +oid sha256:08b0dfdda697f8bb474efeb93b8c29680121bedfac210a3f3a9e193b105477f2 +size 1966 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt index 60b8df4f..31e95e0f 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3cb059ffd5a17639230efd878697e344b8ba63a5e668b2700a7f585517015156 -size 2319 +oid sha256:e9bc200f2875b204354373bf3bda1130655fcd1977db8f0f38b5f4f5c8a91f81 +size 2318 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt index 9d1939e9..c521419a 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7565b970aa9108f101fa05df1539b5c0c9ddfbbd9801798bb84deb3f280c4d2 -size 2555 +oid sha256:4f8195e38abe39b55b69c9fce79bc52367064984b728d8428c0eff98c5ab20ec +size 2556 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt index 20d09fd7..4addf619 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53a7f7c9c00efc645559f57bbaf2b70aced6e3f813a5883e76dcd7e3cd7883dc +oid sha256:5f96c07847b57221f5590a505746426069a9dfc2b7ebef722cefba47176af982 size 2454 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt index 6b50dd17..6e42dba2 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d83cf2e57c53f9b0622eca6794dd26495b0f3a5d4186a7d45abb7202a8ab55e +oid sha256:30c3e550a47bc0bba15e935bc112fab9bd26d18ad55c1eb7c31ecbfd2f9d6dc4 size 2398 diff --git a/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt b/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt index 66c4e97b..47cb460b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03cc3895c82bc709a5b63c1e14e5c6b35f33c468e2cb26438660dc831a2a5dc4 +oid sha256:b1b63dbc4e20d8f12bef83cd4e65a294fa02bfcbaad7e0652922057779ad57e0 size 530 diff --git a/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt b/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt index 0176bd01..559509a0 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0caf2f0fbf7729fa77db0b18ccd09b8e3f44d5bc31b0375945cc6c91dda63955 +oid sha256:9cd43fa2fbb0e511176849537170b53bac23d1ce55ae9ac4252fa96b172aaf3b size 1168 diff --git a/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt index 0346dc5b..6e545c13 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50f5009854c323adedbb59c482357d8923ba598acea76cc6d93f18061ed4c105 +oid sha256:6c761c3e03e102310ff5ff607a78199f56a192eaeb1eb596b203b3ac477d13ff size 2179 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt index 4d517020..2751cb99 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8b3bb6dc9c75cdf282c72283fa6309d4b0e447901fbc62c44b5ff25b396dfc6 -size 19110 +oid sha256:347a18dbfed89ba1a1fddc8bb08d2a6067a85ae4b69e1f82e9cfe4d9b1cc7cd9 +size 19111 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt index 5fb01b98..108300d5 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4609ea588fde147d5e1135d75aba663570522299b17711e5a18775ae7b2f6d98 -size 12207 +oid sha256:ee01ef99955d6b60595c685e4664f4cf38780347506953b501bad67054ad7b86 +size 12208 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt index 1352f6b8..a5e1ad90 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4984fe2c4f064062514e7a49bbf9d9320c1c8a8f3ee9cf0ea8a2d3606047036e -size 6390 +oid sha256:cd0abd57fa5ef4353cc225c5dde9483c3124c12a0cfea0b3b537399c058e21d3 +size 6391 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt index df1e33af..74c9cf68 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4787f0ed568d9fa2acf59226c0d31bedaa6fb34b9c3c06930fd59b9ab05862ff +oid sha256:f4a3fa82feeb51ae3cef85cdfba81ea1d77714f8a733ec82ab0985a66b37e75e size 1898 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt index e9e0e628..8e6e9bbf 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9652b90a721db558c43b332b56276e0753e3f9bd6772a45d489f0b71bb922fba +oid sha256:169faba3ca2ab85760303743db6fb813b512081e163d07ea39e781a72231e343 size 1980 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt index 92c4ba98..3117436b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c173100e6a8fa26413a1ffb4c9f9b32f89439df4caf881fa8f923eb53563cb35 +oid sha256:7c96eead0e023ff9a810baee6d56ebb4991fd80837a438bb3450a2d281e16ae5 size 2211 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt index dc25b681..a447c557 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c123cd7a8c54b9b049ac5b85d76678c03529d55395a3dc76e7b35ac5038098eb +oid sha256:f1b79ea257db895b5cf5429d1834adb529bbf4c2c408a3f94e63f8e4909034d2 size 1681 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt index a1cf74d4..4d1c3ac8 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:886db72c0e6ee85e40ef16c9f233167875523e53dd3f80b9cc56525e832e1467 -size 2138 +oid sha256:fd1cb6a9ad6cf496d6ddf38a350745d2baf858c675c91f5ecc2d4f62d10ee01d +size 2136 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt index c41e85ad..c87ea139 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaf58989a9323ffcc4f880eed522d97ee5257f86f2ef48d7afc1c1ce867ffe9d -size 2065 +oid sha256:52fa15cb9b36be037eae273ffd848db47437251fe8c59c2988fbdaaad4c100a4 +size 2064 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt index 1fdfa35d..5763278b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17f406705642921c11bb9a1711848ba617d80ec57664b5e194ffc63cb8d6d517 -size 2149 +oid sha256:0122bc552ce7878d9b73a1774f2ef8e06a262a02e2f4469c2e404025693b8ef3 +size 2148 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt index 3b15971b..7995ed1f 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64364fe40ff64943c8f9f6b6a5c503f61141e96823d144601bb6a3ac4a00e526 +oid sha256:fe4e0e6ba7ea120913a4ba5f433b6e1fc8091673b1183f1b42c989c5271f62a3 size 1850 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt index 157d0949..0d7bb29a 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a98b82616d5c011db943d2b3fb74315b6ee6b74d3815d485c11b4fb94365873 +oid sha256:d7b03e73f834b71023b8021b127cb1d59ab62447161ea472d1791fa40f9ab42c size 4466 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt index c0facb57..3ebce9b1 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8c9b1303c49c6ea1d9e56d1fb88282bd2bf6880c6ae10009901c1c0c0246848 +oid sha256:8edc308248965c320f1529e769d7275073f10b334fa5c50a79bd20cd19359a7b size 4275 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt index 04d56fe1..e72bd101 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1766a908b58da341bb91adbdf6734a1b14c0aec1a3e0f5d80a3ef5470facd724 +oid sha256:add3151ec8dee1d69646ea8e4ec623a53bdbd4810c048dde20a03ab27fb516b9 size 4338 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt index 8e5b7b95..ff5ddac9 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c090705f69e8d32ab8805e9c2d7dca4e2a7efc41f4cf04b217f8b52711fbe48 +oid sha256:1a802f29d49889324e72f742f2003601d13567de3a4d0584eb6486d87ee4c651 size 4498 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt index d0a7b789..2a178fba 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8567906b01bf44e67376c29be3687bf110ee9ee2e5159d0884195d51bc15786a +oid sha256:73ef017dc54649ee7c3296ca778df5519efa094023a384dbede841c951931365 size 4439 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt index f8720dce..a7762b66 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4111280792d05ae7d694d7f4923e7b7dae19ccc6f6ffb53116a26708854cfd7 -size 4412 +oid sha256:6ca296955e16994a5773cda073f714a1b0b6f1083fcd1aef387f5c906946353e +size 4414 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt index c61d5286..b4e9528d 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d980374ae884d414c90aa786efac0588a7b015af3fb79c63b3660c0d7cf8fc1c +oid sha256:60bc62fc154309d9b450a78ece00a56ca51c1d3755f8a058593d055268443248 size 4334 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt index e480a002..d956c077 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cc1f38ba017ba1e58df688314a1492c29bf6b0bcf6028f50e46ec6a7300652e +oid sha256:f4482fdf0190e5fbcfeaa755c57ac8df1d1c74cdb1b5da1991b872d22a885121 size 4119 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt index a0eb9eb4..f7cf7436 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ac32aff9f5498587d861aacdfcc87fc39351a4c78f716be8439b5977a538e0f +oid sha256:9a3de4a4ab3ca0806d61ec314351474d853cc3ea4d3500ead383b6584c659471 size 3303 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt index 6aa3d892..06477fb9 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32ccb18742b5fa0199697d178d021b9630c59c441b9f57689b6a2bf6eefff9db -size 4378 +oid sha256:12a544b7f668618a1ab1b51621e6b24b830aae2d5c68e74039b9e980a83ce4a8 +size 4379 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt index b677b62c..bf4c697c 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:273ea124c22b1079f84de1eb6a58180147069964a236fdaf337d0286458ed3bd +oid sha256:5b51dfd962cfb38cfc2407705c24343e5c9b05e72da33365ba3be310556f42be size 4021 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt index c471a5ca..4a3c0438 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c093866d7dd956dc80f8457cf9b317312c932d918850633be92f29647380f969 +oid sha256:dba1e769710ce3bb22043a60eaff1aa4020fccd3487bfd337b33d54da2093208 size 4005 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt index 99581a89..af4b231a 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e51adc245f34cbab85f33c19a85f4f05483ce2738e9c709522af1a06f71370d +oid sha256:649d32106dcea031e74fefd623323e6b00ff467bb131e03b18b7e28ce2eb6f3f size 4210 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt index c0dc41a0..f5ff98a7 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f4f5eb3397d95a6addb0ea49bd0bd0107d3e9972810ef6d3584507862b45511 +oid sha256:1a53a187c812c0417aca0324d7c66f9a7d78697728e142064128a76b374950e2 size 4322 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt index 4655aa9a..01015038 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:176dde7abab63e15d49fa9b1229fea65252e190e3a11471f185f839ce5d0ec44 +oid sha256:b9bb53bd82c2dfb3410dc1d4f545cc662c5938aa8b1d75dc1d4a30386331cca8 size 2779 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt index 5725d1cb..ba86b1fa 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f536334277ded594392845d179a0077862e486a52b7233c9bc1b1bc570883c7 +oid sha256:705c493cc8f8c6d6fd3877b4a62fe6fb51dfb94a252a4b571a8f4080b64bacea size 4612 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt index 3a2b376c..d4bdc6b5 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d03448ac05bacbb9bba0bea6b6ff551ee1bd3aae7c5340bf5a68e1f89df39b1 -size 4626 +oid sha256:9cf271e15cb7296b25130f5f000bccf2745d6c0add65f82c7b651679d75a86b5 +size 4627 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt index c7339b1b..49571da7 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ab4d04649084e9cf2a1df0acf3bf8a0b13ebf31923b673bda49fad611f0cbf3 -size 4543 +oid sha256:d087b1741320f401f710aef3b6de76818031eb5102f5bcb2f4255ef15a6a2a71 +size 4544 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt index 394a53e9..536f5d82 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8663e1a3c573a2719844fbe0015b2ccba3f329222c90cd3af149f22e2b5c9811 +oid sha256:3ca157286b50ad49110f62c1074910e3d8e32f9045e1fc49afafa18e2a667ff0 size 4742 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt index fdc1504e..99017157 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b350c661fcb9a9a8a6a54faea0f3533dd0d3afa3f2eb03a846f37d5dbdeb371 +oid sha256:ee85e8f17dd5570475a1b36be7d3fb6e7425ab3791a7749194b3898bc81b8002 size 4591 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt index 7753ff4b..0ffeca3d 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c83ae0a6a3eddb437d576946859dfcba5390b73bc17d6799410378d41e591a1 -size 4627 +oid sha256:f67d0e6a38f7e8f31befc5e9335d8e0ac54760b58c87eaf77ca5af970964f46e +size 4628 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt index 9ea5810a..3eb996c5 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb9ebcc43874cf61d15c44ac5e7c577b7e05ea818f3db5376b3c23f864ed4008 +oid sha256:70ea1e3da9135e7884eaef78d90afe4a049712e5976baa71619bc590f99e2b67 size 4911 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt index cfdd292e..1a607cef 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9f8509fc0b9f17fbe0abaf31cf0b737db43ad00e896e9053fbcfc571d434b5e +oid sha256:0df504e9e25a49a634a0588b79e1a5b04d967a07297cb6faf0e8f3097187a34f size 4910 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt index 1caa2620..944499b0 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9dcf01aece7eea38ff2ee4dbbedc797359293e8f819c6b30aa93786bd96d863 +oid sha256:7b23bfe3e0016f43e8b6ff2af83e631766f1ee09d994c6902df40b6bc8b9c2e2 size 4917 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt index 47620fa4..92cfba5b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6025cbb952cba9c338b33be4f5a4775b43cecbe1bb1a01adc43b7c985c70c00 -size 4585 +oid sha256:6cdff82d90794fb3587c90eb3dc2280409ca60732c2766bcb6dde42814817c6a +size 4586 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt index e2fa1995..0e7a128c 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe6f5d25d97aa90a9024bb30fbc4306bbc2e7f0bb13ef1a93fdbdd7cea069401 -size 16617 +oid sha256:e7ff531a290cb3b8355ef81f8cb18770ba33bc76a6f09ada0b15dd826ed253bc +size 16618 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt index a1256722..031a7801 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8bd47bfa730f384bfb2a7dd14f3b86bc9d50bed6c5db47c71a2eb9ef609ca29 +oid sha256:ed6a060daf94cabb12309c9b921aaf0a8f5bd172783a9f1e9d3709eea9af26ab size 17027 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt index 35a52afb..78a154b7 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72a1289e00fd2c63b51154670ec1e9cc5ce2c75a980bb17e310ebad6edb995c0 +oid sha256:7268ad310241d969f51a97b4920d80c41d359555a80c78a6714f5c4d2b0b44fa size 16415 diff --git a/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt b/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt index d941ca9d..ff4ef823 100644 --- a/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59e310a91611d63e7d413a54dccacf4ebf3469da57283537cd801ab2e3c6138a -size 695 +oid sha256:4531806e9eb81df1c71f483863bf5cd95acc1227c1119d63f5a2a77c9826d14d +size 684 diff --git a/data/minecraft/structure/bastion/mobs/empty.nbt b/data/minecraft/structure/bastion/mobs/empty.nbt index 3d055807..10936a2c 100644 --- a/data/minecraft/structure/bastion/mobs/empty.nbt +++ b/data/minecraft/structure/bastion/mobs/empty.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1ac46d90d13a3b39f34ab8629e40844a496775a44bde7d02006cca777117fb2 +oid sha256:441c8f6637bd9d7bb01bd8b54d23df27c332b7687e749a8c342c1cc6928f5377 size 229 diff --git a/data/minecraft/structure/bastion/mobs/hoglin.nbt b/data/minecraft/structure/bastion/mobs/hoglin.nbt index 8c8307ae..5d4cb3a7 100644 --- a/data/minecraft/structure/bastion/mobs/hoglin.nbt +++ b/data/minecraft/structure/bastion/mobs/hoglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7207a3e993e5d06c625bc5dc9cea94a92db0680c3529eec5d0243ceba551584a -size 738 +oid sha256:f6daf9734d073c4908095e2addf320ac087078a46735ce11896850b4fd4e935b +size 705 diff --git a/data/minecraft/structure/bastion/mobs/melee_piglin.nbt b/data/minecraft/structure/bastion/mobs/melee_piglin.nbt index 1aabba1c..75fef413 100644 --- a/data/minecraft/structure/bastion/mobs/melee_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/melee_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b868f0965813d904a90bf199053b9d5d4dda83a423efa23fad1b7ab331f76a57 -size 682 +oid sha256:3494959301901330a3014860bba32493d31de8e4d86c050f158a10e010679152 +size 651 diff --git a/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt b/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt index 430b3b3a..10b299f4 100644 --- a/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt +++ b/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d7fcb9686b8fd0d9a13749d29acaed288535ae41518ea0c71b95ea372b75760 -size 674 +oid sha256:751baed480fcfb5b8f6ba5ebd3c8f89e229a054a375ef699aa9c69dd88f8fa34 +size 643 diff --git a/data/minecraft/structure/bastion/mobs/sword_piglin.nbt b/data/minecraft/structure/bastion/mobs/sword_piglin.nbt index 60ed4711..9506a1a9 100644 --- a/data/minecraft/structure/bastion/mobs/sword_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/sword_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:269f93517cf1907b1ba8e7cd4b3182ef9125658538feeabcaf451d5490746d04 -size 701 +oid sha256:303c2a9cca36c9550b7c5f3c7cad337cfb62252e57bcc89ca9b95002d0421b11 +size 690 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt index 623fbd3b..0933c651 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:572919fe5e0a5844c30c01729e228acc443b72b4e5091caf22f0e2f3a128a21f +oid sha256:d4c29745e94c05c7cd0e39d3b8bd745baceae5e84638b574d7c715b4c18f67a2 size 1025 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt index 7eb27ab7..ce2ab35a 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3cea215e23b27664c5339412ccee6a75bfe390c541c546d1f6541df04646f05 -size 960 +oid sha256:456677c73d91419c85455f60888cba68e326b929b5fda6754395b26216a27aa3 +size 961 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt index a0f7f186..c1eb040f 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:245ce7b574f5ed5191c8a76c35584872c28ac404d43861074bbff4c4413d5af8 +oid sha256:f833314b479a56a4312d86188567c9bdc2a6f346e1542c75fc034aa7d473a94c size 1076 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt index 6db4fb1f..6d0f6e7f 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:628d578e18b03f16dbf1e693b38708fac7fd21a730f43921ae2d56c730ca453c -size 736 +oid sha256:48457c034deaa1664010e500c30e64ed18bd6380293db23c3e151a5b0050ed29 +size 737 diff --git a/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt b/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt index 5afcd1a0..ced8eee0 100644 --- a/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25aeda0fd17e6b9432165ee82be9451b328de877c56aa38971ff4461bd96c918 +oid sha256:8aa6fa6939a5dce6f46b5ca549bdbc4a28a711bd4f57a439c69bcf5835c45bb3 size 6585 diff --git a/data/minecraft/structure/bastion/treasure/big_air_full.nbt b/data/minecraft/structure/bastion/treasure/big_air_full.nbt index c873cb7f..042556c5 100644 --- a/data/minecraft/structure/bastion/treasure/big_air_full.nbt +++ b/data/minecraft/structure/bastion/treasure/big_air_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dafc0538777311bf7eb427ef9660761db49ebea4647c81ce230626e5dde94f1 +oid sha256:6c162614d50e97df8fa78085c94f5fb1a7095ce3ce5acf1a0d505b38aac5e464 size 69674 diff --git a/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt b/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt index 1d2cda8d..3dec0fcc 100644 --- a/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt +++ b/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9abf8bca57c21cbfb53b871f98717c9d40c82989997afe94c679a0866b22f62 +oid sha256:8a837a2d1d18328fc8b0872389ed6c55503c08b40a40bedc4ba433feb2ce9631 size 416 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt index 57228754..a8f82074 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b33363830a30ba03eb9881d96fc221b947a4f609feeceee3e5ad685df3a2ddcb +oid sha256:f287da8e876b13a045598f74526b78d09cbb283bbfd6524d7c7953776a042482 size 288 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt index bd5316a3..c8c6081d 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3a7b53d8a76805cf27d6d261fd3964527c646fc532dd60971c558e1309f158c +oid sha256:9bdd9ee43ca56e98c9ebbbe7ef32c8ac93eca7f2ceb8a5053988f332d939979e size 287 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt index 6f00a1c4..6b2eb681 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68734164025f609e28e081df84b7b32ccda828ff0bcbdb3d1a662838c553e501 +oid sha256:b07e4f0a120e2ae453d9b60edf82ceebb8eb97c4a9fac752326e6237ff4fc2a6 size 292 diff --git a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt index 3467b1fd..9642e6ec 100644 --- a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ca6bd98db274f9c3ed83bb391eaab03bbf1f5fc6f4e4a61d5e170fd5672448bb +oid sha256:1db1c88ff3850e5d7d150b69dc6e6c259d0da2bdda94967c1f1f37adc7a4cc19 size 1685 diff --git a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt index 731029c3..8c998c5a 100644 --- a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9690a1c0b68cdc27efd081f57576d07faad1995d5c4bfdf06dc7eb774794930f +oid sha256:e9c3bb7c08e483ef75f8d84411798a52bd3e2fc22d13e0aafeffb5e76932042b size 1680 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt index 010cc20b..594e5560 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:962ed6b2628fb4df254f8de780157a9ab803bb5b9098d8cf663c5fc9245e77bf +oid sha256:4f981d96e09e42210688f8e858bfcc43a576952489d49e5ba3f32706b35b34f5 size 451 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt index 436458f8..9142d59d 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec951a995851e20f8182ff620c3e2c56d79b1b73ddc2d0c5a41e7702885836d1 +oid sha256:ee374b861e94a7bfce94273c26c14fe0a80f73ca332814cb962fa1e61fb6a6ca size 440 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt index 4dc3fcfd..77cabd53 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbd65ef6b698a5093e31ae695758d2eb685a023b896dd657c286f0d0a584e490 +oid sha256:df5592b67339d7a05cd53251d867a86bb59c567f38cdffcb9b204561770cee1e size 457 diff --git a/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt index 63a3a15b..93849a78 100644 --- a/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c63ac591d6bbdbea51f75179ac92b2945099d28ed08abc83382c2bbad6bebd4 +oid sha256:4e26ab019be5a9c9f43d5c233ca21cdd9ab3c5da0791f6caf78405aecea3daf5 size 1586 diff --git a/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt index 40cb75d0..c166b23f 100644 --- a/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c243ef2e525c2b8e4111c3615c8b2f82e02b348b77c8ccc60a62407788aa616d +oid sha256:c6bcd90ecbb75b449d13d9739c9fcf6c93ab53e9ee392f8654cc554c0783b75c size 1539 diff --git a/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt index ad3c248d..6d0ea1a4 100644 --- a/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea14ff4c67e866e8ff9da3923232aaad6d9162b5d85df6f8d2d2bd01cd3a4784 +oid sha256:c0e78890d1d117afb63a2068b653f6dc6ffad31d43b1160adb7e535349990123 size 1553 diff --git a/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt index 8e256278..6842b4ff 100644 --- a/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6218c9a73b238aeca40c2923fce95ea457ca08848477c0c910f76924c12bc103 +oid sha256:f2c7aa7175a46002f4818b00db0e3c059db98e168cb4086468292919e4695c6e size 1573 diff --git a/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt b/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt index 321ed943..468b20e8 100644 --- a/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt +++ b/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26e06e99dd87f881ec3ac7004d755358821d47107b55331d956d004923992d12 +oid sha256:d04449ccaefab611105970eb6225e6b8ea4649a306ea50b9d9b7eb73de730a75 size 11197 diff --git a/data/minecraft/structure/bastion/treasure/extensions/empty.nbt b/data/minecraft/structure/bastion/treasure/extensions/empty.nbt index ad005599..92eca3ab 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/empty.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/empty.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af02479287b00608e23524e9b3ba5898cbde71a5eaf0da0a7864fe1a274f8b72 +oid sha256:ef4aff2a710e0e64829b10a9d43d45f4329b27affbac55a61c10c91726919855 size 233 diff --git a/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt b/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt index bd3fda8c..812ff290 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d497659a9a4d02b4b23afffbb349f31e7ced7f0d557871462e28e140f97288d2 +oid sha256:161a95eabfa107b128820933b1cdbb1a418945edc081ece633df41998becdf90 size 1867 diff --git a/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt index 4bf9d089..a2d618b8 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1889bae944963ccc69c2f07d2db5601a0e9e173c745963f31085819ebe898b12 +oid sha256:293849fe896f06bdc053867c0a56fd9556766752915d48b98dc44826c0c7a056 size 2078 diff --git a/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt index 7be8f8ef..b23dae89 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dde687ec4291d15630ff93d38863e7fc9f96e21deadb4ac2610f3c527f60a2ec +oid sha256:0faaf2792ce4ed90778be6e123b6ca592b14cc21cbdba8af6e20e99a2ce06dac size 2160 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt index 67e6d711..0398ea0b 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d2c1255eb07e94f9759587d3230e9ce133dc1ee79060e1f90bd154e426ba5b9 +oid sha256:2d2b73318067adeb3a03de6a57d8ec129b41e92d36539bc3a8a05a1a18e42f95 size 455 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt index 8f771436..0f7be9e8 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f25e301cb70eab5f2af5b552d1efe3b0db36ce34a49717e31a73f7e6cd7bbc3 +oid sha256:bebd4a59c91d0b9172960698910f4513ba6ff02c02cc0c5b76a3351ba1d69a73 size 418 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt index d56936d1..1dfcaf52 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20f79344e6f73165aea7edb45d1b0a7a6d36d47774cd41632081b55e8e0014fd +oid sha256:5dad75d7504b8105c18879c0ab59fcaffaf00b01fbe8695c19c51158f970e616 size 539 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt index 7eb09dff..9261b716 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94a2f1457426794af2c40e14e9fb2c773bc23035f6f41f851d0d4a8527727e8f +oid sha256:674d0bba22ff08c145aca9d0d895b79f3011d607b06f027bab633c8e2077e145 size 616 diff --git a/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt b/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt index 03719e0b..4028f326 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:514d067c7b03d70e985e3885fe089d59e0ebc53fed92bd55db79478c79cceaaa +oid sha256:907682c1131eb7a471cc4dc631c3d96a356fd1c86bf0d35e2ec126e4fa5dbbf7 size 642 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt index e607f1ea..8368375b 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:024d32fccdffdef6650ed3df422ce6ee85746e9d49431c27e91a6a7972ec7fdb +oid sha256:e01ee7e5aa269825bb89d14a0818e2146172125a2c03b574ad4fe57e477f986f size 320 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt index 69932928..1b24bc65 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbc6739794eb240c53220e7cb694ed603f619a5512d45a22174d682ac99ab988 +oid sha256:3c723861fdd55426bb4397930370a4cd0be7023c2ce8328f465e2e83336c78bd size 390 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt index ae432625..4c45bc3e 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f75876cdb14d342e8d743e9036fdb9c5fc46eec52c2961867e56b56f5b10dcf +oid sha256:da3a01008481f31145aba8282e200c35515f6835056aaf4c37c3bb60a4572dbd size 349 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt index 1980a4fe..45eb4de6 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d10d301f5bcb6cbbd79ee90fe591fe97c7b1ac087c38e210a5de1fb46bc545ff +oid sha256:7e03371c05a93936b11fa10e8594efb7e991ff59b00354d27ce5893f0020357c size 480 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt b/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt index 89b97072..1233ed32 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:295a3c08a645a1c4a6d267b65166c8a67566ef340b0b0d4522d9d466b3bf0041 -size 11780 +oid sha256:7deef3ba0020b40dc9f8fb0cf073d060efee8f32f7e1c2b37341ebeb1938901d +size 11781 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt index 0b2a9456..6476888c 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3774d1d4037858e5a8c88a610d2ab35c2a4b88083547f6218ce6ace0b1e0559c -size 24170 +oid sha256:44d1309e93626a973ff3f53c77b54603f66ce1adbd38f742720488276e728ede +size 24169 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt index b6529b48..e1d8c83e 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d1ead462ef615a9cc62db1a112fc5371880e80fac74d0a145356ef90e1621ad +oid sha256:62a1f786236c2925dcad756277de4a2b78c53ca0ff097b90a61fd28fede36a64 size 23969 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt index 1a0fb518..41d972d1 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:078d8777bdbe96f1702b4af150fd94a28a8b6e9c04075255e998e9e10523969c +oid sha256:36620ea022072bc99dd4053b27ab435e2d249e34de6f27f4b96cd8852c0650e6 size 18999 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt index 34d2beaf..57555934 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:566a5a46c4e33219d1fc7d0ad2f7a94fc835bc4a78809196b8a9441434ae8959 +oid sha256:c26c0c297e8e35273196a2b94cada2f35a4f6c9b51d9903316070d7250355155 size 18147 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt b/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt index 5fc931bc..bb9325ae 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b079025959deec452180f74b0695bd4bb52a48250da6c1d037169fd1ca77f79b +oid sha256:4c09407fb1ccc3abf5d2b97d2371e791b76e2f9599d50a6bed6ed3ade891a60a size 9861 diff --git a/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt index 5a585a86..d54290bd 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b11473629a7bb4decf429dbea4ddb9810f916932b64cff41e8a8203e4fa0e93b +oid sha256:6240a76b7a16875836ff70493c257e5af31f7913996d8ad02fcfb57420c4e150 size 3448 diff --git a/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt index 68c50de5..9750048e 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e95aa2d1f78ecace9005014d17ab336a359b6adbbe1576053e0de519b3e0bcfc +oid sha256:b227874f6f823ff7a2b595eca2a3d67890049c074b0ccfc0e8bb688b8c4da5de size 425 diff --git a/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt index f7e13444..e1ef66a7 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55e9745a31ebebd5dc4e260488c8b180698683c570a2fff1dc9e900128446249 -size 990 +oid sha256:d58b1b93135af90fed349b27594cad51ff297b939e0632ebba534c87f2f2a432 +size 991 diff --git a/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt b/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt index dd0686c5..4159596e 100644 --- a/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt +++ b/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d44fe057c935dfeb54d679920f5e8047ef1e50fd80f53d4d2d1322bfccd46415 +oid sha256:931d5a97e389c103f20a57c40d141ad44012e9be5f8c5a808d7e89833e0f13b3 size 447 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt index cce4cf5b..2176ac3a 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c64bc5aac601d929e9a8b18a3ce16c68383e3b594d729b4675b741e7145de1b +oid sha256:13df1fcdb021e97fa8889500061eb1b715f334b075cdc60a66571029123ffbee size 6613 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt index fe4f6f50..fb44b051 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bf2a9e539e077a0a9dcac379775c9f5f9ce139643b7ee185d4ace5f0750e621 +oid sha256:ff7f71307354415512fd3c891214532f9b8b47e981e477e04a96983f0c5a4806 size 6500 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt index fb13da2a..eb912b97 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd1b9401b55dafd2c15b607359020ca805084583b7e4eff4f9739080ccc88d2a +oid sha256:07cb216a5eafbcdfc07e856a981e6a5eeaaab9aac5ed854a57a90b954353ec0b size 6443 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt index 7a952500..93a91242 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e02c7e1f0b2dc5dab1a715ebba2c432425fc5e4a3c355ce96acb3d9cc33b32b +oid sha256:420e473738bce9c695c12550bcdd30de8b85c3f4ba5b6d5929aa0effeea311f1 size 6491 diff --git a/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt index f56b468a..6f8f6fae 100644 --- a/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37c36a65b8bf9d9a709df73ba46fd0d570464f65cc25dc3daaa103ade2027175 +oid sha256:d60769a303afd0d941fe4fcdf3fd6b34a3bd6b402161f16434572d9e9500f56c size 2679 diff --git a/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt index c2a34f5c..8ae9501a 100644 --- a/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69a860e4a1b29541959c449391485b3d04ee5c8dfee4073be7e4c9d51794bd80 -size 2797 +oid sha256:04ca8e0d2210a9b78018c3a6d818fbee7c0107d32801acd34174b6a2fa0584a1 +size 2799 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt index 12875960..29791372 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:850664d56ff311dca04374125a789dcb40bb8af065f571d3cead3f53b21cafff +oid sha256:959f7f86be59181f16ff78e3292e2bee1031c41ebe1ca647b0be47ae4f09561e size 6297 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt index 7921a752..b83d8f49 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ec4533d9866699b57efd69ae0a2541110092d814a4490c23109784f4192166e +oid sha256:5b6f9e325425db947d23ae362436a6d3038a6c50ceacc876f595359505d1777f size 6153 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt index a675d30d..7c53b99e 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a039ae72b7b7879c688e58b592fdeabc2a5db6e14b2f032a49bee0a9a06e15b -size 6175 +oid sha256:7ef9393b82968026027a5ce24b7f293e054cb0dace94cee9920d7103a10c0284 +size 6174 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt index 01a6ad49..0638fa62 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94f3e6d212cb8829448c3d3917c988a29ee3be01230dce207c34e08b0c8e321e -size 782 +oid sha256:76f36715b74a4df2197e2dcf07ced33c0d11887828688551fe691fbb16879a14 +size 781 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt index 06d57b6d..5347b864 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac7fad35a17bd62fdb38e702be2bc9f05de9f9eb53f64edb19f5ac9a890e3166 +oid sha256:1580d5287c39f72bc147bc1903a429b82de5881be56d849ecadadbc6ab833f5f size 2333 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt index df6160b4..814859d2 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:992abcc36bf082e7f851c229dae915b4b3e2f9b22ad17b985675f1ba0c9e20a1 +oid sha256:06aa94c664dbf982063cb9ddeb169d8fb4ba6ec82adfa3d0aa218fc21d7f4ce9 size 714 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt index eba73edc..82806e98 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0214c68ce80ee0edb82c5bac120417444ed641d03640e328eed49e76dfac57d1 +oid sha256:06e328ecdd3e3b0be43fe2bd95777d3044f2f6f06ffee6c6c5e951ec68c88f23 size 2206 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt index 08369fae..59317635 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f53da9e73b30b7428b0fc776f359eb47429d876ccd594683546ba457dae4013 +oid sha256:6df5fa67c7338a7ec56c0a5d27cb0d544a86f67e239b7a31c4eb2027a9331e97 size 2449 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt index bdaa62bd..6fcfdf00 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09dc80f38b78a76bb817ccdcb9b744d2156eca5c1e454e582f537b01657391e7 +oid sha256:d16644e4d63090a0d0c8fa4085f7736436287ce7f02c72a42fb40a34b1130379 size 806 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt b/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt index b43fb428..74d6a7ac 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6dc875ebbee6df0611627b3bf1d6b76d84f3f39abaad2d75ddb254014cda6f6a +oid sha256:cd50209261255d9ebcc714c583888402842c49281381575fb286e8b5f50c8069 size 6220 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt index a7b3fced..de88a67c 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:855ddd7be7cc57b4b0e98d1c89d6156e78a02f3b9a734d67ccfe2381a0cd4bc3 +oid sha256:c9d9dbdf4e549dc4b94dae4acea385e718247b32935c77fdf5f289bb6e51f475 size 6226 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt index 17cbb62d..49fe80cd 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d90dc447db143512d3f0f56fa2e5d8a198c22007b8d73df125a1e0139840b97 +oid sha256:0b2ec7ed04f9edecf9d2057985c93afb66f1567b706ebdda8359948d3aa14425 size 6219 diff --git a/data/minecraft/structure/bastion/units/air_base.nbt b/data/minecraft/structure/bastion/units/air_base.nbt index f74cea70..36074284 100644 --- a/data/minecraft/structure/bastion/units/air_base.nbt +++ b/data/minecraft/structure/bastion/units/air_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d52b352a937fe010a1b4867ccaaaa0ad98a3acff347ef738d021cf23c741f8e +oid sha256:b1eb892bddc94b79c67fa1a011302668fc4a4b6d7a81bc1dd70606d287d321bd size 63633 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt index c363154c..4161dcf7 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:453c7ed1f19728c95afb7f759b5c5ebac374ab02a10c1a1a47ac1399c496a0bd +oid sha256:ab8b4a8ee187945f8010ba1fa1ae5e2e7c08180912718176cb82ac3c26b3107a size 3083 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt index 6fb4768f..736cc240 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c25f7cb8f18dfbd6a055d9862f3c45b52af8d835f4eab55ca412015057cbb446 +oid sha256:d796a5a117de448bd016b98fa4167ffadb2dc9c4d6e1af97be238654b7cca33d size 3293 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt index 02cda297..431246ba 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c7d79cdca8c4726f883a621e36ede1e4b54243780a8417bbcf54788320ad5db +oid sha256:05973ff26dd00268cc8804ca9d7f93641aa610daafbeb1dd54cf234719718075 size 3359 diff --git a/data/minecraft/structure/bastion/units/edges/edge_0.nbt b/data/minecraft/structure/bastion/units/edges/edge_0.nbt index 67caee93..284a0b40 100644 --- a/data/minecraft/structure/bastion/units/edges/edge_0.nbt +++ b/data/minecraft/structure/bastion/units/edges/edge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:786c017fae4a2680d6cbc8ac98f2918ad1507adc012dac10fe3e49fb87908a12 +oid sha256:f89066c8b67a41a0227b563cf4d4bed438e2310766df3e227b2ac37871f4867b size 2382 diff --git a/data/minecraft/structure/bastion/units/fillers/stage_0.nbt b/data/minecraft/structure/bastion/units/fillers/stage_0.nbt index 3ff87cf0..a07ae499 100644 --- a/data/minecraft/structure/bastion/units/fillers/stage_0.nbt +++ b/data/minecraft/structure/bastion/units/fillers/stage_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43ac9b2da1a2e6a528df2e24007d87e72e8dc22a5536c571d5ea129c755e29b0 +oid sha256:1300cc619834d4e491484700168044fd862a8f01a8a35fa49e3c89b69bbc0a23 size 2454 diff --git a/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt b/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt index 13b2c07b..0a865090 100644 --- a/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt +++ b/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c9446ec238661b37990fe2827ff98baee4690689d850f138d5d685afea36cd6 +oid sha256:6491030165b17c5620dcd2cd96194c8772e3ecbdb53629b9585b0c2a781e96d2 size 355 diff --git a/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt b/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt index d4c6addf..98f008e4 100644 --- a/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt +++ b/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:40077c471ff44b8b24a55be0e317cf3ac01892a8cf1e736b0545ca7768cddfd2 +oid sha256:bf313a4f86dd2980164280f654bddefda3be8d35b7993f5473a72b92ee37c512 size 355 diff --git a/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt b/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt index abac55a5..8fd5b8bb 100644 --- a/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt +++ b/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94420d04a87eec15293beee1be11286ebf9fcc2b316b0181d598237016932e82 +oid sha256:0e4d8ecce7cdc4623b6a97d2187f575ee8f2c424fa0907b887be6e329ee90c08 size 3657 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt index 53dd5d66..f7a2f378 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be054d5eab347979d3f12914e8b4835f9711af528352986b4b83211061314aea +oid sha256:745bd9161756423d1c76b86a98afec9d8dec216b01ca6feafe4465337927ad62 size 23660 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt index fa8975e3..2b4353b3 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33ab5f505d4dee8d7ea89822ea296acee98b89ab61cde0f3de3548b06eea0fff +oid sha256:494598a4b4e5d214187f7d2c5d2a3fa46ba8f90fd7731b2adbd520ee5ae95319 size 11771 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt index 370ad11b..c83a0f0d 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52884b0f4f3e7f512ba8effa90a219f0e20a92112e5fb1ec527403f9cde4e414 +oid sha256:e266270810fa72176f8e5bfe4c99f1786e69e0a883e27a9a46a7f170823d57ee size 6942 diff --git a/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt b/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt index 4916fe61..7acf24a3 100644 --- a/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd9281ecdc9b9142f87d44158b855b97212a009cf65119e003a57807edbf025e +oid sha256:48287b1f3746e0c5cc5051e36e20a20560df9eefe9681afb6e2e2c5c49729115 size 2401 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt index 3f165a26..88cffbb0 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b49b88e2d1377a781ab15f5155efe5ff1142b638a0847fc11f78f79585c3d9e +oid sha256:aa689d40304cd7e83afa8d115e020e4637f8890ac61404d4aeef516497fe0d57 size 2549 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt index 47e95094..b84a94a4 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a1bd5bb6edab8a52ca4f7f07a27701a12463af1aa06585948a0a6dce1a5fd03 +oid sha256:d08fd74605ed363cccadd51e2a11eb8f3cc5866a72020f3b614da30995496bee size 2613 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt index c9695186..a01a44f7 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:373f0346f0e46b666347067b943138718d7ec14cc62e811ecf3626d174ecaa8c +oid sha256:0ca7ce8f5c16b1dcc191edb91eee9ea5b46a0c10570b123c0e7fdf00054c3ebc size 2705 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt index e82ef61d..b5e84d7d 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1290c10d97ea115b568b46704929d236b9f4a689268ff0d4de9c49e2f02c41dd -size 2507 +oid sha256:3fd7df08d0785b3d0149e3754b27a3623f9eb89515bedfd7894bc6a0c1004332 +size 2506 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt index b918f494..da644d21 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:39e9324614338341e9564e2f5a0d134c032923b7c02ae93ed1450da937c9233a +oid sha256:7923d5745fd9699976cabb2c59385d0acf4931baa86f246d8d6b4833680466e7 size 2442 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt index 6cd151f3..9a5d986a 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fefdf7c2c4856052de2086b218378cfef62ccd07fab253fe2283b3645f7b236c -size 2422 +oid sha256:206620e7e57bfd058a714dd8152cf15451ea4f0e5ebf87b8399eda430711a4db +size 2421 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt index 5f43cabc..e8b33350 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebce140cf69b762ed132409b79dd8991275e2c3e6c52f3e912a183e78b464b85 +oid sha256:f8b1cf8791d74b8fed85b8ac4757abcfb07e89e0385264155b292b6a91416b5c size 2510 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt index d11763c2..94e93f74 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a4baf957da5830ab023d560308bc5223ee8bb3d08a35d869fabf2ebfee65dbb +oid sha256:a127ad91c56d36808c25e988162d6e7e064944059050462f1fb8a91c5975d578 size 2486 diff --git a/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt index 63fe27d5..4c5f2e6c 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0282e5c86f6672375f0c8e799e571f5e0de84f9c18a7e179a7d0408e4dda0b2 +oid sha256:f0e8474e662a84540ce82a4c4d2474bbb5997ae8ed6d564e27027fa0d4a19031 size 2423 diff --git a/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt index 977e9e0d..d087931c 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:032fbd84e2eb264524bdbb528798643209c9be6452a76a6551a20581bd7b211b +oid sha256:261f9362ed18a8669fdc1650d9f12ae8dc2204280e0c40e801c3e65bdbffa67e size 2461 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt index a000c2b7..7f69b564 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a3ba0c9f9ea4f58d00e64caa37a71d61b5e074fbe3bff952f27cec0a6e23594 +oid sha256:9fd0b70d7b857eff72621459e79f364e08ec09c135dbd1146641da5458ef85ac size 633 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt index 45639f72..42dd9065 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c066fc2c7915e4b7bc0890d442c3a5467637be3fe1d60a54e5b351a9f7f4618 +oid sha256:ac9c2b36496ccd90ed1eeaf51d57bb9ae740e3761966c47ccf37873ef81e9699 size 690 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt index b3b8dfeb..da400a0f 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3be666d479c1b728506fcdc649db31f0f2bd2f4d5dd2d2429203409e26df815 +oid sha256:3e8146b7b4417642b6e648302757c2b4c68e0b9712a701b45738ac1239fd7388 size 629 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt index 2bb41318..8e66d3df 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef8853229f229bd6c9e0f6b30e3d437891c6a2c4e0b8ae911a2d7f9b70a9d82b +oid sha256:f76af5ca523b040112960c0a505b3ece77e5992159e790511ce6a8caaeece986 size 656 diff --git a/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt b/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt index 36225a3b..77dff64d 100644 --- a/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt +++ b/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:627e9fc5c9e678b39174071b6994ce74f75a9547a6c33fd8f96b140c3c106936 -size 2821 +oid sha256:3bb8fe7dbf20c95cfbdef81d266f4d61ff4a6e012cac2bb2eb4c60455c4e96df +size 2822 diff --git a/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt b/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt index 78fdfd44..313e43b6 100644 --- a/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt +++ b/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0657d71ee6a551f55384e7f5cc118510e299a46415f3647d61c29fb3964b3d2 +oid sha256:2fa14f1ca19141fce88a0dcb3ef405a0a38a510864275c0614a23fb0c75c6e1e size 2500 diff --git a/data/minecraft/structure/bastion/units/walls/connected_wall.nbt b/data/minecraft/structure/bastion/units/walls/connected_wall.nbt index b94b3696..94d91ea0 100644 --- a/data/minecraft/structure/bastion/units/walls/connected_wall.nbt +++ b/data/minecraft/structure/bastion/units/walls/connected_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86351901fd9a1545631d568343254d3fdf85e1ac288a7354681663915fdefd04 -size 15616 +oid sha256:6dc8eb6a234a3b03e2d392d470784185a2c6af51c1f23466313a42d821d7f08e +size 15617 diff --git a/data/minecraft/structure/bastion/units/walls/wall_base.nbt b/data/minecraft/structure/bastion/units/walls/wall_base.nbt index 71fd4de6..7231189a 100644 --- a/data/minecraft/structure/bastion/units/walls/wall_base.nbt +++ b/data/minecraft/structure/bastion/units/walls/wall_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b358d44fdd4f7caae900a6bea9d7a4e7e3ce0eba3f6d4c0c2bdb0fe002dbe172 +oid sha256:ba9597ee197d511ddc2126906822a4d8e0bb1c575f8cf0f225b519cb97c9fc9e size 16904 diff --git a/data/minecraft/structure/empty.nbt b/data/minecraft/structure/empty.nbt new file mode 100644 index 00000000..b6c1aec9 --- /dev/null +++ b/data/minecraft/structure/empty.nbt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20e3954591985dd1a07905e837d8f87a6b32c431c03add42c79aa133b7fa3acc +size 125 diff --git a/data/minecraft/structure/end_city/base_floor.nbt b/data/minecraft/structure/end_city/base_floor.nbt index 29ae5b2f..0109c8e9 100644 --- a/data/minecraft/structure/end_city/base_floor.nbt +++ b/data/minecraft/structure/end_city/base_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f73f14beb56a6e547b5f77a0ac2f8b4ecba308af1c89b50b0fc1d66509d761ff -size 1686 +oid sha256:346bfce557fb954deb66d6a86cf54a074b82b33c999fa10b0c69af03b374d613 +size 1687 diff --git a/data/minecraft/structure/end_city/base_roof.nbt b/data/minecraft/structure/end_city/base_roof.nbt index e32cf519..83be8023 100644 --- a/data/minecraft/structure/end_city/base_roof.nbt +++ b/data/minecraft/structure/end_city/base_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:114249f428665f22339775eac92ef47eb4ef5203a71062db9fc652f78d6545c1 +oid sha256:b3baed4b258f7c839fe54cb16f4073a0fec44dec33a9cd1df0380907032addf1 size 1180 diff --git a/data/minecraft/structure/end_city/bridge_end.nbt b/data/minecraft/structure/end_city/bridge_end.nbt index d4d4ace7..910a0489 100644 --- a/data/minecraft/structure/end_city/bridge_end.nbt +++ b/data/minecraft/structure/end_city/bridge_end.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05e0e71d7860375b6a9620e1b2b178fdf770cafd57b43daa61cb33302f0b2b88 +oid sha256:13e527f87c4e80dcf5e0ea601f655249e816cb17fb7609c2bc46ce3fd623eb04 size 475 diff --git a/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt b/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt index 9b7d7424..21295946 100644 --- a/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt +++ b/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ca99c4fb7a87ffc397e3bebcce7633d38503054b6c44e5807f1c5d8d686f0da -size 1142 +oid sha256:10b9569847e12c5f7a03f8188b12240f04c2d0f05149ffcce2a793fb7015c2e1 +size 1143 diff --git a/data/minecraft/structure/end_city/bridge_piece.nbt b/data/minecraft/structure/end_city/bridge_piece.nbt index 06f63093..b9a4c8a3 100644 --- a/data/minecraft/structure/end_city/bridge_piece.nbt +++ b/data/minecraft/structure/end_city/bridge_piece.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac92987005fc3f4db328692d050b012796ada361af2df85a045769fa9850089e +oid sha256:03ff1b030765ae5515cc1f76d9d8aaaa993e571e4da965c3169343a2e8120232 size 599 diff --git a/data/minecraft/structure/end_city/bridge_steep_stairs.nbt b/data/minecraft/structure/end_city/bridge_steep_stairs.nbt index 8e44acbd..c7581ddd 100644 --- a/data/minecraft/structure/end_city/bridge_steep_stairs.nbt +++ b/data/minecraft/structure/end_city/bridge_steep_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c262c8a1c9156d1636b7b88c4a2f2fa71dd1bad44a3a5b98fc079e9a036f2ac3 +oid sha256:a54933c9e11e5855d11c21ab2958e5e165b1063611f09faa9d8f8f8e5a7767a6 size 714 diff --git a/data/minecraft/structure/end_city/fat_tower_base.nbt b/data/minecraft/structure/end_city/fat_tower_base.nbt index c4eab369..47a852c4 100644 --- a/data/minecraft/structure/end_city/fat_tower_base.nbt +++ b/data/minecraft/structure/end_city/fat_tower_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:277190e1112861d4de008c6fdfa50b3262cbef03116104af40f5115af35f5abe +oid sha256:c023918a5ce6f700544285133fad412b08c758d811bccec5591e869ebb2e93d4 size 2338 diff --git a/data/minecraft/structure/end_city/fat_tower_middle.nbt b/data/minecraft/structure/end_city/fat_tower_middle.nbt index 16ef60b5..c7353e5f 100644 --- a/data/minecraft/structure/end_city/fat_tower_middle.nbt +++ b/data/minecraft/structure/end_city/fat_tower_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d38e4f20b54cd09770993234554f4b6a8c519eb00a82508a67b516aeada35a24 +oid sha256:0e37900c1b075d98e69505e9635c4856481e3c8b1f751d0daf5e19115ab55769 size 4468 diff --git a/data/minecraft/structure/end_city/fat_tower_top.nbt b/data/minecraft/structure/end_city/fat_tower_top.nbt index c12c25e0..14438ab5 100644 --- a/data/minecraft/structure/end_city/fat_tower_top.nbt +++ b/data/minecraft/structure/end_city/fat_tower_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd3863e0cd4b9880d97a923616b5535d2b662404501f14e93cf7d6824e21c235 -size 5959 +oid sha256:61c1ac5d569a6422caf50a6b20da2273591e6c47bfd4a418e23d210678080bbf +size 5960 diff --git a/data/minecraft/structure/end_city/second_floor_1.nbt b/data/minecraft/structure/end_city/second_floor_1.nbt index 6d6c1b56..b027cd9c 100644 --- a/data/minecraft/structure/end_city/second_floor_1.nbt +++ b/data/minecraft/structure/end_city/second_floor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49162dc106c7daa10ee941ea2bee1961cc265f2d6d7a5a94e64ed167abf61eb1 +oid sha256:26c0b3778d488215a2038472bdfac6fd5301a7bbf3a19b69015d0583e770268b size 3716 diff --git a/data/minecraft/structure/end_city/second_floor_2.nbt b/data/minecraft/structure/end_city/second_floor_2.nbt index 433ef919..fc5c01e3 100644 --- a/data/minecraft/structure/end_city/second_floor_2.nbt +++ b/data/minecraft/structure/end_city/second_floor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7763c508c3cac924b56b034f8d7d83ebc7a19de8ca2697d1ea6a27a775738cf3 +oid sha256:35b025abb80fbe03389a14cfbcd0e51106be4b5930d19055e9c8cefdeb60c2ee size 3970 diff --git a/data/minecraft/structure/end_city/second_roof.nbt b/data/minecraft/structure/end_city/second_roof.nbt index 5faf84b2..e4cb8249 100644 --- a/data/minecraft/structure/end_city/second_roof.nbt +++ b/data/minecraft/structure/end_city/second_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d1b55c6b93b0272d2c7ddbebdd9769d684507cea22fd6de9162b2c7e570517a -size 1426 +oid sha256:0eaab91df6bf412f6f785fc0cc456211510d89faee2a322363889beb75908629 +size 1427 diff --git a/data/minecraft/structure/end_city/ship.nbt b/data/minecraft/structure/end_city/ship.nbt index 666ba3b4..95ff2bbe 100644 --- a/data/minecraft/structure/end_city/ship.nbt +++ b/data/minecraft/structure/end_city/ship.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a10cd74d81a6c78c028efabe783cf733f24607256a98b495a960657716a2fbd +oid sha256:5e112c4114622650bc278bd76f013458e121b2c75d2ebee1d70a9103a9c258fc size 26445 diff --git a/data/minecraft/structure/end_city/third_floor_1.nbt b/data/minecraft/structure/end_city/third_floor_1.nbt index 1be6c846..784c4f77 100644 --- a/data/minecraft/structure/end_city/third_floor_1.nbt +++ b/data/minecraft/structure/end_city/third_floor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d85e1023a0af383345755f2e690f33fa1eeb8a88ee9915fb4fa98d989890813c +oid sha256:1f001eaf4ec75aac48b942f276a3bf50ec3edb7b33a9e0a5ff1c4fc1966d3638 size 4787 diff --git a/data/minecraft/structure/end_city/third_floor_2.nbt b/data/minecraft/structure/end_city/third_floor_2.nbt index dbbc0010..9be436bf 100644 --- a/data/minecraft/structure/end_city/third_floor_2.nbt +++ b/data/minecraft/structure/end_city/third_floor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:041362b9408406912e823120389c7de998fd47f36fee67aa2d51e4095939acbd +oid sha256:a9ac78e3c477ec32f35cb4d1759d9c12704cb053b9fe75cfe2fb92b485026c13 size 5159 diff --git a/data/minecraft/structure/end_city/third_roof.nbt b/data/minecraft/structure/end_city/third_roof.nbt index 56a51d32..4ffccf76 100644 --- a/data/minecraft/structure/end_city/third_roof.nbt +++ b/data/minecraft/structure/end_city/third_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c78151fb7e1102ed45ee4c8b0d7103e7d31a56031d78de2f4d16ad14f5354d81 +oid sha256:13aa79f7b0639245bcc6d9f83322a77781a79546fd384a89285d48918f59f255 size 1831 diff --git a/data/minecraft/structure/end_city/tower_base.nbt b/data/minecraft/structure/end_city/tower_base.nbt index c77157a2..16384553 100644 --- a/data/minecraft/structure/end_city/tower_base.nbt +++ b/data/minecraft/structure/end_city/tower_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ce5bec94eaf36e8cb938a4401a9d1357e2b2885c3a2c46d5caeaa1a363b35cf -size 934 +oid sha256:98a082ac23cf5ff676382c9c0a7c820c865e3b24b069266812948b1512509f13 +size 933 diff --git a/data/minecraft/structure/end_city/tower_floor.nbt b/data/minecraft/structure/end_city/tower_floor.nbt index 613de52a..23baadb9 100644 --- a/data/minecraft/structure/end_city/tower_floor.nbt +++ b/data/minecraft/structure/end_city/tower_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb7818af19334c7f9abc4977ee913b74379587c0c25489549eb0e0a28a0b6d21 +oid sha256:9b74b7884fda52a40d80580e6cba4743fade8a18f3e311db897a60600fce3420 size 980 diff --git a/data/minecraft/structure/end_city/tower_piece.nbt b/data/minecraft/structure/end_city/tower_piece.nbt index 45eeb142..25d7157e 100644 --- a/data/minecraft/structure/end_city/tower_piece.nbt +++ b/data/minecraft/structure/end_city/tower_piece.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a48880980182ea7961a89aaf5e861ff374b0738966e80eba06368b03d3e81997 +oid sha256:f3467b086120eb08ee889061396d3a88e353279e1d41a49a72c465089e0a07d9 size 898 diff --git a/data/minecraft/structure/end_city/tower_top.nbt b/data/minecraft/structure/end_city/tower_top.nbt index 173b1cc7..d1b463aa 100644 --- a/data/minecraft/structure/end_city/tower_top.nbt +++ b/data/minecraft/structure/end_city/tower_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1805a17a265d4bb3a192cd483bfc172ee92f524cc56ebba112f9b343ef4063c6 +oid sha256:93dd86c5d1ca0c9efde859e18013a82ebf9e64266607028a7413fd06decbff18 size 2036 diff --git a/data/minecraft/structure/fossil/skull_1.nbt b/data/minecraft/structure/fossil/skull_1.nbt index 33c96b19..5657a63d 100644 --- a/data/minecraft/structure/fossil/skull_1.nbt +++ b/data/minecraft/structure/fossil/skull_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e45e8819923b7f13518ec19fdfd6c27e4febf4ea2e1d8076525a18d0f4107711 +oid sha256:56dd3abf23a9190172c68ebd27c351a833cac3372b3c0f95095ce9dcf35d9d12 size 442 diff --git a/data/minecraft/structure/fossil/skull_1_coal.nbt b/data/minecraft/structure/fossil/skull_1_coal.nbt index b12c4b7d..162069b9 100644 --- a/data/minecraft/structure/fossil/skull_1_coal.nbt +++ b/data/minecraft/structure/fossil/skull_1_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c30316d9a9ed59ff913e316961dbffd049c44fa6c1028fc76ea9b11bd1b6baca -size 397 +oid sha256:963b965694e23e206fa5cc6c12487c55cf5f985d2f51f723444818bee9e6f506 +size 396 diff --git a/data/minecraft/structure/fossil/skull_2.nbt b/data/minecraft/structure/fossil/skull_2.nbt index 65baf570..1a4ae3e4 100644 --- a/data/minecraft/structure/fossil/skull_2.nbt +++ b/data/minecraft/structure/fossil/skull_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d780f145b5758d32b9445bada31d4fb68b94c9b34849e56c71df8f59927f514 +oid sha256:a2ee092118d3ab0b979584098a282a5f706fb6e92a1bff0c3dbe764692d22530 size 398 diff --git a/data/minecraft/structure/fossil/skull_2_coal.nbt b/data/minecraft/structure/fossil/skull_2_coal.nbt index 756348dd..dbe9ec45 100644 --- a/data/minecraft/structure/fossil/skull_2_coal.nbt +++ b/data/minecraft/structure/fossil/skull_2_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb8c4f64e70f878c39cb037be6114e8d1582f531e30c153eb9b1a97e25828c86 +oid sha256:dbb6d58ff0df7d5dc3c8acef39d65103793ee250ae6f5982e85cdd231ca31144 size 346 diff --git a/data/minecraft/structure/fossil/skull_3.nbt b/data/minecraft/structure/fossil/skull_3.nbt index 1e8901fb..aa3d8d3e 100644 --- a/data/minecraft/structure/fossil/skull_3.nbt +++ b/data/minecraft/structure/fossil/skull_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edcf23bb1204af42c739452df2ec0434adb2fd5e393c05902b2bd6853130a766 +oid sha256:81f783dc5ed4657bda93c5bf9742fa00c825773dc1643d6a07b13d3228de6035 size 348 diff --git a/data/minecraft/structure/fossil/skull_3_coal.nbt b/data/minecraft/structure/fossil/skull_3_coal.nbt index 6e6e0d9a..3ae33555 100644 --- a/data/minecraft/structure/fossil/skull_3_coal.nbt +++ b/data/minecraft/structure/fossil/skull_3_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53b722d72a42e8b604512b55f3e14cbfeed3dd8339f53194664ba765ff9ccfc8 +oid sha256:8d0dcd14772d827a860a54d9d1ac35f0e3f97f1f559666a3dcbdf62c9c5cfc8e size 318 diff --git a/data/minecraft/structure/fossil/skull_4.nbt b/data/minecraft/structure/fossil/skull_4.nbt index fa8b71f3..d0a2acfa 100644 --- a/data/minecraft/structure/fossil/skull_4.nbt +++ b/data/minecraft/structure/fossil/skull_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15d7121bdcc368c203a98a91521f3e30b0307405227794de488ad055fdac4bc4 +oid sha256:a03515c8385b6f1e58aacf448138ae793a31fbd10eed00f6a13110e9aeed21c9 size 270 diff --git a/data/minecraft/structure/fossil/skull_4_coal.nbt b/data/minecraft/structure/fossil/skull_4_coal.nbt index 545cfbf4..8a1e6b87 100644 --- a/data/minecraft/structure/fossil/skull_4_coal.nbt +++ b/data/minecraft/structure/fossil/skull_4_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83e99cc11abe3cd079f3adc645cff4c524fe6e0c5e5ab804e2697a75a8d2f06c +oid sha256:8e9ba2a82c6662bf42ef650d20d7c8f19e47f13b02f511ca125e86968c60d332 size 236 diff --git a/data/minecraft/structure/fossil/spine_1.nbt b/data/minecraft/structure/fossil/spine_1.nbt index a844b8c0..df9fb36c 100644 --- a/data/minecraft/structure/fossil/spine_1.nbt +++ b/data/minecraft/structure/fossil/spine_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d7fc20618d688ebdc753c60aeae011ebe4eba480aead161c99bd6b5512c7e38 +oid sha256:a83a94441cd4dd26e7c5c51b6ca0691b82079d3a160762cc78b5c4a16342a1f9 size 272 diff --git a/data/minecraft/structure/fossil/spine_1_coal.nbt b/data/minecraft/structure/fossil/spine_1_coal.nbt index f985fdd7..e66bf147 100644 --- a/data/minecraft/structure/fossil/spine_1_coal.nbt +++ b/data/minecraft/structure/fossil/spine_1_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf320d380148dc42f05f29359ef8de68e89ec67d31e506ef4077e5016d4fd5d8 +oid sha256:c13d78e136a398c2416f9e9cea3dfd1723b37e679a1c282d130247e71e1fcd38 size 252 diff --git a/data/minecraft/structure/fossil/spine_2.nbt b/data/minecraft/structure/fossil/spine_2.nbt index ad12c3e7..5c6c71d3 100644 --- a/data/minecraft/structure/fossil/spine_2.nbt +++ b/data/minecraft/structure/fossil/spine_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:932c29607194dfcf1209ecf8a921e379bbb2f0546b2461278b7fcf2554e6f195 -size 361 +oid sha256:48c995f2c544103e9b4a822d9f27120fa2b47cbd7cc0100aac7ba5072656fbec +size 362 diff --git a/data/minecraft/structure/fossil/spine_2_coal.nbt b/data/minecraft/structure/fossil/spine_2_coal.nbt index 962d9a2c..1eeb5468 100644 --- a/data/minecraft/structure/fossil/spine_2_coal.nbt +++ b/data/minecraft/structure/fossil/spine_2_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e9241eb4a07580ea4d4d8e653fb1937c0a7125ec8ea50dbc9c345d86d8cf1cb +oid sha256:41004dfb3d55cbe4f640a832b0974f5317dc69e6c598a47d5cd17dfcaedf016f size 325 diff --git a/data/minecraft/structure/fossil/spine_3.nbt b/data/minecraft/structure/fossil/spine_3.nbt index 4db1b9ee..7ba732cc 100644 --- a/data/minecraft/structure/fossil/spine_3.nbt +++ b/data/minecraft/structure/fossil/spine_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69d4c4a009c977a440e8869f58e326e37cef1cffff5d865b0b98e4a77b6954a6 +oid sha256:4ddd6619e889609969db8bfc55786a60bd6bf445d98f64530e9124b3c1142fac size 457 diff --git a/data/minecraft/structure/fossil/spine_3_coal.nbt b/data/minecraft/structure/fossil/spine_3_coal.nbt index 8407d37d..fc66715d 100644 --- a/data/minecraft/structure/fossil/spine_3_coal.nbt +++ b/data/minecraft/structure/fossil/spine_3_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df04841de7c3fce88bd401735bf06a607a90f78edfd3bdf3a6e7b0456a8b74a4 +oid sha256:09959f73d34b76c4b2664ace11c0fa640799d63ef423caa6276447c49398e734 size 437 diff --git a/data/minecraft/structure/fossil/spine_4.nbt b/data/minecraft/structure/fossil/spine_4.nbt index 49ed0606..94cfecd7 100644 --- a/data/minecraft/structure/fossil/spine_4.nbt +++ b/data/minecraft/structure/fossil/spine_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfa80c34058c03ac3c7d68072c98ad06ebf617e0d645dd1856f107954d4d8ecd +oid sha256:f23183fd2517f00621390517cc8be9ff5e6658c3288089b70e1d439fc89ec78d size 529 diff --git a/data/minecraft/structure/fossil/spine_4_coal.nbt b/data/minecraft/structure/fossil/spine_4_coal.nbt index cb3e6598..3dbcaa08 100644 --- a/data/minecraft/structure/fossil/spine_4_coal.nbt +++ b/data/minecraft/structure/fossil/spine_4_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4b201b8e7c22ac4e51e84805cf86ddb3e44025c47add361e7f2520e1fffc605 +oid sha256:d99db2c3e1fcdc1daa05f4e1bb47f4c3b305754df95096f4c92d4713d98c8b80 size 482 diff --git a/data/minecraft/structure/igloo/bottom.nbt b/data/minecraft/structure/igloo/bottom.nbt index 21c1bca0..b30a9757 100644 --- a/data/minecraft/structure/igloo/bottom.nbt +++ b/data/minecraft/structure/igloo/bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0553c38640e4a323ebe05adb56d8785eb3865d170ac4b642ddbaf7ca06a34c8c -size 2772 +oid sha256:f8e1207a54f0554e620d6c62b36cac8f13c513ca8d1af6ed9d5ad5e17e4d741b +size 2732 diff --git a/data/minecraft/structure/igloo/middle.nbt b/data/minecraft/structure/igloo/middle.nbt index 95e2b05c..7eb77598 100644 --- a/data/minecraft/structure/igloo/middle.nbt +++ b/data/minecraft/structure/igloo/middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7b140192bc7718cd4b522dc41a868ad2c3c36ba9703f894b76b620be7cdd72b +oid sha256:6b952c9d51b898137f3f54e5edd6d88b8de7200cecb7e6d450a4b43aa89c945a size 237 diff --git a/data/minecraft/structure/igloo/top.nbt b/data/minecraft/structure/igloo/top.nbt index dc88c5e3..d34830fe 100644 --- a/data/minecraft/structure/igloo/top.nbt +++ b/data/minecraft/structure/igloo/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd7f5cf13ded12f99e50a8473aa96c0dcce74c65ec902910f78fa24be660a650 -size 910 +oid sha256:8650b4c724935c16fc3042b5cf647957f1b8a9fa0bac95ab50a3f89a5c3853e2 +size 925 diff --git a/data/minecraft/structure/nether_fossils/fossil_1.nbt b/data/minecraft/structure/nether_fossils/fossil_1.nbt index eac0e128..aff45a41 100644 --- a/data/minecraft/structure/nether_fossils/fossil_1.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:885a4c20cf9b8cce25fc8e23a93102c38eea7ac8e14630e0779dcc21f40c027d +oid sha256:fdd49c588fbd2b4cbddef15b72eda592111ad9910f038e0638742029f7ab450f size 398 diff --git a/data/minecraft/structure/nether_fossils/fossil_10.nbt b/data/minecraft/structure/nether_fossils/fossil_10.nbt index 377536bf..f364e143 100644 --- a/data/minecraft/structure/nether_fossils/fossil_10.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:776de632ae2c92821da9ed99c86870b6b9c36befb94b3dace94a754d9ecff821 +oid sha256:dd186459f007d2177be95df660e9d7304de732f019fa1a21f27efeea14d5164d size 238 diff --git a/data/minecraft/structure/nether_fossils/fossil_11.nbt b/data/minecraft/structure/nether_fossils/fossil_11.nbt index 2211814f..d2776184 100644 --- a/data/minecraft/structure/nether_fossils/fossil_11.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9dd1caf1f1d422080f25942cc3384f00edd2dac18724229460ff10bcfb95ab3 +oid sha256:7dbd25e2626eac8f5ab540a2b83a0fe1232730612e33c5dbb13e056c3e9d2632 size 675 diff --git a/data/minecraft/structure/nether_fossils/fossil_12.nbt b/data/minecraft/structure/nether_fossils/fossil_12.nbt index 7ade2895..6b45fdc6 100644 --- a/data/minecraft/structure/nether_fossils/fossil_12.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_12.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac034a97f757949982aab1b94feb6e578be87055f00f970473b04b83c1cb6b04 -size 317 +oid sha256:6aaebd4181e3b73d05326905ce04bd7e628f0465172b9e9e05958d730c650748 +size 318 diff --git a/data/minecraft/structure/nether_fossils/fossil_13.nbt b/data/minecraft/structure/nether_fossils/fossil_13.nbt index c74e6036..be14d3ba 100644 --- a/data/minecraft/structure/nether_fossils/fossil_13.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_13.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab5084703dc40d8d5c38735b6bdc3d2e14f9b9812228baf36389fa2b509bb99b +oid sha256:e2b4227ed3b77effcac82d86cc7f663833b4a9c4c85b753a1aa50a0a689844f6 size 525 diff --git a/data/minecraft/structure/nether_fossils/fossil_14.nbt b/data/minecraft/structure/nether_fossils/fossil_14.nbt index 9401d05d..fcdea3ab 100644 --- a/data/minecraft/structure/nether_fossils/fossil_14.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_14.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ecb7b50c8ac9ad2657ff5c9f5d712bdc6fdf896d7b022c716204a7b8dd57697 -size 938 +oid sha256:4dde7e58b8fcf47cc90475425c1d67b44a2d46c1a0fb0f4a4179db0cdf84a77f +size 939 diff --git a/data/minecraft/structure/nether_fossils/fossil_2.nbt b/data/minecraft/structure/nether_fossils/fossil_2.nbt index 2cf985a0..9e78ef09 100644 --- a/data/minecraft/structure/nether_fossils/fossil_2.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:993781e7acd89b2dc1c0ca8495cdb7161e2cd604e02ddad5e7abefcf8fb5ade0 -size 259 +oid sha256:109e7f1944c6336a08655f11375d0f4ee69f6ebe6661c935af5405f2d68061da +size 260 diff --git a/data/minecraft/structure/nether_fossils/fossil_3.nbt b/data/minecraft/structure/nether_fossils/fossil_3.nbt index ade5edfa..c03d3204 100644 --- a/data/minecraft/structure/nether_fossils/fossil_3.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78c8a34c0af74b4db78b62e601206ba7084c948126de66ce4793c0571eebc527 +oid sha256:3574cd9097b97c79a0abab633e57f9ad876ead2118605cf733b217961f7d63a5 size 249 diff --git a/data/minecraft/structure/nether_fossils/fossil_4.nbt b/data/minecraft/structure/nether_fossils/fossil_4.nbt index ecb611e6..a20d98ee 100644 --- a/data/minecraft/structure/nether_fossils/fossil_4.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:220cd5a5bddc97e2d2b263d117deec210f981fff9531880a6a64cbb76bc0b6d9 +oid sha256:08d2dbd98204a2829789ace8a57c517747e3a0ae4af31b760ff0280aba6b5241 size 212 diff --git a/data/minecraft/structure/nether_fossils/fossil_5.nbt b/data/minecraft/structure/nether_fossils/fossil_5.nbt index 84a0310d..d84e7afd 100644 --- a/data/minecraft/structure/nether_fossils/fossil_5.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cad31cc1b3a0c3e5c074ac5d7639e2a337df915da104fc92ec12bb9896445d7c +oid sha256:f5112c9739caeef6f27b6a39d065f3626641ba8a4bbca4040c43e1ed119299d7 size 206 diff --git a/data/minecraft/structure/nether_fossils/fossil_6.nbt b/data/minecraft/structure/nether_fossils/fossil_6.nbt index 6fd6d3f9..11d5a02d 100644 --- a/data/minecraft/structure/nether_fossils/fossil_6.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdc4021b10937c8671cfdd1942b39dc1ae164397dff812072af73c095ecd8380 +oid sha256:c65c4e7528903c5b17d5a1e79b02c7e226ebdf940bc3013829a3a9a7a6a525a3 size 631 diff --git a/data/minecraft/structure/nether_fossils/fossil_7.nbt b/data/minecraft/structure/nether_fossils/fossil_7.nbt index c4c77e74..1f63b760 100644 --- a/data/minecraft/structure/nether_fossils/fossil_7.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf85f1cfd170bb4f152d849739d2ec8a8bf402983010610ec5048795a798d6be +oid sha256:f7b7aae3c464be0d4dd84ffbcb66712a099c88eb07fc66482961e4fd3ddacccb size 510 diff --git a/data/minecraft/structure/nether_fossils/fossil_8.nbt b/data/minecraft/structure/nether_fossils/fossil_8.nbt index de952158..f322c535 100644 --- a/data/minecraft/structure/nether_fossils/fossil_8.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ecdbd74f846c00f11a5fbdef57939ddbda643a6bfe7e2db7c4e0ed0177da7cbb +oid sha256:ccba775285eb55a3a840b72667c5262c1618b81b6009d68f8e9a144e00b5c093 size 221 diff --git a/data/minecraft/structure/nether_fossils/fossil_9.nbt b/data/minecraft/structure/nether_fossils/fossil_9.nbt index 6e70d1c9..68476fb5 100644 --- a/data/minecraft/structure/nether_fossils/fossil_9.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06ddb89e9e305d6d98e2f429fbfe2640a2c2cd0b4613c36b1dbeb115fb0eb3e7 +oid sha256:490ddd56993e62d7169f3c0857ef9699b5bbd0e4d6283462b70065c2b2c65ce7 size 395 diff --git a/data/minecraft/structure/pillager_outpost/base_plate.nbt b/data/minecraft/structure/pillager_outpost/base_plate.nbt index 31caf654..dc96e8b9 100644 --- a/data/minecraft/structure/pillager_outpost/base_plate.nbt +++ b/data/minecraft/structure/pillager_outpost/base_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:87e5ec2601bdb6ad40bffb02e1ad0189c5f8699546ad71c36d9b7045a31c8155 -size 19282 +oid sha256:545a463bd09c2ae64003f8a1f11bcc0ea5a7b626832a331d1ee324ae31a90e69 +size 19281 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage1.nbt b/data/minecraft/structure/pillager_outpost/feature_cage1.nbt index eddddc4c..3c527227 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage1.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5677da0753b82e02497960d3d41f95b1cbd11d8421b3a1670705f2cfb67a5a17 -size 1666 +oid sha256:15caa2d6898f0372d0885b647bcd1adcff2af4a2678ed30eccc04fc64d0e467a +size 1630 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage2.nbt b/data/minecraft/structure/pillager_outpost/feature_cage2.nbt index e437c8b6..4db861ab 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage2.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:204e2c021427d2872d29bb75840e4729ad36a5ad51575db0750f9c62b9b885cc +oid sha256:074860097463fb3ef2bfad768196b79514b8867ed9b26d3c0e7750346ce0fb34 size 1032 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt b/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt index a4e00855..3c040592 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2917a5ec67e9a8af746e40e81d933b6a7eb80919129d3259a0efe7f1d95aed06 -size 1791 +oid sha256:ec7da568eb209e633d4554bde0fb2a92b515a4c1bdeaa32b9cb057e9751c6877 +size 1756 diff --git a/data/minecraft/structure/pillager_outpost/feature_logs.nbt b/data/minecraft/structure/pillager_outpost/feature_logs.nbt index c1540d27..abe72b6c 100644 --- a/data/minecraft/structure/pillager_outpost/feature_logs.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_logs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7fc3a2746ea19a737a0506b8f1d750a10f6a4c3f9fc46a3df9d8afd736b686af +oid sha256:aacacf97d90f7fd5ad581d85b5f4286a252dc52a5a8b4f519f3bd0d8f294a99c size 659 diff --git a/data/minecraft/structure/pillager_outpost/feature_plate.nbt b/data/minecraft/structure/pillager_outpost/feature_plate.nbt index 1e89b4a1..b8718f35 100644 --- a/data/minecraft/structure/pillager_outpost/feature_plate.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16f769a977f8cae5ab50e37ea487a9e4dc267ae8f08458692db0af53520038d8 -size 6039 +oid sha256:00719e8430087b80b62ea1652c87a08f1fb747ee6d59cad5fb46b4c37e72111e +size 6040 diff --git a/data/minecraft/structure/pillager_outpost/feature_targets.nbt b/data/minecraft/structure/pillager_outpost/feature_targets.nbt index 7681b9ce..4652ddb5 100644 --- a/data/minecraft/structure/pillager_outpost/feature_targets.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_targets.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:110d83625e62674990558c0beca0a9ecdba545b4e0843644871f50e5a5af1640 +oid sha256:970201a3d21627be3d656007d84b160bc5135284f87e584f90d3a7bf36e690f9 size 579 diff --git a/data/minecraft/structure/pillager_outpost/feature_tent1.nbt b/data/minecraft/structure/pillager_outpost/feature_tent1.nbt index 0f14e8e0..12b63e53 100644 --- a/data/minecraft/structure/pillager_outpost/feature_tent1.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_tent1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89a56119aa0d491c8b8146248e81547a4c1ff39c7435a7a2bf14f1b1aebae65d +oid sha256:774bb0e5d388622f0cd909374be9d88c68b91000c820e1a06e2bee7601d474c5 size 858 diff --git a/data/minecraft/structure/pillager_outpost/feature_tent2.nbt b/data/minecraft/structure/pillager_outpost/feature_tent2.nbt index 6873eff6..2821f11f 100644 --- a/data/minecraft/structure/pillager_outpost/feature_tent2.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_tent2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a48fe62baf5a0e2a168c7c5892b3f08466f457d98ea7c7a8fb601d19902d4eb +oid sha256:b28790d9aff3aba91cbfacbe3ed1f045c88d6cc49734225162b1dccbe64a4acb size 869 diff --git a/data/minecraft/structure/pillager_outpost/watchtower.nbt b/data/minecraft/structure/pillager_outpost/watchtower.nbt index 3c848e88..accac53b 100644 --- a/data/minecraft/structure/pillager_outpost/watchtower.nbt +++ b/data/minecraft/structure/pillager_outpost/watchtower.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4e2620c18527936ba2e2c6cec9368d8e3155c1b330ce7e0b4c156caff6bd5da -size 14626 +oid sha256:77d9d16adb47c3bc41577688097bfae24ef61416470205b744be0cf6e5e2c614 +size 14585 diff --git a/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt b/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt index 77bccaa0..9eda14f8 100644 --- a/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt +++ b/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80e18cf7f882ccba80ebfc7bfc6e0133ea8e8151054036d0ea4c3525f12f225a -size 16066 +oid sha256:e494109b801e6c9fb411a45b1d90a50ffc1c843c36b38e7bfc9439ad6fff404a +size 16026 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_1.nbt b/data/minecraft/structure/ruined_portal/giant_portal_1.nbt index b0183310..5bf04e54 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_1.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5aec7645e05d67657f6bb88a22c4546af54b4f9b9339501efa2218dc96969199 -size 7200 +oid sha256:407df76c96650e418fa374304cf34099cb5d86ed406c31b641b1e5e1490e19cc +size 7201 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_2.nbt b/data/minecraft/structure/ruined_portal/giant_portal_2.nbt index 937ae692..62a8d256 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_2.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa1c69163523762d422ddadeb4a5b814a81f7c0e2ba6f62ce83d0c8a4d03a0d9 -size 6839 +oid sha256:36bbce074e7e8d1f4f8759d9dd1a51d2a0d9d8edf06059d196326bd87b89b1ef +size 6838 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_3.nbt b/data/minecraft/structure/ruined_portal/giant_portal_3.nbt index 45af5ea5..cc566371 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_3.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0d9c8665f70f51a76ff99bcaaffbdd5c9ff131ffb5a7c9dc4f17c234f3bfc00 +oid sha256:e8e2be323fd63be8cfbd016ff268231dc018d5fd0f9eb44f91128330fdbf52b8 size 9899 diff --git a/data/minecraft/structure/ruined_portal/portal_1.nbt b/data/minecraft/structure/ruined_portal/portal_1.nbt index 143a1a78..79932242 100644 --- a/data/minecraft/structure/ruined_portal/portal_1.nbt +++ b/data/minecraft/structure/ruined_portal/portal_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66359653058b61ded78b6a2cb795fed0106d5e31ba430137adf6f2ec16184d95 -size 1431 +oid sha256:4732799ba5ba60d6bb8a36bffee6c9bf8206bb8213ebfb7c66925ffab317f937 +size 1432 diff --git a/data/minecraft/structure/ruined_portal/portal_10.nbt b/data/minecraft/structure/ruined_portal/portal_10.nbt index 3f406e2f..b08683ea 100644 --- a/data/minecraft/structure/ruined_portal/portal_10.nbt +++ b/data/minecraft/structure/ruined_portal/portal_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8473c776d52707a1c25dbaf2a49f19f4beed16ca5536a375f3fbcb880de5337a -size 2879 +oid sha256:35c91ecf224e8f822b0891b6e20a33585d3d71b57dcadb7e9d107845ad50dc52 +size 2880 diff --git a/data/minecraft/structure/ruined_portal/portal_2.nbt b/data/minecraft/structure/ruined_portal/portal_2.nbt index 661a6892..ccc914e1 100644 --- a/data/minecraft/structure/ruined_portal/portal_2.nbt +++ b/data/minecraft/structure/ruined_portal/portal_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29fcae023d173c2241f3eee0d6953af2f7679c483574a96943d1cab43905cd99 +oid sha256:b30b3c1cd081c6f967c0fd8d1c9a674629b5cf118b289372de2e155d048708c2 size 2762 diff --git a/data/minecraft/structure/ruined_portal/portal_3.nbt b/data/minecraft/structure/ruined_portal/portal_3.nbt index d80e87f1..29a6d0c7 100644 --- a/data/minecraft/structure/ruined_portal/portal_3.nbt +++ b/data/minecraft/structure/ruined_portal/portal_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3eed0bd38681390c5018d4a47fd30813cb30ad83ec56d6b945a8d8297755f6f3 -size 1994 +oid sha256:2172d865f8f2a96e76944d258640732097e61ebf5d513726264e08614fe51f9a +size 1995 diff --git a/data/minecraft/structure/ruined_portal/portal_4.nbt b/data/minecraft/structure/ruined_portal/portal_4.nbt index 2808ee59..9783efe1 100644 --- a/data/minecraft/structure/ruined_portal/portal_4.nbt +++ b/data/minecraft/structure/ruined_portal/portal_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4242a7ba8beb240579f42955753f87a10b2e1e1b8bcc3d7f2a1c353934b67a18 -size 1885 +oid sha256:aaee59d7c5670b830e395b707c591237535addfcfe1054ad6905fa5026e68f0f +size 1886 diff --git a/data/minecraft/structure/ruined_portal/portal_5.nbt b/data/minecraft/structure/ruined_portal/portal_5.nbt index 2e08707d..38c53431 100644 --- a/data/minecraft/structure/ruined_portal/portal_5.nbt +++ b/data/minecraft/structure/ruined_portal/portal_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:279b8efa013905bfc4782f34c40fb7d349ffdfa8056bb64ecd17a68c7102313c +oid sha256:1e78ccbbe0ccd21a11efa9629825ba7597a7212f3c293581f03f54556c82abc8 size 2217 diff --git a/data/minecraft/structure/ruined_portal/portal_6.nbt b/data/minecraft/structure/ruined_portal/portal_6.nbt index 0f325db2..c6351485 100644 --- a/data/minecraft/structure/ruined_portal/portal_6.nbt +++ b/data/minecraft/structure/ruined_portal/portal_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70776096dd098a0b4c1a9a7c7b0f410256f77d079e3ca0d967580afe9b95bfd5 +oid sha256:6ad6dc668e63b26146f375f00d0d78bbfb2142ac22287a2f1a4e90b1686113fe size 984 diff --git a/data/minecraft/structure/ruined_portal/portal_7.nbt b/data/minecraft/structure/ruined_portal/portal_7.nbt index 490dfb7a..157ccd08 100644 --- a/data/minecraft/structure/ruined_portal/portal_7.nbt +++ b/data/minecraft/structure/ruined_portal/portal_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ae1f49cd84e692d9f0120fa1f32c563f1212acedfce4c887fb44427126b745e +oid sha256:5757e27387fd37eec0f8c5bb097a9a0c2dc06a52e195e8797074fe6d2ed6a029 size 1831 diff --git a/data/minecraft/structure/ruined_portal/portal_8.nbt b/data/minecraft/structure/ruined_portal/portal_8.nbt index c723d07f..1929b7dc 100644 --- a/data/minecraft/structure/ruined_portal/portal_8.nbt +++ b/data/minecraft/structure/ruined_portal/portal_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:454312234476a36a69fa3bd46f1107b3bd639ee8ea39f87682aa4decb15f2c4d +oid sha256:8d168bd5d1f768556532ea834f5dddd198654601d20ecd37c421e211f2fb8901 size 3408 diff --git a/data/minecraft/structure/ruined_portal/portal_9.nbt b/data/minecraft/structure/ruined_portal/portal_9.nbt index 9bb2363e..35ca4523 100644 --- a/data/minecraft/structure/ruined_portal/portal_9.nbt +++ b/data/minecraft/structure/ruined_portal/portal_9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33636d20c75fb1ca0d04ced5d345c9247839cb7a31b2a479b7a8e44e4cc8823c +oid sha256:d8f955a5558f029884afe18d3c75b99a61d0c4c746c72ad89ce419cbe5b4c2bb size 2169 diff --git a/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt b/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt index dc353774..f07bb63b 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88ac75c02db5a341dd65a233a7e47e12d5c5296d103e87328e34fc8377dfafad -size 2712 +oid sha256:3376ca0a80901bd13612f5598ca15e55d76b644de62593f2bf1d4f28405cd8dc +size 2713 diff --git a/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt index 6a1476f3..93f8617d 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee0c3127f499ff07041bdd3b12e51eeeb2e46f248bb34542a34b56c070c6c40d +oid sha256:e37caffe1652f4370bb0c22a5025f632f4d038d35a1712f8808763b121e6d549 size 2570 diff --git a/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt b/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt index e1862594..d4b8c03b 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:539b49257e1a140d99f8e77193c6c3ab9c25e2c47d0502277e1b3bd2a6abfbc6 +oid sha256:5f49bd50e7843b61c35e95d498f76db679c4a987fc576fdfcb21eb173d426f71 size 2476 diff --git a/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt index 098e3ad4..575b9889 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74f419cd0690ac8fadc4f79dded031f1171e248530a18b02bfdd6d486fc4fc2f +oid sha256:6b8120b175def83ad132c5cb90a51bc8131dae55bbdabe156742d2adbd695dde size 2253 diff --git a/data/minecraft/structure/shipwreck/rightsideup_full.nbt b/data/minecraft/structure/shipwreck/rightsideup_full.nbt index db47574e..8846f6a6 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_full.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7873a21c71f6cc441134c443d989f4fd8be8f24ff76f1d1f1c8d89c729ce9a4a +oid sha256:8da5471014a685b76d0a8a1148fab4cf192e4dab3faaf6e814f59571a0dd14cc size 3755 diff --git a/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt index 1ffbdd26..6a034a5e 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae69adfc712e81a136c05257a7aa7982616b89ab844e1e20b33e7fbb30c36fbd +oid sha256:a7ef2e951962eba36aec0c60c73f3d324ea678d4048625ad2dba07e7978146cb size 3528 diff --git a/data/minecraft/structure/shipwreck/sideways_backhalf.nbt b/data/minecraft/structure/shipwreck/sideways_backhalf.nbt index 162274ea..913a47ae 100644 --- a/data/minecraft/structure/shipwreck/sideways_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/sideways_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:245eca5ad3787717caf98fccdda617608cdd6db4583be4941a62985259a773c0 +oid sha256:3aa82fc24c3dfc56abbd146db8ea78aac92245bd0cb5b33ecaced76da014675a size 2436 diff --git a/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt index 09583499..3877d633 100644 --- a/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0b110521e4868bea2008d0385f7c7c91bd4c8275c1eac056cc2411510347bd0 +oid sha256:2dfaa159668d4fc42e6ff02f3d9d85502aaca6ff077208eb6b64eca943dc0fbf size 2259 diff --git a/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt b/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt index c9a73324..914d4464 100644 --- a/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:320a906908bd0ceeeb27fa63be8abaa679c278bdda95fb94c2eeb2705f782625 +oid sha256:406ef9ad7cbe5441761084b8972f3064457157a3f8f5b120b4df4f827867404d size 2204 diff --git a/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt index 6b043990..e048a030 100644 --- a/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1071bd76e0453ec0304bbb9263a27e97364b104827553308be657a0db7e7057 -size 1913 +oid sha256:9a3738aaa7df2fa307bbea395badfac79c252d132000f9cf93aed9775983e0d7 +size 1914 diff --git a/data/minecraft/structure/shipwreck/sideways_full.nbt b/data/minecraft/structure/shipwreck/sideways_full.nbt index 2fe4ef48..02acbd78 100644 --- a/data/minecraft/structure/shipwreck/sideways_full.nbt +++ b/data/minecraft/structure/shipwreck/sideways_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0efee48ff10ef300700ba824d48dbcdce85cfcfb2c54ea9f14a9aaae3472bc52 +oid sha256:630929d672737a8d1033620157ce3cd5e3fa69cecf48df08505a5db47a577a29 size 3512 diff --git a/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt index f4f7bd51..e8655984 100644 --- a/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abf88ff5d1619de3615d3db0823c0fcb5ec336fe9c7e2bd153970dd891ddf6b1 -size 3309 +oid sha256:923117f06c9141069d4b4c7e37ebdbdc5e89bce6d0acf6932ded12c41ec0a7f7 +size 3308 diff --git a/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt b/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt index d72c3f19..6402588b 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14f4d1ef0b7903be093c2ef8208a182955c0806b419dd486ff3aaf2f68bb1de7 +oid sha256:1f840a092f44c4eacb9263a90e735c5213ed5e0fb9698f169e75d9a2cf8361cb size 2518 diff --git a/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt index 5cce7760..f917b758 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d2be47ff0a4ffa094a347e22c2366cd48e4bf830c418361da02bb9fc607580e -size 2388 +oid sha256:59a9a1d7fe8aab036a9588361af4410a69b85ad29bc1acf150bf1ee38b605b70 +size 2389 diff --git a/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt b/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt index 6a52c50a..6529669b 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:012872e09bfffd5c5ecd05c1eacb04e9933087e76eb391f359debbbb567fb866 +oid sha256:1b76e4b2df1424d6e1404a829ef3442231fc93ebbbecc6a81e00d90af085fcf1 size 2325 diff --git a/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt index 522fdcce..b51f7f6a 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c72716f64d6d9be3a4d9654373a4935de470149ed1a27c890d7049ca2611c75 +oid sha256:bcfce1b511fcac6b8242d03a373702d7a040d50f5b179d4c44ffdae6f3a7604f size 2210 diff --git a/data/minecraft/structure/shipwreck/upsidedown_full.nbt b/data/minecraft/structure/shipwreck/upsidedown_full.nbt index d698fa45..8d8d0389 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_full.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a2d2b84dd5d5be4d2ae8a1856061c15c29be67e7b61b0e0847be9f785cbb460 +oid sha256:9a9946f38d7b0a3b3b5d692be0665e3e835ae723c1be1f8566d9e12ab3fbeff1 size 3470 diff --git a/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt index ad8bedd8..32934d3e 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0228e0006dbf04684f7a694eaef7d1154992e064de52c9fb668c07492f1a5fb3 +oid sha256:ce600e21360a07b3d4657b0d9fea67d6a4315d086167a1f301e1b5f2901f26cb size 3299 diff --git a/data/minecraft/structure/shipwreck/with_mast.nbt b/data/minecraft/structure/shipwreck/with_mast.nbt index 7dc37d88..51d10f41 100644 --- a/data/minecraft/structure/shipwreck/with_mast.nbt +++ b/data/minecraft/structure/shipwreck/with_mast.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11d225fbdf2a1e809eb34642de546ad9189f011ecf821f7600d1979bccea7e7b +oid sha256:689133e1e1813474f0a19ccec1c3779a9ef0b274485cd386d1745ea090641783 size 3960 diff --git a/data/minecraft/structure/shipwreck/with_mast_degraded.nbt b/data/minecraft/structure/shipwreck/with_mast_degraded.nbt index 2bb3b272..d6b4f418 100644 --- a/data/minecraft/structure/shipwreck/with_mast_degraded.nbt +++ b/data/minecraft/structure/shipwreck/with_mast_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8b9afe9a2e87a269bd10c0f054ce14719e084053120707d09532c58dfedadea -size 3686 +oid sha256:1b4244ce177b4dda16d01756d01c90cf090ac2aa0134dd3d684ea234dbd4bb28 +size 3685 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt index 28e71fde..71cda637 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3edabd8ead989d7c3629133f00db13f7d3d0acfa2540e867afa64249679eab2 +oid sha256:d152c7eb5714e0dc3f7ef05d55ffcd706d87c8c23bc27c8d8a6c1f6eaaf9d2a9 size 1339 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt index aef238aa..68dbc837 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c003c228001b636753fdb4156e6964033835caebf4ad70e08f13cc4e4533e93 +oid sha256:3533ca3e878beab7e804a3ef4302dc3bdd33f4477a72243f541374fcae957448 size 1281 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt index 905ed84e..3ca1116f 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:438615c7934b0d68e5ed9cbb95867f3deb7846d3d548280f2296ccca4563503f +oid sha256:de955635bcfa6d2e34413cbbde1861f7f9ef7ee04ef2c117182527eeeaddd671 size 1299 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt index 6ede56f3..ad07dafa 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6f69e09c60138eac1f0be174ba2cb55267b51303e9be4b3bca266e8be0c8258 +oid sha256:54515b8275db63a91899b511ba904633c5f6e660385cae0d88ada4dd9017f16e size 1263 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt index f074a890..db81b4e1 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3691f0371bacb18fe24d33e0dea328ac77f491a3beca964c1162e10f0476c2b4 +oid sha256:225069440b7328a580ae7e340b40220607385447af520eff268342f94757b2a3 size 1261 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt index 2954532b..487c246b 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36475fcebdbe45514f016d93bcf6d6a4a2e2d5ef5ac9abd6db0a602392f24069 +oid sha256:10c2ca97bd65e8fc979427ea7d356013f7fb4479595ffddff1a807badeaeb840 size 1517 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt index 64b0a779..f3de70fb 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad82c6edf89dc42c5a3f184c03de1ac789e6bc1d9483b706320ef6e3c72ce58c +oid sha256:7e0fe0ebce593325839664613aba0d1fdf7e8af7b61284d361c6b2e923aaa550 size 1616 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt index e32baca8..f38de6c1 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8541c43e4a230ef0c31f7e874f762c2b51aaed55f20a85d23edbadf004efbcd7 +oid sha256:309c859b55ac76e1b8d9abba4666c2682f2a8f5bf6d40818a8e6472bfd3aecc0 size 1716 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt index 1fd53eca..fd288190 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a056698d9ec7de4eece376d5b5a1e2d490cf5d048f9d08a6d363c76560ff3399 +oid sha256:d996fa67e8b4d477faf8929469ed5221086b486d4edfc8fc0aa915309b948a6c size 1640 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt index dd71bbd2..ae7e97ab 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be8af6356ce8acf414b9f10fc9b83e675d68ee862501454c36fa7358027ccd00 +oid sha256:95e41915c23f5df704df316bbf0ecda9b40efa53e69a933cca23d3dd59720808 size 1526 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt index c28be45e..09f6e6c4 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9cc573070490282a4bc7152afad5b497d7faa4056329f1c51a0ac92505ab653 +oid sha256:90db8183624d6869e60a9598d049e0f1561681bdfa1598976b9278a94fcb1a7f size 1047 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt index 56883d54..fbc83842 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e85bc96cffa3bbbbcecae2504bd3be4a342a85e1d44ea2288596f1861fb0d674 -size 1044 +oid sha256:d93fe9b15580acce74a01a1c7e2a0c7eb786acb770cde881e680a48931821ed9 +size 1043 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt index 4b35716e..2e49c448 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0653956c74e4b9b9ed1c5003e1b27afaa22a130e85bd0b8e3ba347caf5e5427 -size 1047 +oid sha256:aaa78e883c5f2080f5afac01b19a00e5c2c382d6817a9ac6d57dc1a63e781e7a +size 1046 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt index 8f9ed81f..6aabc371 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e22de6478d1ed7f7942f85342aac24fdaf57baf0f21b143ebad96fbd2c1ba75b -size 975 +oid sha256:cdceb5f569f826ee4533c4ff83cf1890caebc7e6fbc0c8d3cfd8023eb253860d +size 974 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt index abe38373..ffb580dd 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f8c2d9955cad333f69dfb57d2edfe73a7caa0bf8d27b85d66f7effa89d4b963 +oid sha256:15d73d26068f5a722467dd9a877b8908b8cebe1c8881e731945256ae86bed9cd size 973 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt index 0b7a6c8a..462bb287 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3165636202d2fc5fa974a7412f5177a05cddf0ecb3a268c45aad5a6e9f795dcf -size 781 +oid sha256:00a7ffa73c2a8f0ae342cf4c66e32a67888751ea8974955be527d6562568d772 +size 780 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt index 6dd10933..0f392dc6 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a0890b3d99730e53f876591c365a64aac51e9dad94e1b282fc1e5ca768e5742 +oid sha256:cea7eaeecff94b4e770f75d050116bc5b6d5c54b31d76ae9fb43de6aa8f461c9 size 864 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt index 51a07e8e..3701d1b6 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5424c2e01e59600ae617999d8853aca452ca616041d400784a0fb27d5002bcf3 +oid sha256:42055527e698154d8435e66ad316af5c297545398139014edfcf6b99ada5e678 size 848 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt index f2a30a73..cd4e8983 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62a35bcd7981d08b0038721080ff534215bb56e70eb909248e741c26cc6c2f9f +oid sha256:153c8adbf6930c5ebaae07ccc2d354bc0b3004649da3e4b7efdd4b8af76bdf2a size 781 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt index b0ef6047..fae7ebeb 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48ffa595e5c35216675d00f6a05869b26380e37ed22696f10d22605420fa899a +oid sha256:1b7929253421ecb546f387370cba954e37174dab3ee6cf91b53016967d258ac7 size 779 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt index 8dc2fe70..6fafa98e 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebfee836ac50c4eb0cc307c7f16a6e5aeb0f5e41bfe02ee5bb7c6c825eb5afd6 +oid sha256:8b72413a76d797568ca5b8cbdee16c5b51a7ffd87dff01ab80ce530fb22650ab size 1270 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt index 6f6f984d..f4506fcb 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fd6ece105a9be8263da1f38387117879f9b7b827f310d3aee58fa0bdcb1ca1e +oid sha256:d36f157229e9033f87d3b5565af22e2fec0f43d5e93a13007f81dc85fc0c2fbd size 1263 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt index 97c3d2db..6ee221a3 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5784082cb0405d6d26f66d25178f4609f4a377ac54921588afc75747867b892d +oid sha256:44f813b89436f4c4226d3e24b19b3832040c417cfba22a66f9473a082150d0ae size 1274 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt index fb4a6dce..f82481f8 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfecef9d196b528eaecbc41aafb7cd162c39b3df35f111bd79dfc9e59c3989a0 -size 1182 +oid sha256:874fcbd6bfd22219bd3d17f35bb5897204d333a5f3cdc3b3be2a1e73bf16bcde +size 1181 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt index c743f68f..57541f12 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea7b6ea7a8c3f67c7845cef122053d3d463607222f030f823660ba701e9fbb90 +oid sha256:fa234f068ba1605fe0660f9bffdedf3fce67d7f1be5e5fa7e580cb52c646e9a9 size 1178 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt index b96c27d6..fbf6d4a1 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1afaf95c454362cf4de5154d9d97843e7ca63553e91cfb0fa21ba5f04d5c7c6 -size 1928 +oid sha256:a6c465972dd9d28b3eaa1a1984c8e5beda1b44e27dd6ba55bc02e7dd191cdc25 +size 1946 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt index d3de89e0..0ef9cd0f 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68efceceefc9133ef1e57087b1f45643fdf3fafeb242b0c372c54b68f3c8a74e +oid sha256:1a51af25eac3001671f2e931613e3ac00bdbe89208d0519056bb117063d34fd1 size 1658 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt index ff920d79..6968f7e1 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91c408cb19abe729e0c78223f01463c355090b19be9c023a44fe8ab23662dc6a +oid sha256:c5f4149206b7be7229512f3a00b88543152927927a60b566f2c6bb2c01218047 size 2707 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt index d3266518..e7483bd7 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fffddd073b88b1807771a6ff0456f51f2f6cc29124d37c2796c6e6bda911961 +oid sha256:80e09a4d5187f9dcd321e89dedea983ec3ccb003710345642cb98cdd496e9bd6 size 1564 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt index 8fc34aa1..0a7a9402 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac39c94083e29df0fbbda812de93eb12b60d4cf23446f33571b7ddc9c7d2fa86 -size 3199 +oid sha256:56437fd9a46dd90e5aff85a65b756b51bb3e788e017e57421db5df86bc967754 +size 3219 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt index 4855e7e3..978a6b55 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d21369a613e160ac3a27ca026ee17425a8ff24db6f0b59222376bd4a8d22980 +oid sha256:ff1c61a51b0f6c1589ee47e526ae4eb48a34757e6199d630ab5155959ab50ba1 size 1005 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt index 82bea60f..2832259c 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:683fe1a6e7b91d96867b8e56451f57e45f5b9173af0f24f38db386401706199a -size 1087 +oid sha256:c7ac17b53fe665a4f3685ae439769afe50e4ff75625be94aef2d3344f3175f6d +size 1086 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt index 70d7b9e6..dae05945 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:651193f6d36f41c46edc28e8d49ec8d5a63fcb72765a48be6f9b954c417fe275 +oid sha256:753e904984c5a1e68fbb9de80559392bc0821d1c0b79980833b324b8500e554b size 1105 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt index ca3dccaf..4ae5cf34 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b22122fd210fe470d98ec477825e02a3c7151c922891e62eda19cb552e642d38 +oid sha256:97ca94b5d310ee5262411f795b50a7740bbde576b3c10fecfa228f91abd5d2e5 size 1452 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt index 30077168..53e4270a 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efaa6df0e7c3db1fe9c96bd54b90c6d4cde6184058f1e37efa6c725fc25033a5 +oid sha256:659ed7b0809b07728fbb0b82294ba89c52a553ad88437aca769b11655e7f4177 size 973 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_1.nbt b/data/minecraft/structure/trail_ruins/decor/decor_1.nbt index 72802846..cac37b4f 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_1.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b147857f6327e5c672634165709f8b14706248d09537f0847c7fcfac96c3a7c +oid sha256:4885fded73b3b555560c2392141eafb46497ccd7a6bc8d8713c6837327c33962 size 489 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_2.nbt b/data/minecraft/structure/trail_ruins/decor/decor_2.nbt index 4b2c0f8f..fb67d79e 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_2.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e586b4fc874c807f15c91b93cbae0b52336fa638b1a29afc3a675305d05d2516 +oid sha256:0601a050fad4a29eb147e014b1ed931d0560a320808a168d0a7782041375e1df size 471 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_3.nbt b/data/minecraft/structure/trail_ruins/decor/decor_3.nbt index 60fcc3af..1018da9a 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_3.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f32bbd04e258bb633271fb072e2ed0b52b1c7aecedc4d8eb28c820204ee3ad52 +oid sha256:597352b3c437c2e7e8ded5839aaceb8be19b0bbdc6e00d54150b046dedefffbd size 377 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_4.nbt b/data/minecraft/structure/trail_ruins/decor/decor_4.nbt index 1077065e..c34b4b5e 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_4.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36610ed70289460a5386883304a774b1959db7bedb70438022edf791ed42227a -size 417 +oid sha256:2e32df9c1b81dceebfe89c63e769ebd11e9fd95da42ec0b1673b71f6af18f357 +size 416 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_5.nbt b/data/minecraft/structure/trail_ruins/decor/decor_5.nbt index 594e3a6a..9e71081f 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_5.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d0a3dd73f46ad4a3ef9e1050e05cbbecf24ab420a54d4c56b98fc3f18cf8e3e +oid sha256:dcd5254373a6216df5e32388823e6d5b9873b1c91459ed2cec0555dea3abefe5 size 492 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_6.nbt b/data/minecraft/structure/trail_ruins/decor/decor_6.nbt index 205bf275..afd5a016 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_6.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2f0aeac0871a754c077135ae64ea9b95d9417183f73721fde72d3ee598e7422 +oid sha256:c344164b937830038222606e147614e0f04612cf95872f6d5223f52f1260d23a size 506 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_7.nbt b/data/minecraft/structure/trail_ruins/decor/decor_7.nbt index 72591c84..2d69e782 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_7.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:377ac91e2cff0c3172502a8b0ea9cbfc438ad36d376ef1c3c3f85f088fae15e9 -size 632 +oid sha256:4c729c4d6e60884a24948d99fb2a36195bf1155c5cd09834fda038cac2b758fa +size 631 diff --git a/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt b/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt index 4eaadb1c..026d768e 100644 --- a/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt +++ b/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dca45e7d1e6535476b49886f4248a2b71344146efd952e019878d53a6f871c27 +oid sha256:6e0e13b50f7e6d1c2420956a4a93c576e3c0d12338030a02428aa2dfe54e49bd size 858 diff --git a/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt index 83a2c9ef..562dd061 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f2b46fcc91199ad929cf471b6dcb58d4e275ed6c1b079eb35a44111559515fc -size 468 +oid sha256:4e2ca2809e712344e9c24795c07a806114c53b33e7e8d9a128afd77902c8c35f +size 467 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt index ed623d31..01127051 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1492feecddaa0236730eef288a4eff0c8ecda8e44fd6362e12b80c64780ccc0d +oid sha256:1dc5f3b5490705ab7e410e871a2b9fae17d56b5657d453ddfa0ffcfc54d84090 size 706 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt index 4944ce25..264544f4 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e8a215faaa740f0e8ca7a92f8c94c6628576581ef260c169c86cd01bdeb35a1 +oid sha256:2c35cce424163cb7644b737a8ac6d980ddc32b98ea4d33291fd9fdbf3b7d4dc3 size 719 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt index af06bf60..cb1a8d27 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36cfaca0741570d9c0eb99e3b3f276f5c865c2185d840b1ac9df4bfd4308360b +oid sha256:fe52ab8269ea31e06869adc01e116509cc9f61147cde47903aedf9baf0af9649 size 757 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt index f39f853e..758b63fb 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c64d05c3eaf10c9ee5390b427b5cb6ddfd7e05761e2b66e806ecb092a0af79c +oid sha256:a8d81bf011f7ce447a551bec81e4ccccb7d14e02fafcb69fc3f4670c4fd700c1 size 772 diff --git a/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt index dd3dea2c..72b0caa9 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1f5a573000214408c12c708f66863492cfdb9ebaaa0a16828e704848f53a0d2 +oid sha256:a4371ff2428a011a9cf5ba163ec6106c505cdc3a030f9afb7c3b7808d0560b5e size 644 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_1.nbt b/data/minecraft/structure/trail_ruins/tower/hall_1.nbt index eab86fb6..67772620 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aace8db0442daa2d89ed43fee3379c62fda25b41e3a7991ca16aeffe06d60445 +oid sha256:6555bda901feed127456a4aa278441cb67977ea6e95e2ca30187a2f445565132 size 1519 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_2.nbt b/data/minecraft/structure/trail_ruins/tower/hall_2.nbt index 3b3d210b..81fac965 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d50170661cfc0b4ff856d6f475dd0164f35bb816c76b70d73a5ae82b146d4e5 +oid sha256:372862f43d5a41112fba2801489c17435e5beca34b7208b332442a009883ff68 size 1894 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_3.nbt b/data/minecraft/structure/trail_ruins/tower/hall_3.nbt index 5567cf9b..1aa408dc 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925eb81a5777401ff36cb893a3ed13a3327021ecee64aaec181a259dee563d82 +oid sha256:166aa9384e5faf56e50bcdfb046e4606229eb6618c839c36a638098fc80571f1 size 2140 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_4.nbt b/data/minecraft/structure/trail_ruins/tower/hall_4.nbt index ef4f1d68..c62fe34f 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b9a56ee7f0c1a773e6b420e8895c60d32b7e7400d55123027b1deff9242504 -size 2031 +oid sha256:2e3a25e7cf897d11a24b073c90fdddb93d7122c38a86fdbe88efc619215b8b0a +size 2030 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_5.nbt b/data/minecraft/structure/trail_ruins/tower/hall_5.nbt index 97dd6c22..ed305307 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:352e10ed0ed5c1dcbeaaf2b55ef5a00a45cb7b672f23f99bd2570249b60fb2d6 +oid sha256:7ee68a75368dee8a91c2d81ddc66c379d66a4f853bea98db88958db0ab204958 size 1873 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt index a710b4b8..e70e103b 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c00396a61ba4eb4f64885e330b205db5e762f2b4996203c65c0d5ed8e4daf47b +oid sha256:e88236b894dc043d9074e4bb66eb14d563e09b1c9cfcea71cf076d6b90d43a32 size 2024 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt index 08e28ca6..715c47cc 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99938bd044f2d3596435dc9d03fe5e4e33c53c5ec46cec13caec6fedd81a9198 -size 1966 +oid sha256:373ecf6b74e681d7e8e876073bd0732c440fcd2fa03c875d48008dc4ebde77a5 +size 1965 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt index 36a4e2f0..d3759ac3 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d34575e59737ae33fd67f0888aa63cc62eddb7ed907c907f397d85b37af63f5b +oid sha256:ee1cac8891ca88746bf10ee970962da0300d5cfa160fcc552e7ce13750e9ce5d size 2023 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt index 74fda1d0..b206ddda 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c23690f9b443fbe8fed3e84e56f91aeb49f06a7430cd28796cb9e27a546ec47 +oid sha256:eef43435145233b28f62b9f2165488f3acfdbf979c71954788af5d542c5812f3 size 1807 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt index 5e71ff51..10daf43b 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8e82b81f437fc18ff4740fc35ba3426453c260cb2d2ce5a6f42eb519af58b28 +oid sha256:5d239f8d16e0df3edf1ada01b0bfc488a68b224825162fc03d2e5ad5ce9ca994 size 2003 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt index d885bd90..bb930d66 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f6b85c2011c20f586298f3d2064db0b5883087332c90d68a3ba716dc7f577e2 +oid sha256:793f6717966ae1a7e1a5b1b8a75120f618cca29e03107742206b465aa350ff33 size 649 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt index 6c28bc65..edbda065 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4634937ae75f450a8810f5ec929c3c8d9edb2873ae14fda0ccfab29087b6612a +oid sha256:183db34e52052245660a983d05c7d3eff954cff0af9baaf3231a2a6e01601ae8 size 718 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt index 714be720..e7b1e576 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f97da7e7c81e0ce2e2f72865f8cbf32bad5882622122affb02d8ba20060c918 +oid sha256:ad763e86448be5d52760659ca91dc86f7595fa064972189890f131e955b7d9a0 size 624 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt index 082ed204..b68a85f1 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:272de34f8545f76fe7e68a4c7918f957b595d4184960f582ad1df219620389b3 +oid sha256:d7f78444001698166da7805289bc14faca591d8ffbfcdcdc7171c4d34afefd91 size 615 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt index 05801f82..23c32079 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ee260eb8905f93145dfb730061eb05e2d3769d86e528cb329d2e4d4a3dc70a5 +oid sha256:03435418f6e67f02e35b37b823577754b10eb01aeb12ff183df3100c822cc95d size 637 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_1.nbt b/data/minecraft/structure/trail_ruins/tower/platform_1.nbt index dab628f1..69a84252 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d69da5aeb753f8d513d4e1c8ab3527d6807c0b29559f09ad41957b31b88aaad -size 1197 +oid sha256:468109a6364b7b428ba2d97987613b3c4424f875d9db30e3bbaa71e1e01b7256 +size 1196 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_2.nbt b/data/minecraft/structure/trail_ruins/tower/platform_2.nbt index f87b812d..d3adb3f7 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a44f3833df783a910392e769776d0e6298b7c0a3a31dab47ca1ff66246d771f +oid sha256:c2cc850a901f5f80c92f291406429ab1a0c7832f6e8112b77fb9a0f63e601f3e size 1135 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_3.nbt b/data/minecraft/structure/trail_ruins/tower/platform_3.nbt index cfde8ab6..0336932e 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ba1d9240132316d3f47c3eb8dc9449208f51b017680a07dd7f15ff7bcba29ff +oid sha256:e3023c615949733f003f04e9f1fc08d0f50ade276f328b35ac30f228d9669d06 size 859 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_4.nbt b/data/minecraft/structure/trail_ruins/tower/platform_4.nbt index 0e25a545..e2d18384 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d197dbc9355625237ca90712b23dc95267222a72bf79420f7db0885450d4b4c4 -size 1205 +oid sha256:31dbce2eeca9394995d9fb06e5ac8de8e459bb6fd6e144e2ee8b74c9e1c6d5f9 +size 1206 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_5.nbt b/data/minecraft/structure/trail_ruins/tower/platform_5.nbt index 74443e74..f674c181 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76b88e5aa700b5cabfcb5591121d08db89d697286f182ba5cef8fa5ba463c49b -size 1146 +oid sha256:223e0293262a72714a8eb73bbc306f3cc7c1cfff6dbfae48ca234c77589367e0 +size 1147 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_1.nbt b/data/minecraft/structure/trail_ruins/tower/stable_1.nbt index 92a1f16a..787f3ea0 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:357a59e54f2b1d613fc28fb9aba5612e4493811d555edf387811ccd5bf643175 +oid sha256:0448a2a0b33e7c10204d06ef58f06ebb7e3adced4fafb22f10731540a4c7fab1 size 1274 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_2.nbt b/data/minecraft/structure/trail_ruins/tower/stable_2.nbt index 9f137543..9cf4e745 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a67e42ed23734b3eb3b4883cda95faa35e29b08678e69043db14d5158a91931 -size 1292 +oid sha256:279e1aca15b76ea3958893a75d9ef9055cc19474d39ce551db6698bf19224ef2 +size 1291 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_3.nbt b/data/minecraft/structure/trail_ruins/tower/stable_3.nbt index 6ca7eac9..774c52a0 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a88920dade946166e332738f4c7c422b0885145a635edf3d54219ee7542799ae +oid sha256:39dfd300f802c62ef765b9d12da4c939b960c2d681c5feb700875bd6a63fa564 size 1256 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_4.nbt b/data/minecraft/structure/trail_ruins/tower/stable_4.nbt index 7b07269c..b809bd09 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b620e45a7078427155bf427432f324474600a05107833ff125b97e8fc909834a +oid sha256:2b31b265afb4d5b15279c9331a710ec88d96cd74fd8666ac19998adbd949dde2 size 1290 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_5.nbt b/data/minecraft/structure/trail_ruins/tower/stable_5.nbt index 05be770c..210cfcc0 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3742859d85fd5e501d0df1e3dd38e9eed147de3ef7385a4a951704e936f34713 -size 1034 +oid sha256:95ef86b72d48d858bc25c1c3288faed7f6574135bef2f7695731b617e69f9113 +size 1035 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_1.nbt b/data/minecraft/structure/trail_ruins/tower/tower_1.nbt index 4cefeabb..5da27a92 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42263a978250b817ab6e037be24a749227a7f8404be35534e637a0c851f285a8 +oid sha256:c0c400d7ea41606b9a46bd34f780156ed2ce7267cb323366ea876e6fa9b787c4 size 1585 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_2.nbt b/data/minecraft/structure/trail_ruins/tower/tower_2.nbt index 2a88cd5f..6e2b3b7d 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5a8a2fcfe0efd23767590f8d3236caf7bb8418a9f38150b973297a83c035a9e +oid sha256:2c85f1f4e2413d14247bcaf98991bae06d4b327ecb9cb3159fbc05122fc0a1f7 size 1619 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_3.nbt b/data/minecraft/structure/trail_ruins/tower/tower_3.nbt index 3fc9d606..d69d4a2b 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbb878bbf5fd0e5d4bf0d568a22ee4cb1723ec62667a7a8d71f10f3e36bc6125 +oid sha256:9640544cfb237f7ebe7816d329f4efdd966ff318e6aca999d25c834912f3d32b size 2229 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_4.nbt b/data/minecraft/structure/trail_ruins/tower/tower_4.nbt index e2396cd2..354f66d3 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bdb66ec8d6ba254463a32ab21e638b1cc0f59d8123e802a6780e2e251c307d3 +oid sha256:e9f108f2725593a3de9c59bf8df9bac37a5d7d59586cacc5a425245235e97ee0 size 2091 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_5.nbt b/data/minecraft/structure/trail_ruins/tower/tower_5.nbt index d7a6d0f0..3aa5fda3 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9c3311b0426f052c65885a8e9dcd7054e6a1356b416231920126610df3b5212 +oid sha256:694705298d02bf47cf3485f3831385ffe84dac9de19ffe1ad3c7abb9d4a3ea94 size 2062 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt index 1e6e9681..9c5fd516 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43cd70527a2dc69b41521cb1b45169eb287d1cd96a270cdd5e219192dccfb7dc +oid sha256:bf374b874ef7416d346a75b80f8b960e09f5ab0b4bf31d564a82c0175c4dd877 size 505 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt index 11196131..4d59eeda 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf28cb465323d8c894289a03d7adcfaf6db09ed3948d78ab11a83dd9ed067d83 +oid sha256:5bad514083ca7397f5fe5fbc6fc3a0a58745ebdecccf50f08fd936ec04cf935b size 522 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt index 0c7e757e..32757368 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1aac2bb990b5f11706340a670ce625efc7ace5ac92c17a29eb00589268ba4188 +oid sha256:91613ee95a81aaf29e29a7b5db294426be55c19c178ad31f599487d06b1d0d04 size 501 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt index e36d08b3..1605097a 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cad2083c9a62a6b90bcfa8446c33b5b94449db811dfd837d22ffe07a1105bc70 -size 481 +oid sha256:34f4ac2b44542b0c6d08b81792212def75b4d6a99e2bd2a28512bb54846ffb69 +size 480 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt index 5aa37363..e22f7226 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfe534512a0b25a6b6f5c6b94d1f604ea6f875ef58f7427349dfbd4f97ca7748 +oid sha256:da2c1ae06f9a706a8e3d464324655a99a078a248ffe4a274894439fd8f49a20b size 406 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt index 30850f90..b1b69ba3 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2f0956554d743f89db96537185b5c2c735502b91327a76c24359f5b0d83b406 +oid sha256:f99ee53231f315f4c58ef4116119aa152260b4d11e9345f205d4295d1ea3c1a3 size 1695 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt index 1ee47e68..d2577ef1 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfe5634dd5566284cb4154d8f892ecde7f290169ee7217fb840bd460b2c5da8e -size 4157 +oid sha256:3bb444384fa3de83e33e2050cff451b09a2e4f939f91a4d96b9fe5528aec057b +size 4156 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt index 06646a4e..1dab11d2 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e0b29781cf75dcb4e27481fa69b8314089ba0bf1d9e4cd4755108d8b024da9f +oid sha256:2286f1a60b6a8420bf77e31f8e05311210c9b4022f2d6fbf5fd70360bc9073bd size 4337 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt index 15a4e8f6..2e558797 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73f3041c520eae198d3a87c133d4c598b33313f23afda5180bfd526490d9fe11 +oid sha256:34c5b07d5d2466c38341df61457b3cdf6bd0c0f53570747734b64ea387da441a size 4281 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt index 55d41ef1..4b386f0b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f87cefb2ad2ad4e122037708a67ccd3bc47ddb7c913ce6f647e13bba3f9bf6c6 +oid sha256:d36c593004773aaaa8a312eae63f9efa4e5f16d6034424bcf41b4efdae449e09 size 1754 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt index f5125b74..6404010c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45c8c8fb9b5d0c883ef2c89969cc4cb7a56e9c55c77c2e3cb5e8045290d49ef9 +oid sha256:d25f6d9bb4f411701701996780c53a613a1aff7cd11cea0be6b8a7041e11265e size 488 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt index 1931d6fa..6c5b9ac3 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cf3420592c60b1c121d1c39c80644082544d9643864e6acf28bd3d50b8f26ca +oid sha256:3fc83ac1d17e988eb4dfd3af7553e09c999340a170343f093069430d714bbcad size 429 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt index aadc1e1f..9f6c9c91 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4c0f9d681b317cf9d13aa41fa6634451890bc76ca513f3d8beb0afe62328aed +oid sha256:5a533a0b670fcb634907087e417c0a5e708a597362b3750a40fff14bd2b1f5bc size 800 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt index 80035461..75b7bb21 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56033368149e989bc32f03c453143770d94500d1a915fd32f9eed014dec73dab +oid sha256:cc36d118750b649dde734d32be749d83d158509456b91cde3572cef3b0e2f02b size 585 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt index 5b4c2833..3f80ad81 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eacbcc5b3014b64b2d264f5222a372a8090005e9e829e8bbc761c455b4a9bc56 -size 6221 +oid sha256:fba4c74612fcd191b40afc744a4a3c671dd036c0522afdf0c0f6704dd96209ca +size 6222 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly.nbt index 4f51d409..31cfdaef 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d1ee1233406632af692b79334a39e249694f4460fa215061ce6b719b3229c6e +oid sha256:db894c78f0da8b44e5a0c79b351346b5ccc999416b0fe7d4c3bc9ff509c7b3df size 54409 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt index 508954ca..d41535d8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3810610a9224353718222a0f9d8c88573925baeeaeab02be5029984b48210660 +oid sha256:c2546a9236b7ff319a51da439e5a9ef876d4a984f75048126d2b2ea23ef1cf9c size 957 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt index f01a56e1..d01f2720 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f77cf5791f97af8b448400a7f9a8aead7aebaaae3598699d1364cf9e6d20558 +oid sha256:78cf6560d4a5947b6df06a4a79ebfc691f9ae388009dd31a71bd2e59d5707c5b size 950 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt index 80ba4f99..306ed7de 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a3d06a2646f96a7c8e3cf41d37c7cb4ea4cac75dbde6d4219d6c81f79ebb10e +oid sha256:c4a7215d5cd5550322eb000a09075bc595d8ef1afdf78441e328b8beabcce624 size 957 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt index 4f455f49..ab340718 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbbc8541aa65ca67224cfb6debf8b6a59fa14219c6177499e39e27dcf88c6c78 +oid sha256:a916c82fa22c31b5b9f2dccc0d4a4c0278f9809f03b61a1b3a0482352a15166f size 953 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt index 20842998..6c952606 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ff8ed33855a91d0661781bc5b73e047a106d8d78b398ebb962cd71a172dd1b4 -size 1025 +oid sha256:e83f584a207ee3ed336cd89be1fcc7a1640b06f6fb8e5763e1a143ea2a14b396 +size 1024 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt index fda36062..0cd7251d 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98b0767de4b5641d8232071ec255a1f136a39a65c33cb47aa76b8f1e06d59d7d +oid sha256:3484d090e3be61fcacc0b3e255839c7c60558ce442ffbe75c723fff83de3d1f2 size 1022 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt index d4f5e395..0cdc9f25 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:538aa063c74803efa924a14d426a75f3e697f13041ee84d24081f8b1127517ef +oid sha256:b80a71fe01ba645eb8894977c70ca7accdab1dc40401b7db08294db20cf85bb8 size 756 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt index 4dc61efc..327336a3 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:241144093a2dcf3ad1703265d75b156f797e32df87cacc745728007edbd9dc51 +oid sha256:4cf6da338fff29035d2defb4fc5bfc2bc9224b180f50fa35ea2d24505a43226f size 661 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt index c05d9ea9..ffa9e32b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1512506a345701a1685d2862d28dad50f135b0b452c0198122243f45a3f75932 +oid sha256:0665f37afa2c2f5d87bbfd56a80eadd51ee75796244004c698ba97866108f51b size 587 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt index 14d149d5..2daf4a1d 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b32a947d9f82c550716d48b3751bfe55585d422cc3b328506bf2d6d365d1f56 +oid sha256:c7b02ed873c224b28498a56e679d0b1e648338f70763950ce353d1fd0c4c1827 size 869 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt index 288947a0..65c6e02b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6fabe194f39f4b2749c6f7e151d6466b37e4001ce5cdbde063f32966862f0d18 +oid sha256:b764d23c6909446e6a3ef960c18b82a4079e0870059cfec5eaf8d80500fbb2e2 size 537 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt index 20245879..489bb049 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd230d3c8078ddab68087c7a9bdb7221d9d57dec779fd72314c988adcafe6a1a +oid sha256:68b452cd8f8ba2a5fbdce0ccf675149dadabcaa0fddbc5f7fbd8241e6a3ede96 size 639 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt index eec768a4..24efa197 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4042f8fbb059c16d3a8dc5af1612296bb3c1c5863f6c9c0f13899dce7793c25f +oid sha256:a20ffc225f0744803729bddc69315c885ec26c02be87995789f1b299ef3684c5 size 340 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt index c5f222f0..106b5f32 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f2eace4851db415b9bf08c49f9ecde8891f59bedf3f278b3138c8a16877bdca +oid sha256:675c7f6b8aa5b67c3f1b08eec0a4dd1904aff206d6465275fe47dc41de29a83e size 2462 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt index a6de9e25..8bfbf9de 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0674606e7d7f8b04f1ab28dfe1989208ea0ebeaaf96c0650e30b0a7ccf099736 +oid sha256:2bd2a0e49553fd48990b5c801f3b92c6ce28de9da80c3df8d3091b20a84e0afe size 2495 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt index 286b12bc..2e682dd6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea0bef588da86156910905fc5ce36699ed6a060c23ff0c4a7507c6456c531923 +oid sha256:225fef580c864a742e34a2a473b72d484ae13ed5f3da324f22788044413e1180 size 2511 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt index b666623d..27cdcee7 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7b84f7e55090144c2f4c185c40e1d8550d65c145672b698427b3fce6a88f6af +oid sha256:4db33533e2db454977741eeea106ba4ac676adc30caea2ba22f621f8113eb34d size 473 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt index 75c5b030..a0828a1f 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d6beda9742fd4bc6fad82af2689cad9fa684a3ae13ec11a42f8335adf02316d +oid sha256:a4e9b6222a3bd98b8f72644f6f144a104e7a2dae50ced81365cf071685e8a530 size 2424 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt index 0cbd771b..253368d7 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5df577e61b422f187ae24ba6400c5dceb4c4321d6c768d131412e93a4db64cdc +oid sha256:aecbd7a39a35be28aa2d76a2340f29cd5cf62119ea6221bb769f5afb9b48d01c size 2551 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt index 2423fce2..7679d593 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22d67f95cd6c9c54ec20c30082e6fb7ce441b3672c5c17a297c40337b3d2f09d +oid sha256:0b61448260af4e342b218304d304afde7537ec64ee49d04e3905df616692454f size 2558 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt index 820abfef..5989943c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4537d03d038bf10035e3d514a34c5767f4bde97bae2d2e2a85d2fc817828a2dc +oid sha256:fc2e37afe5896db151e6df747982b4ed5fb0cf4a31815f5ea83f4225a0a164e1 size 916 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt index 713bdac8..a6288892 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a091a01b3ac2cba4cc547896f4939ff64c35e68c7c5e314afaf4feec75c8d00 +oid sha256:a8c6e5d07fbf7f7753d854e3e15ca7b5fbcfab743c406503e7f90e5ffab1a252 size 38589 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt index 364dd19a..33c7d17e 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be25827df5872b607a061d90bb02045407aa9d535bb1116c3d6cb11ba3c90a5b +oid sha256:a3ba7af853a44e4610f53e2a96ae2aafddc56ea77964a2a17e49f9ff276d0d50 size 38938 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt index 5fdcdc5a..55c37ff7 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b946fb4a4dc6f017a062931719b69c1340f0b71e25760b1aa31b52e79ed3c2f3 +oid sha256:5e637cb98838c02e44104d70014864f8a30660b8da3334525846e83377645ef4 size 24479 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt index d9cf5473..def2226e 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:066a0f15b3df058a0db7bcedb321d8a3d2a3dd38e5de1eac307a3c88fcb13014 +oid sha256:432df228324fa35b45a8b212ad63434540835607510a573e6abb87048b4199ed size 19203 diff --git a/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt b/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt index 23c23cc4..391c694e 100644 --- a/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4eaac92ebab4121ba67a01cb2f27a99a87a191383a39154a81bc0741ff1251d0 +oid sha256:f5c0328898d258c1689c6e3a23fce563d72b416b5cc0014ab7728b155377c927 size 384 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption.nbt index 34783f37..383599ef 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44397910225539d7bac7de5993d92b6851ad0ce21d7e449aeb68829deed1a95e +oid sha256:c2914d5d7eeb6581986572281578922f40e577a5ccc772f12089b727aaae67f6 size 31897 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt index 46db16f6..77782770 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c4e7ecc5832cef4fd134735a651a9504b3c2069668140ffbeab0265ce4c6bbb +oid sha256:ec39594f65e806198e1245fce573ae93d8d58627ce20ab760464bf1d30bf56e5 size 2594 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt index 00bdb970..3ec00510 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2551487353c160925ddcad7df99e219ca6a8a77067396ea341f96eb25ff42701 +oid sha256:c8e1753c581d4d4f9a5f4a69e63b30430b9e20128f0fda4a4d9f433f2584317f size 1537 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt index d213f9c6..57677dd8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efccf81bba8e705b773467310bff1a3d57265e11e001f7997282384cdfa489d9 +oid sha256:19508250e4c53949c04bca527c39321ecfca2f28e7abfa9a09486acdc5552c44 size 4438 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt index 02f4bea3..e20b85a6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f153f33d6c7e1041202addac8ec0cc425557926fde8e4c8763d1ab7b4a7ae0f8 +oid sha256:03f4f915a42687a3bf919805c6b506e353b8dde41d3b8f69167ce97f7ecac03b size 4602 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt index 59e85ec0..31a6b541 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:670ab8acab5295f46696d7d66878e149c368edd3becdb79baaa747f027ccbc2a +oid sha256:4db0e8b059443a80a59b36cb2b8addd12092fc3a9e539f2df2aa3750e61fffe1 size 4684 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt index f313f8e5..4b59d915 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d4f8d3c8036ef82d01a2e5f610cf2869a398a4c636408b1e62606ba91297c0b +oid sha256:21e35e7325f3490e3fef12c1613508f25e2f027e284192418b37899d18ad3ec6 size 4835 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt index eb3e147e..f6ac3a71 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee09bf406257af5e01615daedc538580c7249ff42f965f87be66ed79f1e00089 +oid sha256:ee5e78e5a6cdf5abd27b9d527e39f5ec24610663cb00e932d742e76f38936c00 size 4787 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt index 5f758932..195bfd21 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ded6f9964bdbc73521dcfb3288f9d2754c7260888061136f40dec2ead5de9b1 +oid sha256:668e3c8442251a361b01032c3cdacaa44df9f95ff1e67f09cf7130e7c29f5440 size 2506 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt index 6b6651aa..9fd55a77 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af1c3fefa118954a0e4c74cd82064ffcc4086e4641a2ed942a4a981cfa40ae1c +oid sha256:04628b4339dcd28cda378c95f5597fdf0f58b7c5f66c47b5a3871cec09096867 size 2483 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt index 84fbe875..ee22b474 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:198af57e07c59ea1d6250aca410eb39a5de6de255a14ab81b2286bd1689fe647 +oid sha256:bdd86ac92086c00316819000f35b3ba05c323d9da84fc896315abc272a523aeb size 2476 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt index 647fe206..d81573f2 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6c90eb77d3d240ec989d253fd5bd1227bb2ece6b30dc2dfa1fc6d41eae0e4a7 +oid sha256:b295ab3103c3932f3f2fe1e73ecead95887b961252cc45af37174598a148991f size 47359 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt index 6a97f678..9858bd1a 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e2307ce7a59ffea8281559e2924620b9d96d1e8111b69c5d7673e7f8a33afd2 +oid sha256:75e5faf16607b6cb5e450776d9faf2f866f1b9b5d73917256f24700f7c82b071 size 3678 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt index 74ebd6d9..6f8e6f02 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10d1bbf8c6c1be13894006dee85a750aeb6f445b8637ee88ceede62d771cb703 -size 1919 +oid sha256:331b71a8eda9ee8122f17710185d85c0c23287ce7443316313ccc02cb7981b32 +size 1920 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt index 05c8e618..2146635c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d99f3729a5550076f7f216aa8e16dee7b44cab1e3df5c15abbe969fbe2381c37 +oid sha256:3661dbc9a9cc50baeacac35c606c2c54661117a54afb7c0155762096ff58932e size 3462 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt index b84d382f..cc054a97 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e389b2ccca38a6eba76ee4813be8cef8b625eb26b0bbc9e89ab30ef3e13a232f +oid sha256:20a31e073feecb19e7b0b1f41c1de7641f7813f5fe6ccd83cb1fdf74f2db4c24 size 3326 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt index a21a9040..734d0941 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44e576b4f0c30a2c338ae8c9d9453cebe498c1f25485a5ca841ba749a9e51a60 +oid sha256:330baee7ed6b7cda6ffa4cc8f4fd6ffecefb78fbdbd0d787cc4285644dbfcd5a size 3910 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt index 0190c0cc..c55e03a6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32d874fdd14fde834041e57b6a62999a7ad863c86b951abf9240d424a704e1dc +oid sha256:c221a25e972fea2f08c26aabdf78044cc3cdada18f0468fcd9832716ced5b2fa size 1922 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt index 37cf3d78..e950def3 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:659e592a32a2d946c5d28385d79761b7eb7206eeb0efee434c63343e6366fd08 -size 1964 +oid sha256:bb86f5590ffc75974fc5f10517a5d46719c3747ef2b107af874db4b08cbe3cc0 +size 1965 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt index eba3675a..a68920b2 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22eb83cfae554185dc33b0b766bcd98792bbdace8fc4b27b45296cf689b149d3 -size 2010 +oid sha256:20321a5dfd2b73ea583ee793153b5efdca27a5a15fceca0f39299bc25ac4265d +size 2011 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt index dc11c4e9..578b9abd 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7a1084cdef63c23ade8a77d8d873ef413e5ab8861aa3a09612f261d8a23098a -size 2018 +oid sha256:e64d09f6653a886c56b3d9d085e3c7918a8756766ce3f54d2bc3674c4c8b3a33 +size 2019 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt index 4569b8dd..46715e26 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a5b7c27176f72d3071ca67e20a0ec1fcad587ec12852bec4166643e8618d2b -size 1970 +oid sha256:3b802f037ca8944763d00d9f4ab6f7a6dc23e8238272a2e7ec1476eb744cd07b +size 1971 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted.nbt index 410f2bc0..4231a0be 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ae185c36323272fdf4824a4644b40077914dd123fc8a532ad44c94a908a371 +oid sha256:b984607c2c0992c89da34130ff8b60a599a30467c9ddd225e4cbca0f3dd39285 size 34273 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt index 24b98668..0c881b1c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f587a442880f769edb976dda861337c9bed6796920fd4ba3869577e3fdd799a9 +oid sha256:b187a12329f7192efd64af50171ab3177ab27e8cf317fa9d0c65ef613d1efe2d size 1276 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt index f5d16d5b..f48631b8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12cf1626813b71377f42156c6a32c1d49bfae456c07051565216d7afad5f42d4 +oid sha256:99e2a145ab64ee61d89d51b6ade2576e028c08e6e8411bcef6e7c13f0285c2de size 1008 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt index ddd45e99..24da8e30 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7be51e10e30388d4db19d9991badd14234fdae4a141cbe1612d941213964c7c +oid sha256:f6bbd4c10785c4f50c609d4d1ff7b0f683915d6e9359acc0a755e0183c52ad97 size 1133 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt index 62c8e47f..8aaaeea4 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5098afbecae1ffa7d25bda8aaf28e9920763f4060adeb461bc5856af66a58811 +oid sha256:57178d6d5ffd4a199e87718ae394e231d3b58fa9b9ff926fcbc2cf0a52752326 size 1059 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt index b971089a..b4af0da8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a735f3e2bd42c6d38a0e4ef2d88fbe85319d00782ccd541e45f66d53db4d7aad +oid sha256:ed6c1efa3d73dd00638faa639a923dbf2954d3886861f933f9e092e7b238bc92 size 1344 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt index 4555f991..5a793dda 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3146631df0e4e2f47271646c64135f8a35bd275c0ba19431631fef20a77d386d -size 3429 +oid sha256:94d64e1d800ea3daa3e7de55fca831fb9f9aed1ca4e195a7940aaf81760f7a43 +size 3431 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt index 220f81dc..14742a19 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59921203f532e49be7f910155a9e2f53a6d127c41bdd3861d435e6aba1d763db -size 3445 +oid sha256:4b7f3419c4ba135af9a82e27aaf9542b309b66338738f6bef29d8a4267cba0d5 +size 3446 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt index f6e2e7fb..7fb0ca03 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:027c76a88f0444eced0e4810b8af736064717393ddf4a20d71362d7bf5af3e75 -size 3435 +oid sha256:716549066edeceefe0c1e22ecafdb782fcc504eaa1299de091aafc307deb3dc8 +size 3436 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt index 761ed433..aa34db1d 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b16d49123611df697df463ecf2f407d70ec52a2ed1f58f1b3aebeffc9eef165 -size 4325 +oid sha256:1ffecc8da9674bd5d8866f74c493d47a555cb3898a54aa315a60e746990db0c2 +size 4326 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt index 73bd1ab6..23f4f9f9 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e5af4d88daa129f168ae23ca7a418d1666966eccd68eb8a99570dae693d2bf6 +oid sha256:36847877135397a449c9f12b1cc6697453b59c929b5dbeee82a98378556dde1a size 1324 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt index c15047ef..36f9f88d 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30a017e6ccf2f5e78b430501598c613be84d646e4e70887cade74abc849f2141 +oid sha256:5f2379dd777a2e9610001b50e0898c55d52a7d9a248f892143dda684225b494d size 1319 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt index c9f48154..44f5da17 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:959a04b61033cab7afa2f3fa0862728bcda29341b5b2f69a792269042e659b7b +oid sha256:33a72af41000038a81f25ecdc91b80df376d30d7db83a0b656ea684938834a84 size 1453 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt index bacccc6e..904a0cf6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18185bdc4453a3b6ff681fbd86e3db7541a88b8a82f253a17e07dace94ddbb2b +oid sha256:8a8c99e63cfca10267a039c203e15cf96e58adf644006923284672fe1881cfcd size 1232 diff --git a/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt b/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt index 60f31d7e..3dac102b 100644 --- a/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt +++ b/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad3b7c2ab4fc19417ba5be38a5e685433b0f9c3c049cdabdd6fc731262026e77 +oid sha256:0fde573e8d394658bed123d8254680c37a7b4b85f150f60673273c1a71e8e658 size 355 diff --git a/data/minecraft/structure/trial_chambers/chests/supply.nbt b/data/minecraft/structure/trial_chambers/chests/supply.nbt index 6d111275..ec690e78 100644 --- a/data/minecraft/structure/trial_chambers/chests/supply.nbt +++ b/data/minecraft/structure/trial_chambers/chests/supply.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0db2cc83d2f5f83f5a628abb4fd6f4bb5b8f1e93619ebc5ac4302f59e720efce +oid sha256:68ff0fb04c804e18705fda445021b1112b9bd4c0c7185a5dac296596dd1367bf size 440 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt index 0b52034c..04b18aa5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27965c8ae8e5c83c8d58b36e26848db52409fd11af5a57c4d969ca3e2a2d1250 +oid sha256:532eb16fb777b8dd89dca5bb213b0870bf541ecb5cef2a9f380c883211b6f772 size 835 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt index 206eec26..b7bd70c1 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b62944d0c74fcc67e2a8fd8bf9c49c836ed48423f498da3a4955aba03c0b942d +oid sha256:5d5c51a6c9f1b553ed7ae9e89eb12d7ae7a9aa048e62b7f86204919b5b7269bb size 698 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt index e8af54c3..b1450c2b 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d60d29a17c4312446bbda182669825511916c093c3b6aa12b1b4b287870f05c +oid sha256:156ad800d5d496b1dcf13688bbee3d528ba45cf6ef0548a5659576aea9b018e9 size 514 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt index 40448bea..2b85f42d 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a9a2bf6f59b0760685bd4965b8e4c5f7afceb7e4b3ae592b3ef2ce9b179c613 +oid sha256:800c3753bd9c66f7afff6e12dc09a585e28790a6e22c680fad6e16bb150ff872 size 514 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt index 6eb40515..71a232ea 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73c2c265f458b3f17f52650d6bbfef544e22d8833bc43d6921f8bb7734511425 +oid sha256:b9673a2b70fa92bb1bcac56cffaa3001f6eeaccfa262c82c1acc92b105be1630 size 901 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt index 8d64d997..d955a846 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e3d171963dcd7075227c2b1274ab00214546f28577c7dc0f148dc1f86e8a708 -size 1529 +oid sha256:8b7c4e7cc24131893045db4708264ed7817a40d2cdedb0d3fa6330bc089c7c6e +size 1528 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt index 294a50ab..a0d54316 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b736f5bc1cd14eb16b2e83a6fa662c1c2a47cc95784b019e11f8e01ffb224cd5 +oid sha256:9a5c413e8f8e4a0f145d69ae4de050ec2bfe371612f28b5b57fc48630e4a2e8c size 812 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt index 17bf5c6f..f7115ca5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef1a149452b122213324623394f3299cccc3e048a51627775605720be9964301 +oid sha256:dc8b35e37dff3f53091a2262a5d32b254f6ea0b9fb29860005b6911210ffe5ea size 526 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt index 8cb9e2e2..50d1c12b 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7328ac4c87d0a9019a44da1bda372fd37f14313f3a9f52ee39140836c55d6d3b +oid sha256:55b9b28c0bc3490395fc22465831618c6101ac9d9943bc93c4dc77924632ada1 size 670 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt index 57e8f01d..5cc8dc7a 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c449abb6b97e4c2d123a8837bf5da38c6926adf37f7afeb43732db6c3f057f17 -size 1160 +oid sha256:486bf7f9363451c7f1f1236127f8e3432642ef75a6d6371d56d77c1658af7a55 +size 1161 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt index 5a24fbc5..fd8e6baa 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7eedd338ed7ad7929023741db77faad1e65731c7cbe919a49baac521841b8c1 +oid sha256:35c3ec728d2d798ad7725babf4560c148f8f372dada951a8b12d599403eca1d7 size 587 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt index f952bfd9..ea90477b 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7183ae027e2b6afba1628e55379ad872d405d69b7000a4b57386ae03266d20e +oid sha256:2a6393e09c4de0fdd9762bd387b356c30b0121bec76ff62ffb01ee61b4e7a3dc size 590 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt index fba12151..a916e27d 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5955eb46c9a56ed3c228623ebe93ffd8aff7e8bb793106a08e8b0ca62a4ccfeb +oid sha256:c4e1cba468e358e2d61f5e0b84c4dd2d6a86ea27e8fbf49f9f2ec8634ed1d067 size 457 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt index 7b1e86a6..880b92f6 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd0433ccee2c1e52f5354007eca73f2355a3759348337886ce4404a6d12f1bc1 +oid sha256:4bdf1b43d9df51f1aeda37db6dcad60ca64a4cc9ecb71ec8eff7cbbdb0d143e9 size 909 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt index 875f835c..5759e8ca 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a9684eb51c257d5a6da2930b7615fd69d6e7448d081476838b34074c69bf2c7 -size 1186 +oid sha256:a4963cef102f5160f0fe5635b777f6472e2c987818dd20e858000fc0c09b002a +size 1187 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt index c3e60b11..92f6c32a 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7748e85f7cf23c9e74a16e4311e8826fa52469714acbc6b02a85232a06e23b6c +oid sha256:d75d6a0b99d2d37be081ddada6ccd6a237ef2092e83f04ae9fdefeb105e231d2 size 3245 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt index 4dd1fd48..3cf60307 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:349a0c4f68c84b9dcd5626310deb7a01e2ab651ec1a89f47e15f630a307d9c41 +oid sha256:a587c41a1e95087052d7f1a124224fff571eb2fe97593bbfb7ac54f3827815d3 size 3224 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt index a5fb66d7..5c6139fa 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b94015a2594bf308dec6bd87176b6a25b6d3baf5862ab8ca6166aef17d01198b +oid sha256:a1303c85e302960e6660e2373d282b7ca104227ebf74717f874e599fa1f19788 size 2884 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt index dbbb4c6d..20cac789 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82ac04293bef439c3b81c465716d3e4c799c58c13ada5d9c9cd27b5af89774fa +oid sha256:94053b9593b8714a403679eb2fe66dea6454fc073648b3a953ce2a5b463a033c size 2821 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt index d2d67c5c..6a96caf5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:460796015519f9db455de201fbf9de08a75a80c15bfec91b169f302bf697a6ea +oid sha256:07e7f175a7951f3eac8c38a23e0b2b16c69b54f23997d74307178ae83ba34d63 size 2831 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt index 9c09cb51..51d70b94 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b400142c1f72decdf285d43313a2ccacd02728e47563d61f755abb857e97c1d7 +oid sha256:b968a924d2928fda0b15057ab8746e7fca90a983b04c34c0e2c2002905c54238 size 3849 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt index 4ffc7f44..0ccd1658 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57b7d6a7e5ab9cb9517fc7142347ead6ce548596be1b9c45e26acfdab6d75616 +oid sha256:1e91518beb403cb6ac2c54899b2bc0c22c7eae54f6a363a6e7bdded6028ae597 size 3317 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt index b74ae7fe..a2361e5f 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3f42ade7a43a78e3f92e4f6a94ed483ae759e7daea124cb7627d591d1aac531 +oid sha256:eb07c940b52744a466d8780269dad6a3a9a0457cdcd960cfb228e7bbe9f0b76f size 23427 diff --git a/data/minecraft/structure/trial_chambers/corridor/end_1.nbt b/data/minecraft/structure/trial_chambers/corridor/end_1.nbt index ff0c0b77..9f895c8c 100644 --- a/data/minecraft/structure/trial_chambers/corridor/end_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/end_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:266fcd75f4ee415d16f2f426c660c2fdc6218cd8efab39d76f0416afec466b3f +oid sha256:11c106c1afc3a392dac32ec26d28b89a06f25931ba3497715a42e4712c1f9406 size 21446 diff --git a/data/minecraft/structure/trial_chambers/corridor/end_2.nbt b/data/minecraft/structure/trial_chambers/corridor/end_2.nbt index a0a9b3e7..4125a818 100644 --- a/data/minecraft/structure/trial_chambers/corridor/end_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/end_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2959440499ce11730c79bb1b11dd1ad7bef139764dbd2ae811a5b59c38b613ff +oid sha256:be9ade1acde4400861f9010f7e2ae1ed290850bfbe2e061feab991664ee683b0 size 21889 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt index 535f78e0..b8bd3e07 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:134f786c95e43a9f942a3c496fe2bd0b294ed98ee9970a022cad91ad1d75aca0 +oid sha256:231b1735adb8ad38a1cad8329cb2e81d49d8d3bf67882c70ea3551a05ebe5cbf size 22026 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt index fe5dc3e2..42494c6d 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb71681fbcc000740999b838b288ac49a58d011b396b43dce296caff85371c91 +oid sha256:71d8c35e9afdcb29f33bfcdaedd0ab3b654ef356ff46156f1832885c12111412 size 21600 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt index cd3c31ca..24b3be3e 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f66d749481a4399cc80ea67d0241438797f65c920ce47e883673034e3080b08b +oid sha256:f197db17dbcc44aa831a39912f55f44fbf4bde2f93afa4bc0ea5ce68ff656e07 size 24031 diff --git a/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt b/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt index 16b5fb69..2e5e7dfb 100644 --- a/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:106d9ef484311d65ea35259a853c2862fc6dbccf5878c3b4e3928a4fd5245a3a +oid sha256:6d892cdaa068013a48d1241505913204ca5b7b46c1b98ccb3596d9795430a772 size 1473 diff --git a/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt b/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt index 34a69cfc..08951f1c 100644 --- a/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6cbcfcd481fa5c7528af69a3d4eeede0c76e0311d716ea9f7a1bebd5b27bcbe7 +oid sha256:880716d15554ffd4fed04dbf1b1026b1c81382ef71a73e1e334eef9058895f51 size 1478 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt index e7fcb332..46da6ab5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0944582de23e4acc1a450fc393c1cde1899c2c2186fae4e36199bda3a0a9283 +oid sha256:8e54e41f3a3b165af77e075ad5f38c3368fdb4490c4689dcc37459b9d08c31dd size 5672 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt index 4aa32e41..ce8d67c3 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ec3478d919a5bc0c95706525ae04e52c39d681efa45148f27dbca8d01b19e73 +oid sha256:3fb3f5e3e0f92ce6782bcf47c9504a696a46b96c330670a2369e7500104baa65 size 5848 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt index 07f7e05b..f8eb60b5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf8733c20534181fde972c2e25f2a3207b08f81e312a07d2c1e6478091dc639f +oid sha256:fca6dfd5ee9592672a7c4713eef0116bd4be04d8d47859c479e15281caa1eaa8 size 5821 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt index ded51f5a..87af3515 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97867a7d0ccc3fba3fda9a8d2a3d413c43be7f23ebd1d0c0e356122e3c47629e +oid sha256:7dc689c3ca56fdcaf72c7352f1757c7754a64636f1c105b7613f986b79c96750 size 5815 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt index 99a2c2af..6b3d20e5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5016424d227a3066e9e421c4382c4e7f72a31a282cb0ee910dd72a8a150296a +oid sha256:d61e4ba84dece1875e20e87642e58f2ec934422f7ccbf6becdae1e8f77118385 size 5822 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt index 14677715..d17d8f79 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:417e7366ebcc3db3a65697bd4e76d27d5f5c8279b4d13e097a4e3c3f9ec93a89 +oid sha256:be0495335016b21f3ea046ee8c54ecdb4ed5f6ba5d7d45f4aa0f884e9c73055e size 5788 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt index d4bbe26c..fbcc2a48 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5541e8101938f4c4326f97525ff0599ba7f22f5eed00161bf23f846181e5adc6 +oid sha256:8058ca53f3214266270386e87d3341ce650a55dcf22a755f24785fe81124fa73 size 5777 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt index 67d2ecd3..e085c7dd 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff514c0730fd62dc6eb728ac255040bcd3d38fff6203a3ec68c6e60402271816 +oid sha256:745a5f94b9b94deb7cf4090a38577423cad48cabeeed4a1acbe3824c36401afd size 5562 diff --git a/data/minecraft/structure/trial_chambers/decor/barrel.nbt b/data/minecraft/structure/trial_chambers/decor/barrel.nbt index 77697b26..d84c720c 100644 --- a/data/minecraft/structure/trial_chambers/decor/barrel.nbt +++ b/data/minecraft/structure/trial_chambers/decor/barrel.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e933bc1212db348dfad0acaa74a0e75057df8e3afb147c995c16f236765766f +oid sha256:0a6fee458d6f59d2a3d92b159f67d217697fcee32ada3b5b9577136ec4c848e8 size 337 diff --git a/data/minecraft/structure/trial_chambers/decor/black_bed.nbt b/data/minecraft/structure/trial_chambers/decor/black_bed.nbt index ed576c26..a81a9c05 100644 --- a/data/minecraft/structure/trial_chambers/decor/black_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/black_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:696f4e7f7c53b066ed233bc15c93409a9138d50066584c1937d6b32687e64e6f +oid sha256:2e89546d0cb54f00f0a60497f98ebb3b05496d0f22bcad79e23ecf543e53b66d size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt b/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt index e7d9f765..caeac9c8 100644 --- a/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a294b92349680ce4d13acd6586d01820b35aff9a02f3eb2f48d5e1823cfc686b +oid sha256:e173866bd6eefa8f37990754f7a0845423a9a2319a21a48e91b3ceb0988714bf size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt b/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt index daaec739..1d477f31 100644 --- a/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef4a59d532829d98428401f36b0a86f74c58c72d592468508502ad84cdd583af +oid sha256:a7f50ec522b2e760c640c41412458cdaeaa2c18469a241fdd1a5aa3d7399cc1e size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_1.nbt b/data/minecraft/structure/trial_chambers/decor/candle_1.nbt index 4c913385..4e738865 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_1.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b18fd01d6ee24f7316c91ccce3c285bc525a825afd67a1827ede7fd81ff5401 +oid sha256:07374a44772c6f378ed238ea9ef5f779b1019f245bd539c24813d29575e8d1b7 size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_2.nbt b/data/minecraft/structure/trial_chambers/decor/candle_2.nbt index 0170e3f1..96b6a086 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_2.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35222b83e494ef9888b54a238a4540d2d806c88948d0119c75f4159f7dfce782 +oid sha256:b463e889494d370408e097f54b23161db4a92d71581b1e7b99b60a34c12fea14 size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_3.nbt b/data/minecraft/structure/trial_chambers/decor/candle_3.nbt index 690a78a2..507f4d2a 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_3.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c4ada4ecaca30af141166637a2a63c81934dd7fb40ab28339d269c670f66394 +oid sha256:7346e76067b3a83dd0a72a653e3bc2e968847d79e1a13bd05e132dd64f520ee1 size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_4.nbt b/data/minecraft/structure/trial_chambers/decor/candle_4.nbt index 409feaaa..f6103c07 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_4.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa44843870c01663d75d1ab8616562b4571273b862d49236f9c5c7fd12005bc0 +oid sha256:57fbb95e970572caf4221a544a07a4456717863ce7da8e0d312de8f1c679e41b size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt b/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt index 9a3e08cb..7ff662f8 100644 --- a/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d2b2c538661c52c6420b689500a06bb914ab7b8959582cedb4f813de2727f5a +oid sha256:8fa1f6bc3aa323c512b0da54d9a61252380d52e3dedbdb7121f4c69c41a53a58 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt b/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt index 50ac2be4..dffe3182 100644 --- a/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:926f22a3195e286a99f6a68de64925bb61b93c740628de27264f03a8645af9bd +oid sha256:727a32ec43aad0050ef407dc667b38d36b15c2383510f690a31a4136106323f4 size 290 diff --git a/data/minecraft/structure/trial_chambers/decor/disposal.nbt b/data/minecraft/structure/trial_chambers/decor/disposal.nbt index 12bbb22d..97019c6d 100644 --- a/data/minecraft/structure/trial_chambers/decor/disposal.nbt +++ b/data/minecraft/structure/trial_chambers/decor/disposal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30385c4ea432a34d3b36444c2c424d69f72a99ee0ddc999711046245931cae98 +oid sha256:b98de5a96bdbbf821baf8027d805eceb6202648ae0e7a983a1c8c0ffee11fe21 size 516 diff --git a/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt b/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt index d006200a..27286601 100644 --- a/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e02070da095d7db4f05c50f6f14b3f82bd704bf612c7541780fe9435f5094348 +oid sha256:ed85c26b5c9362f8c2d31f401c6dd0d189bb909c4fe2a80bdfac674031a32959 size 286 diff --git a/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt b/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt index 6f8c9617..3bd42f19 100644 --- a/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee033b84df4626084b85c09d23790312bfa05ec94fb1e23012f4922c7396eb1 +oid sha256:4fd991fb2030a5bfbcb53f513ee5f30baf55e5dda03c3916193ff1b8f42b3ef0 size 388 diff --git a/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt b/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt index cf7e54b9..29f8c800 100644 --- a/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93df09f2eec452961222c9070ddbb926e6da57fbf13eea610d445774112f5829 +oid sha256:e306a9c4ac8afc8629154fdade41dbd1fe5130be57f93dcefb45bfea92b71154 size 326 diff --git a/data/minecraft/structure/trial_chambers/decor/green_bed.nbt b/data/minecraft/structure/trial_chambers/decor/green_bed.nbt index c0766ddb..4da2008f 100644 --- a/data/minecraft/structure/trial_chambers/decor/green_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/green_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:364e6b862f8277f668a9be85c744c38707a3b4fcec23595307d7bbef0aaa670e +oid sha256:399d19bc9708558007f39fccd5ada67b474a3d3b261d68b5d173311ba8d63b87 size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt b/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt index bc22f4d5..8fbd8a3e 100644 --- a/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f80be1dd69a5cb452d0a6283edf8961bde5a8e09d0e6d54cd8dca882ab70da1 +oid sha256:1c862aba5b064eafe69ec7941a498f10fc5156aa041d1d506ee78644fbdcb90d size 385 diff --git a/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt b/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt index 7373e18a..c37ea3bf 100644 --- a/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c35a771a3757c3df791e1fab53c5755dfcf0a9721fbfe213f845b0c8c4d7a72f +oid sha256:4f075c1f99d7e22088f04135b1eed263931fb91ceeb663be92efea6ed6cc89ae size 331 diff --git a/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt b/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt index b4662de4..01f5e89c 100644 --- a/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e81d3ca8ad54da837013414d9f80b560bff5f05fabc7c95d62013406e9a8b104 +oid sha256:1fab3071b65cf5fc70adf7b67155ff2d6329b804665cf59f6e926c9bf05d7c66 size 331 diff --git a/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt b/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt index 28a4280d..e98cd3b3 100644 --- a/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:deebd9331005a03542fb31ef265aed9327b08fdcee6fb9abca5e0905537e50ca +oid sha256:52548e4f640696996af6f70586c0340420469e8f070788e5e764acfabfa938d4 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt b/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt index 1641762a..5f534e80 100644 --- a/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:561e51f4047c4cb8b6f5c3213210ab5ae8b250504cb48f66ebe27151c46d5c03 +oid sha256:b6497328c475559da381b562eb7de3b171b7dee1da4d1cd92b8e2befa092f1f4 size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt b/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt index 6408af62..6c682b3e 100644 --- a/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ec1d6ad6b01239c76c74f2167e7ef8859466f366cd32278e89e23c9b2e0f9c1 +oid sha256:01085ae3b260adaf35f39ca382270215c0ab5137a0822f26e7b75d25364f4944 size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt b/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt index 2bcce0d0..e50e03d6 100644 --- a/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eccda93a1ee818f9d458b1837f1d4ef99ef5bfc4923c1608fc9921888d625a31 +oid sha256:e5927fe332aad2ad4d7de72ec138fbd1e88a577940dd3a52f616a477694f502a size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt b/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt index c35d8c33..2fa37b87 100644 --- a/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:800dba76e678c8899cf85dc6950e1e4a815865dc5f2a2ea21331acd13bdfa729 +oid sha256:3a861e7ce40320ee4c96be39c90c6fbfedb03941ff5e8d1b3922db260dab89bc size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/red_bed.nbt b/data/minecraft/structure/trial_chambers/decor/red_bed.nbt index 265430ca..d17e3547 100644 --- a/data/minecraft/structure/trial_chambers/decor/red_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/red_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50008f2e8c8eb04eb9ea2481b1e499933bf5df66327af5a2e27249d642134ac9 +oid sha256:e2ee9cf76e52fa0840b2c8b26722ff970729cf7550d333fd17cb7c5a674e1c5c size 324 diff --git a/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt b/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt index 9eee2b89..63b93c00 100644 --- a/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2074d292315fb6701f9bbfddf95c13e13bcc6191c9ca08cead74780a4a2bd5e -size 384 +oid sha256:629fd0f6bc8641c6cbf24883815ff0c0433851cf99c23956d284d25813cbf879 +size 385 diff --git a/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt b/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt index 1ba61ffd..c5cadee4 100644 --- a/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fc268533e8cc20c54856abdedb42b5238583417ab8403a357211b3835cfc84 +oid sha256:d49035f907fcaa5f7fcce0f5ac2ad39f4cd758e0c5713a8a24d6a71d25ce34d0 size 353 diff --git a/data/minecraft/structure/trial_chambers/decor/white_bed.nbt b/data/minecraft/structure/trial_chambers/decor/white_bed.nbt index 7a6336d8..8f6491d8 100644 --- a/data/minecraft/structure/trial_chambers/decor/white_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/white_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c33c83750c9838d29c6c00e9211d132de0d33caf7321179f1a40cfbab35022b6 +oid sha256:2f540d0049e23157273518319fa95480c8e7b97b16a3cf175a57b8f52184a835 size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt b/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt index 53b7a7ce..7e31b8ec 100644 --- a/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77bede75328695c77794d33e61fe0bbd7637aafd82b7fb0761cb37816cd8aee7 +oid sha256:5612c7733dd950a1cb5ecd48564e7a1f086cbed7063a02e36ec33365ef8c7416 size 328 diff --git a/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt b/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt index 0652c129..ac8bb46e 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05e30cbb19f3112cfe18b65e91022933c82254b7408d4c2e7ee4ccb1d9fe3684 +oid sha256:a7fe5c08c143375307947d76cb54e10b4a32f45bfae95335f2dbf362e1cad134 size 384 diff --git a/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt b/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt index d8961fd0..3ab2e1b4 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fce59fb6b6ac926fa795126dd8b3f73ad421fda5e60d9da2cd8465a91d3756 +oid sha256:5d8f8480185b80dd7639d2cb6aa591999681786dd4effc501d0d786278ac961b size 358 diff --git a/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt b/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt index d5574b8a..f5615241 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65a140bbb0ed5d939af25d64c0babf0be3a7fa5460285576edcb96878511d4c0 +oid sha256:8aea8a8811d8106b227c216a75ed4b4fbe58c9f38ac0ab842a560c0022bcab71 size 414 diff --git a/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt b/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt index 64402a6d..09c61941 100644 --- a/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d1e6db09be197e553f4a88eeeb0f46cd263cd0e578730afde2cb6a35761dc35 +oid sha256:2c5e5fefb1cd837816339df8d8655d2e19dd12e52ee022a229a07baa56e1bdd9 size 2709 diff --git a/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt index 982a9db8..35b978fa 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af854868cab8866de827b54efb8da593b111043ac0e0dcf9b3b39b4974b98814 +oid sha256:0463c77c17a36de8000a3920688599fc7a1383c811179d8c01ec5006b4c8adee size 1435 diff --git a/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt index cdad9ea8..dd54275e 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:317228f4ba7a1283080951f1d80a9003da513de25123dc3c2749e0638565d997 +oid sha256:26fae3910b7c1452061cfc6cacaacca159082404211532443e3fe62ecb772067 size 1438 diff --git a/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt b/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt index 9726c85a..0d204827 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:272362ffb8e7d730ad659b0971fe84db15553ab7ae7bd5a116f99159154beec6 +oid sha256:889ebdb2bffa12bbd756fe4af5f766fe06d499afddf4fbcd6291cf8f1d5a59bd size 689 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt index 1e7889d0..6e6271d3 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68e2852f7279c291f9cd544e751ff1bc337b0770db59c62472855cef0faca54d +oid sha256:3d84847152ab284b483acc6d968488a75b94c4cb08203882f2954dad46c0ebe8 size 7351 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt index 71058b0f..ed7cb57b 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edd4ae40d1c58177e08d24de157a8f594767e31f11939364248d8b6d33668eaf +oid sha256:8dfd1b616e935ab527e4c12e6685af7d39df1cde1188f5871853e0ab543ffae9 size 6705 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt index 498b1178..313924c4 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab3cc7fb6e82b254570739a7dda6c647547a9274d3804a1d3f7f10258363fe3d -size 5627 +oid sha256:8b451df393b096b4c4c1a81c156c3ed3b215e19171b751fa80d0b23d76cc094a +size 5628 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt index c1a88568..72612ed1 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f09de2ff257f8830eb6060bedaaf11af2111728b888376ede154eabb151fc6b8 -size 17907 +oid sha256:46793a7be5f957a96f1060295d9d148b62b58ad15d47faaabf95099d582043bc +size 17906 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt index 78958a85..c58a7f54 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:429024043424740e34f3b20f61ea3f28faf5ee94166f81a2482224dc1a48d39c +oid sha256:d3bc5b33d2467a1f31bcfd80288e717fd57e1312fb68b5df142d9ac37d83e78e size 14324 diff --git a/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt b/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt index 90908f8a..9495e057 100644 --- a/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31f31cdeedb9a19ab16369cb01e88e582be10f06cdf8689e612e1b53a00b81b6 +oid sha256:d03de289c207172325ad68c8cb3204a11304d09352ae89ca4b5193be99b522bb size 938 diff --git a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt index eb95c657..033cedf9 100644 --- a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2af413a97cf10c26de442d704389602a161bc2fd37b85b56006ebad754b9024c +oid sha256:96c8e87a7c863ef5870b47df2401374121cd505e9c7157e2aae0b0fad1dc82f2 size 2593 diff --git a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt index 39eb19b1..452c5018 100644 --- a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43411feacf86b393665fedc1a662ccd00e04cba4205a3e58874fd6b5451f896b +oid sha256:7a9808130669bc85292559445fdce9bdc63a120de3809d562092887cdc83f3f9 size 2594 diff --git a/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt b/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt index 2a3d0baa..4616de2a 100644 --- a/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a1cf5ba3d40a53aede13f920a6b88b925f9a2805bee12d3ba73e1ae9118e2ee +oid sha256:01f5d7921e5c9371196b60d2ee15672f271ef15a1b0cb36ec3578430766a29f6 size 3186 diff --git a/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt b/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt index 4bb4ca34..3e5773a9 100644 --- a/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5b48ad1bb613f6c6bd97564bcff27f3e0dceb6a9dc3da3344e78802205a0e9f +oid sha256:fa573c01bf41d204a5c271d4396e7aee2f7fdb5eff754c0b8ef59bde4408bd93 size 945 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble.nbt index 41595e3e..d146a365 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48bc137a467729d67a8f276fe75d962bcc24bbc1134c83924a2db7d8ab63e5fb +oid sha256:f27f0c27fa5bc7194ce9033ede9e0cbb81918b01e21df3f12880184200dc31ab size 936 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt index f419c2ba..02f135ab 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1923e0823b06802c2c5f2451d919c500c4fe68ce9e8dcbeae7c7eeb05ecc91eb +oid sha256:fcd92d89c618123d53c0802a22170f4cb2ff76749bfe3d1971e4005214d82e75 size 926 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt index 8e53c780..ad7a0c48 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de1a88b20c679493b93adbbd52b9a398ba9cd504ad407a2899030d2ec9f5e760 +oid sha256:73bc3cf6aee34c77905ccddb2ea2450e52fef65a9fd9b650ae7ff698e6221f83 size 471 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt index 8e53c780..ad7a0c48 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de1a88b20c679493b93adbbd52b9a398ba9cd504ad407a2899030d2ec9f5e760 +oid sha256:73bc3cf6aee34c77905ccddb2ea2450e52fef65a9fd9b650ae7ff698e6221f83 size 471 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight.nbt b/data/minecraft/structure/trial_chambers/hallway/straight.nbt index 4788f4d7..9145ff2e 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e78c5e58d30d83fc34247146a60c56c14f1b84307f921e28fe3c9453ab57602 +oid sha256:8c2fff6a2eb4a192909607b9362b23b8f5b352f36be1aa9a78718f3d69973aad size 932 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt index 397b8c81..0b6905bd 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3c67bffe44294ca263ace58b3de100abb63f7ed6c4d8423238e0567d41dc168 -size 1178 +oid sha256:e5f3e450981318a95a71a0793486d95bbd557258a09d99547bc04621193a3c66 +size 1177 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt index 1baf003b..dff4b762 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d52dffbac590b63fa0ae1ad4b3015ee150654f2949e6ba53c9007a69abaec3e8 +oid sha256:71075ba1152e52a15fda8f210255a139b658ffec1757c753c40f81c146848a77 size 1177 diff --git a/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt index dc011ed7..ba565f5c 100644 --- a/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce085df4a5091a9fd38014c04260d9c42dec6897dc3acccd22b35a48154a1c72 +oid sha256:70a99b0412d6db9564b2403ff09da870427fc21109186a52a9cc7bd365338918 size 3613 diff --git a/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt b/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt index f535bf20..7031dea9 100644 --- a/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a37179366cf289b191ec9e9caba20a7eae9bcdcd8efeda17f66cb0bc1f4f338 +oid sha256:3a1f8160f316ae069909ec604084d6081e48cca07049effff2ab53da01135378 size 2700 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt index 8da146ef..e9130dbe 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88cb188e2bd55f043a1d95c44e7e7f2f8d9d4b7beea5ab2f7367ff034b1ccf92 +oid sha256:331230d9f8dc8856bcf228b4e5f485a53e52350a81fbe45eb6bd4b545c7f6c23 size 29422 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt index 1149d57c..2b7d6ed3 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89a26dcac4eb71552cbdad6fc3652b6588a21ba8066134b270cb21b12160099c +oid sha256:77a6780276406f49d87649d63e2d33240db1f8f629b7948a9d55c790e450122e size 30344 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt index 82a059e3..704ce122 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e67de627a5a6415a5e892668befb7e85df483c6550c5549c5517ddf8f89c9b9e +oid sha256:61ef1d936bf105b25990a6499bebeb7509ae95a19b2b9b5ec508f394ea6835ae size 49356 diff --git a/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt b/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt index 716a6c9b..3d78a2e5 100644 --- a/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt +++ b/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4884221d7773efd9e487ab2920bdda99c93a19ed399fa20ce8b419a93a47fffe +oid sha256:aec1b02c3493b82c828285614bc420cf59bfbc9885dbeed1b9f95611b9a5b65b size 690 diff --git a/data/minecraft/structure/trial_chambers/reward/vault.nbt b/data/minecraft/structure/trial_chambers/reward/vault.nbt index 6cd242d9..7f0ad2a6 100644 --- a/data/minecraft/structure/trial_chambers/reward/vault.nbt +++ b/data/minecraft/structure/trial_chambers/reward/vault.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:075feb4aed9b164b0bdaf22d24c2402ca98de5bef5844d79383126b5deecbc8d +oid sha256:2a8af677dc71c18f46169fbb5fd42ab3b0088344c408797cd7ae46c00a49a0cf size 504 diff --git a/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt b/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt index c0b8cdfc..711f984e 100644 --- a/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:735e95bf2477bd31efa5c69daa8160e2c1293a813348aa542e41a2c8b814c8bb +oid sha256:8ef0d88bdff17ba95df86a128bd672d242569352b9b8ef8d77921f92a1c73b96 size 469 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt index 5082ab6b..e0b3592d 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2008c7d1dbbdd20879b0556afec59a8055fdd42f2b727823fab76d0fe605ef8 +oid sha256:d0159d9e47048eebdf5790eeb43881aa2964435ab60330dcdb01039c5fd812a8 size 328 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt index ea3534f8..7d500dd3 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3da4f0d57072cc69d44a520acd86fda3d79b1a46bb02c26453770b8a4d02b2bc +oid sha256:f6c3d7f10943f0926cc06dd35365cc3da585776b4acd99fe2ad0e9ea28ad98c2 size 327 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt index 8ef56c25..d3fef7d7 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d82b3966eed727e52995437b5df9d17ff6f4b16ddacf9efcc65160e7d34a17cb +oid sha256:7489c3cee5e67f912bc0a8f0222b3cc11904f49df53d1b040f7e3397fc13be07 size 327 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt index 40647b35..553dcd05 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:754bca2af1597953ad00b480f0f47b92881d4f332cac6a0e0275e8e00eebe916 +oid sha256:37d49db6ea43ac8c0f26a0e12f2479d21525aee26a32d8af35070a2d088559dc size 331 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt index ae8a13b5..2f6e4ae8 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a96408a7dae012a70c6cef2590114a786ef9566878c52f09517f1d298d7f55b +oid sha256:2ae39dd6e7d208a8ded4d0f3955be446d8d2febc2e832c259a44267ea6050a1a size 330 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt index f9d84275..036e474a 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c61c571d9a59548b1ed05fdc99d486dbdbecf711ca01ac282817d1ceea3e1283 +oid sha256:545e9b7ba28612f8983f62ce67566e5c5d77807f2f21ce3dc08736e7544e0af1 size 473 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt index 3660cae0..163c9020 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa9b6f64a0261dbeb65aad2ce15b1580b89efe00955a09ab9be80e9ba796336b +oid sha256:fbd8622ac50bce4859fd62f12ecb952dd76246405d379fb45aa3e95fcf655162 size 481 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt index 923a02ad..0b2af2d7 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fee380edfe800aa2173b0632feab28d76c668f987a8f861b10dee4d56c5cd693 +oid sha256:0f9c7fa6e6d2eb5764e09b6e0c8e0a24e611eaf6663e7439ca8f71d549c61cef size 480 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt index c8ad7d90..91d51f84 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0145ddd0a84d72f91561d227fce42470042e44e63dfdc8c619e4d10b4cb1095d +oid sha256:03b7f7060e37ca889183f1297f9b1de9bb3197d91c185026b4cdff3becda31b9 size 524 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt index 4407adcf..a9e07936 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0f1a7d2e81efb1304343f7adfa311a2bb3d5c153f8acd68ea7120a7a0091dfe +oid sha256:e3db58700b238f60f931762b37f5671b16a87559541c33a89cf976d3a3b19d8d size 480 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt index 8469451e..dae6c72d 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f2a9207d369ea7442ec1b4927fe3599f4f57898952d41533080401b0f09dbc0 +oid sha256:e2d0cf706fc8efc4ee52fe1974e29c917aa6504dffd1911038886a5ba7c52d4f size 476 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt index 294d7272..bc4a4f18 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c57ec721a495343bb7c5fd1c74dcd9cee602ae4582f0fe876dbc5640352636c5 +oid sha256:5078172bf1324faab157939d1c2e9cc0246471896e880ed379b1f0b5f889f44a size 527 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt index d0882938..8b569c9e 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1cbb3fedfd65c38e8717e8d01222d9ce3041e7eb3cb5c50bf192f960098ed86 +oid sha256:10eeb4919f93d2ca376f6205e67e7827da6d6787cae904a0c14bc72edbca4bb3 size 485 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt index ebb59e3f..8ecf1363 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97c5398536469f8a178037546b34f0f38519fbcec152fed44dc5478787c15812 +oid sha256:33a75cd2a3a5a3d10d67b72258059a32365a88ca2888370c3f11259267d54cc5 size 479 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt index 82d9c1ca..ca171c75 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71949f72692573c8d041f2d8e6f3ac7cc431c332db71360851eca57c79e2e0fd +oid sha256:bd4f9b4f9225d9365619810dab80e3ca6127b5cc3d8803f0585584fe557dd953 size 499 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt index aac9b275..7c4f95c4 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e79ab405d514d5dbd596150e532101c1c76c4e65514c195eb20dc9a640f3e565 +oid sha256:9fa8ebc7055d6157ccd50af0c0b95f6ebe16ddc44ea57d36de405ef21fdadeab size 523 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt index bf54ac14..8b33cbaa 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8044ed8454b70f2b375ad13d2621ca714beecb0feebf872ca017cf88bb37034 +oid sha256:1f669423f1fc03dab12cc9852eb63cdf32c927a53144ae268fec6aef9fbb9ce6 size 483 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt index 6814a048..19797a2d 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9434a7143e9465de2e927d3594107447fe527c8fa9948cc8d2d7b86005888f4f +oid sha256:4d20383d795b2ee171aa1aeac7cff5a8f8c373b904bd73b71e68e8b25a85ccd2 size 473 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_1.nbt b/data/minecraft/structure/underwater_ruin/big_brick_1.nbt index 61d8c918..defa0269 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99c82d8fb2e6921f0978ceaddcd9b55dd5311e120fab99932a4beb695e673e38 +oid sha256:b32243eb7701df0ea33090cc07662bb60460a827a5e9e470b41e0b1ab9073d18 size 11114 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_2.nbt b/data/minecraft/structure/underwater_ruin/big_brick_2.nbt index 35e26792..e1bd44d7 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ea3da26692dfc2e14367d0a8fa855191e2f084ebf17a02c63df29aff45bf781 -size 11461 +oid sha256:8931c09bffe1862eacc55b4b18cc20dcaad7cd318b66b86418af838d5325b8f4 +size 11462 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_3.nbt b/data/minecraft/structure/underwater_ruin/big_brick_3.nbt index 97b5ce6a..1d75b045 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c3a29698d1b2f5a3e1d5a24d17839520529b6a010002cf7f339972d0c09417f +oid sha256:d4a497df74ebe3fd9ee99b1523bcd40868d9747ab2982e83098c31a4492182a4 size 11632 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_8.nbt b/data/minecraft/structure/underwater_ruin/big_brick_8.nbt index 16f49f57..83d3b3f8 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdf2524fd72c578fc2898e014e8d37a0fabe1eff7219c50ac539d1b28bd059f8 -size 11014 +oid sha256:764c5569377fe8ed8274e9153eb1cf5226cf7082e1b2e35dfee53515cb1d58f2 +size 11015 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt index 989cc098..7c827bdb 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e72f478573fee6c741d7659c270eb19aab8402dfff61a9820b738585c7adcb62 -size 11096 +oid sha256:135f10a8bea9c16b0923b527ea4030cb80e3afc7eaf4f35617e63c9faa64d576 +size 11097 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt index cb935eca..7e7fc90f 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24c28b9e1520fc0744405c9d97debf1ab990c7dd905591e032088c46361be268 +oid sha256:bf855043e1222e3b926e33c3afd514e4983a6192670b562cd4cc3583d28f035e size 11505 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt index 7fab1335..04f70ce9 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:964fa1fe8181fcf51a7287f40ec84c46189a95391eee0e06f15bc95dcf5b3739 +oid sha256:ad6a9abc232164e62afd785a039c0bc9dff831d2ee4581f8005ff48659c95d27 size 11622 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt index d6159b4d..dcc1fdc0 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c0317734f912369daf267249600804658e88607d48ed009937acb4aab85f007 +oid sha256:0bc4922929b67eab30a4149cb028e80eb449a54a8ed0f4b6a4a63168d7dd1a9b size 11024 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt index f32b179d..6fec7403 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8770da915ae094de0f0b5d476d63598ea7f0416e195cfd763d00cb0f2914b85b +oid sha256:5f57e8581610b040a6356b848832853b4ce9a5aa307dddaa8df2c9a80c9dc653 size 11096 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt index 9a38ad40..8af0af16 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53c9ed99ca52bea13f351b7d8e5144f42414fd0311afa23ee6b07404e4f23e4c +oid sha256:06e0a1f60650216d05dc818fc1e6b987fb322f038a54d6d2d49e8fb246b2377a size 11504 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt index 75cdd5b7..68d29fe5 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1956778ae53129fff2e58e9ac4a5381870935c629bb87a48d61957ef546f4e1 +oid sha256:fa6cd4a982f298d17f2564f016a3a7ae454cfa28ef815f8f799f95ef2de1d643 size 11632 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt index a3d41f41..78f4860a 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bf6259130065da6aa778a59fbff03834d8e587f346ce8f99df212d5cc1b888c +oid sha256:d2a4f54087a48c5bebfa76461ce67520d1d198d5613651c394a42824484d2e37 size 11045 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_4.nbt b/data/minecraft/structure/underwater_ruin/big_warm_4.nbt index 30647101..76ec1184 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_4.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f983adacea640b6162815a5f9956f767ba610e959ff2d810f06e5114d2f9969 +oid sha256:2b4ee1669b409e0c6e1403b9c75807301814bf5198a86ef99360fdf6e445d735 size 11266 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_5.nbt b/data/minecraft/structure/underwater_ruin/big_warm_5.nbt index aa312205..ace75129 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_5.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5858bcf81d2849d4b8edec3ff5a03de2a1449f6150017c53ba402866f61d6d75 -size 11032 +oid sha256:7df3d38127d1931e9011875247ec239f8325ec1a5ed4274d5d023e84dc26cc16 +size 11034 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_6.nbt b/data/minecraft/structure/underwater_ruin/big_warm_6.nbt index 1622714b..c8a7af47 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_6.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fb3e2aee56ae2579c0627cada16f3e9179a3d7c880173d5f9bbec3143bfede5 -size 11106 +oid sha256:e217c6184a5a889654b5c8b187287385543b86c7dab7a9cea6819c48e6414bcb +size 11108 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_7.nbt b/data/minecraft/structure/underwater_ruin/big_warm_7.nbt index a1cf2fa7..6ec28cf2 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_7.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72e2068259bbd6c3706c80869451f0bd213262325654e5006302caf276babc1e -size 11140 +oid sha256:7be409aa151a9b3d93df99f4aeccaf94ffbd73cd4cd0f8daa331059568cade10 +size 11141 diff --git a/data/minecraft/structure/underwater_ruin/brick_1.nbt b/data/minecraft/structure/underwater_ruin/brick_1.nbt index 8b46f551..d74baf9b 100644 --- a/data/minecraft/structure/underwater_ruin/brick_1.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4592b7f1afa1321566776be7e87e25c25c9ff8db1673c73ec0ec07a88ad2f900 +oid sha256:eecaeefdc29aeb10d46faa4522400016f44c228e5378c5c1f27242f05e7d6876 size 1270 diff --git a/data/minecraft/structure/underwater_ruin/brick_2.nbt b/data/minecraft/structure/underwater_ruin/brick_2.nbt index 0ba96dfd..bd85dcae 100644 --- a/data/minecraft/structure/underwater_ruin/brick_2.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:421164a00567f6e60e596e220411f4dc6df0545885da277ff37fece2a08ce912 +oid sha256:97002db1d400693c9396fac807980944fc3cdd12f51b0884b79e22f48c86ceaf size 1260 diff --git a/data/minecraft/structure/underwater_ruin/brick_3.nbt b/data/minecraft/structure/underwater_ruin/brick_3.nbt index c64427f8..a0e5e64e 100644 --- a/data/minecraft/structure/underwater_ruin/brick_3.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6e78fe570d1e2cd50d3c7ba6cf79ec156a34aadc2dcf87b9f1eb0cdbad4844e +oid sha256:ba1919f2ed48419fcf516182aa894f73ab27ddedf4aa1aef3bb89a5a8e90cf39 size 1319 diff --git a/data/minecraft/structure/underwater_ruin/brick_4.nbt b/data/minecraft/structure/underwater_ruin/brick_4.nbt index 7cef6b39..677f6861 100644 --- a/data/minecraft/structure/underwater_ruin/brick_4.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a53a04c4a0ebcafc342577c1b10824cc0939e547c6eaa144f6b78d70969fb752 +oid sha256:1f595d60dcdef6a8f326edba51bf54d6c2f8d419b098c674d95f609d630751a1 size 1296 diff --git a/data/minecraft/structure/underwater_ruin/brick_5.nbt b/data/minecraft/structure/underwater_ruin/brick_5.nbt index d4b15917..7cc6a452 100644 --- a/data/minecraft/structure/underwater_ruin/brick_5.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6604f99e4288d75cfb3a44182ceffdc9c26514a4c53477a42873ba2642956c99 +oid sha256:d3370d83ae75c85e2266515e71437cdd006b83f94ae6f7d92b52ab567b55ae62 size 1277 diff --git a/data/minecraft/structure/underwater_ruin/brick_6.nbt b/data/minecraft/structure/underwater_ruin/brick_6.nbt index 779ab908..39d52a90 100644 --- a/data/minecraft/structure/underwater_ruin/brick_6.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bfb90321b7894e81a5a63c75f283311c0323854cb5883797864cdb3fd791564 +oid sha256:62f7e757469f0c7852a5790620413462e54642b24aa294317f6c052d5e539aec size 1468 diff --git a/data/minecraft/structure/underwater_ruin/brick_7.nbt b/data/minecraft/structure/underwater_ruin/brick_7.nbt index 4fd6ff46..184828b2 100644 --- a/data/minecraft/structure/underwater_ruin/brick_7.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf9e640b38f07cacd546f715654d0f2e5a86489c61dd7e331138dc3259020cf3 +oid sha256:fc894b307fb84615af2518d2a1e23a42261161f7acf647ccea90d86c6e6a1287 size 1293 diff --git a/data/minecraft/structure/underwater_ruin/brick_8.nbt b/data/minecraft/structure/underwater_ruin/brick_8.nbt index 49d77e8e..abe0a5b7 100644 --- a/data/minecraft/structure/underwater_ruin/brick_8.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:534a7c94c9bd642486f841113d56132dccd92cc28f70939566e21c5e021c6f8e +oid sha256:cc85d708af63e9936a60295ce4838f30d8489dc3eb5e2392ad1fd8fd90b9254c size 1306 diff --git a/data/minecraft/structure/underwater_ruin/cracked_1.nbt b/data/minecraft/structure/underwater_ruin/cracked_1.nbt index 8bf72d32..1d092462 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_1.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d502418decfe6b82d7cbea8b848a564f9c7f82070a1a1f3eeb060549780af0c +oid sha256:6dd933d0e1cd310437051326d10186485da9affa8f102bc0d0d569dc3973c59c size 1266 diff --git a/data/minecraft/structure/underwater_ruin/cracked_2.nbt b/data/minecraft/structure/underwater_ruin/cracked_2.nbt index 24d14a3f..58aaf891 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_2.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf73bc4c99499f507d3b095c88ec5afdfacd0fb23fc2bea69580e1f16a85f4eb +oid sha256:8143276d0e83a1b2279e7f084b5b39b86d88e5373588ec8cdc58eb56ad879173 size 1258 diff --git a/data/minecraft/structure/underwater_ruin/cracked_3.nbt b/data/minecraft/structure/underwater_ruin/cracked_3.nbt index 2d0450be..4b227c93 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_3.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6864f2ca493618ac46f9ff94963fabee3057db6ff2532ca3328ef9e50886a3f1 +oid sha256:eb625b6db009c98b90448642d74d81cafa5adf5b7b8648c46631886dabca72ea size 1348 diff --git a/data/minecraft/structure/underwater_ruin/cracked_4.nbt b/data/minecraft/structure/underwater_ruin/cracked_4.nbt index 5e914138..8ae19c5e 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_4.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1af16b31b66ca2fe3c18a4c3ad7d8e5e985455757a368aee0b10a64f87bd0551 +oid sha256:3e107f5d7a9dcbb72a156553b7c0a1088e6af33c34ef40b16f78d1889d52abe0 size 1257 diff --git a/data/minecraft/structure/underwater_ruin/cracked_5.nbt b/data/minecraft/structure/underwater_ruin/cracked_5.nbt index 080bb5b7..b33fc44b 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_5.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bce9c88a1ae5344829a18a1ff0f9a157661aca0edfa2a849b962b76cfc16c067 +oid sha256:6e72b4746f9f6fbe0ffb32f23ea2b81184d00bc343478ecd36b2e7d38a962a36 size 1282 diff --git a/data/minecraft/structure/underwater_ruin/cracked_6.nbt b/data/minecraft/structure/underwater_ruin/cracked_6.nbt index 272c2608..b99cc249 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_6.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51462571fb070af39b92bb1d724b70aefc2c24eb56490a06a84bc7517b0b17d7 +oid sha256:4142805aee06de69f692f664956d195d591af24a229ed1fe1776ad1c5361bbcb size 1410 diff --git a/data/minecraft/structure/underwater_ruin/cracked_7.nbt b/data/minecraft/structure/underwater_ruin/cracked_7.nbt index c70abd4b..2c82ecde 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_7.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb29d0b94ff74ba6d4c5a6a85c4b4c49e607f868eeabec0224070b2c5ba112ab +oid sha256:7c2b1eaf3726a85d2c821b23c431bc30a414fc9134e172abce94af33bfcf884e size 1314 diff --git a/data/minecraft/structure/underwater_ruin/cracked_8.nbt b/data/minecraft/structure/underwater_ruin/cracked_8.nbt index 76ad35e0..03a82586 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_8.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89fd5af54c9141586ba81bfaa116de6c02cd81b2bec009db4455b74bab3dc681 +oid sha256:8f245736d5954668652e3db0673d29515e2c1684631db0b7b301f142e91db25b size 1294 diff --git a/data/minecraft/structure/underwater_ruin/mossy_1.nbt b/data/minecraft/structure/underwater_ruin/mossy_1.nbt index e2d0024d..83a25270 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_1.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e574f29779f4b0beef08e8b0dce7610f1e5f6d632304beb2973f4c8182c89a1e +oid sha256:7421deba3cdc5b5ab992661d7732abe5e248e03878c7195e64f5b28c98b77665 size 1279 diff --git a/data/minecraft/structure/underwater_ruin/mossy_2.nbt b/data/minecraft/structure/underwater_ruin/mossy_2.nbt index 37604777..5fe476a6 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_2.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bad743ef5e94a1979e09ea31a69e6e66c7854b4e9c45e8e27e35ffcfe8955dd +oid sha256:4255a060ebff0b9c71340194440f24f0ba4e125c54883bb61eca47b2340364a9 size 1233 diff --git a/data/minecraft/structure/underwater_ruin/mossy_3.nbt b/data/minecraft/structure/underwater_ruin/mossy_3.nbt index de226dc5..2739d787 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_3.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03de01ae377fbc7a0164176b244d6d17c5c94daa126781c77b05f66e3edf178c +oid sha256:5e68755d83083d2ca8122f136312322450a446a248b4178acfa0a48c17130db9 size 1323 diff --git a/data/minecraft/structure/underwater_ruin/mossy_4.nbt b/data/minecraft/structure/underwater_ruin/mossy_4.nbt index 2f656b39..a47f2612 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_4.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9647b26df01e63caa2e9ef5059726e1f0deeef79f39d550ad151fb6161540ad9 +oid sha256:0c5dd62686c9e1d0317818b73053c6c098329b7b42bc039f1d1b8e5fd73ca8bb size 1282 diff --git a/data/minecraft/structure/underwater_ruin/mossy_5.nbt b/data/minecraft/structure/underwater_ruin/mossy_5.nbt index 62aa8b5b..ca9993d4 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_5.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a45a3396b0eeaa4bc27fbe1cd4217916eade481193b8420fd3ea621a738a5335 +oid sha256:7f1961245d4cc22f1bb274d8b53b08e9b191822c4b2e2d89f2d03fe177ce0724 size 1300 diff --git a/data/minecraft/structure/underwater_ruin/mossy_6.nbt b/data/minecraft/structure/underwater_ruin/mossy_6.nbt index bdd9e3a2..915797cd 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_6.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a7aa8e2a6a9cca5f7d76ce91068fb8a0d9b5b5b964c1126ad178a58fc99a9d9 +oid sha256:241d0796b5f1468accceeff9cb268e96f68c88f9e036a33ea93a8cb2b3e26044 size 1452 diff --git a/data/minecraft/structure/underwater_ruin/mossy_7.nbt b/data/minecraft/structure/underwater_ruin/mossy_7.nbt index 8227bf50..56795391 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_7.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f38b823603895267f33acf2fb33a5c5120d991fe8ddba40aacbedda2a0ca9b65 +oid sha256:36fbc836a7084fcddf9a56e348c265c3c5ce2ce0781523992e13663fae46cfdd size 1310 diff --git a/data/minecraft/structure/underwater_ruin/mossy_8.nbt b/data/minecraft/structure/underwater_ruin/mossy_8.nbt index a0403d4c..01515164 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_8.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bd214dd82ba03f176a34e86060527a38f2180d76aa439af3928bef1ef6572c4 +oid sha256:85a005d9515789914a1f329371afcda9c21afd2a9947d85a14b56d9a3b809bd1 size 1322 diff --git a/data/minecraft/structure/underwater_ruin/warm_1.nbt b/data/minecraft/structure/underwater_ruin/warm_1.nbt index 8cdfa6a5..c701d7cb 100644 --- a/data/minecraft/structure/underwater_ruin/warm_1.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb0185cb5c65aa1855b5c0b201647accaa03f5c79f4c6ac7b3029f5fd77fba74 +oid sha256:874b236c5169422eec35bd6d7d3da2833d0bcf9880bcbab140ddd34b942b396e size 1269 diff --git a/data/minecraft/structure/underwater_ruin/warm_2.nbt b/data/minecraft/structure/underwater_ruin/warm_2.nbt index 17e233ee..752d3423 100644 --- a/data/minecraft/structure/underwater_ruin/warm_2.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a02698f6956b10def8ca416ef442baed825b215f3c98dab789b31ae17daaa1fb -size 1298 +oid sha256:4b67c4309672436a26b1192735dd3c72253ccc56fcfe07dec3d47405aabebe51 +size 1299 diff --git a/data/minecraft/structure/underwater_ruin/warm_3.nbt b/data/minecraft/structure/underwater_ruin/warm_3.nbt index d9b8f725..eaf20823 100644 --- a/data/minecraft/structure/underwater_ruin/warm_3.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f849dff94463e7ea576dbea9faa5314eb005094a65b3590455307e82dd6e69a0 +oid sha256:a8b29c15227db2820538750cf4082f02acb9c8e8d6710254d4cd2ef62faf1c60 size 1272 diff --git a/data/minecraft/structure/underwater_ruin/warm_4.nbt b/data/minecraft/structure/underwater_ruin/warm_4.nbt index c35a07d0..ff91681e 100644 --- a/data/minecraft/structure/underwater_ruin/warm_4.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd398f44200c3170d83a3f038b20929fac9887ef1b86cf0f7ac01ad697a94edb +oid sha256:d66b6a8b55cfede5adc8d53e75e1f9493dd7655161159e928ac498020e855020 size 1348 diff --git a/data/minecraft/structure/underwater_ruin/warm_5.nbt b/data/minecraft/structure/underwater_ruin/warm_5.nbt index a244a0bd..93e5023c 100644 --- a/data/minecraft/structure/underwater_ruin/warm_5.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22fd38e1b4a787075d5309fa70f93e4298cce7939ae2637f95aee6f5031dac6a -size 1226 +oid sha256:78f4a1da5d59427f110d1c9566ec088bcf715a4c3020dff540cd26423b966c60 +size 1227 diff --git a/data/minecraft/structure/underwater_ruin/warm_6.nbt b/data/minecraft/structure/underwater_ruin/warm_6.nbt index ba5252db..347c012a 100644 --- a/data/minecraft/structure/underwater_ruin/warm_6.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2958eec6a10e32956681dc1c55ba2988655e052dd93c36174327cfdfb99078d +oid sha256:375fabe46977f50dbf8ea3448eb61ac63305f3a3341dff159884ce3507f3410d size 1271 diff --git a/data/minecraft/structure/underwater_ruin/warm_7.nbt b/data/minecraft/structure/underwater_ruin/warm_7.nbt index 3741b948..dd9a5f83 100644 --- a/data/minecraft/structure/underwater_ruin/warm_7.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b5c91f2115b7e60dd5b548daaf8fc994019a1c6a1fa000755d46003e7700f92 +oid sha256:d8ae879269e8136f69b6f9e026b84a8d54517da58c1cce43bf2a6ca260d8ad99 size 1211 diff --git a/data/minecraft/structure/underwater_ruin/warm_8.nbt b/data/minecraft/structure/underwater_ruin/warm_8.nbt index dad8f035..f8b9a8a5 100644 --- a/data/minecraft/structure/underwater_ruin/warm_8.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e15c1dddba1446e6c005038d1708bc25734422b5bbd083fc784008daf12f59e -size 1339 +oid sha256:1116512f62dc862281e379829a113b214f40b0ba09852fa8984832c4c8ef4a76 +size 1340 diff --git a/data/minecraft/structure/village/common/animals/cat_black.nbt b/data/minecraft/structure/village/common/animals/cat_black.nbt index 994bcf60..90171a6a 100644 --- a/data/minecraft/structure/village/common/animals/cat_black.nbt +++ b/data/minecraft/structure/village/common/animals/cat_black.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e56e34ef63e5f6fdd74a4e96b61c85000d59aaff999854cfdc3f9a6276ff0c17 -size 924 +oid sha256:71e56c9b90c28e3b5fe35c2c8b5955c5ab28b626359ab644df65fa939eb5fdf5 +size 892 diff --git a/data/minecraft/structure/village/common/animals/cat_british.nbt b/data/minecraft/structure/village/common/animals/cat_british.nbt index 5911e3af..6bb708a3 100644 --- a/data/minecraft/structure/village/common/animals/cat_british.nbt +++ b/data/minecraft/structure/village/common/animals/cat_british.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34a14a9c6ca6fff0eb8945fde7f12c4b3fdb66495a6d0b3cb8e87204d308f3ca -size 931 +oid sha256:52e843aa9763c836e1e83a157b231d8398c0a7e82f64cf243672e8269800dbf6 +size 901 diff --git a/data/minecraft/structure/village/common/animals/cat_calico.nbt b/data/minecraft/structure/village/common/animals/cat_calico.nbt index 63d9cefb..efb1f64f 100644 --- a/data/minecraft/structure/village/common/animals/cat_calico.nbt +++ b/data/minecraft/structure/village/common/animals/cat_calico.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f05e58dd8f03137eed0b9b6775034940758b7819e2ee8e23d4a1282dc67f8797 -size 855 +oid sha256:9739aed88113d53d6c6336a175f772adf5a23871d2bd46225505c131485c9e73 +size 827 diff --git a/data/minecraft/structure/village/common/animals/cat_jellie.nbt b/data/minecraft/structure/village/common/animals/cat_jellie.nbt index b7629e8e..16426a14 100644 --- a/data/minecraft/structure/village/common/animals/cat_jellie.nbt +++ b/data/minecraft/structure/village/common/animals/cat_jellie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0887b44081b16913cde01753e92fb07a8230414649bebfbb528a4906018ff6b -size 926 +oid sha256:ff79cfa1a393638f1aae5f00dec9ec44fb6edc5fe28160ff4ebd440109f34aee +size 896 diff --git a/data/minecraft/structure/village/common/animals/cat_persian.nbt b/data/minecraft/structure/village/common/animals/cat_persian.nbt index 430f9c99..e7775b19 100644 --- a/data/minecraft/structure/village/common/animals/cat_persian.nbt +++ b/data/minecraft/structure/village/common/animals/cat_persian.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b83b6664bcc3bd85ddbf5feda87223ea5ff2bb91b3e3143b0f97851a44b1b95a -size 857 +oid sha256:fe6a6b2a50565e8401bb86659ae0c136137aa6eeef2852b87630cdffacfd2708 +size 829 diff --git a/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt b/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt index 91aaf0e0..dbe6754b 100644 --- a/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt +++ b/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:521eae96900bb7af677e1030fd5330eaa521b426395a876872d2ddf9beb831e5 -size 923 +oid sha256:3cfae776a64dbddc31fbe91e67ec797d2adee07bc9084e1629729014de9306f5 +size 892 diff --git a/data/minecraft/structure/village/common/animals/cat_red.nbt b/data/minecraft/structure/village/common/animals/cat_red.nbt index a2628741..121087df 100644 --- a/data/minecraft/structure/village/common/animals/cat_red.nbt +++ b/data/minecraft/structure/village/common/animals/cat_red.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e8bef215d0e5a1f9f78dc4dc2cafe2a7b9af4d98f0853efde1da76f69f646b0 -size 839 +oid sha256:28ac1ea87d58c274206cb5d1aaf88800f5ed863b2ac2adcd1142af20b04453c4 +size 810 diff --git a/data/minecraft/structure/village/common/animals/cat_siamese.nbt b/data/minecraft/structure/village/common/animals/cat_siamese.nbt index 99e0c427..f7011150 100644 --- a/data/minecraft/structure/village/common/animals/cat_siamese.nbt +++ b/data/minecraft/structure/village/common/animals/cat_siamese.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d2162a0c5d361c9da182d376f8ed5b817a0d7d4952936955dfd765e0e6ec790 -size 845 +oid sha256:da9f4fbd41f6a74dc2173eebce2c87ee57c0e939062231f48d6b270d1d76e723 +size 819 diff --git a/data/minecraft/structure/village/common/animals/cat_tabby.nbt b/data/minecraft/structure/village/common/animals/cat_tabby.nbt index 3ee1de21..85f0b039 100644 --- a/data/minecraft/structure/village/common/animals/cat_tabby.nbt +++ b/data/minecraft/structure/village/common/animals/cat_tabby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a6a5f4c20528bdd3f0d43dbbaa5cdb15fa841b2c19d4592cfe342dc94a8502 -size 919 +oid sha256:387169823d4187c6c0e49103b22c2782fbb23cb564f300ae6913966d454589be +size 888 diff --git a/data/minecraft/structure/village/common/animals/cat_white.nbt b/data/minecraft/structure/village/common/animals/cat_white.nbt index 7b63f854..68224029 100644 --- a/data/minecraft/structure/village/common/animals/cat_white.nbt +++ b/data/minecraft/structure/village/common/animals/cat_white.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c6f9330c8c7b1bac1c6dc9f621ec7ba3c237422bdd8974347515938cda94ac8 -size 915 +oid sha256:fd6efa38e8a63def2027ca6288e88152e8eefdc1a134efa1e14ddf9cfd3bbb72 +size 886 diff --git a/data/minecraft/structure/village/common/animals/cows_1.nbt b/data/minecraft/structure/village/common/animals/cows_1.nbt index 954ef08f..f0a7f02b 100644 --- a/data/minecraft/structure/village/common/animals/cows_1.nbt +++ b/data/minecraft/structure/village/common/animals/cows_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c4cb690f930064657cd8ec3b2cf68edf94fca39615cd77b154b85601296c391 -size 960 +oid sha256:dc2f2661be5a50d11a1974b8040e029d4ef1ce0c0d95962ea5ff7755822c46d9 +size 928 diff --git a/data/minecraft/structure/village/common/animals/horses_1.nbt b/data/minecraft/structure/village/common/animals/horses_1.nbt index 6c9e23fa..10aa7bf1 100644 --- a/data/minecraft/structure/village/common/animals/horses_1.nbt +++ b/data/minecraft/structure/village/common/animals/horses_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a52d61a94c7869c086e58319d1c75f44935c10fae2b9b96caddff6d8e77c9631 -size 920 +oid sha256:a820cf34db2e42a14df54a6621c7cfc411ca775bcab5da544e38dcacfe710a53 +size 893 diff --git a/data/minecraft/structure/village/common/animals/horses_2.nbt b/data/minecraft/structure/village/common/animals/horses_2.nbt index 3baf21f9..5540d605 100644 --- a/data/minecraft/structure/village/common/animals/horses_2.nbt +++ b/data/minecraft/structure/village/common/animals/horses_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28f097817289a0206edfef332272789b3ae47a18c61de4cc36fd9fadc107ac88 -size 1035 +oid sha256:3f36e6c3c4e12cfae750fb39f0e073c012e1f0e780b206bea7e4f6dcbcaeed69 +size 1003 diff --git a/data/minecraft/structure/village/common/animals/horses_3.nbt b/data/minecraft/structure/village/common/animals/horses_3.nbt index 091449b3..37a9ecfa 100644 --- a/data/minecraft/structure/village/common/animals/horses_3.nbt +++ b/data/minecraft/structure/village/common/animals/horses_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad5e0d92235dc9ab38a8b2f365fe7ce7dbba7561a137504db43e048c8d2d10a5 -size 1043 +oid sha256:1c03c6c60b00bab979623f5354a560ac28920d1527d06b25f5d08f5cda9fa9fe +size 1011 diff --git a/data/minecraft/structure/village/common/animals/horses_4.nbt b/data/minecraft/structure/village/common/animals/horses_4.nbt index 27745877..8b6b76f0 100644 --- a/data/minecraft/structure/village/common/animals/horses_4.nbt +++ b/data/minecraft/structure/village/common/animals/horses_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b831b6074247a43545f6ca4cbb06619b1add465504c94e92fd6061010f140b0d -size 915 +oid sha256:9f6a6fa970a4170f891138301637785e61a0cb46da9f6bfb94112eafab1eec47 +size 884 diff --git a/data/minecraft/structure/village/common/animals/horses_5.nbt b/data/minecraft/structure/village/common/animals/horses_5.nbt index 4cbf99bb..87aaf86f 100644 --- a/data/minecraft/structure/village/common/animals/horses_5.nbt +++ b/data/minecraft/structure/village/common/animals/horses_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:debf6de217bee4111372c4364e011f60341937d9d54f690f5804fe20c521348b -size 936 +oid sha256:79f564d335a2508f4c4cb44545f1ba403601eef67a3473c99c71d70453080b62 +size 906 diff --git a/data/minecraft/structure/village/common/animals/pigs_1.nbt b/data/minecraft/structure/village/common/animals/pigs_1.nbt index 5dff0116..a9678381 100644 --- a/data/minecraft/structure/village/common/animals/pigs_1.nbt +++ b/data/minecraft/structure/village/common/animals/pigs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1ef17d8a4b1e15226d117d664818fb981cbe86d83f500fb7490787d672d3c7f -size 968 +oid sha256:d88b9a9850a695802a44a86e6a14f44aa3b2db09965bc2a193e043f61a638d51 +size 932 diff --git a/data/minecraft/structure/village/common/animals/sheep_1.nbt b/data/minecraft/structure/village/common/animals/sheep_1.nbt index 397438e7..e0382ba6 100644 --- a/data/minecraft/structure/village/common/animals/sheep_1.nbt +++ b/data/minecraft/structure/village/common/animals/sheep_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0db880b596fcac5e5270d17d24029a2c2c697899dd1cf94bd9e20102ae229d3 -size 982 +oid sha256:36fb013f2b16a4f726622e797ea43586ff1efff6d684c633ab5cf8e8e431a8b4 +size 950 diff --git a/data/minecraft/structure/village/common/animals/sheep_2.nbt b/data/minecraft/structure/village/common/animals/sheep_2.nbt index 847ba201..812ed734 100644 --- a/data/minecraft/structure/village/common/animals/sheep_2.nbt +++ b/data/minecraft/structure/village/common/animals/sheep_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd0158f2e56fac26848ad7db38489dbb0b4758b2f211f81f1cc5d0c8bf336ce4 -size 981 +oid sha256:b707ec29bf03436c749397d0a2eb50fc7c7bfc0bc1a614719d3c99e9dd11b649 +size 950 diff --git a/data/minecraft/structure/village/common/iron_golem.nbt b/data/minecraft/structure/village/common/iron_golem.nbt index 8c902762..63f0c1a4 100644 --- a/data/minecraft/structure/village/common/iron_golem.nbt +++ b/data/minecraft/structure/village/common/iron_golem.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c005e44fdf79db36feabdafeed010f1d425a00bfca156ff775a9a7687aae8ec -size 855 +oid sha256:8e760878b1a2884ec411b5c480e5be16783dc73ab566e88c52506116c16e84b2 +size 823 diff --git a/data/minecraft/structure/village/common/well_bottom.nbt b/data/minecraft/structure/village/common/well_bottom.nbt index fa113451..9d6270d0 100644 --- a/data/minecraft/structure/village/common/well_bottom.nbt +++ b/data/minecraft/structure/village/common/well_bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48cc5521beb415880504cdb09a5526c377899f4abb33ca8bc21004d7ec1266cd +oid sha256:4b21747020d10888eb17671968778429f3a672a328164affa64739abf1c34fdf size 427 diff --git a/data/minecraft/structure/village/decays/grass_11x13.nbt b/data/minecraft/structure/village/decays/grass_11x13.nbt index e321b60a..0d980324 100644 --- a/data/minecraft/structure/village/decays/grass_11x13.nbt +++ b/data/minecraft/structure/village/decays/grass_11x13.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9906336706bffdb7aa737b65cbe50fe02bac7c2993bd18dba8109bf5b03fde7a +oid sha256:f85eae8e13483d840180249c26b2603fd55e675e44a282e72f96171008148dd4 size 558 diff --git a/data/minecraft/structure/village/decays/grass_16x16.nbt b/data/minecraft/structure/village/decays/grass_16x16.nbt index df5a0fde..1928a038 100644 --- a/data/minecraft/structure/village/decays/grass_16x16.nbt +++ b/data/minecraft/structure/village/decays/grass_16x16.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9f7dac4f6e44abeda6ff3a7af4f2809d733d6d50cd148254ef8abb28ba10ff9 +oid sha256:020f16905f04082d4cc341cce96442686407ba48c5b448a64ee46afdbac39cd6 size 874 diff --git a/data/minecraft/structure/village/decays/grass_9x9.nbt b/data/minecraft/structure/village/decays/grass_9x9.nbt index d62a05eb..5c53712d 100644 --- a/data/minecraft/structure/village/decays/grass_9x9.nbt +++ b/data/minecraft/structure/village/decays/grass_9x9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06d634c5a4f31ee66c87ccabeb30d32ff83bae640314b89cb9e971a0871d418e +oid sha256:ceb5d1b69c10870baaa4119665c9ed9dac11e10d5f9ae7f93bb9209197c310cc size 393 diff --git a/data/minecraft/structure/village/desert/camel_spawn.nbt b/data/minecraft/structure/village/desert/camel_spawn.nbt index 6cb24a90..2284e01b 100644 --- a/data/minecraft/structure/village/desert/camel_spawn.nbt +++ b/data/minecraft/structure/village/desert/camel_spawn.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d384d61ec082f7ca5b7f7191956deae6b401b5425e45cb1d61899425511f628 +oid sha256:17f25e404a65c004036e1a472c9333d4275bbf06efafbf53fbfcbef7266d2cc3 size 283 diff --git a/data/minecraft/structure/village/desert/desert_lamp_1.nbt b/data/minecraft/structure/village/desert/desert_lamp_1.nbt index 08efac95..a7a2893f 100644 --- a/data/minecraft/structure/village/desert/desert_lamp_1.nbt +++ b/data/minecraft/structure/village/desert/desert_lamp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31870bbf83937fac2c9ad0f8641532ea2bb21faef0c77ba25f0fa457ec31353c +oid sha256:97ad489ffb1ada4ccb6c0c0656d1c98e88a8f061600c3c16d75a3141ce9b6ce7 size 279 diff --git a/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt b/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt index fb43bb2c..945dfd50 100644 --- a/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e485644b6fda3d177aa994991766a35a71e201dde7a36777ebaf8ed52d818443 +oid sha256:8b5f2bc895b8813741a17f5a9cd4209ba1e4bacaaf3ebfc634db4df93abef9fa size 1690 diff --git a/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt b/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt index e0169e9e..b75e208c 100644 --- a/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04ce299b3d07a76e9a5d72dc554e949ceac834242df85b712cbe0e9589d3eb6d +oid sha256:44dd5e2271ab63af6aeeba6c198141a683720abebd6e4636b2b2d4dcc7034a59 size 1864 diff --git a/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt b/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt index 0a994323..28ccd4a1 100644 --- a/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:705a89e8a130634f708e895d5abfd161152fa39c2b940a0521d82750538bd717 -size 1746 +oid sha256:d62c4facd15468717daf4ecc4d15e9a3ba4f49313ea9dd68e47402b421306356 +size 1765 diff --git a/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt b/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt index f10c54d4..55861836 100644 --- a/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73a66fc7243b7aa0db4f580568bc83622cb6ee15d63d48949c739ec934bae8ff -size 1779 +oid sha256:60f85bc8b72fe02a7aa3187b78768399e737ae1ff3718d81300ebce3b70ceaa1 +size 1797 diff --git a/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt index eaf2f01d..05b8ff0c 100644 --- a/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:071bd1262d1b132ccf5f0d92ac6c322eb87c19487967fe7eae04ff5bf8e742bc +oid sha256:c9ac7028562fdf0aa6d288507795c3a645429b5090ab5653949931fde6641413 size 1677 diff --git a/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt b/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt index 1327aa06..474371cd 100644 --- a/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2030ff71c975128b7fff9261185d40c1e489c0fe155a50feeb79b5faf78330e4 +oid sha256:54899eebba96aa9648b34bcdcca07125e79f7e7b79f203e36923be1018319670 size 715 diff --git a/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt b/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt index e43f426a..ce3ddcd0 100644 --- a/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd58d708919825c80a5484ce582b5a20a55430063af66d6f8aae3b84884918b0 +oid sha256:7165c2553820cd6eaa29fab8fa786f330ce0303b0d9aad8780db6a05b7457faf size 887 diff --git a/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt b/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt index 9423cedf..608f58f7 100644 --- a/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b42963a7da75d841f3a7e7b8a41f1aae8207fe7c52088ed5255c9e033a29b37c +oid sha256:91f0a1c0398c2ea1b70f5eaa57db47e3dcb3a9e811edb4543acf95a663f05b3d size 2286 diff --git a/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt index bec7bf8a..222ecf59 100644 --- a/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e62f71e265471dcdeaa4d2c7bd135ab83845739a6b82881440a944227c800b8c -size 3096 +oid sha256:893b998bb174d5e116cbb08a68a33457a35c9860fc52c94c9f4f4b93f37538d2 +size 3095 diff --git a/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt b/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt index 281e733b..9444858a 100644 --- a/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d626ff6ecc55e1cc4c15e5480b209703659bb9bd902fb69244989f5cb6882ae +oid sha256:10b245801e305655146605e26d723e2ee46bdd7b1e3404782bc28d6b91bf4f25 size 1623 diff --git a/data/minecraft/structure/village/desert/houses/desert_library_1.nbt b/data/minecraft/structure/village/desert/houses/desert_library_1.nbt index a9d771fc..3f3c31e9 100644 --- a/data/minecraft/structure/village/desert/houses/desert_library_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b90b9849ee20bee2a5f3fd0d60b1a7086cec602628b6179e321f0d735d3735a +oid sha256:3cda71597a329812c44d65b449de4a5ad2de1e8ea9cb48ec2b149883fac3d426 size 1539 diff --git a/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt b/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt index 2aafed5f..99a4b46d 100644 --- a/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2474eeb51242929ffc7cc69b3f17351fe76ec4693f46efe17ecc64aa9ffd033e -size 1442 +oid sha256:67f100aa8af0f46cfcdb1d90473c8083f7934b21b611bc22296d709e57ec746e +size 1443 diff --git a/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt index 87fdaa72..48496a15 100644 --- a/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d25a0c0a5fac1555e419bf7e1d286496aa9925fa3361a7b5d7f96d6ab37a613 -size 1441 +oid sha256:c5217566b822ef1c791f0021b7b25dc9e7b0b4e13f0a39215b03a6293b88967e +size 1442 diff --git a/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt b/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt index d6a811d3..b10082dd 100644 --- a/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e62f8ad463405560b70fa742f953669c316b934a933da2c136ac6f46c85207a +oid sha256:7757ad5b65558a3735ef7b8d21d4476ea2c457dfd0343884f4dbedd94ee0d836 size 2838 diff --git a/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt index 0921a174..d0ea5d14 100644 --- a/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79b861a27aa53d88fc774444e2221966aba6b2c7c40f61666d652005e1948f7 +oid sha256:a91385eec381fd69e54c3cb556918a519cd271682fb92963b934670db88eec2c size 1567 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt index fc66ab9c..e3c08fd5 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9a15921147906138c175120962d09ecd758032b8ecfbc702802f0856a8eb78b +oid sha256:09dbc7eed5f44eed3e1a3bdc6d06c06cddf064967a16c2687214128da39ad38f size 1180 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt index 852b97fb..90d7fc75 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6f5102c21c5dc7787616d44a9b1aa01b820bd8415e5cd8deb17bf8d750976d5 +oid sha256:66bfe2fdef3455283aae502ee77565eead1d70524bba39b19551ccf2de23dbb6 size 1314 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt index 212dcef8..0b8f3adf 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:176c359db6c71029d16e73d3998be647fe9d8f7eb75fdb4b2918100757132bfb +oid sha256:84e0be34e11c528e138e2b0e1289d4202e05bfd23ae2e527e3a73c7faf67cf03 size 1132 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt index ace3a51a..86ce86af 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0295a6fe5d66a6fd1eba8796b970c735f42cd77556e8550e377d44eef0dc6c4b +oid sha256:4dd4a2b5bcc534f3313888175d132270bad7052ed7ce8e459ff84e4d72bf2d53 size 1055 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt index bbff13e9..e49a660c 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0d98afd7b3f3feb803af2ce7a8a996921b5e39241b2b9022041f3dce48a33db +oid sha256:3c1a8e527f16c52c9c17d5bc9dec0370005886797489e57fa67d7e78bd1f7d46 size 1108 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt index 81ddd77d..e28216df 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21217fa23e697ccf10632940adcf225c2755bf5f353926d2c703286714e2a446 +oid sha256:f32591e4b7fd2db39eb20e47c7ff9a3e540b968a735110fe2f5cb9f0e21e40c5 size 2293 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt index 0551cb8d..1a5b9a4b 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7816d1b146333536bd0c627333d83d5197d90a2fbf891d6bf3aa6bf4e335b60 +oid sha256:52c096e1e1a44358fda2bb57f991f19d29bfdf0d4ba72f2ac005ae418f363aaf size 1600 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt index 5d9433b3..b7dfda91 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f1f6deaad5c47669c0631a66770c66c7d6df95c9560cd50ca45f4f7c00cb002 +oid sha256:970fd097bb83ad420538536f8e85ab60e0991e76bdcf7ae72984aaf772e32960 size 1026 diff --git a/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt b/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt index 59004a4f..dd71d769 100644 --- a/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d413a2c9a85337a876c1a77e084c25948b9639cebe175c9e8c25ec07e2d5799 +oid sha256:171d0d430edc28a4de440a80165e8dd0c2eb59c188b1ee5b36f9c6752f624ac2 size 1836 diff --git a/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt b/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt index 8c87ad6d..c036fc9a 100644 --- a/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c4e1c881cde884dbad3b9d89bb1755576e55fadfb68a80b8e6151718d7b780c +oid sha256:c74bcbe20a95003a240bfc8e7d669fcc0df05a24c62792a2cd25db14ae0d6db3 size 2999 diff --git a/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt b/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt index 656d37d7..c6ecb8a5 100644 --- a/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1ef234745dc762fbb4317c78bd9249bf38d3ee87dba320caa2843f1972756f3 -size 2881 +oid sha256:9b6065d5206ce94b7ee2479e999f9f9ab31189de6c28c337d2c7dbe44dfa2da6 +size 2880 diff --git a/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt b/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt index 08d41651..24823184 100644 --- a/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:481aaf68b187ff78ea658127baebdf499005ffab34f06aa11112d9e7a685b30d -size 2961 +oid sha256:be7d27a72f616c585b7622c498db8aa773524a909839f5ee99a38f1020bc27e3 +size 2962 diff --git a/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt b/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt index 9c3fa4fa..c7d0d4b5 100644 --- a/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df85de65bdde9461eb8a08d8bf35ee0650036376267c270d3a4bf06785e108c2 -size 2066 +oid sha256:e063f39e481c4625252eaee886db447fddb368fe5cac430e25ea78f11534ebd7 +size 2083 diff --git a/data/minecraft/structure/village/desert/streets/corner_01.nbt b/data/minecraft/structure/village/desert/streets/corner_01.nbt index 0d92ee06..0997cb33 100644 --- a/data/minecraft/structure/village/desert/streets/corner_01.nbt +++ b/data/minecraft/structure/village/desert/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a5b5775f03abea9dd102d4c905a163fbc95c2d0b9cd3ca9554bbdf363ab5a02 +oid sha256:837bf606c8e99c2e9c622c8637ade74e6637e59efa3e85abd50fa657342867c0 size 749 diff --git a/data/minecraft/structure/village/desert/streets/corner_02.nbt b/data/minecraft/structure/village/desert/streets/corner_02.nbt index f053a870..d2177490 100644 --- a/data/minecraft/structure/village/desert/streets/corner_02.nbt +++ b/data/minecraft/structure/village/desert/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a94f97ef94ca2533bc8c1842216cda7f34f201cbcabccdef786936373cb78c0c +oid sha256:46edb1633bf2a1033c399cdf89a49a1e9a1cc319b2c895007978ea964d1ba258 size 469 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_01.nbt b/data/minecraft/structure/village/desert/streets/crossroad_01.nbt index d9e22adb..fc4231df 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce3b8d3e27ecaded2480b395e84cb184c575160c8652729f63e1c059f535bcbf +oid sha256:9b9b001ee7f336dafdebe250f60e618e26260d5572477a8292432de0fe9daf5f size 1273 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_02.nbt b/data/minecraft/structure/village/desert/streets/crossroad_02.nbt index 5301b659..c5f943a6 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ea98a0062e99924966ee69591753561f68f3515e758360027875216d22987be +oid sha256:65a5874ddc4058cffea8ab835e9d8a3d5fa832c0b62321a4316e34d1259edf4c size 783 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_03.nbt b/data/minecraft/structure/village/desert/streets/crossroad_03.nbt index 5cc42c80..6512b8fa 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5dd4dae918e9e14f7c91348ca59239a1fa3e18dfc701eee1eec087a35c4c8bc4 +oid sha256:87bfaf45889f92b4e34068125ca01c78a5e46c7565785601f3079e13ab55f6b6 size 444 diff --git a/data/minecraft/structure/village/desert/streets/square_01.nbt b/data/minecraft/structure/village/desert/streets/square_01.nbt index c8b73619..4c6f973a 100644 --- a/data/minecraft/structure/village/desert/streets/square_01.nbt +++ b/data/minecraft/structure/village/desert/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a207db394f84ba861a238b2b0f7ab8decedec935e56a025d078301ba61dc9eff +oid sha256:68d22f544cfa719be51c39069619030fadf3e20100c1b103d089d6756c0d8557 size 1582 diff --git a/data/minecraft/structure/village/desert/streets/square_02.nbt b/data/minecraft/structure/village/desert/streets/square_02.nbt index 7fd60ec0..94ad560d 100644 --- a/data/minecraft/structure/village/desert/streets/square_02.nbt +++ b/data/minecraft/structure/village/desert/streets/square_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e69bbd3cc7ef8afdb6e37e25c8093d6dd6d85b007c3cfb2527f5f701027af1d9 +oid sha256:4e7d8e99d3d12d0bb34a5a7916dc39f25ddf4db27806942794366bbebddaa942 size 1311 diff --git a/data/minecraft/structure/village/desert/streets/straight_01.nbt b/data/minecraft/structure/village/desert/streets/straight_01.nbt index c19be8ad..ffb39a41 100644 --- a/data/minecraft/structure/village/desert/streets/straight_01.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c6bd4ce7821a837ef73f907dbd406647557488034b6fcbc0bce8afa27110867 +oid sha256:e2db72d1eeb1e2ea7021068592450cc215ca2b9229a420b01474ab4239049504 size 985 diff --git a/data/minecraft/structure/village/desert/streets/straight_02.nbt b/data/minecraft/structure/village/desert/streets/straight_02.nbt index 34892dfe..dafc849c 100644 --- a/data/minecraft/structure/village/desert/streets/straight_02.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d53ded7e12570d788e5c06646489f33038ccd13a04f7c623e2f29578c471a680 +oid sha256:53efae7fead90ea3593197a4647b59aee5fd3eb11a456eb503303898681e5011 size 1230 diff --git a/data/minecraft/structure/village/desert/streets/straight_03.nbt b/data/minecraft/structure/village/desert/streets/straight_03.nbt index 930fb805..46ab33be 100644 --- a/data/minecraft/structure/village/desert/streets/straight_03.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea32a269ad883d81ccaeeb99ac2cab972b8dffe6e3c67ae35081a372e2eb24eb +oid sha256:e8c706ee2d7d455d712f128ea1ab51a50f1239191c8b0d45f80d0baa22004bb6 size 323 diff --git a/data/minecraft/structure/village/desert/streets/turn_01.nbt b/data/minecraft/structure/village/desert/streets/turn_01.nbt index c0a012da..c338914b 100644 --- a/data/minecraft/structure/village/desert/streets/turn_01.nbt +++ b/data/minecraft/structure/village/desert/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:247531b7ac0ae6b4dc6dd7cebc3478df66663b3120ad2f0883d4974b12f5b021 -size 402 +oid sha256:6cfda88878719ddae202035d2fed1be02725601e1215e66fa98532c33174c87d +size 401 diff --git a/data/minecraft/structure/village/desert/terminators/terminator_01.nbt b/data/minecraft/structure/village/desert/terminators/terminator_01.nbt index 03050eb1..bef5b138 100644 --- a/data/minecraft/structure/village/desert/terminators/terminator_01.nbt +++ b/data/minecraft/structure/village/desert/terminators/terminator_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5eee3b61e7496c478d344b88e4c130398f0934a750fdb31d83e379e240f6da42 +oid sha256:b901e8e903be47348848379bc96479aaa185cfb054bb92bf0996e13011d7dcda size 294 diff --git a/data/minecraft/structure/village/desert/terminators/terminator_02.nbt b/data/minecraft/structure/village/desert/terminators/terminator_02.nbt index 8be92d3a..d8f5b263 100644 --- a/data/minecraft/structure/village/desert/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/desert/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:510ddfd23846bc9532edb44354aa1b132422006693d8d06084d5b8db977b7f8b +oid sha256:c671ace00ad9cf4916d1e5cf914df70efede0f3f0d80d1d19b2f2aef87d5cdba size 373 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt index d528a9bd..3199676c 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d45220adda6987be9549303df20067417d4418387390bd3c325018429aab5890 +oid sha256:2c052b42f6d1182968e60656be3c5278f97334f60d365e0cfc8c35aefd815b62 size 1016 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt index c5e2ccac..08ac2dba 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a469ddea02c6b702ddc82573f5b21b265b9bfde69112110b510bcb4cc48e520 +oid sha256:37ad005126d1996870fcaf30e4faac6e6134c843059c1c1e66b173316d8249d0 size 1835 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt index 1c4be53d..142d8aa2 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34de3d1666c32e3f09957e8534bb4f07f00b36be40b69fc5346b5390ac64b52e -size 1899 +oid sha256:42212b9a6dce46218458e520327084be91871bfa2772512302cb1775d67ddef0 +size 1900 diff --git a/data/minecraft/structure/village/desert/villagers/baby.nbt b/data/minecraft/structure/village/desert/villagers/baby.nbt index 0f6ebc71..87189bff 100644 --- a/data/minecraft/structure/village/desert/villagers/baby.nbt +++ b/data/minecraft/structure/village/desert/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:526c3b4ddddc8568ee8f56e887a24cf2c52dfd08e01a95172e288306ad555529 -size 750 +oid sha256:5e7e145695d2b5b60e33466712807b76701f60e435147ef3509259cc1c47f069 +size 719 diff --git a/data/minecraft/structure/village/desert/villagers/nitwit.nbt b/data/minecraft/structure/village/desert/villagers/nitwit.nbt index 3f22b1be..c34d04b9 100644 --- a/data/minecraft/structure/village/desert/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/desert/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4199b395986ccbd545f793fb223bc2788cd3d7a622abfb660c8ce92ecedfdb6e -size 750 +oid sha256:744215dabc436a79a04feb450fa5bb8cd2043590fd268e57b85d905794299d94 +size 716 diff --git a/data/minecraft/structure/village/desert/villagers/unemployed.nbt b/data/minecraft/structure/village/desert/villagers/unemployed.nbt index e67002c1..9e1fb669 100644 --- a/data/minecraft/structure/village/desert/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/desert/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:703cab74f98beaa1e0d190e71b48234ab377452805765560f8837ff87e1e04c6 -size 750 +oid sha256:151c9af9cfcfdb60d046c532f7db86ad5f88d624baafc5c2c954a3f77bb92d63 +size 715 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt index 4e986263..da8a3529 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b73bd48dfea5bba165851d6d59186326d3e627d12c51eeb7b75659770eb50238 +oid sha256:a57e2878770bf47bd8172c4ec852d21bd05c472757adf3aab3b227912d03541e size 1449 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt index 1a6fe6e1..20a07556 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:044902782035fed7a7c4ad494f7a83f5f35300d247bca4ec87e89246c8eb54a6 +oid sha256:cd5b47619ab6ec1426602ffedc32387890983ae255db35a2f93d92b95ee95978 size 2846 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt index 4c607af0..c6c53cf0 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db2d5443c5c7afa9c936e07021a2b29d3e4b8b7b79bc507a8b5b1c93ebfad72d +oid sha256:451b0518cffd9fc672db08eadf105109d6d93ddba3159e5f393f33ad78a4c7f2 size 1186 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt index 691c1bbf..a3f310df 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ba42ab2b00b3c8847a8dd07444f685bf2020eec9e735826a638259f46350672 +oid sha256:a46e96daaa634ded3bfd9cf455cc06d108153e762bd0073ae18c39b4c636bb91 size 1319 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt index c7d76418..0d41cdc8 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55cb4570ea3c264f27bc0e04a46af98ea4c5f08da448f5233eb975f7c86f465a +oid sha256:a4df91e7cf766ca21e9b9cee3209c4ec3fc2131e255a38ac09c74b6ff30592fe size 1138 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt index 7d5432cb..04b02435 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ea5f721eba285438780b3c7f0ea14e7686e0cea7f098ef472b5b0fe0095710b +oid sha256:516defc96b9af56866a346c3f9744c54e8c806ce37afafda9d88067a87078de0 size 1062 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt index 5e5128dd..44d4284e 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6749d6250164c5cf9f93e1e6cb3aafd41b1818c2aad6a929bff178c72d062cc8 +oid sha256:67e7c4bf5077a80bcb550f6c2652bec88c28bf4b593812f4de865a1e39ef7b6d size 1114 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt index 3525a0c2..2f4b99c2 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0db9175f1cb88bbcd02b3ce028306bd49194e9dcfe66c09f1632d7850918261d +oid sha256:51fa8a4f8e92459d3c4db67df899b21951c4ae7c2cf0945d3b81ec6191724d9b size 1964 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt index f196f7c7..69f08870 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c82b44e79add36caa6566addb0b5688f89c825bf0d8e065c6795274325c7ae3f +oid sha256:430789e2dac163d5d6b5f267fddb34cb1d3041f1e10b7e030d5d62218b6bcb03 size 1606 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt index 4649eeb5..75f739c9 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bfe9c8c6352195a6e918030fa6fee9f9e411f9f870e77113b59a3a3a39e0cb2 +oid sha256:197b14304c3592cb0396725d65025036461d999fed8a0215f6b25aaa845ce8e7 size 1031 diff --git a/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt index 40428c41..10348427 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:297cd0f1bb642021f4bc200c467c6c5d46894bb8414d345f85edc9b2350344a5 +oid sha256:e00bdea6fcbd117502fb810b7bd9fff5b9bed1053e1dc231c019b81299016f45 size 754 diff --git a/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt index 432fc3bd..5f47fd75 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10009a70ac04930984cbfb9d9fa923b844420c9695521d3ede14010838072e5b -size 473 +oid sha256:40345e14ffadd24b714dae15167c90bfc379025187dec1ed537c0a2b3214e883 +size 472 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt index 5eced4a6..8fdcadd7 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5293580ba6bc939879c8299f13d7c5c78fcfc350bb0395928ca0cbfce3ee4f4c +oid sha256:e3ebc74e4cb6fad9e4c3ba423f3850a057e5cdbdf8b3d9960d416abd5742c821 size 1279 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt index df93ab41..89fc84a8 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12ff49fd84b0ea80a8c0670ec08aba8823bd8f26f3242d35b29e9b355fdf199c +oid sha256:cc4e35f380fa77d90e6942a4dbc3225c801a1679daaceeacd2bd6e53e1351846 size 787 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt index 6a8b43e8..5786e3b9 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ade8f3528e257cfba17a7e5ec9cfed7f4bdbf769c3a0623741257ee56d43e703 -size 450 +oid sha256:11495ec71f7352173fa9a561cd80f60a9cee9888326f9e0a1e3802d17d0457f2 +size 449 diff --git a/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt index ebc98156..0a4b0859 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52e7eb6e4b2994a94d59b28422f20fe0933761b9faea83b76f341cf607b1b4ac +oid sha256:a660213749ace646ecefa8c53fa696f039fa311c1510a4933d1136d08aab62e8 size 1587 diff --git a/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt index 971e291d..19958ac4 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d15c95b54a8353a63dca6d91c80b702b22a9af09c3bcf0ddce2648b0e4544b5 +oid sha256:d8a5fa7af1b57e15e20c731f58a44cb356378b09160284db859198ad68a30b36 size 1315 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt index 103fc35e..513e4623 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0daca19ee1b5d33c6d5d6ddc8b1525d2c21751b7dd7fcbbfdd75db58a1377f7f +oid sha256:86e9a2abf0fddfd6bb8742ff748534a0c979bce4ad61f47b4d326ceef7ecb02a size 989 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt index bb4a9cca..4afa167f 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ebe155574ff2d4a51db04a512577d43b5ff23896449a332b41d36e6793d2213 +oid sha256:818fe0948123ffd5e6abe0c64e4a3a18edbb0edcbba110093904ab9e362217fe size 1234 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt index e8fc699c..1e584a9b 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b5f9d2dc8ed0bf0b37087a5af7ab013a64fdef4dcebc44afa39a5689a1d8ebc +oid sha256:14527664fc3d5176967fa396c1578067609fac80f3414739e1c0c6e691d8a9ef size 328 diff --git a/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt index 7eea96d2..ffe7bd61 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:091be914da64c8f3e27df4810425fd1bc3e711b75209af7c2c80ef2a012c0abd +oid sha256:499c5b90be40a3d2a360a87df7b436f7ccc2a5dda82ae2d0f48374f05b511ec0 size 406 diff --git a/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt b/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt index 72bb8e40..3fdf913c 100644 --- a/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a365459182cad25b5d2c101295fbadb8212a9a783c8697d097720c361b2a1fa8 +oid sha256:1a730d3aeab2b25dee09cd9e5738eabdb4f57d0009a46e8053e4f605b7075878 size 377 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt index f4ea4d7a..a7e9e85d 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1cc6554827086187937f439bfa5a8a0e66e64304d9b92144ca127289d0caf5d7 +oid sha256:61cca96e22c7b6ececf5b8d4f700b08454fdcd74cb21141c09bfe65b0a537a97 size 1128 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt index 6c2a16c3..c59aa030 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d20d0fe65d898b800aab1c648409511e91c9cf643cc6518127d43827231fc729 -size 2313 +oid sha256:435718a267d404f886b4f3eda5fb2b8732f5e38d5cc9b84443af6a4a36926176 +size 2312 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt index 5f3abf34..87a1f558 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:755cb959d568a61248b188596da7757e7ae8718d7b1f8f9c836740cd8e631ff0 +oid sha256:f71f0c912160a03a4b70cc8b6826d2e61b91393f2d9aff15cfe4617ce614af9b size 4580 diff --git a/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt index 249eee17..7c5889f5 100644 --- a/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e7c6f233f3e8049b4927725a9f4b7f781577830a6b9eac909051f6337e1ccb2 -size 755 +oid sha256:547274e462cc985437a37a99c4106d4c799a3aaf709c2bf0b8e6a5975c3f69d4 +size 722 diff --git a/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt index be3292d3..1add0fd6 100644 --- a/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76a825a3ee6fc49073aa757f71bbcbb9fa8ff6cc836d558a8e537d447e87f5a1 -size 755 +oid sha256:9b9caa22782c0643793fe1618f9593f65751d9dd4305e62d80decf4ba20d126a +size 721 diff --git a/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt b/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt index cd97770f..49b5e91e 100644 --- a/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaa4baa94be88bb1fcca55c2be2a2bdae1d1faa59019c5734df9929d91797177 +oid sha256:4a9265c57a404667a629331403dc3a3bab5ee9febb26397ea8c7ba226489d988 size 523 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt index 6a791a93..77e7c66c 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6532c98c416a8bddc16622ebbcc458b031bf9710ecba46dc32bf482c82ea5c8 +oid sha256:c1314787141388101fe5eb17bbea71fef60ae26dd637210a46fb386792a0107e size 726 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt index e8a79c13..a1d1e002 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:160141275d60f836f0c9ba7d8e2739b4ce6249feec74fece1fc6ce06450ebf1b +oid sha256:775ca022cde2687a67ad46a504da89af9b7703db076e86a35249fcb3c952b1ff size 1013 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt index 7a08e6f8..ff21fe3f 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:331a2103bf3c1a18ed1aa080aace9cfacd20e2b8095b9bbd3ced3e62bccb95fa +oid sha256:e84cc9ccfdb81546ca78999a80e6555827e41a4878758849b2148ca8351462d0 size 1355 diff --git a/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt index 29db27d9..abcb0de8 100644 --- a/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe82998c0a704e9d8446aa3fd2aa1abd6985da8152867b4ad98d04c66850a9e1 -size 2612 +oid sha256:2fb1fa11e280daa7fb58b9d28b906ad947b7ce8ae5defb269277b750fc78e778 +size 2634 diff --git a/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt index 1e24dad1..7e917e9d 100644 --- a/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4aef50989cd0ac17a91b82a656d529a664a78eac3364731063d93a9f409bc2a6 -size 3263 +oid sha256:ec0cb0671dcb95ad9d2635db7a9d5dc87d3e8da89ea260fd40200720c855e8a3 +size 3264 diff --git a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt index 940fee45..279b1e94 100644 --- a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41db86d3187d6453912c8985a04188aa4b90bd760f700be7f8e346aa7b9b7462 -size 4166 +oid sha256:1d41f31ae1f207b400c31afa5764f48833e496bf672750e4a96b93bf33395fc6 +size 4183 diff --git a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt index 77d6a863..50cbb0e3 100644 --- a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1e8e0e1c7fb81565bbeac00a32871058d8cc07eecee675628064df5660c2bc1 -size 4561 +oid sha256:ce6bc556f4b0b98b802c37ea5274c4ace0c5093b9cda3c69d629ab7ac226d5cb +size 4580 diff --git a/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt b/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt index b68ab171..2ebbcff9 100644 --- a/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c44dd872a33aab5c36777fdf5c34acab87905ba54a2a704104b9e04649529171 +oid sha256:ff2a30edeaca1f27559daa21f64e9bd25d7143af0446254737a86cb610cfb9b9 size 2393 diff --git a/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt b/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt index e69d104e..537524ea 100644 --- a/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:505fdcdff3d92a217da835370f379d06f71c78b8bd69ae436a17bbaf5a5daa68 +oid sha256:c487fbbeee78ff20083a47c88ee40a22d49ae27df22dcfd581cec5b291bf9047 size 3527 diff --git a/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt index a6c7b2d1..b39ef428 100644 --- a/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:02adc07872c4e4819c88653b2134d531edfb6d25ea95a85cdd237595e2952afa +oid sha256:7373de513aeb0cca715f7075fbe5d82b7730c860cd82e5f77af327ebc25df7c7 size 2914 diff --git a/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt b/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt index 732f93a2..64dd723b 100644 --- a/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:455825490e9aa8a7a9c31d570e1aa9ed2e0b457a183bc1ea1c97d0a5b07c3050 +oid sha256:8e76392b14c91133da580f66111a740e1f6f8c353add4b1c1907f5558a963012 size 1157 diff --git a/data/minecraft/structure/village/plains/houses/plains_library_1.nbt b/data/minecraft/structure/village/plains/houses/plains_library_1.nbt index 1e778f48..b2dc3bc0 100644 --- a/data/minecraft/structure/village/plains/houses/plains_library_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf15744c0bee6ade6ee7a6d0b2d19a7a0404269c8489cbaa703271eed6dba602 +oid sha256:d24dace3284d40e5b299efbbf47740e109b792b1e23b7266b26ec19f20eec3da size 6515 diff --git a/data/minecraft/structure/village/plains/houses/plains_library_2.nbt b/data/minecraft/structure/village/plains/houses/plains_library_2.nbt index fde35355..3afe527e 100644 --- a/data/minecraft/structure/village/plains/houses/plains_library_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_library_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bb5e5ca53405b860303706d5bff7b72e04c587802b2a2d8f37e65dc1e3632c2 +oid sha256:37be8af236b2558613aa1f80841c88c4f66190c32d391d74f77d889b1ebeb381 size 2917 diff --git a/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt index 2532543f..211b1f41 100644 --- a/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e9b7e07396f55a3007235ffd66b173c7c8e07b3b07cdf791c31d6f79e3bfda3 -size 2296 +oid sha256:70a6d88887179d4f6527554b4f1118ab4c32b2fe76d41e11a34198797d255e45 +size 2297 diff --git a/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt index 46d134ac..7864a9b1 100644 --- a/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64f6fe9ba6f2cdc0dd5f32ae0a1e7c2d0675d3eef9396ba9abc5b0a537f56c9e +oid sha256:8e64f7c396ac944543b20a69b7264720d5a6e9fa8818e4f490a565a46f30d94e size 4241 diff --git a/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt b/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt index baebda0f..8358847d 100644 --- a/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e22bde22d97248d760f19d9e3b0cde7a63d86b9de5c60008ea4263bddc7eb89 +oid sha256:7317a11f3741f69d62e3d514a80d223f5df0c28d8fc4236b325e03a4c7279f04 size 2543 diff --git a/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt b/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt index 9704cb6b..b4c12c6d 100644 --- a/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54a6b09df3fb6825a38cafc97bc1f34a3c8af57a30e4a52890353ebd2bbfc182 -size 3906 +oid sha256:3b9f8431562cb2e2810f214aa8be88d8ff8ed68375ba645a4beae67e4b78093a +size 3907 diff --git a/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt b/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt index 62b870d8..9846b734 100644 --- a/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfa5b9923a6bc8a5d8a737b7c2e45b2f6c70ecf4b64e0931865f6f118742355e +oid sha256:74caa113550ab07104e416d1bb279773154017d17296dc22e70f4b6c0dffc451 size 2652 diff --git a/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt index 7f6f94ed..a5d7e964 100644 --- a/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaaa768a8d0733e412c10bf3c9c862f89ddd5f1934f3fab80485c519385cb60f +oid sha256:edef7883c9d55608bae7f5b69181cb07d36ef470187d3a537018746e0c817501 size 2915 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt b/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt index 93b90432..8655f738 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb26343ba5b66b929a99671ed0307e6aa984c88c6f6093aa26a0365d112e2702 +oid sha256:80fd42b91bd3e64f4a599c230214bb52e30f21ee3d1abe74dd76e9482dda236b size 773 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt index 763c6fd2..c20a33ea 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1e1be82ae0c4962aa93a0eeb1fcc1304d89359c2dd3f3c5cb1527f010246b92 +oid sha256:124244c41977d5383b59805030d87ede3061070a15d31678d7f9660d8060733b size 1809 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt index a04a6e23..f240d266 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee14384c558940679b1e948f4842477bb9508e55eb68d4585ebe414ed883a409 +oid sha256:8e5e3a54e1a459bc95a48d789eaac11d584c8ebd5f72b3096dde512391702331 size 1700 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt index 164a3b98..3a9e23a4 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e88ff690cdce006dbef6211841269dd6c8ece5686b7ff747de3644379ba0eb8c +oid sha256:86f9aedea24a4988633b25f91f6ef066f80033509ff3889b18162515df5967da size 1803 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt index 24d4f81b..26a2944b 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3a75866af6e400976c1af644a9e9118fdbe763ff10ccb9d79f9eea78d950a2e +oid sha256:438edab2f0d94d30862d8ab3eeb1b3087d8298415dd4247032b610d57218f7e5 size 1726 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt index e9bef0ee..2b72c295 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc6247121a26b57d40e6162af5134eb0b9f90cdcc61dae949ba143ca7e810d47 -size 3491 +oid sha256:1b61a823f26aae487dcc57110788c4a0a06ba7fe77ede89b40ca0ab77844ebdc +size 3492 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt index 7e957bcc..4869e9f5 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13840a845a286888d1887f3a20829efb5dcb5a51cfd72859824158c93babe65d +oid sha256:e35b1b652f53395c54afb5a9a694de007e76165ab28d7ad6df094e3bf9f09c26 size 1775 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt index 68cfd468..b11a728b 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c41d15ec12b10b89e01d3a6f4d68b519bc06414c531e4c0135bcc35605d594a +oid sha256:115d28e8ed3b9e8aa9212b07a5e7f2b6e21cd4d455861671eafd9a5d4e4de326 size 2036 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt index 18d8521d..648e4745 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b494280cf0b3e426dd78e191281a8b221511bd7c0700a378fc75c665536d283 -size 2683 +oid sha256:7c77aa158397ca9b1aac2b9bcb54fd730858a841d245341aced5805bb0989742 +size 2684 diff --git a/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt b/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt index 9756e889..43bb6e9d 100644 --- a/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d4469c9746f7195a8cf703eaf4ab6a2fbb0748b2bbfd868f04ce90613bcdb08 +oid sha256:823d1bd3f71cbdc72108caca853589270282288bcbf115339d83241e439fad4b size 3779 diff --git a/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt b/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt index 406df3d3..b3fb3d63 100644 --- a/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01117ea15b3000379b18c3d9371a0dc10d10568334720ec18f65ca84db7b69ec +oid sha256:8507262d181174c43e8bc4f2dde1bec8de037dab8984cd7298d5804493dc6fb8 size 3072 diff --git a/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt b/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt index 4a7d88d8..976d39d6 100644 --- a/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:072d3a77cc918295cac3de5da887f1ff39ad1614dff30fca2d5940c1f602921f -size 2502 +oid sha256:6ee26f3393e042277abab746f8bd23cbcf305654143f9dc56b5a4e57106853ec +size 2503 diff --git a/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt b/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt index 19145139..eeac4ed2 100644 --- a/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:232ae84a1256abcb3829268c7dafb51a034cf38b294972cfdd5802058128c884 +oid sha256:8bd46ae28b09a8075ec83ae4809e5ca48e5610c411f22293804397c36098b35e size 2493 diff --git a/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt b/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt index 81277c20..06949e58 100644 --- a/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b85903eb06da353179011035385d9e234a3c02cc880a25d12098380f74f6c786 +oid sha256:55d7fdc0a3e58d16a0ccfa074bbe88304613a33ed5787a6e37647148a2a61505 size 3211 diff --git a/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt b/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt index 177a55e3..26ee4875 100644 --- a/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a78dca8aad121187ffda67b7192b0c640c512fea59118cd54c7d193f9c2c9ce +oid sha256:f70da9c35dfe01e1958ccb8466d1b4b195a46c6db542dc7e391724ca65d1463f size 2675 diff --git a/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt b/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt index 1475bb21..bc98bf73 100644 --- a/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b53b6eb3e45dca7a9b5ecab3d03d14c41cd3c2c7c482447f65769cd98af6de15 -size 3342 +oid sha256:eb27f257b0f663a206337cad5049ed284b836cbbcf549beea9a3b5892524861f +size 3365 diff --git a/data/minecraft/structure/village/plains/plains_lamp_1.nbt b/data/minecraft/structure/village/plains/plains_lamp_1.nbt index 0901a4df..b0b7468a 100644 --- a/data/minecraft/structure/village/plains/plains_lamp_1.nbt +++ b/data/minecraft/structure/village/plains/plains_lamp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1778d887f9015b0a332ff94a5eb4f8a345c4af1f24f8391372db03551be912bd +oid sha256:88abb93e379edf14580bc2b834d1584c0107d22541088ff9cddc191bcfc546ff size 470 diff --git a/data/minecraft/structure/village/plains/streets/corner_01.nbt b/data/minecraft/structure/village/plains/streets/corner_01.nbt index d061a609..f26a3776 100644 --- a/data/minecraft/structure/village/plains/streets/corner_01.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01305baf5f12a739d22e0ae10dcd1480c4bfe2befeb367d70d67f86bb9a0c36a +oid sha256:a163001e656fbd5a7b20e598fca7fe8b327302ea177988988538977d1d8e8232 size 1183 diff --git a/data/minecraft/structure/village/plains/streets/corner_02.nbt b/data/minecraft/structure/village/plains/streets/corner_02.nbt index 3d7dac13..fbad771c 100644 --- a/data/minecraft/structure/village/plains/streets/corner_02.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30d06708a5c944b939d40fca1fdeeb028f1c6459d67d95819af756e113463bff -size 1110 +oid sha256:26f3aa773a1d399db8371ff0c0088574ce97c151d1477f95d905dbec3bc0e601 +size 1109 diff --git a/data/minecraft/structure/village/plains/streets/corner_03.nbt b/data/minecraft/structure/village/plains/streets/corner_03.nbt index 2e47d7f6..eb62d2cd 100644 --- a/data/minecraft/structure/village/plains/streets/corner_03.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6618f8e135e94f9032216d36d5940d185a3679eb89a104a599615261b8a91b77 -size 352 +oid sha256:0292975e4912a945a8f615fa077518f8e4d9fd9661de2152ef015ac38492d4ee +size 351 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_01.nbt b/data/minecraft/structure/village/plains/streets/crossroad_01.nbt index b2afc1b3..148a4fe5 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73a8e60802a46aa8d23a9470028c10e3c6c0c52b94446ce978dbd224eb46cace +oid sha256:106a1cc4efc79e9ff6a5fa6b98076ad2c9bb6a052faaa44ad5dd3429a59329a8 size 1216 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_02.nbt b/data/minecraft/structure/village/plains/streets/crossroad_02.nbt index 3a4e22b5..9a6f3dd9 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b97ab71db36ecfbdd6160336994ced34c8b6deee80ff403607310beef2b8c49a +oid sha256:90d34cb88e2eb75aad05aa18f7242f1eed7c8397ab706d6078a5b7f472e6a88b size 1161 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_03.nbt b/data/minecraft/structure/village/plains/streets/crossroad_03.nbt index 3a0ab588..e4fb7eae 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6058e9554eb26ec6c7c1779937041dff3a3762bf1b3004305a01f5221801e8e -size 1205 +oid sha256:6262071b40e83a64238b2fad11b66f1f56cbce1577191c84d6c6813e185ea7cf +size 1204 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_04.nbt b/data/minecraft/structure/village/plains/streets/crossroad_04.nbt index 789cd666..d3decc31 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ac1745ee49e27373bf26f45414b1c958c77733aec718a849786aa7976dac42b +oid sha256:d9c31a2c3b97b536b22756dd32cb675f3f8ed397cd3217789dbf1ad1871910bb size 378 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_05.nbt b/data/minecraft/structure/village/plains/streets/crossroad_05.nbt index 8c38ff9d..11e3098c 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:864bdf0390f2854a96d549ef44e99a2e55977631bf45f1c8cf0ca8b137ebc859 +oid sha256:bc044a11b1dec490adf0328278ec8fd10a6f0b3d22fa949996c2b40a54e73823 size 410 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_06.nbt b/data/minecraft/structure/village/plains/streets/crossroad_06.nbt index 0e6f0c79..1c0174c3 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a671b622bd10d8b7775debad11d979b1e33c375c2fd6a6e82f43656f3d50419e -size 472 +oid sha256:25d6fcd68a9c60e08382468e56ee8b091a6a2310f2c90d45f8d5af87ed467fc4 +size 471 diff --git a/data/minecraft/structure/village/plains/streets/straight_01.nbt b/data/minecraft/structure/village/plains/streets/straight_01.nbt index a72ab7b3..b93d81c5 100644 --- a/data/minecraft/structure/village/plains/streets/straight_01.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c34355585083681868bb21cf3638f9f37adf26a97597f21a1caad0969aac31b7 +oid sha256:c33daa0cdd49d332fb1064e75480203ff48c26703bdfce0fa98447cc1a134a20 size 1132 diff --git a/data/minecraft/structure/village/plains/streets/straight_02.nbt b/data/minecraft/structure/village/plains/streets/straight_02.nbt index 150076eb..11a1f8f2 100644 --- a/data/minecraft/structure/village/plains/streets/straight_02.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a114e39384e8e3a758f996d69811d5b1b5baef0b8e2135d3e326ad626250b2b +oid sha256:405d11d1dafc49bbf94a05593c3326948fe005f8529cdbc81a26adfb51f3cdd7 size 1085 diff --git a/data/minecraft/structure/village/plains/streets/straight_03.nbt b/data/minecraft/structure/village/plains/streets/straight_03.nbt index d5c74e45..459f26a6 100644 --- a/data/minecraft/structure/village/plains/streets/straight_03.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:111fb1bb1df390b75360ebe6ab1898ed93d451f446d8a88e445fd8441fe15006 -size 778 +oid sha256:e0080086bed1de2b10b0bbcf5572c2a214c0231e6ebc82e1dd79454115a38d1b +size 777 diff --git a/data/minecraft/structure/village/plains/streets/straight_04.nbt b/data/minecraft/structure/village/plains/streets/straight_04.nbt index 8aa00433..034f2ac6 100644 --- a/data/minecraft/structure/village/plains/streets/straight_04.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bdba6232c08a59bcf3f81f7f86242478a891d6072502ae5d97a2207b2f291ee0 -size 635 +oid sha256:81e61b82027879f3b9bfd4393c19139c71a51e93a337c214f5ad401cbed36967 +size 634 diff --git a/data/minecraft/structure/village/plains/streets/straight_05.nbt b/data/minecraft/structure/village/plains/streets/straight_05.nbt index ea3f9411..079f005a 100644 --- a/data/minecraft/structure/village/plains/streets/straight_05.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f60d43ef3f8f749802146937224857958da8fc52fac44a27403fcb504c29851c -size 1330 +oid sha256:955241b329b205c43cc2cca3dd261f1a85ce05514b6ce4916334dee6c8e5bb50 +size 1329 diff --git a/data/minecraft/structure/village/plains/streets/straight_06.nbt b/data/minecraft/structure/village/plains/streets/straight_06.nbt index 89ed5732..975515e3 100644 --- a/data/minecraft/structure/village/plains/streets/straight_06.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7d0a2399ad2d8637b6141ed833e319a147748fc31262db5f7cf0f0976d6cbd3 +oid sha256:c0d7e774f4a2985bb58c51c5be1f0b3f792afea65d87f52bd82d5c8a18b0ac1f size 1704 diff --git a/data/minecraft/structure/village/plains/streets/turn_01.nbt b/data/minecraft/structure/village/plains/streets/turn_01.nbt index 125caefd..4a5ee8e3 100644 --- a/data/minecraft/structure/village/plains/streets/turn_01.nbt +++ b/data/minecraft/structure/village/plains/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:634aaae75e0d07e6048081b50537a32bae0cb7c176e649f7fb1678f59aabc986 +oid sha256:d83132ed35a3034015ba9386485e73ed6195aa0b5a1b7752c108bf1c0a863456 size 790 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_01.nbt b/data/minecraft/structure/village/plains/terminators/terminator_01.nbt index 5fa45c05..71933995 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_01.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5a54418efe9c561d8e3443fcc7bd66886688a70d71d68f8b81e3ddae3a6076e +oid sha256:34650b04439bb06b2e7871aa67e8282b345c24743c9bc80f6903e41cf3beedd2 size 285 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_02.nbt b/data/minecraft/structure/village/plains/terminators/terminator_02.nbt index f28945aa..4ae9715b 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba9fb7cbc06385dc7bc5d39ce7d2c199f3d276ab7037790688263b52a234f138 +oid sha256:1b878198ed08e576b6d01138d8a970734e86a667e801af4db8b38507f50265ed size 251 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_03.nbt b/data/minecraft/structure/village/plains/terminators/terminator_03.nbt index adcbf838..ccb1d251 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_03.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d9808bf798da49a9c93735be19f371d565ac9af754ee4280f61055c8d2bc27c +oid sha256:69c7d89264c0ad0a3b879b1d5b4286901a419450f4f7fef3f9cba40c77d96003 size 292 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_04.nbt b/data/minecraft/structure/village/plains/terminators/terminator_04.nbt index 98f03a3f..3ce4dc1f 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_04.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14b8f9a3a60f446efc6b891ac911f918153e72f241f67d337031dcf89a4abbd2 +oid sha256:9100caa7a2660b2e9dfa22bf940802a75b733ea6f72f5576a1e7a8d66144c39b size 322 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt b/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt index b67df07c..e76ec0f1 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb957f3c85d6411eb16ea1e5c3782fef5cb75647c240cc2c576a5ef2d7514015 +oid sha256:e8669fb85e0339ca4fb5d93c7d797cf4a9f5e19fe6aaf1e4fa6f7604ab491f5a size 957 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt index d3de886a..4e988bff 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de4092b166d4c932962baf08a270f1bb58af6f5f3ddfc0b83c7c090be9661f05 +oid sha256:06100ecc4de8e6e3d11f2748ba7d463533da93144509b3d6150e5bf33b957515 size 1052 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt index 63939190..40c7b7b6 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8197afd6589070a47d67b362c11e80d2a87e660a1af51b3dae4f96497f7ea601 +oid sha256:966a9b7035b75c6961b7eb056da3940951d242aa6d45bc30a81764ffed28eabf size 2540 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt index e04bab83..6f37e1c3 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f53c1015240a4ee548be648375b9cfc3391d79b34f738c410d517dd8562e412 -size 1586 +oid sha256:04407203a40cd084dc430a10aea3b61ce9f83cb328a5b8948f72c1e7bb304802 +size 1585 diff --git a/data/minecraft/structure/village/plains/villagers/baby.nbt b/data/minecraft/structure/village/plains/villagers/baby.nbt index 59d1e0a8..0d0d870a 100644 --- a/data/minecraft/structure/village/plains/villagers/baby.nbt +++ b/data/minecraft/structure/village/plains/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a783d3e056a62527372d7e82065dc5a43bd1b171a66ca68d5812087135c31f8d -size 750 +oid sha256:226a6656aae6f3f6d8b39c4d6c982edee40ab5e00c5110ac6a1a7027d2bc6cc9 +size 718 diff --git a/data/minecraft/structure/village/plains/villagers/nitwit.nbt b/data/minecraft/structure/village/plains/villagers/nitwit.nbt index e814977c..77786c58 100644 --- a/data/minecraft/structure/village/plains/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/plains/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1cb215803777dcd0e114041ccfff259ee2b542165f946dec77a5b9066c685ee0 -size 749 +oid sha256:71a20804dd995d2223d9c25127acd8e7d73022a69263afb07441ed9086b3281c +size 716 diff --git a/data/minecraft/structure/village/plains/villagers/unemployed.nbt b/data/minecraft/structure/village/plains/villagers/unemployed.nbt index a1d25bc3..732e1865 100644 --- a/data/minecraft/structure/village/plains/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/plains/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a5dcc6243031b474d12d3d3578af026510b6844637ecc157c0be55e9b9d923e -size 749 +oid sha256:5e1502a0ff0665eb567561b6f73f382a0e0bc9765eaf88f2627dac15199bbdca +size 715 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt index e1a843ed..67d43239 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cffef7763e54f35ab60231b0e0f96d099bba40d5b5bc5dce93fc51f5ba0d04d9 +oid sha256:f10a4f434070d819b5a62dd0acc6bf72d9173c6e76a9cf1ee2313b048cd3f306 size 1362 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt index 92221263..4d2f3d56 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4cd72bf090d57db276cac363b62b8c57c68fad99695bf4b82a48d9bb8b2bcdcc +oid sha256:2c29f0b4948d7ba2b28a4723aec0db31b00a8b4cec1e2a6fe16e653f947df517 size 3272 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt index 28e1375c..670f6941 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17a0ea7f3a651c0b5eda06788232ac165fe092e5cf7c1206a7106b942232dfa8 -size 4644 +oid sha256:5c287ee671a3b77f4883323d3e873a438314391a87101e8b9b5f10eed1b85a76 +size 4660 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt index 6fab6c9b..f897e151 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f635ca4e0bbba90637618a0e25269237da5f3de6ef54f62b6d3f76def40e1fe1 +oid sha256:596271e8dd0a4341f82ee3d8a7077eb564c0a192dddf4dc9f42247c2bba64443 size 2912 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt index 231228b7..f0a9e4b0 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a4f85020029993e6bc8507eb2cb15b6ee6005645e55e799177c29d9e9e43a0e +oid sha256:8a4593d668533a7b300607cf64bac9d22dd330bf8c6bd4d22136306b60f704ad size 4248 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt index 114bfd03..908701c1 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8b4af1462f5d6a837714b2f320a422d8cab271704a038b6f38904ff247768da -size 2541 +oid sha256:46a818ddc4021431bd9023e8211165678d8bc5801cb721609c202b26e9f3deb9 +size 2542 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt index 00d5024c..95047a8d 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d959c3fd4cfb4c00d86b66c4db9565344234f3c7f0e76cd87e4bea5d9d6631e +oid sha256:38de99e1435aa614cc767a7c036e6bc8dba6e9cbdfc6eab9b1ab0b6aba1ee81c size 3919 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt index 0754570e..7beb7510 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46a6b8b5915d988ea86b0ae228a35d777de0847636c476247a59100fcc4cb7d0 -size 2598 +oid sha256:d357141658438201edd6b443d8dab9c81488186fa6879be0085f3f25efba80ab +size 2599 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt index 16cca1dc..bf816f7f 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab4486b11c586ad2f16c69dddeff550972602a1d930ddfcbab021e465ac9a73d -size 2924 +oid sha256:5ff6e832c041827f52d0d637d5194c3fffb60b8d064e2c9526ba2fa163aeb016 +size 2925 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt index cf713c7b..b23dcb5d 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3dcbfc37b3c7a6792b14f7aea9554253bc90cf87090cdfc52821f0dacddf15ff +oid sha256:0359d6b1d29b47dafa0c92bf6b507229222f213e0df32931586ae632d900f8a7 size 1810 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt index 3674df6a..774cd3cd 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6bfce7dcb03647ac53ca039c57f39ae5884ef1d965a1d0c09aa3a8e6e779898 -size 1707 +oid sha256:35b4e9c47da99164eba45a9445aa4400d097c74e55bee6f64b0a67848d296c9e +size 1708 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt index a1e3ec2b..0c0c57dd 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa43b01d9769c678478c01344ec88a9d4693aa53b5343b6b3186b18848328b91 +oid sha256:79fcbfac449cd94031db5e675cba2120d27917955f5a46ab09e02b11a7b5d658 size 1810 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt index 98527aa7..e0d3a45d 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f24ab9470433ce7258234e4bf3a84129814e091bf8386739042ad20c4068fc0 +oid sha256:f6589ea31b8e1cd5bde2ef3385ef42e0595b2f11fc6cd3c06d319572f66e73b9 size 1783 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt index 4b673d71..2a917726 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a015bd278dda535bb4ccbde2f2f971616f1e0b98e4ff7244392b73706d411f32 -size 3494 +oid sha256:e6e34b78bbcfd91b12c4c87ac744640873e1c42a62fb4d58935c2ff716d6cb01 +size 3496 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt index d381e361..6a36c1e7 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4acea5de12367dd5ede54b2c6e0f71b52fec51669b69bd1d378047725109af97 +oid sha256:e2bbc62501f4b53e1ad9ca1190845d9687fa23afd020326c54f3c43f95e75b76 size 1767 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt index e487563e..cec39f83 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae2840d82c2e49c85c0f153f457a74e9f316765a74975795e46fee6d2482da82 +oid sha256:aefe9b71874a6089bc2b964ff12392624b13db3a99344f0b59657ab302ed1a73 size 2034 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt index 4c089675..ee24203d 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fd264ae4dc978f614cd2f431063a001f58d2c772ebe4f46837cdfadb60b808 +oid sha256:8ca735818d0bc2502cec6fc71c414b6a38e1da3fe9510dabbc80860210bbb800 size 2691 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt index 5f96340e..622d4efa 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce8d9350166cccd3c11219598102f388e79998e30d42b3f014f4ae6721d85e5c -size 3859 +oid sha256:468250b64c51f574ac0c0d23e4af4a8923f3d7d4ff1029353337bf5bf9ba1b00 +size 3861 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt index 8a7eea11..026f4514 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01ba5bd6e3920dc1b3e08e147ec918099e73fa469fa4d5e53bc3ca5145a5d4f1 +oid sha256:d198f622066837ba788f749b425bf0d229736e02351883bac0fea353cb39fc1b size 1188 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt index b544cf64..32a346ba 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c7b5d2a0ba8bc64fd42eaef1d2b2ff2339d704ba2035c373a0aaaf6995c858d -size 1116 +oid sha256:8382773a7bb602f329f9ac37d86959bad4f73252b2e062bec5fb56b49c0481be +size 1115 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt index d774a9b7..cec2e553 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4aed22283bcb4c95522e4d47498846fc0943710339ed1d99f5c85fbf7ac24d75 -size 357 +oid sha256:f85c9c62c73efc442fafca481fdd79c85034954e223b496149592a3adbcd8537 +size 356 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt index ab535feb..77de9c79 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cf412b4e635107d8545103fcc7409bbbcc0d2b71793c38de4acd33d20406f88 +oid sha256:d81b54138ee7164595b144bee73aee211703de0aa30fa69f613f43dcddd2fbae size 1221 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt index 2c9c86c8..d8e0b34c 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec032aa26736ea1ac7c91505f380c3fad212bb5920b7b0e4380b72ae02064c14 -size 1166 +oid sha256:ecea71f5f8136aa9e3ced670a0c6eb964f469838801ac41d4cea1b44a3096149 +size 1165 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt index 9275dd1d..5fc03e66 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f72db504ce27e6972873bf418393e0cabba12f4fb1f3a32cb833912709532a8 +oid sha256:e2eb80231eb2355ad8dc00f4e31ad73fd89b1ade898f8bbd4d386f38b975d31c size 1209 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt index 3fc74082..b46e7961 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e366fd0c7fd02b4ef4300cc42850da58f7a92e2c5d09d7f6c312a04b114bcf78 +oid sha256:e88dd2ad6310a1e381da2f655b5dc1fdb1bfbfebe426cb52fb401c59c0f0ca97 size 383 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt index 42104fae..03b50922 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8032fbcb89e62fc2c3db0c5f60f6e9375ec3c3629605087ffbb9c11055480bcb -size 415 +oid sha256:d2e93939b3a2ddde050dfa2654a4803a54f25ab37cda90480dccd525520ab551 +size 414 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt index 30aed354..f5318639 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84ba47f947c6530d4332deb9bff8e9dd7c7f804d9dfc704c12e69c7819b6103b +oid sha256:d74a98dd636a9f49a8b7beb5a04427cd50fc35e273cdff95c0cdd227c19e3392 size 476 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt index 5dd8b84c..18534b33 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c57dbc1fe4e9e8a242aa7a07d384027f2a1f6bf68a2c98821ca95638b3c66a41 -size 1137 +oid sha256:d0205d49e6003eca432fe59302b662e4bf40af3e5470bb01e5a716b501ab54db +size 1136 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt index 8ddda641..650b840c 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c085bd6dc9bd6e9e2786932e13d8f42cbaa489418d3f2c6f70f253fe4fdd9ed -size 1091 +oid sha256:0eba4508e80e29e1ed7e2144c2ed1342ec89b2d7790003423d8b692ee1ebf461 +size 1090 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt index 42cdf78c..87985e81 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:677ecb33d46d32e5640d1f21847acae245e3a681279c376f61c4ae6aa76751b2 +oid sha256:c136c6bac24377cbe4bd02b831e25341f7fbf8c9aa7b5e60255d9e07dfbb2ce6 size 783 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt index b6f016f2..10086e9a 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13b0e1555ab079cc31a390ac79107657abfeb69368099d1148b95d748704f769 +oid sha256:ec3e88ac9a2574ba21f2545836fa40a9a1f0ca1251bbc549c4b87d2f54654ac1 size 640 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt index 20c87609..a57d3abe 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5529314ebcd18eadfdd83704d2c72113bfdb464e2ce1a487e1e46fcdf951cf48 -size 1334 +oid sha256:b73e0d93bfe1184b2ba37958df84138dcba3abb8b9942499444738349a7f1a6c +size 1335 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt index e0729a92..ae261b08 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b69c7de84434e1affabc39b4ebc96afc65dac6c4e20b0746215c6e616c40cd21 +oid sha256:d2cb5e1bd0371b72d44f2dda92abdf23ee255ecfedac89ecc5a6f564510afba1 size 1709 diff --git a/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt index 9a7d8979..f9912e04 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37fcb421a006aeffc0ce2d38240d8ea6394e7d7dd2a43fd9ef2f57f6561387a3 +oid sha256:403a7197296924b5e0a5abdee6861464f3fb65489559eaababbf522b37ee720b size 795 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt index 87ee3552..4c953556 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8366aaff51bb87350bbf9d962d8a16d8329d07d8f8d11b9e055cc3e8a5ac69fe +oid sha256:c4576dfaaaa827f7a91b6ec548e2aa154b9727d6b5b1aa0cdd5fe04ffc9e4f87 size 933 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt index 7ccf47d0..4cb32e97 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63ae352b6df9e4847c9a4d29f21da3e110fac8eaca31a32384669ec4bfb28378 +oid sha256:c92bf3c1392a456cff698067907f25d3b3a7988afc9fe1aee8c73c7015664556 size 994 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt index 32985caa..af998062 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68cb8404438239a596947503a2d8ebd6e451b229e5dac5b732486647c56f5257 +oid sha256:259b37c0c7abe105e8875bcbdb67321d2acfc7e850f9cfe4307023c64b4377db size 2485 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt index c00598f7..adbf0fd1 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5af6d20750f6498fa21fd882c7cb5d125c73ad87f84b57f0a9b861fbcf8aa38 -size 1528 +oid sha256:2b8457352b053ea8704c7e385a85858605d706e70489e74d69fd77314f51d365 +size 1527 diff --git a/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt index 9d0caabc..967e4096 100644 --- a/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e71cbd6eb143c5735c16bb8b60de1c74839a88c52e77d90ca23bc774b448bfa -size 755 +oid sha256:881a4402706e3ecff7d926f112b71ec6b15b353b575e6f75344a9540bd3cd2cc +size 721 diff --git a/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt index 586926c6..429b9750 100644 --- a/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ea66e508a59b25877f38984724608244cbf18d0c43453d34aef491f8681a522 -size 755 +oid sha256:b97090541ba589c52244497a70c15bb2e33f9b53ba4050f08314a59d9c72c0e6 +size 721 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt index 3a9491ed..3c8fceeb 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0ad337a1cb292f975afc81b548c414d4a101fae0bc74149b3f0c450c730e612 +oid sha256:bb9499026180ed92795c5ee2f0cb6640a6becc1d99066284bd6c06e6f12bb7f8 size 1861 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt index d39787e7..03a63b8e 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63be1f6923c39e6ccb4d03c501de885241097164f39d4380106784e0d4a810e1 -size 3473 +oid sha256:d2b51cf43a8b69bc61e2cfd72ec5bbf679e00fdf0cb6acd814c5fc93da3d9575 +size 3474 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt index 8276993c..c82180af 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc2ebe8ef9ced8b5e2a5124ca07eefbf783bfa5afd713c70b50c70c7f38ba97d +oid sha256:b3f4cd4b3cdc4086133c95acacec5a61b839f0e3f510b557e857f4724a7eaec4 size 1660 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt index b867fce6..936da76c 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:142b25fb1d5a80a1918aea6d2770299a9dcdeee7c4c8d1f8dad0e51332edba3c -size 1706 +oid sha256:407eb9ac86a75580a3be143e6492e0339d45923cd5f7d97311c83792501238a0 +size 1723 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt index 10cf26e6..ad954ba9 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cf4b588c66deb0d31bb3c0e2cf3d08811abb2d8def5fc711fd1683f15271224 -size 3922 +oid sha256:88fa938d258b745ea71080d667aa24f5ed0900b98680d1acfb4bb3e1c8e2a4b9 +size 3939 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt index 26cc3d49..3630d4cf 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f52a26d0ff538f130c9a51e95a5c7f0c9567dcf92af7c76f788827627aaa4779 -size 2068 +oid sha256:f4a46829910ea769b6a328aca392375ded57b0465e7ad9c9c6473ad73b4d470f +size 2087 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt index 2f1f5160..5c4e3182 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56e60f63661a0d8517006b03ced2f86957a663cddb1d46424b6aa7529b375fd4 -size 2644 +oid sha256:d5c8938fdff69e079e045baa856d970b0897beb7a97fc5ab078084c071e37e29 +size 2645 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt index f802d6de..3dc6047f 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:554c15e17438afd491ab92eb516c3d0ff2b86bdc946965dde1fc3c985030fc3c -size 3180 +oid sha256:7e73cbe2f0b220bf76b285eaf6cd5802a3bf824761504c68afff8e8ad2a342e3 +size 3181 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt index 985966d0..9042ba4e 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f73251f2b626363c01929ecf659c36b693a331baa6743c781eb9f31f762101a2 +oid sha256:2319391cee7d7df40443d31f652bdf0ee94a57463ac13ccb90dc6499b1ea389e size 3036 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt index 64e1e162..3c7fc3e8 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e28b93ce5df13dd9263ea742d4bcc8bb087186b32b68b07a16b31da8fa3b8c4 -size 1245 +oid sha256:0e493eabef899d8cab64339452f17be0bea0c8a6c5abdc51f91e70cfad4d2a8b +size 1246 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt index f5d58fdd..edea3275 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a2e980c6f1f449d1934c46541914dfba841312fc2df8ba93abf4bf1aeed0aaa +oid sha256:7f95c22eba63f09f1e5388ad1e453f4b93315819a641eebcd40032b7675e097e size 2153 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt index 522a8fba..9fdc0fd1 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9bb502d0bf2e1dad7b36c48beba418a5ce7001af770afc143f403a3c9bde460 +oid sha256:91e5d48cd185ee9160a2efd5fc1418893f8164b012c5704ea3c8eca8e92012d2 size 2770 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt index d514f4a4..b0ed0345 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6945fd3b4d8d9af59ef58dfae72fbbd012a5ed8cf32ed1e0f130cbd12b9bca9e +oid sha256:3ed925df89cad8c80bea32672be74256d1c6131e797b8e35951d0e8464f42acb size 2520 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt index bae2e521..d4a1a622 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:462d22ab8568d0c76fefe3ff3c18fb4a3d9eb682e08c48978e9000068e256387 +oid sha256:e563781338bfd01a534595218a064ad51409d0210b99de8a0a24d4c1ac283c4d size 3642 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt index 9714985b..895b8b10 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68bd758666579dcdfc8a7f80fce219f04993c7db2c7a474f2006893756d153b2 +oid sha256:f525281463cee9dd1889c6531580de1abb14e14538c869e96be4718ddf5794d6 size 1859 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt index 1e95415d..822672a6 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:334ef13bafd270fd5d325b94fad1d21c1e0498356cc706504deb0c99f19224d4 +oid sha256:12d1589606601bff3ab92ab5ae6c3996719378e5265fc7adb613662a123a3f11 size 6327 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt index 5458722a..4cd33914 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d09251a855daaf1c101e24dac3b9241e6c27259290388a3eeb8423c7b4d5c6c +oid sha256:67a7e44b957c443c5715b6424092ad6dff7f014cd08e0f84d2dcefae24a243e2 size 1138 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt index 5091197b..258141b5 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e10811f4639e517807867bf5428bbf4372c802a11a97d40e583b16a92084abbc +oid sha256:70be429e5426208b5955213d41bda35531a4d799df17f61641deffe8efeed269 size 1851 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt index a24ce10d..83ca0a91 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ee7b778572184b989476fa0394ffbfae05d96c423bc97db5ef69ddfd6c6c518 +oid sha256:8a98e1af5454fa54a228dab41b839261decddc2f9952d0d36e74a6e3797812e5 size 1860 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt index 706441a5..1d539eee 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:611c9ba94295e1e34053bfae7392797c14a26f673fae3e439fc2fa407bfba936 +oid sha256:b85f926bf316fe1b678411c27cfab57e755b5145d15c0ff0821de96667190b79 size 1812 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt index 40bfde83..6383d3a2 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77e722219280294336a208bcfeef8d531220eb874c143082993f4cf0b57ed98b -size 2707 +oid sha256:11741df756defd3237df20f6281c984d493e00268ddc6d0f36727f6a7a64ed34 +size 2708 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt index 23219fd3..eaf45c91 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b804264189bb88f5de7ef4d3da6880d32616b114f02b342d1420601635f96cf6 +oid sha256:b2d8b532189ebcc2ac14bfff4a9c5f2856f2414c726705c7b751ee765e26ffcb size 2374 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt index e9121ab1..102c7fb8 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a39655cda8edf9ad699f69ff808e8e7a791563248be141744efdb5a2419fac5 +oid sha256:7baec6886bdcf2dd50962c4f6f4f9dc5691c5c0357931523cf1c5bd39d941bc8 size 1786 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt index 751aa8bb..0853f3f1 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2590505da90431cedf361bf2abf894a5fc054ede666a45cb80e27522539af466 +oid sha256:8fb8b9558c2d831865be58319c448703dbf5b50d7febcd920f68eb90e694a9f7 size 1883 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt index 964ce2cd..0da1cb48 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:926afbc3fc8fc907a690e146a152c2be6fd7dfc192dcb47f0c04b3d9ab3287f4 +oid sha256:ecc77f9dd1d7876d3c2fcc8536f845c2e3c30a333d89efe3b56bf450fb4b4c0e size 1546 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt index 7fc543ca..cad20394 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0141c393963a6d72a59c2ab4a7521eef007d4ab71a9943a739af5f259ca7b5e +oid sha256:0134456d6beaeb6fd98bb3655a654ba5c9d6fa1e4c123a4cab0ad6b179de2aec size 2132 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt index 7f3d6211..9cf11881 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ad05a36946686ca39f483fd014307c7cf6b89dff12851cfcb24ead349d0495 +oid sha256:3595222c73adab13b78aa1f78c61e2a293e62c1b6f48fd53335527b14f5f8158 size 3629 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt index bea02215..869c9cc9 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b51ac7fb049fabf822f49c3f196d7a7c4a05ee4fd92717d703645df5f4205e9 +oid sha256:9504989164f4a928f094c7d4016ade58a6455cdae84fd851e59ad08454d24984 size 2026 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt index bc5875bb..2a2c5fc2 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea94b23e42cd25f00beb179d05c6364da429953883980c836e5e51548d380d2f -size 2461 +oid sha256:c08a9b2b486d765317e78e4634aa1c067af2e47f53024d4404647ed44fe5c829 +size 2462 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt index 172e5dc1..421f560e 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef4253e2827c07321ca8ae1195e5866226abffaa728982434e1b067770747546 +oid sha256:f386433e63f3b41c2b5992c14d63b3c6d475ea9c28d71e244f0f44052c5560a0 size 2079 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt index 6b9fc6a2..750f123c 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d5cde489b76d55151b86855d45895f1c692be335abd23c865c4e5e5f71d1451 -size 2199 +oid sha256:b57a07e40f551edf8e640eec615378fea479cf1b726026e6917c5276c4aa8569 +size 2200 diff --git a/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt b/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt index 82d58439..eb6dac60 100644 --- a/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt +++ b/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:706f09f338ec1f9ef91026816ae6236c1ac1ed5906fb87297bf151feceda71a0 +oid sha256:7c0ea2b1a7269f87df17a32af548ebea9414fd507e4bfc1ca60b416eeec6c855 size 284 diff --git a/data/minecraft/structure/village/savanna/streets/corner_01.nbt b/data/minecraft/structure/village/savanna/streets/corner_01.nbt index 648d8794..fa0b5f10 100644 --- a/data/minecraft/structure/village/savanna/streets/corner_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78e1e188bc4c82933920ca9077836fb90df808ef574749138a27ba6b91a99777 +oid sha256:4d41a385841575f6d7f5d99e78787b5ddc78b8b6ca2eb53694930368235384e4 size 1198 diff --git a/data/minecraft/structure/village/savanna/streets/corner_03.nbt b/data/minecraft/structure/village/savanna/streets/corner_03.nbt index d1495bcb..d89cd751 100644 --- a/data/minecraft/structure/village/savanna/streets/corner_03.nbt +++ b/data/minecraft/structure/village/savanna/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ac7ca47515fd51e9ebf9291d3129dee00b87813f072653949a7d7f2b569f8af -size 352 +oid sha256:7b2f04d4d7e916ad8e2a394a80c3602dd26e3386d21cfca6199819c6507dc2c2 +size 351 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt index aeaac5d5..9b106daa 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c24c679c48af59f629d3a1d2b23baf129af73bb0206404ef910ddba594e18e39 -size 628 +oid sha256:2cf70ae5dfb9713c7ba22836a00aeda893b3579c1a2a73068375d24003aa41ef +size 627 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt index 7b2ba786..ee15b52a 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f7c599b8602cdc7a78efae9a031fc43f6e9f246b5dfb3ec9e247185b007db65 -size 1227 +oid sha256:e3af98a97aef7dcdafffef73a2e0038555d7afe44541e3408638915aebe9549c +size 1226 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt index 9b991301..d649f52a 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f2347f4aee6ddc4e8c29ebae841e6b0679640061128b14ca1f435fc17e913d +oid sha256:aa0a95ae9b62afe58db53faf855b275d6b0cab684b23ba3d5f2c7987be2474fa size 380 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt index 844cd31c..a28a6418 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fa4d1a1a6e8cdf5722b19483603804f028d1cb2be7d8f9348f169a4153c91a -size 411 +oid sha256:c6a535f0a9a6506caa4c03a5461ff06652b74a869ed8d4058b91d72e2e1c947c +size 410 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt index 9157bdcf..0bd7174a 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea123af2e9f8c8ce8d8937b74bc4f9b92247df4d3d49394c58fa5ae1cb1af221 +oid sha256:852dbd434815650f5648dcbeb18380bcf0aafeb2bf3c8fd6050aa206477237f9 size 468 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt index d54dcf06..5b22ba93 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c2e2ceb32f708b6e903017ebc7ed5888888a41f78cc90c7f5980f8ab558974c +oid sha256:7239996ad4cea7dd27e4fa7c534faade0161db5079e228c3660533cc2a8f24fc size 1382 diff --git a/data/minecraft/structure/village/savanna/streets/split_01.nbt b/data/minecraft/structure/village/savanna/streets/split_01.nbt index ab9d32e1..9aee9474 100644 --- a/data/minecraft/structure/village/savanna/streets/split_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/split_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a8b5571e4a5cace831049f78ae0312e2aa6a7ac4ae456cd846b25dfcdba42e0 +oid sha256:90018ce795f41955da9850533f206688289abd1067eaca57525dc11e519aba08 size 525 diff --git a/data/minecraft/structure/village/savanna/streets/split_02.nbt b/data/minecraft/structure/village/savanna/streets/split_02.nbt index 82e93ddd..c0401041 100644 --- a/data/minecraft/structure/village/savanna/streets/split_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/split_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55569b25b03845d31fb282eca47b560c0e5d72096649d06936e49f9ede9d3a76 +oid sha256:8367f5ea8edc3febbe35487f8d08484ad87197de0d1a9a13734c35ebf58c6313 size 737 diff --git a/data/minecraft/structure/village/savanna/streets/straight_02.nbt b/data/minecraft/structure/village/savanna/streets/straight_02.nbt index 09610aee..97aa69e6 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cc2461c85a73aa219eb3866f2947bcef4b98fa60575559d2932978e4d148955 +oid sha256:b55eab053c6b8bf188d3faa0ae7fe0e2efbfaaeded02b19314e9c906c21196d4 size 1125 diff --git a/data/minecraft/structure/village/savanna/streets/straight_04.nbt b/data/minecraft/structure/village/savanna/streets/straight_04.nbt index db91d745..b5a40f97 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_04.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97c138b267b293b5a3d3b0737399f6f1ec1514f8b00e7def0c91dd21cc98f1f6 +oid sha256:1ab61a4b90de5bf9a861d5e0dc44b97eb035faab013a61d0dc2c0b96f9c6faaf size 641 diff --git a/data/minecraft/structure/village/savanna/streets/straight_05.nbt b/data/minecraft/structure/village/savanna/streets/straight_05.nbt index 453c86ad..3ac32ab7 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_05.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52a33200929a76035d5e3a2ffb140b829826bbde2c890c15cfd6a14f7e8c184b +oid sha256:1e127aa310aba0e4821cc10a365178e924659a2598e6fb4acac64a34f059b08f size 1931 diff --git a/data/minecraft/structure/village/savanna/streets/straight_06.nbt b/data/minecraft/structure/village/savanna/streets/straight_06.nbt index da1b833d..15678bb0 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_06.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6afa6eb4989b7c94d50921204836b113333f9b928eec08ac2a9c4febb70418d7 +oid sha256:35587d2b9da5b325c46df0429fa9e3288c8d85f0edc5f0e69a0f73ad76698de6 size 1088 diff --git a/data/minecraft/structure/village/savanna/streets/straight_08.nbt b/data/minecraft/structure/village/savanna/streets/straight_08.nbt index 260dac61..bbbc1bb3 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_08.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1090098ae8d6b2ee25f6454bc69a66e846e4c034a89f3c83cc5a826627000dd +oid sha256:fbb646c3636c4dd9722b11310a2f77b09ce6d586cac17d5eda1d40a2e3ccd8c1 size 940 diff --git a/data/minecraft/structure/village/savanna/streets/straight_09.nbt b/data/minecraft/structure/village/savanna/streets/straight_09.nbt index 82aab733..f20fdafc 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_09.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_09.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c2b849c1251812eb01705e7b922ae0c3b09217513c60d4621431ee71a68fda3 +oid sha256:dc6e623be9a695c672924b90b3c41c10302fa55eea1502311ef4a626e270e41a size 1523 diff --git a/data/minecraft/structure/village/savanna/streets/straight_10.nbt b/data/minecraft/structure/village/savanna/streets/straight_10.nbt index d1ae6003..4cb49415 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_10.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:541474ae86ef535febc67b0ac7ac85eb4006655499776ac63c54da0ab6c4c8de +oid sha256:8d63381a9f3f15b9228a93c58da369027607839f614a396ac40cd7df53e18af2 size 524 diff --git a/data/minecraft/structure/village/savanna/streets/straight_11.nbt b/data/minecraft/structure/village/savanna/streets/straight_11.nbt index 82292c19..a08e8ced 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_11.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:175d421f7b74289c37343db9bcd285cc85446288c704f9cc021960eb40b1f662 +oid sha256:878d68687bc6e191614fa44dab2652a89fb31682d233fe3453f554c617cc73f4 size 1561 diff --git a/data/minecraft/structure/village/savanna/streets/turn_01.nbt b/data/minecraft/structure/village/savanna/streets/turn_01.nbt index 7b09208c..9c7dfdb3 100644 --- a/data/minecraft/structure/village/savanna/streets/turn_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ce1e5e4087c180952a7f2df92cd57736d58493fef8b992d9693bb792942d233 +oid sha256:a4d1e5bb6758db3aa351d099bd419b420424b59e0b3e5ae0d380ab1d3e7d4b01 size 1159 diff --git a/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt b/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt index aedc5069..b3c150b7 100644 --- a/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt +++ b/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28e406f0da73ae76f9e92c2692e7801bfadbb3728627882ecf64bdc76e99539c -size 1191 +oid sha256:2b9c697bf2a5a9a174a0b6315b616e5f5ea6cfd0f17176ecc4e485a468c91e9c +size 1190 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt index 6c5ea384..111f803d 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6164c4390471727f0a3368691fc67d02bb167399da9b529aa8e3fd858012038b +oid sha256:9e2348d5dbcf52f48db98e5fa2b38be3b67bb582dcffb974e285f21e5b6393dc size 3287 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt index d948c838..25f37138 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a262e1373286b070bc45ae2e426986949dbfabb62d21184265ea94eacd35d7f6 +oid sha256:8628f5c3347c83c8c908d944857d6fc795e59c4e0a2d9cea2459aac1ee6b2b18 size 1119 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt index ec1d63bc..9f05558a 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d233742739c65db2784b5bf3e4139c767f0e810961f232df8c3e734aa11da1bf +oid sha256:2246bdfd4e8f9cfc097e58395b8edba3133d7e73bc5518bf343e5e4989da1f5e size 981 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt index 94eb7806..b72a6900 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:345d89699572b6814a4c96321c3d1e9cdbe933edda6b330b2311ab6ad3322933 +oid sha256:d06594af96aef079e06e4ac5667f10072595fa02261fd7bd9e3d442942d19098 size 1187 diff --git a/data/minecraft/structure/village/savanna/villagers/baby.nbt b/data/minecraft/structure/village/savanna/villagers/baby.nbt index 12ff3848..53611a39 100644 --- a/data/minecraft/structure/village/savanna/villagers/baby.nbt +++ b/data/minecraft/structure/village/savanna/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9825050ac92a7464a8cba7bf3e4d60fe5e9b9c5a33e5c053cf2c765b4ff281a4 -size 752 +oid sha256:465fa4d753bc13719fce28f065c6c4afb9c3f8e70c0c5dbf53648ab104813acd +size 722 diff --git a/data/minecraft/structure/village/savanna/villagers/nitwit.nbt b/data/minecraft/structure/village/savanna/villagers/nitwit.nbt index 818b52fa..d92f56f3 100644 --- a/data/minecraft/structure/village/savanna/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/savanna/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a94e63aaf97cb039108e90edf58a84c26427708895816f2be1e686949ec9193d -size 751 +oid sha256:7266f88e934fdfed15037728b17f2360b049e07f3078f1008945c8995e1f61f1 +size 718 diff --git a/data/minecraft/structure/village/savanna/villagers/unemployed.nbt b/data/minecraft/structure/village/savanna/villagers/unemployed.nbt index ddf7b90b..5e4e26c3 100644 --- a/data/minecraft/structure/village/savanna/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/savanna/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6da3825c339c8f76748c16873d3b145dd171f10b168ee41728b32a85ced981ba -size 750 +oid sha256:8d39d183a08522d626eecc6e1d9114e0aa6978c996a149d017caa9533e266aac +size 717 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt index 5cd839d8..0f874451 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbf7cec33e85d6fc3b3353b785b30c072dde4bb996eb196504762f31aee192a3 -size 3481 +oid sha256:6a04726bbf226998145a88929c50ca4e6871ed19baff16cb0d7a214ef1ac7803 +size 3482 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt index fe1d0760..f17f62fe 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0adce5cb570bb68ebcdb4eb2747281c014a5504dd6d81f79de94b89b0dadb849 +oid sha256:94dc062d5d5605a303acab91f5539b465d31684632237b2bf45f783fe346aca6 size 1666 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt index bfa9f49b..d5ac98d4 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c758c887bf0f8e48b76c6ebceab9331c58f0a5599e866d34c05d9660cda9a6b0 +oid sha256:e1040e0a0df8d69bbfaf150bd70f9f43fe6de295dbb37c653559c961c614818e size 2162 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt index a9c02460..8b8fdce6 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f511e47931adcae254a418a13b53925ebfd260158093d8b3de379f17d5b65ccd -size 3645 +oid sha256:a446acae6343acf22b6f3d2e088c94d1860c33e6197056ce9d7939c1318ebe06 +size 3646 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt index da69a401..cd2c2028 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98494c035c348eb4d114d4e6b6567b10e2609007c599dbf7087102f7ad35490c +oid sha256:8d230c4b750f029ee6d090d4b3a33034722b06a68a45bf78d1530214ace46df3 size 1866 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt index f9fb58ea..9755a6a5 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:814b61e5ff11a1e42073fecf422eab68f2ec9a2f8fe00e534cfdaa6c26db094e +oid sha256:d0cd759873244d414403d5b96fb6cef73bf75af29acf2096ee009f2765e83e05 size 1880 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt index 66bb97ad..06511002 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a41ad602a66f7e5ec0fb79cf613d1398f9101fb5d814cf641e62dfe47eaec93d +oid sha256:02ef7c186a2b4bccb9be8007e05f153065007313c9ed957ff04541e96ac20494 size 1877 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt index 66cf76ff..9774b7ed 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b7a842475f7d10e52a192ba4ba12ec4e2c3f0fe55945ee63404b695eb144927 +oid sha256:aee26b94663a803bdbdedf834e6e76aae03c61cbf8469365a5378506b21752b7 size 1829 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt index 0a8da6e4..34371cd5 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925733470cf77d10ac48fee3079fc5078ee160bdb98c00ff5f5c35c93c2176a9 +oid sha256:395272ebdd88c24167d96ceafab724ca36d882cf2521ec887b37af9c48203f0a size 2710 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt index 59cd4304..08c8d943 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d0648364639516f167d62ca35da85b873c25d0832021e3d2ac20398f88fb9fb +oid sha256:d8b7949481a57cb186a969777ac6d2818ba14d5a3d0175c1bc1dff6aaa821880 size 2395 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt index 853c2fdf..291d2310 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef78adda83ccff6016f83d3572f072e96fcead381300d5b994e73563b4dffb05 +oid sha256:f1152a45caf032700acb2899323c0549cb77b024d8573be5155f836dfea39585 size 1793 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt index 5e5060df..2d6ad302 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cd3be418eeb6ef06ebd4389c4607466317003dc351d083ddbee4346a6abb034 +oid sha256:5e6071f9a93ee0730d122ce9216965262489794e4450fbd827c651243aace78e size 1909 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt index 96387759..7595e5c2 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44b9eedab2e555be4ae2549d7ce9593ce09db473824c17f95f208adeaae1f6b5 +oid sha256:8f22dca8304008c0a3f22724584b80a5980c16dc333bc96b84870b9084b539be size 1552 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt index f8ebc0cf..e7905dad 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cb3e32f7e09bc67749b1d5650faedccf8877b586cad93c44cb3d2dcdf1d59e2 +oid sha256:e62997eee162802e627cbffe28657f1b789c5d9d45f115682e21258dc1b561d2 size 1204 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt index 7ccb8839..45827fbb 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9643e85ae60f06afffe100a70500fed9e1eddd6144e4964d1cd978749dcd2157 -size 357 +oid sha256:0e0b9ac89a85fc09d68342a09212963f8b7955a12f48339a94cc0a3028cd07d7 +size 358 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt index 3a548396..b728569c 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e990e60af33e07ab69767f4509e943f7bcdf891ac0a223070361e14dcdb8eeb +oid sha256:0c55d27d35653b2cba4fde74272ead32ae51857328d848549d003eb59a8ac4f4 size 632 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt index 603fbcd6..ec325901 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a36f2f331ab3e050b6f502f4c03de8e903702548a9f389b20a8622673e9d9e7 -size 1231 +oid sha256:f0ed699439f9e7c6101f13ba80949dafc7dedde01110d400fe13634f60c2326e +size 1230 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt index b156168a..c43812d3 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a3736190a189fab68857f98ddaeca18a346505559c7f3fb30c74b634b11fb8f -size 384 +oid sha256:829d4e4ad354a6c80beaf4e7064b328baea7efd65f4a2b6d3ec2c20e9d26e0f6 +size 385 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt index 26862b4f..cbf1667b 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0dd37e551f074821db95dd0f2cd91393ff3b6a0218534a68a0585424f34d6bfa +oid sha256:eed3253c7726228f6cb54d4e234b5a62635ef9ae15dbb8976bb8bc0249599066 size 416 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt index 59843529..093d2937 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce743ea18e2a0861abba7ffd5aad0c3f801c0ed69aa0933307acb2b176135d76 +oid sha256:d8de4f65422a920dd6233bc56a4f86ca36611baf3b432752cd1843623c1587f2 size 473 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt index cbc990d8..783f0b2e 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8645c0d4c9aa995305537084e436f0dd48ad734c0c30b48daba5472293827265 -size 1385 +oid sha256:1ad087704e48fe4816b0f34d513db536cb74269c66d78a1dfcabe966e4b224a7 +size 1386 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt index 89cf110d..b0bc04d0 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dafd4cab125657a6fb6a3947b4bddc38750659e3111a9cf0fae90032228ff0c -size 531 +oid sha256:fa55744503790e9c8cbbd7d44bfbd404f4f9bec2ae6a39fe4a0e33418aa1af5c +size 530 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt index 744c9706..53d1b81e 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f0a5010bdd0da85564eba1679b2acf7e4c8add42eb09b2f89b3135b1f5bcd20 -size 744 +oid sha256:b2815835532b0aca87dfcd204e85be2fefef624b939f0ecd4874b0e190755305 +size 743 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt index c9e0776e..dbcefae4 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52ff6d04c317cf645c75b8951eb193915ba8cd729f933838bef3582168b3dbcf -size 1131 +oid sha256:0460209ab678ff1bee9a987f01caff2a6035b6067d6372387504af44648b0c65 +size 1130 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt index 1ec010c3..b265b693 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da0e80068a2eccc63226728e4bcada60b26930fb457000a618518340ff3d7fdf -size 646 +oid sha256:64b740769c12d7fcc1b226fd6014ca18231b51d4b484b60c9520c455d4e62446 +size 648 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt index 041d0dbb..7c69fff1 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb42a4bf867ad920bdffc005a630606755dd2f8fca297e318764034f232685c3 +oid sha256:baa6c184575f8b1c8ddcf52fd4097401fc6f36f5600da0512683f2ec349d6ac1 size 1938 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt index 35172dc7..3de9ad81 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3466ea81c25418440786900552f07de8d9b3257e1336a73c75e6818994ca0e1 +oid sha256:953dbb21a796bd775ef5ccf82547486f3b78d251d1b43ffdad597bd7939251c5 size 1094 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt index aa165544..d0a243b0 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e63a3e6b46282d3c59209e95e6c5bc29f1d1300472527aef1fe85535dc358a7f +oid sha256:ed923567d2e652cbc89407fcf1f6a328610115fd883c05f2593435a4c7f1a3c9 size 945 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt index f9b8d79d..0aeef25f 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:856582c95ca89a20d0a28526197974aff19e374c35e4570247a2d24f7eb99eaf +oid sha256:2411d77d9bc4ab220c9621e47bad91f3824bc9a708230fd1955fb616a41d843b size 1527 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt index df91fad4..04d98983 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:724bfdce0ecd80799404b0109413e1d080776ffad5f78ac339786dc29df4a9cc +oid sha256:37f9eabc32577e5780c3b4963fac216015629f565c08f6d00dd5ac4feefd8dd5 size 530 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt index 04835362..bfa9deaf 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad27edd971edf075bdf7fbabe76ae9e7038267295a591ec7080b288baf86ba31 +oid sha256:0c49f9ac50929522b484e207d88f5930d23402f96b519d07eb3d0dffabb213c5 size 1569 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt index 3dd59663..61b7c4ce 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:626d484ae958ddf262288ecc4916b6ed339c5cbce789d3407896a7b37369884c +oid sha256:ef383f2ba16a5a45c7c635b5c14c5cf8cbbfdba9b7b73084b8f0b36c66e5c999 size 1167 diff --git a/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt b/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt index fa5ff868..ca960304 100644 --- a/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccfe5d1e1a82dbdb57225ecccaf1951170be43ab716d2ee3491c2f2554f3e8cd -size 1193 +oid sha256:c0df982a64ad5bc36709edcbff15c03549f11fab9c7749a73b447ad7a349c020 +size 1194 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt index 5c0f7970..98d3a7a0 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1636499ed0bf541f6183d6880a008764896c9939630133715e7917bdf2d8f057 +oid sha256:35db10e48e1576b3af6ce13d341726065ef8997f0924b4e9a9ca1720f6fa534d size 3185 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt index 34c110b4..f5742ffb 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:597ed883515bdf5146561d7f235aa5b3dc53d1577f4a8b0017e761a8dda4428c +oid sha256:6bffc038f1858edeff9c91875516885823d55270c687dc64bcc90ae0bdb90c3e size 2713 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt index e5f075ce..b0fc49c9 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b462fe9f448e20f5ea455e1fdf9668590482a3af58f7ed8a4c82c7688c4f2003 +oid sha256:321425685c02e7f7870ac3fe3c606a83d0f1bfb237cc3de5f0676ffc64727422 size 919 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt index 8ce0f668..94141f43 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f78e5753115b19ba68c289e440177aa96b7532bf9bdf8d784351584c6c1fc6 +oid sha256:7035ae7c494d72a9e70d4b10b11bc69674edb301bf1a2f888e1ec27f3ee13fe5 size 1146 diff --git a/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt index 17373ed9..cc3f2609 100644 --- a/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7f27c0ce8e339e6b2d36ed6c5f5490108c63658b4d243ba4db068c501976c89 -size 758 +oid sha256:c398248deb06a4df0c278dbd62dcb969016305cf67c616380b67f949657199dc +size 724 diff --git a/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt index 9ce3280d..ffa97bd1 100644 --- a/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d2700173e247cd00f53cdea2426305c47cb04be93e6ad8314abac45e7bf8f75 -size 756 +oid sha256:fe259aa946d849edd1faf9f266670d9fbf6aa66cdf286ef5a3a349a1d4b6800c +size 723 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt index b6b318af..8b9c4c71 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad23252a4c5207b15bcfe485952ca4c5b87b7f6adb2390319c6ad60eae5f4c06 +oid sha256:889cc3f301668cf3ae74237e61cb7dc76e6f48be7e17dc802239ad17417819db size 1622 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt index a22d6602..e054b1f9 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da42285c7ddf8f5577c543714641dd693763e9d8ce24f8c0de686e7a3f01de80 +oid sha256:d1b1db0477514ce5ece0e34f3bafee87a9ae6c68f7765c184c57730babedcd1a size 1262 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt index ee5fa0be..35099a02 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c7fc784f41d503fdc1afbba22b1080bf5a43190d9d951f93dbf08d0c2696c80 -size 2172 +oid sha256:99ba17a2a4cd1d1cd6b6fbf96d4be9ff5ae8b68884b7dbf4815f3d5522718c6d +size 2192 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt index 58b840b5..6d11b727 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34656879eab6c965517b2c01ca51a5b5b39db12b27ddc5e925e75cbd97ef6a99 -size 2052 +oid sha256:7e8569cf2747b328fa0487e3dde0a9c306ba10831ac87dd0e4a6f11252bbc886 +size 2070 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt index 90833062..e8c8db44 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35a990bc1930ec8ce6e6ac92e1767a277ba684ddad374235431140bb3d077eab -size 2548 +oid sha256:4df78188100afac936a549bd7bf321d6e892ec0ee029015ec40a168bd7ed13b7 +size 2568 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt index 3d8bbaeb..40b9709d 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7227d95a67c8c9505f8c0fa41f25bf91847a8816efee228ee582c795133bcc8 -size 1446 +oid sha256:33e43bff0d47c00d88ee0c35815e40b3856b8d3aede52140d7b6cf7a2233e34b +size 1463 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt index 49ec9e0c..815517cf 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5a3da406bfa2acd2bb343d35678b1b06e64e63fcd630700bfb298110be6d815 +oid sha256:205e94ae1c228e4418dd6a396dd4db6a4a10c3033ec92c211c06147ab28e81a7 size 2362 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt index 1ee93662..60de297d 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d52e350178dc443f15b6c3dcfa251b40f832929553013bf28d63dbae28685a1 +oid sha256:6ccdfa1c08f0915d07328747f8518dfcca797c42ead7763ecee418d89cf6ced8 size 1254 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt index ad4d6d92..10f8377b 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b592315705480f21cd7475336c19b42b8846572cd335b62ade35afacfbba6f27 -size 1076 +oid sha256:8cc0e511af21555f49c3e2fe89636c046b957b3a94f9383945a1e1462b1d3004 +size 1075 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt b/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt index bed4113b..87782b25 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1283a0ec170aae180cc8c7b0ef217ee43847febb5a2005cf1adaf10bffaaba33 -size 2236 +oid sha256:62df4ee3e75384ffb6c97474bb8e2423ffd83c6347906e77edb8df96fbf4d00d +size 2237 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt index d08a0fdc..886d75cd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3173c04f63fe027114292bbb44ecc66cbac3029c192e9971c9c1582e49ab5139 -size 2121 +oid sha256:2dd7f5a0dd515bad0f1805af36a14e265fcdae79f5ab647b0eb1e2756dd4851c +size 2122 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt index d5d00d98..f63c8930 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e5a7c96af3d7512dbd6cd95b4d14fd1a373d008c7408a3d54784041343181b8 +oid sha256:35e4194cb06fd84398ac9e510452d6ac054724fc3b4a7904ab714a01d12b1623 size 3447 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt index 12356be2..0da52ed6 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6057acf76c399084aec183fae41692660df1af4d80da938bee86b2955d1f69c -size 2980 +oid sha256:123d4b716d61af9f49779b8cd5b2ca6d3bf956a21164267096c31568c3f63fc9 +size 2999 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt index 6d931751..a34baae1 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b96da83f9ef15ab919e6b56d80ed48824555a4286d9bc31044f351bd44f6e76 -size 3166 +oid sha256:9bda52382419c63f656a59964128f98dc47edc95ec9923ea5d609c91df41ab8a +size 3186 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt index bbf60b43..28dd5bf0 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34c949b3b741f25a2b57ebbf1592392d5cc84397790542e37fddd1f88322eab1 +oid sha256:0f5ee3fa74ab0eb9434e4d9c7c126f78c4b2f0554d790734ecafb68d5391024a size 1595 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt index b94c5aaf..e5ed1525 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:868298b28be108c67f4e1a935e5c2437084736f44e404b218ed6b5203f9f31b7 -size 3511 +oid sha256:9ab3947582e950c02cd9c4902c0152eb38266b51989738b241a6bfb14dcdd814 +size 3532 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt index ecc31ece..0d70b560 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac3b162dfe2de736d12a9fb9c6d7fc97239f60be309d4264436d4b6be0468615 -size 1189 +oid sha256:b5791986573526860dbc2402b454f59da0963ec28eb50db10051a56f9ff979b2 +size 1206 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt index 07754ee1..e56e2d55 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79364888344951a70fe4861a94cfa8740f246dad0b0b4fa85a49d16e7a29a037 -size 2167 +oid sha256:b4ab16f4afa644888f792be165f791090585208a958adf08f9034bff4a0ab316 +size 2168 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt index 691c100e..e6bd59dd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3339eebfce39168ae582f6573ddf45107f18b2ce01800a9439b42f889b653cc1 +oid sha256:86ec5f10d87ca7d1747d77c916b50ca5894b5f61b7025caeab2cd1367acbf1ce size 1318 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt index bac00356..6d632816 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f96a7f9ff9db90d708993fa68f63d6c35776913d2d2120bbce8103f5979a0399 -size 2100 +oid sha256:0c15108c9b3fb3e094ea49e3328b6afcf39e860d74aa9d92da364b861dd9e1a1 +size 2123 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt index 2a9d7232..a5882254 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ef06b099a3b90bc86792053f43ceacacc567d054ac94060c450b86d826ca8de -size 1738 +oid sha256:317960e24cd3cf70ce5f4bad1dbfbe689578787e2dbafbdeaf674df7dc8f969a +size 1757 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt index db018ea0..9f34d66c 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf742a0337473d282ee4a70ae3860c0c307415e2cb34d5cac0c89f111af4404e -size 1586 +oid sha256:5599cd514d10ae97a05ca0f2c6fde0ed8830d92404def616f67309ed35300a55 +size 1602 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt index 9dee0fa5..a7a5159f 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2e07129854a4d284a735da25d1f1f5d3274b8d8a86841d2a72c05e51157b2c0 +oid sha256:0407d5821085e958ccae536a8856be87adca8234ab70e933a58171e9239df6fe size 1141 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt index deeb16de..0f7eb51d 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3df9fb0ad74631c02efa1f0c8caaee5470f436d30665c369b1485a05810c72d -size 2198 +oid sha256:1c1f5cb7cbfcd01de9cc7ce310d95725b256b089314ffec8a27e2b7e65f8e380 +size 2216 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt index 9b25e480..d3888d49 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6268bcc456cca495216b8bb2ec8a9cae8c700b9a8b3d5b3623059544ff4cc663 +oid sha256:02a9ee2aae7dd712d313ceecb6d5368283e6815564d79996129117cabcd3198e size 1619 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt index 586acd31..0ff7b631 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c9e654969daa241f4c32de4bebac99bffe7d90e20c6213913afca7436875dba +oid sha256:12a230ec5c66ea6da785bdf378e978637beca05e1d816e18c9448bd180b51cd7 size 1021 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt index 7d22649d..d3caffa9 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d464b230fd6decf0b5ae5989c54b56aa8eda22740c2fddb0b0b7448de7917748 -size 2956 +oid sha256:ec9c3b45af8702b4bfff89faa6d43fe04cdd5733062aa090b5e67443be8faed9 +size 2975 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt index 4ad56561..6b6d3bbf 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54cbe0b0823f126fef1b1a2c2da2d159733a4e0292dc17ae4d3ffb13978e3278 +oid sha256:728d8b8801c523b1bae0065e9fc41a6a20e6ffd91c063b3ddd9e91026d3c2fbc size 3574 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt index 53b4a3f0..fd38a1fd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bd84e2a28ba765a786daf64ed2c7509cc337b7ffb7d80fc156f37295265e727 +oid sha256:f87aaa7e44ef0b5a5c5788866632a072a75a023b44b0f85cb9ea7dde698c5aba size 1915 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt index d59b498b..c305b865 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:231d642dae849d30cac0b2a3527c0279d6f44d6de55f11994e9c03b8fe31c00c +oid sha256:548076e7e2f9a21a307fdcc1d4e85178b1bf50b394874c12a9de9a777df7250e size 2757 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt index 2dced28b..31488879 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3153cab3ce3c6bf4908fd30f939a3f7007a18ae64650d09d6f92b4c8f5c7514 +oid sha256:7610f9abae41baeed9609642f71d711f530ecd12eb1abc6291e9dfd4c05e20c3 size 380 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt index c3016553..7176e26b 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c293433294bf01d4fde845c1745aa4ee475761894bb220470d2281bb8ac37fc +oid sha256:80e59bb6c4e6544d1f8f2c0f048537388440f56ca4bfd657155dbdf9f345d72d size 357 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt index ea90388a..14f78e56 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fdf1ec3c188289198ef37bdda308af1d492e560fef77be09b6539c5a51e3379 +oid sha256:4e5fa3ed908359b2d97242b2af77d2152abefdaf68eb819c246ad2d6a6e7b5cd size 504 diff --git a/data/minecraft/structure/village/snowy/streets/corner_01.nbt b/data/minecraft/structure/village/snowy/streets/corner_01.nbt index 805a8977..ba813243 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b94fbdadd3294956220932ea70f551f991a6df456d04307a19ad1664d986cde8 -size 1098 +oid sha256:eae12cd8878b53ce079e77cbe91fd3d75920b2d236f6e874ab44e4290164d0ce +size 1097 diff --git a/data/minecraft/structure/village/snowy/streets/corner_02.nbt b/data/minecraft/structure/village/snowy/streets/corner_02.nbt index 470d2b6d..df5c03fd 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd0183f117ccf684fb05fdd01146da5b2a16e13da5833eb8d38ff3a042982328 +oid sha256:fe41db9049eacfbe82907b941bba811899217879eff9b1f8e617004689897e58 size 1809 diff --git a/data/minecraft/structure/village/snowy/streets/corner_03.nbt b/data/minecraft/structure/village/snowy/streets/corner_03.nbt index aa4f3123..2e8f414d 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc8c3f05ea3417f8874d30c9f8884054058105417e7227bb6e26dde4e5227f68 +oid sha256:142b44ac9edce32c71d12a0d18b36947ece29adc7fc77db5f06c7af912198336 size 395 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt index 76d0f9a2..9411b1e9 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36b1578eb2197d6b99095f43e92bc65a44da2aeeb32aeef9f9ba7bb7c15172d6 +oid sha256:c7e9c5148c430cf939f0da405d3c0257994ae541f5816a38ea5947c8247760eb size 1920 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt index a5a8e24d..fd060e88 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d12eba346fcc0ed34d5370ecbadceeb0b8ccb26ae54200607fe4a293996684b2 -size 1958 +oid sha256:f42959c1672ae900446384e195d90dbdeb3c2f869b44b9f671eafc4cbc8afdeb +size 1959 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt index c30f938a..9daa666f 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d6792e6d01552dfeb8270e389f50b833612b537108acbf5bea07b7b755b550e +oid sha256:b90941b1cd66facd31f81df414b318e365f8b2f6b5380bba1c582fc17c1d5e35 size 2024 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt index c1a6d194..a5703881 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddbd805cea45a6662a21a6f620279f6825ee2a34cfd116a32d41572e1a86f74a -size 432 +oid sha256:cf2d81e346c53d45f602c9a60c0a6fc8afb427d3107cf76101911f470e5ad9e3 +size 431 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt index 3fa6e39c..95630440 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5da0d8f93104867604d7b62762c32c2a2a14c18c391f7af7c1a792888510f32d +oid sha256:33f37650bd78f5c5aad0acde734312999c6bd83f18a839b22ac30eba62169880 size 474 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt index b9ee8e21..d36b6b52 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91c7eba4c197d201d9ce984374f5d99d832dd8a204cfacadebc83ffcac219b97 +oid sha256:a38fd4ce74619f104a4e484662e8195edcf8449531197323028e15890f3befa0 size 529 diff --git a/data/minecraft/structure/village/snowy/streets/square_01.nbt b/data/minecraft/structure/village/snowy/streets/square_01.nbt index b316c34f..b101ab71 100644 --- a/data/minecraft/structure/village/snowy/streets/square_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb2d1ecbbbbcc6b54e04d27c2f53c8ccf3d362b705502a75a468d1416a7ebcad +oid sha256:67f1ce60794045cc19e17b220959e3e26aacc5bf29eb5abf2d3dc1461f4b2dce size 1511 diff --git a/data/minecraft/structure/village/snowy/streets/straight_01.nbt b/data/minecraft/structure/village/snowy/streets/straight_01.nbt index 1245b597..a99ef6bf 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34f51a3366b3abdb54379024f51c6caee6989be24c77008b8be6ced1834965cd -size 1852 +oid sha256:bd87a7748dfa6809c33beae3ba6ff4422003c68bc682171f3b2f58c1b0b995df +size 1853 diff --git a/data/minecraft/structure/village/snowy/streets/straight_02.nbt b/data/minecraft/structure/village/snowy/streets/straight_02.nbt index 749846b7..6d845ee4 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2114008987ba7512bdd169b1f6f21b430c71206fefbb0d9cc8e0ba018cb31d65 -size 1775 +oid sha256:2e8150202e44a191b805b6b583777f62d2022675e1158089067a3793a465a0ef +size 1776 diff --git a/data/minecraft/structure/village/snowy/streets/straight_03.nbt b/data/minecraft/structure/village/snowy/streets/straight_03.nbt index a2c302cf..a0962e34 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf8e847f3da24e4c347f0b59fb02b4cfad990b4a858959b7a4c247e12868f5f4 +oid sha256:fc8983ed37cae678d834b8398a62f45a92ce021631dcf9288e7b04f8852f26a1 size 1220 diff --git a/data/minecraft/structure/village/snowy/streets/straight_04.nbt b/data/minecraft/structure/village/snowy/streets/straight_04.nbt index 0d34c5cc..712156e3 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_04.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5504039a0209346913db528b40ab8a022942e3e1e3440c00b9c6deb96242467 +oid sha256:bd70b4221560d38e3b06b9a2674956b44e182e45e72be2d000607e283f0ae6d5 size 710 diff --git a/data/minecraft/structure/village/snowy/streets/straight_06.nbt b/data/minecraft/structure/village/snowy/streets/straight_06.nbt index 6dd0110c..d776802d 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_06.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64b5d02af3386133a4f96bc0aee30303b61689f993ca592a868c476b17da52fb -size 2618 +oid sha256:3c3c252376e1c0dd2f691a10f1846cb11b2bfd69535e394e8d90bf4a713610c4 +size 2619 diff --git a/data/minecraft/structure/village/snowy/streets/straight_08.nbt b/data/minecraft/structure/village/snowy/streets/straight_08.nbt index 0350b9c5..0da7f212 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_08.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee1a58d06350e0d8cf1a1961760ff944a0e48cbda2a2bd0250be42b18719ca40 +oid sha256:6baed7ae7c2810dfe03049640d0f187953687bf5ad1e3a43b4e134454acaadae size 1943 diff --git a/data/minecraft/structure/village/snowy/streets/turn_01.nbt b/data/minecraft/structure/village/snowy/streets/turn_01.nbt index 46b69070..96976744 100644 --- a/data/minecraft/structure/village/snowy/streets/turn_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2df93d57f554465a5635d3153233726ee7b869ef93064d4529451370fbf923f +oid sha256:47a108e0a3b1f82496f34e76acb55c020b12982537efeb61b18fd88e76ea960c size 1234 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt index 7aa6aeca..57e81c54 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a32967ff6ca05595c6392729a1f5ba5933108ca8c0a2853d9a8673f4d66e5ae +oid sha256:ad0ebcc20bc453f03e5a898cdc6960d471a725467e6e505d830dafa2ff40b101 size 2734 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt index 8d91ed12..0903e7a6 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c80e5168685dfe4a2779e60f07e85b7f175e7dae29a2b08c884d3bf4499828a +oid sha256:b5dd557e36624e853b638132ab1ccd28cfb750289c302c0f9467748465554d09 size 1036 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt index 8a5621b1..8662d2b4 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:637d174c10d9661c21f72a3f3a84b1c97c3cd3e2ba2bf044234282c8cf226d71 +oid sha256:d6bc46e87f952dc7090c5ec404ed98658d3f4f78cbad906194f5f099e5892181 size 852 diff --git a/data/minecraft/structure/village/snowy/villagers/baby.nbt b/data/minecraft/structure/village/snowy/villagers/baby.nbt index cc239641..bf6110dc 100644 --- a/data/minecraft/structure/village/snowy/villagers/baby.nbt +++ b/data/minecraft/structure/village/snowy/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8bab00d84f4addc699abe94843344b5a6a4a8ed51845247ca04d501e5e5303a -size 749 +oid sha256:8c71a3a58b5d4db2a9a71154c8080121487ff669480ebca83fecb722769676e0 +size 718 diff --git a/data/minecraft/structure/village/snowy/villagers/nitwit.nbt b/data/minecraft/structure/village/snowy/villagers/nitwit.nbt index 524fbadb..03c84afa 100644 --- a/data/minecraft/structure/village/snowy/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/snowy/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef8f517553c3917e8cdd2ad5af94da21dff70d9f7b0431b9fd57f40f99d06eab -size 749 +oid sha256:490fb8742b929854fe7f126b31e2943b39e3caf493d6163e7d9a64189bde0c1b +size 716 diff --git a/data/minecraft/structure/village/snowy/villagers/unemployed.nbt b/data/minecraft/structure/village/snowy/villagers/unemployed.nbt index 0edae8ba..b0f4a7f2 100644 --- a/data/minecraft/structure/village/snowy/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/snowy/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5802d07fca4c0af185d3023642f3435250a82cb89472caf400316fda898cd74a -size 746 +oid sha256:b7d316571d7f5924febc3fbfc644e9d38bf000fe579eb2a740237247382ac8fa +size 713 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt index 10c8fee7..10921e2b 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f062b4272b1483365c75f6bd03dafc66215de19a51a97b8f2b797addc59f3f76 +oid sha256:fa9103006e0f3841c7c01296eb6e971279e4557b8529c443957334844a3a91e0 size 1601 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt index 62ad0e22..824a9906 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8165f2b0f6991d0635ee585eed9b2badf0c3c621b832fc050bdcb4f819a69b35 -size 3559 +oid sha256:3e6b6679c862252d4273756732ba759d948ed9956978e74975eadd81e070e651 +size 3578 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt index 9ed1c536..11a6b7f0 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5773f82030227c269a3b95e4f632c84104ef467950183f3fcb16fda3d4f8ab39 -size 1195 +oid sha256:36087303432bcb511bd5f7acd22ef4017de0e6da099ba67473e7f536330d2153 +size 1212 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt index 078e3650..63a0f38f 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f59d98cb392d950a4ad4dbd6995e6053af336412547321f70535a8f3956a1d01 +oid sha256:b3ebe5ae71a0ea71765c7a17372ddc5b0502ef313fd740c904fb91c0da5c34a1 size 1323 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt index 4176f32b..a1b89b17 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3a3aacf88ce1886305c3542cd63a04d16aba89a5b761fdf08934d33a450140e -size 2121 +oid sha256:aba472c62ca3a895f46be8fe261e890e96ab20f6225a5c26f4c3aeecba96b1fd +size 2141 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt index 3446e4bf..6fd00c29 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:976eb9916bf6edf7cd071291ca9852cccf10ec718fe1fc55e6a3eb8fef5febe8 -size 1796 +oid sha256:3ad0c1bf9f5af447be584cb142353ebe3370ef05af08c535610fb499cc767d40 +size 1813 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt index ec85cc9c..b37bfcc9 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20efe4ebbe8c471cd437467213f811c6e64aeb6483ab03fe47e6b82a0bd434df -size 1592 +oid sha256:21d9cfaf5ab1c151c2aab3ef7095bcc4091c6731149cd62d47af8b8f8a5d0ac6 +size 1609 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt index 34e54191..fd769650 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:286a3de3644dfabf1ca00852ad6e5c8daa20a5de0b69fd11036744aec3afac05 -size 1148 +oid sha256:93ba928b7e3471d2c6fcf2933e1ae4df8eb96eb1b4dc4972c40df58cb2e2ad15 +size 1149 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt index 18e8ea05..ed2f9f71 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c435a808d793f915755f42dd98739e96eea9f6bf7b65429f6824dd37a583f6f4 -size 2206 +oid sha256:038383c81eaf95d46420f9d89dfe42c4d925b0f702f78b139bdbed3f2078fb97 +size 2223 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt index f1e78f88..b387f9c8 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc76b8bd9ecccb97111957fd932c037ba05e385bfd28c0a94c2d122708c44e77 +oid sha256:e4ccafb2a0e2dea904bcffc65f155f8bbd866205057d9117d69f5c8611e451fa size 1625 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt index 7b6362b7..581ef1f7 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2ddc530b007b2ce48c7f2855cb10837488f8c88771d5a10a465a992d0b02524 +oid sha256:dbd0247e3ab9e2b881c2e09519958465c3560d167860da329e38b97529fa19bc size 860 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt index 82ccdb50..a7ff376b 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:573716f57ce0fa6fe575b200285be027929bad8a4f03d7794ff1e5e3244bb708 -size 1108 +oid sha256:533dead5741ec33a84d305f0a885d912e5cf7521c56a8c95f08a3d59c2a2e1bf +size 1107 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt index 30fa41a7..0d8792ed 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5b3516263c69581a52c144714ae751a87e48719352987aaf78a086219e854ed +oid sha256:99698bd404b4e7aea1ef05ef11d518f751bf09ea89b1cb8b31e0c20a3a0cba6a size 1816 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt index 47f79568..879c7248 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a17b95b8f1606f27bfbc5e46955c16149d62a68f1b5ea8df0422bd2b717e1ec +oid sha256:5d14609ef523026073148518403530e5a90a8e1e584d5cf1a1155922e8f90890 size 400 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt index 200720a4..8f35c7f1 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4864e0821364f0fd85371fdf06aef9b2d9f2c3b7de302a4c504a397566be36e7 +oid sha256:937346fed6ba2825fb2f4064c7b21f133f3f581f7679ec5f39bdba543d225424 size 1925 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt index 723a1226..24054762 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38a1387994e1efe11280fc4c4182aedf21efd3ccd0bd05f351a79ee640c9b4ab +oid sha256:405bdda0da05dec988463e82d2ecf2a5125e4446371f1fcbba6943e60d3e3c82 size 1963 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt index b86fc93e..65f5ac4a 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af198796b7beb4aa7939238ccea531f1908ce49ece25260f4126ba0b3fd8e103 +oid sha256:6eef6d5282d21aff74f5e4fcf109e613294af294dce6a00ceb85ec41d8ba65f2 size 2030 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt index f39e892a..fb80905e 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:083f9c3bfeb77fb7ce2d8d469ae97fe1ddf000ad4f5b26f72777a383c8c4095c +oid sha256:c328270aeda75cb0c949915410fc7fef3edf934a5cf08d653eff8f839973cd75 size 436 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt index 3510b434..4478894b 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf3665c54d861c6d34e0880682b1e08d40b56ad7acd9b61a7af5f40aee4afbc5 +oid sha256:fee12ac5ae3865532a8f715172669817d6304119f8ccb34bcf761d8a34733c35 size 478 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt index cd12950e..0c61e780 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30f7893b6fce7a39b8e6ed752d6da7a63548fd7af6f2a740af525939e8705cca +oid sha256:2492a33cd7bae5d2568783c62954a107cd75fff63d9b77aeaee95f423326de63 size 533 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt index 61cec6f1..27182697 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfe5ae39303a84935c0ddc9f8989144eaa8b64a3c3bdd25c16ac0d06763ed750 +oid sha256:b094ffbc5fd918a9b345ee894de6d8fa57debb038321c0cce038d3b64203f914 size 1517 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt index d0d16319..b2b22a1a 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e048e5aebd7ffa8169367dedd1326a4780702e518d84877042eb8d4a075902a +oid sha256:9b7628d638d8a6193f6816ecb455582d8623d063bd5f0fe87e0d237b02c7468f size 1857 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt index ba634dae..15a9a2fd 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4b61d4f18a7cc0dd5494c823b0f487e05ccd9fa4a7a78187db6eef6246dc771 +oid sha256:63d0b33c3d6f3857ef2066167a7ebaaee21fcb5d48f745e3c3bac4439bde59de size 1782 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt index c4872199..feb33057 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25e6587c801b5dbf1915edac5274db90ff55ed014ae2e72ac3f9208db29079fa +oid sha256:db154e96a88fa55ea84dd3a2e41a16debf62d85b491170f492d2ad884f852ed9 size 1225 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt index 567ae77c..d4546959 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddab494b52339f38501cf51e4506b4072c4eaea5fa8cd8624dc615911f697857 +oid sha256:7784d9941c79a8a62125981a74c5382a22001591f6ea152a425196426ee5a40c size 719 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt index 8b42d18f..b4a5cace 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3521fbab3994eef1f8e5c96a4939209dfdc7329bb213b5e67a0987bbe556df4f -size 2624 +oid sha256:cc8eb3d0043cb31951e064300effb6a699edf426e29c64b571c342da766809b1 +size 2623 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt index c92a0ed8..ff9f5224 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a2404963f730682474ae3e0ed95e50aefc3cd394bc162a74be51f502f8155a7 +oid sha256:2e066f8d2ced0101a7b28b86b96e013eaa5a68ca47364973c7fbf6eda73a77b5 size 1948 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt index c733b554..b79e065f 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:132f4350c5de1369c4a23b63d4e19b0f648b5def54f835cdae68c06873c2cbd6 -size 1239 +oid sha256:ef8f31ec0af3d853ebd1bffd593b42e8cfae640d26d096732cf0829702dd0a05 +size 1238 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt index 8255abcf..c129f1d2 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1573670191b0d531d46ec11e3a533c3137bc3784ce23412682cdedb659646bf0 -size 2694 +oid sha256:f18cb0ad3302f6b8ad8c8baf1faa3206f7f0a7d2407885ec3b1d8447ff9e82e0 +size 2695 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt index dca146fb..72ecf2df 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0f94812df36a36e911341cfb8a59f617b952b40bc3a5747e94a703a308f0ac7 +oid sha256:a9a2d6cf4c0153c5408dcb9515d0dc0715ffe6fb9d43ca3087263ce085db60b4 size 991 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt index 922d57b3..153eec27 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:082c2bee707a5bc76402431831b26b7353fbb5adcb6a937e6b6193f39b06e5d3 +oid sha256:e610377e1563df6402132bb3e3ff11ccd02c93f6865e2b185ca886b2d9e886bc size 817 diff --git a/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt index 6db90263..c9e04efa 100644 --- a/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8103d404eabe5c87d6a789c3306dbe50edf94ac30c35d6124c64a8263eb8872 -size 755 +oid sha256:45841e0b3239c3cf422628bc7e8cd836004a0c32333437796db3b8abe73d2cec +size 722 diff --git a/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt index b278091e..0bee67c7 100644 --- a/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad573ccd0ccf1ad4e537a3014934aaa0f2e40d04113566ede87e9e1888a8051b -size 752 +oid sha256:90a8938f1f997026208dcf59345bfff72a33a1b915aabbd3b01e9b91d88ab0aa +size 719 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt index 99041526..201d6a95 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc5029b59e5626012fbd7f58e870f47e25a2fd772a58368b3d6c9667e7530b23 +oid sha256:549f409837a833685d18c14b400e725fad5468a962df4a16f82d0aac71964400 size 2091 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt index 3eec9307..f3cf5ff1 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b05dff6a165cf1f8966897d31f39ccf0e02ea5d895c3a404a9689c90a3138abd -size 2528 +oid sha256:3a7ce94dab9454c3e3b366a0edfb88c9e107f5587aa8304b92d5c021a7b3663c +size 2578 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt index 8070d9c9..245878b2 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2249e45864ba8bad34d427018f353cff04a0f08d51c1998c0821058f6f7e0a03 -size 2058 +oid sha256:d6cd39963a7c152ef309454f04423cfc360be74828a64b0727081021bcff6a95 +size 2073 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt index 1430b63d..c4c6e7c9 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f4e3ee6c69c4a32017940d87958c6fea7f2f6afef8d0c89f8a091b5aaa3cf0e -size 3279 +oid sha256:b23079b6304bab7545cf83073b24ff4bb24f632b4b29ed12ba5676d11176d4ea +size 3297 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt index f183c3a7..c25ec09e 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:859475e5edc4e8dd06d93dbe75adfcf761dd2098cd9070276d622d36213e6e6c +oid sha256:edc84afc3b8dbfbb1f861d51ca235634f08bf063401d62133931ae3d0bc4f26f size 2607 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt index eea13209..eac05214 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac850024212d94f96b2fde65c09a0927459c5927d25d811a507cee2ab34415d2 +oid sha256:220fc1f1954320d04a1afa5fb8f0dbe90ab21ca374b42b4b3675d0987e9aefe4 size 3655 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt index ef71237d..9fadd9e4 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e15e5e497ade629bd5287612b5f0cd391b1906c7c0d4fc0b1a3ffe0ceb8a9478 +oid sha256:69d47efcb4cb0e6bd6ea1bcd3af7a24a65a8741c5b3162e342c828f8a5852ff2 size 2768 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt index d91f19f5..9f43993b 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0516f275702d9317ff6024b97b9c3023c50647d8db80cf845ea2e9fe9a850d6b -size 2213 +oid sha256:05b144bb5dd1aa5a3c916698a72862cbf63bbb6c90f7dd82c79e90eeace41692 +size 2214 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt index 9fe1e352..5dbcc56f 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee588b5e828787941c21f89186a889880975430c70d59f849fca08b58194bd88 +oid sha256:2074c339273ca2c5bd8ae47aa8f37d3d3451540d544a2c9308a878ae39b6f472 size 1601 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt index 056c0459..fdc99369 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a58a79b0e379f68549fc2e4386b5a6f3604eca8b42103f27880a59fe3af7842 -size 3449 +oid sha256:891e7cf1cf2f7db8330a661f8a7ff89e8a2ec2d092f3feba19d0772eccb1e07c +size 3448 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt index deddc30a..41d8ed7d 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6225df2d12f025a3317f29ac5c92a24bb26d6dc7e477a07a46437d0c6fd59ac +oid sha256:e209b55452c88b253184df33ea908c56d34892ff71949cc3230e69886243f98f size 2191 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt index aca0dfeb..8470d146 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8a1092d36e98bb3297847266d26269322c55e1f5c0bb3ff0579594e085752b2 +oid sha256:529fb5b169e5e80e3f298c156070181741f56fb376ec44889efa794c6caec3d8 size 2837 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt index ecfa1f7d..b67228d0 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ded897464d0050436976d30335dff66a2317b9c9bf431b9f7f8fba2f0da47b -size 2610 +oid sha256:eedbf0bae8f89acd4516a889388e5e4b60542b303dd133f63c28292f7a246edd +size 2611 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt index 59755fc2..4cff06ac 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:765a8364da1f6a8347188b6ee189238be4828f789ba95ac13b4c29a9d96132a7 -size 3066 +oid sha256:d7bebc110b48f4d0e7af8ba0fe6a4c0092bdbc8dd32113ee54acc531f7c672ed +size 3067 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt index ae30bab3..3732865f 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:909b5fecf3c7855b23e71f9ad0eb6350714d8bffb26cbc682eec5b84f22b1f0b -size 2754 +oid sha256:ffbb3a9bbfa89092b5b5b31d874e80f4f84129e71f828962c880ba05e8465045 +size 2772 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt index 3c5c72a7..de50f615 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f09002f7be0cb974bf955648992f45ed6b4d499f479822c35c16f3763305f588 +oid sha256:56bb13de46912d9493ef074a2e29bab79b1defa456d62c04952d0f8806b638fa size 3017 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt index 1f6f7cb7..12756497 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18f1ca6d2e0854f03f15a46ade04c3b914ceb2f7e27713ebc73b6e1e9f1db462 +oid sha256:1c9d0ac0efd24f3a5eeffbf8fdbe75680a6eb0df48e2d09f56ce9c98dd37e3eb size 1258 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt index 862e8e60..0c61d799 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1832b84e50b850a90c05ae0065668a22404067398baefe107f33b3cbc9398ecb -size 2386 +oid sha256:66b508edf52e5e1fe236ffd63c708a35eb1a016a1c8e3f82cc56de49dc876643 +size 2375 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt index f878edec..57322f6a 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c2cafb702f45db9406484af468911d12e8bbbb60a84b3a29e0d6317e375627d +oid sha256:f1af4dfc9d02103b0eb655c1974be4a8ee022eb987c19c92ea0c3f04eda2bfd3 size 1777 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt index bd738ce7..6c959260 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48fa0825fc1c765e8bf5b2a4c7790d7ba179a21fe949b63abe0fc336c16100a7 -size 1871 +oid sha256:06e0900e5844cec52e8be348a760a3465d1f1d76488f73288e8a6813d99263e8 +size 1872 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt index ad92ed51..75e8653d 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7789a648fa932595427ca3ebdb03178e515257f47aa4f967097fe2b860e3c3d3 +oid sha256:b5add8320c01ea77ef1a1dafbfb2369d75095e6f449d6d269ba6be1ad25e8305 size 1609 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt index 628eeb4f..32db18bb 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e07df1b14a05c4f0205919787666248c610662d470c6e7531deb906251858df +oid sha256:87865496cb72f493e6679f42c2776fb8cd550c4928d9a2168c7ab5834a5858a8 size 2042 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt index a420d103..753bc33d 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b91acb7c9df8f3ab0dbc07953fb1009e90b4201bd41b9518e519796285574259 -size 2156 +oid sha256:511e438fb42e146aab0f593566b950c9eae78559efa4843459c445dce30bcd18 +size 2152 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt index 33af7939..ee224fc7 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24463bee6a4467c302d1bf17beddd55c03fa870ee3d876fc12f9c52bdbb354c8 -size 6643 +oid sha256:4658115f8775edecb9dbb0605e4203983bc5f464a510a1e1435d34e362543155 +size 6645 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt index 34ad8d64..e26722d8 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2dc3a88132b5636b8970fcd2b715d94a450e4fab5336822e7b134bb5af5a46a9 +oid sha256:222531b230ad73eae0b0964e05536cd61a6295eed3eaa6acb1caffa6ecbe16ba size 2165 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt index 80396a81..b523056e 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41ae05da1727fc31c9fbfdee59927d15f2a8e6b0de645ca8fd01c102f60360ec +oid sha256:e9ae382a03b621d534af0e434093ea63e4ae912624298d579f04767ade0130ec size 2077 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt index c4c7581e..33a7a8dc 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e0094a7fcad47b66cad8a4d46b15679135d0b4b882f5c8763c180ebce5cb30e +oid sha256:a56f6d01751431334bbefb80b87b94cec0d83f8b6fc6c6365809367682bcc142 size 1189 diff --git a/data/minecraft/structure/village/taiga/streets/corner_01.nbt b/data/minecraft/structure/village/taiga/streets/corner_01.nbt index e58ac225..c17915f3 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4eb49e6994ec55caf7c499fddb62961e3de389cb1094c712b2b4c506ef55d406 +oid sha256:539a2b2b2d685218c9970b692ea901720562c00acafc3bc7159937ca28de4e77 size 1182 diff --git a/data/minecraft/structure/village/taiga/streets/corner_02.nbt b/data/minecraft/structure/village/taiga/streets/corner_02.nbt index b6b4ed29..2c2f1628 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f43169b99fd8f1368fb04c7958a14fe20fde0dab8a7ac60878824e2357cd708 +oid sha256:00c8fc82089e11cc415c0018a0b40a558b8def6bd27cfa5feb9e24d3f8409fc0 size 1184 diff --git a/data/minecraft/structure/village/taiga/streets/corner_03.nbt b/data/minecraft/structure/village/taiga/streets/corner_03.nbt index c25d41ce..b5ea8ecb 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d43b1fe4209ab4c4711cd1169810e458428371c7d6e555e5ed5cd47c9206645 -size 351 +oid sha256:962c9ee9e08698631848974c49a3cc5de33f8cab6df0fbd6a9fae872fc2d2ad9 +size 350 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt index 51a0ba46..36355886 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32c74360f6e1e02fcdb6e8ad647b38ca68fffa30d377d3cf2b6b3ea095f49cb8 +oid sha256:d884465c81336c19ee7ae34c1df1fe5b0e6140ec12bf7c8ec5b321e03b845dcb size 1214 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt index 8c61f368..c3ebef6f 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:003b336210355ff6b39c60d4b3c3923c70a0e4e1e25917823d6dbbfd83dbaf5e +oid sha256:add7bfb42dab7ebcf960a775846aba320510458043c1dcb6d633ab09c9d50054 size 1160 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt index c6cba0aa..6427e21b 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbe4a5821af32b8c87c125785a71f488fcf6b77ab8346ffbbefdfbc0ca7966c5 -size 1203 +oid sha256:4b579155cdd533da8e0e5c017b408d826ce892fa1c2b9fec257df8b936e2f21c +size 1202 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt index 62caa556..b8200a62 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a754cc0eab20eb45a21dd8439fb7c84dfd4222ebb07d5f2cc8f3271b05ea619e -size 437 +oid sha256:53e092fefee1987cc259313dd763eaf2a9abfae78c47c8e8b42c9ff5b1281ca6 +size 436 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt index 683e23b8..8fe41994 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a2c315b874157261af303e0282c8716357d5d2d5324a2f9dd19c7eabe6d9ebc +oid sha256:d02462f2ba74f3b63d2df3283be72cc998439695087316c989cd766bfc4ac2db size 410 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt index 032e12da..5abce047 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b23a398e2289ce9b28b87c44419bbd65c951e258d94f96a77f8b33434968b78 -size 472 +oid sha256:46f9228b8debe8acbb9bb6a491f95d690569c20cad6694dd64f8d7266faa2240 +size 470 diff --git a/data/minecraft/structure/village/taiga/streets/straight_01.nbt b/data/minecraft/structure/village/taiga/streets/straight_01.nbt index 8ec9c67e..ab29d32d 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f14e7ad2eb8a9b744ee473673ecb7a37c5cfb53d6289292f3a6d494257afa22f +oid sha256:fdc0213dff873e5ad43b208819100959f1cfaa228b06db94d4fc6f4a373a3088 size 1131 diff --git a/data/minecraft/structure/village/taiga/streets/straight_02.nbt b/data/minecraft/structure/village/taiga/streets/straight_02.nbt index e5472154..50d743bd 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc7596811940ea5285983c1c95c40ed4a8afd88b30f71d9592e405cdf42e7881 +oid sha256:fd884410255d13fd842b44ad1609be8e46ceb6e0ae2c5ed6d0fa0b83643d46f3 size 1147 diff --git a/data/minecraft/structure/village/taiga/streets/straight_03.nbt b/data/minecraft/structure/village/taiga/streets/straight_03.nbt index b754bcb6..17f64b0a 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da26b0f57dc1dff3f28f1d4e8246707ea83e0c903690c021856888ad4ecae282 -size 777 +oid sha256:30768f0544012ebd8512c973dd6bdd4e06bf1a92086749d9acd986f68ec64b55 +size 776 diff --git a/data/minecraft/structure/village/taiga/streets/straight_04.nbt b/data/minecraft/structure/village/taiga/streets/straight_04.nbt index 3b4326ad..ec48e3e1 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_04.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54f45fa8e9195c3958052ef86556914278a422ca6e199e0bf1114d3161f05503 +oid sha256:7ef1273a6c5bae1d60b6559976b8923bd2dc4aabde112f5016705ac9f91ff027 size 687 diff --git a/data/minecraft/structure/village/taiga/streets/straight_05.nbt b/data/minecraft/structure/village/taiga/streets/straight_05.nbt index 00f23bc2..fd75fd10 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_05.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c8cd504e934ff6c2d753ade58faf85cc190fe18ff0e5248eba5450d21d81c2f +oid sha256:0b5f43d0b2141f1e316a4ef21e75c6d29482f371daaf4db8553a59f33f8b23fc size 1390 diff --git a/data/minecraft/structure/village/taiga/streets/straight_06.nbt b/data/minecraft/structure/village/taiga/streets/straight_06.nbt index 94ddc316..63766f1a 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_06.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fdbae73062f4996d0849b2464ed2bd1262f5b77c9ede0d6b3c91d389ed247ff +oid sha256:861c664b858324d80ac8127bbe1d1bc2487fea9ecbfbc4cfe5595621395dbfb3 size 1703 diff --git a/data/minecraft/structure/village/taiga/streets/turn_01.nbt b/data/minecraft/structure/village/taiga/streets/turn_01.nbt index 187aab47..6b4d056c 100644 --- a/data/minecraft/structure/village/taiga/streets/turn_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32222705e00ba5ad13fe436f884e634f61ad115ad0507235fee7de7d33fbf4cb -size 790 +oid sha256:80a18e6963368a4184be4226ace4fbfba79dff703f186336479ae571d749e101 +size 789 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt index a97a8dd7..4be59419 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83a0c4fdeebb69c48f0410bdcdca9fd579d1bf90d830e8d9695b4d0d5bb704b6 +oid sha256:ef0000207ef611d224a342fe0c39f57388e582f21f288d770ad1e701e1993906 size 423 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt index bbdb40ae..37f8f8d3 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48ea26a3f72a73639e538bf4c3e5834d67cda5ab6e058f207652d7b461376494 +oid sha256:8cb8786ab9e3a374e6d4d37ed1a68186d79042598d283730bf2482ba11992411 size 368 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt index 5b1490a2..ded081b9 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ece4aa3f6b5e5e8241bb0ec6581ab94b18b207cfce9319da56ed8d452bad137 +oid sha256:6b4ec923f618d74f165d4413d3732393c7317b5fc061bf517fe7d6ca86377edf size 354 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt index a4046b38..e6fbe7c6 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9468f63ef62542502c4c9cfb32a6f1eb29505250fca4eac8de9ec44bf618677 -size 323 +oid sha256:6699d6d5f560774541f1ebf958e89609eb2f2f1a2774cb005cc57ff7da63f7ea +size 324 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt index e84cf9cb..64cfe04b 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5330ecd5ec82f9641ab61ff3dede4bfc6c226337e4d32c04ed4e3ac37ac208d +oid sha256:b229a82414c7196e24bfb793ac71fbc6e84ea290fa3bd0c611abc3b6ee6a6d17 size 250 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt index f1ddb286..c4b87b40 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1093485ea375b9633c36abdde907be6e42f8fff8e0f31a2e0ae107b76f5ed241 +oid sha256:7d5df1e5851b40801ef98d7221748bd7fb5222ef6dc629ebd7f4918d53d51e77 size 471 diff --git a/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt b/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt index 426bbdc1..7fb57577 100644 --- a/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt +++ b/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a475b7e5146166a8bf3dcb53086253d1412f6529372e67997a146791b0c336c1 +oid sha256:e8f40551acd9e44dc33f675360934fa16d8be21132b70cd09976a47d6992b9e5 size 252 diff --git a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt index e502c1b8..8d9eeee3 100644 --- a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt +++ b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:785d5f03843d5d2a6ae30926f3a2de599ea50b1829e4ceb024514d6a1b6d72a4 -size 3947 +oid sha256:d730a7b544cd9d766f794270afa25d08b07595943d836a4889cc4a6e519a012d +size 3948 diff --git a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt index 1daf1b34..ae18c188 100644 --- a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt +++ b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06148974d8da96089b228e860299b7a211346cb900995c53e5e2baae00eeec11 +oid sha256:0b31cac4ceadc9fe8357b531d3039d10687e1a21b715a1e069429e3db4679881 size 2272 diff --git a/data/minecraft/structure/village/taiga/villagers/baby.nbt b/data/minecraft/structure/village/taiga/villagers/baby.nbt index 3c62e6b8..8d4b8782 100644 --- a/data/minecraft/structure/village/taiga/villagers/baby.nbt +++ b/data/minecraft/structure/village/taiga/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efdb6334cba16c7a5839f1de2e559fc82f9f79f4e11569cd6500c5698393bf96 -size 750 +oid sha256:df971237533ea7e337dc06d228b83544ab9794011dfafed9b6552b83411d43a8 +size 719 diff --git a/data/minecraft/structure/village/taiga/villagers/nitwit.nbt b/data/minecraft/structure/village/taiga/villagers/nitwit.nbt index f00d6e60..37a0aff7 100644 --- a/data/minecraft/structure/village/taiga/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/taiga/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b848aa30dcba4e7a080042cc68bf23ce8c06246a3f45cf80d768df4eabfc7cf -size 750 +oid sha256:1bee6145bde4dd406bf5301c472e9c8886df1b0ec80481b9d2ed6633c7d5068e +size 716 diff --git a/data/minecraft/structure/village/taiga/villagers/unemployed.nbt b/data/minecraft/structure/village/taiga/villagers/unemployed.nbt index 20fd7a42..4e06e993 100644 --- a/data/minecraft/structure/village/taiga/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/taiga/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2717e902a833f7bf2ff8970211a7a13f1bf101a1d74bf53112e60b9b5ba08767 -size 748 +oid sha256:61f99459960376aecf36e787e19f19b67e0ff47c395ac77cb715b462b0ceaedb +size 715 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt index a3e2ac2d..2c49c42a 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75e13d74dc26fb67e2cebd2c9905bcb946a794e1dd62a7144c1dc341f1d46c21 +oid sha256:e719a8dccdd507174a0437ff3cacf2a6a42557f7a0261c443c72f31f72700f8b size 2613 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt index 14e0ef60..a40240f5 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e72619ce34ee7a436ba0c3d62ec8e0d1e99196a86df8ad51c55234c424350ce1 -size 3666 +oid sha256:12312d370a03139ba9a7d289b9574f909024fa0928596719fb6303e88711880d +size 3667 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt index f1f8bd22..c552db8f 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:525fdadd347ae65784f4e885b7cf07e5836778e244ce4fb33720afaaa60ca4ff +oid sha256:5250f58858b6faabf6b566b7f90c63c3e676d77e093dee5370885426867bb292 size 1607 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt index 82427773..714c427a 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e77464afbbc4d11db500e00b3ce0b40db51034762d8a05d39b5fb28bdb309d4 +oid sha256:b73fa901547021debd257c4f0f78dd14b2f7802fdcb779485d110b95ba1e91f8 size 3460 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt index 33c77ff1..e2e47429 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:348f1c1faa52c42402d8807839eba0dfce2e4e16a5fab32e2bb859045371592e +oid sha256:70fd036fcd7749352b63ae72bbe652e6741a1db33678fd765412f411c391bd85 size 2790 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt index d1fe319a..b0c94d18 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46cac63c9e53fec5c24d7bd5cc0aed5618358f93f27d282b676b2cac7086fc01 +oid sha256:db6875c18f6c1925777002a991edff302eb104a3e29cd5447503fceee69b6358 size 2607 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt index 745a5c05..77648f12 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c31c10e88eef1862051dc7812de9dad6a1604a9cc1faec704d110eda89d02e83 +oid sha256:ee62c080c0b2443e2d5f8087a205ec9eee326d99ec962298f9073a83765f75f2 size 3070 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt index 6e05333d..bf220330 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa06522f1feae0c5ec5e8d0d6b8c67fb129a0ca4a4e5432fa3296578557c41e7 -size 2692 +oid sha256:48f68b6e3cb49a66f89eb7eefe19265c261f882f4164c2fa4a82c1a625a3213e +size 2710 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt index 333c5a98..20c59439 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:323c6ac3ee89249bf433f56889854a1711898bd14995329e137bc243fef02d48 +oid sha256:b6fd07194ac4ed7e3d76c5ed596dc90f6bb051b79dab28387ad8a0cfd0ab4506 size 3041 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt index 957da1df..23baa9b8 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:583c166e7e3ec4561751c0896ba8e2c0769dbd9fd52b9c00292f80e859aa750c -size 2392 +oid sha256:0b3e6f1f317630e33fdf85c9d4b8096f6ba560273d9a89e27321971873a6c7c8 +size 2381 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt index 57f56860..6530704b 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a27cfeadaf80060680b00f918138ee7467a8815bb267c4a2c27358e6ca1f25dc +oid sha256:35936b1d031c8a02d5ecbd1b2d9916b6734d7a4a1fadbe6618934b6f6198065d size 1796 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt index fe1cb0df..3bd0af58 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ee926f94da52eeb8a47bdf42373b4aa29378068b3e0cb49ec49b0b105f4fc92 +oid sha256:818178de12417a8c13e0b4c6bfe3bfffa8b19c93b2ba7b8984e9e27d670dede0 size 1887 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt index 83c100c2..760a682a 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f362621612a22e0863df3b175f52015926f0f9ae3c2bc1ed075213a6d7649ad +oid sha256:122c580fcc3e9909f0a71dc258e6ccb7c44cc880947413a866759c0d4b91073f size 1615 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt index dba55a68..ab919492 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b2388207ee8320de185d4623a3f5525854d09d9de5bbcf756755d910db9c55f +oid sha256:49565095d90d046f1fd5ace9fa8dc96f8f82315507c6fec34c811dce4bba2bb2 size 2049 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt index 33af7939..ee224fc7 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24463bee6a4467c302d1bf17beddd55c03fa870ee3d876fc12f9c52bdbb354c8 -size 6643 +oid sha256:4658115f8775edecb9dbb0605e4203983bc5f464a510a1e1435d34e362543155 +size 6645 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt index 0378fc7e..b54b6abc 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a2e02b9b67d64956d99d6fa6a6778a7aa3babad15cde194838b885fac0f16dca +oid sha256:49eaf03f7adac44823cd5e03e834915b2248c904cc6552c3dd57ec274261edc2 size 2175 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt index 023f98e7..625aae4e 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d8cec3c367018acdb2c8754e3508372138ceac022fb0d1f82f154e6f7a5fdc1 +oid sha256:76ab302220108c91a91310d2029d0f495cd27f4a3b652ae13636cdff09bcb92a size 1194 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt index 3893345f..5515f34b 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdab1ada9cda40822f4b2747fddccad23641771138d1ac79e03930ea070e6bbc +oid sha256:91957e603679a9f595e5b0a62bb2dbb6f94684127adad72afcb110d2b53999b3 size 1187 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt index ec01df14..fc75e026 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4ad952d8cc438f2591dc3277f901ad903fb3b472ab01202316f7e4105aeb8f9 -size 1191 +oid sha256:a3efc6020cacfb1d028f1074033a4d1a2ca35e7ee8e9f2ccc9088c782431c59a +size 1190 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt index 71322151..f9bb2c04 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:852fc709d79297a9bfc7af9093c2c6db89928ccc6f0f5c300eb7790cb1b032f8 -size 356 +oid sha256:567aaa72489dc2aed72bc691819c9130e69752cdf644e43f201fd1abf058ad7f +size 355 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt index 767f73f2..429f2a4e 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b18932e9c07f3a0ff6b0ab33333e95c6e353ebcc7fd00414fd092602b7ba807a -size 1221 +oid sha256:c0ec99447bd52e15ec78ba9bc668a092df7705eddba44322effa3773a74a8c4c +size 1220 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt index 324a7ae3..6d7527ba 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f1af214a727d746d8e450463a88ae901dbd61dae6948f0520ea72b1f33e550a -size 1165 +oid sha256:e7dca079dfa2691e057eddb60dc481f02d2be1a24eb623714818c823af066cde +size 1164 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt index cd64f0af..f08b42ec 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b51c5ac9b5ee24c55fbcbc0173aa041b1b7dcc9612e51b1b4dc4ad5130b943 +oid sha256:918346395e8addc5dd12c7371680df7574dfbbd0730da9548e93ffd411d3afee size 1208 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt index b8c58110..b9b97a72 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5af4724bc63ff19ae1a7e1bc3bdd520cfe44b46590ff51c0e0a46145e0e5983 +oid sha256:4d05bf0ab4a59d19cc0c704b9cdf0fa75233499d5ea26f01e83fb897356bff32 size 445 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt index ad88e5d6..2aa93736 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:622b3ce9aeb05db0c95f44fad5e75eb5e5241a11523617748f907efb0c75b348 +oid sha256:0049934cb3ca90c05596069e3ba616fca29eea3ee96018d43f21ccf92ce6fe5d size 414 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt index 18fa6909..7e1335d8 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a6871e21c50977990de8a4c2f496c85913cd8d8c9481661c70cfed4ad19ce7c +oid sha256:9b902f6d11cd16857fa09f46f039c4c64f961741cd5f0bd63e28de3f5bb65db1 size 476 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt index 16374dd4..45ca057b 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb5c5dd113d8c31a83c39f2c3126b5728627dd0329bc8e676a7fd6fddcf8e8fd +oid sha256:a56190d78c97a7d319cb95ac2dd5dcab143b7f7ef9366ef3e775528fed60b4a3 size 1135 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt index bc5120e6..1c42f1f5 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d71da2038edd208157e6a3287a5323e185663b361e61d3506ab17009804956f -size 1152 +oid sha256:fcec4140b15fc5cd74c4e8269fb1af844531f62252ecb1fd1cf36cd5b8fe79c5 +size 1151 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt index 62fd7106..ec9e7ca8 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe60f5d746e15a9688759a3c5650742f86b433f57e19f112175618c52723f1e7 +oid sha256:eced29acc8ab6435279f757c2d2b8194d75a508007f550cd0f43df8d73e17a09 size 781 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt index ed37d916..b914d2d5 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:509c796355bb4ddeb2999bf8e7f864ee4f95de233ec4d5f8f1453031c99df6e0 +oid sha256:a5dccd3fd5b22a4e7dde88e809e579148f2bf4c6e3ff50af205c2a0cbc13d780 size 693 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt index cec2daf6..10dcf6f0 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c98a9c5fb44f0a83bf20a8dd67f140bac4ea58823f5509ee01b2256b0e18e38 +oid sha256:f29c0b7d2b9357729f1868e693d61bbbd1d17708977a2b6e031bc7eddcd9c677 size 1395 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt index b4f2fefa..b35683b9 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf51f44e2c0415650300a16f84e80213c87bbd7896bcc92eac7ff9acfde927bb +oid sha256:e3fbda9e66c6f16bedbfc607bf685a6fccc689c291625543e6bf0d0f4b704c23 size 1708 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt index 7ef73265..d7dc128b 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9958c4ff80acba3c97ec5a7e8ba020bf53ead5541831aec25005d82a9e81a2e4 +oid sha256:e3b9717f7681891a890b13e7455e4f6b1206c9ee338886d0c992b7431976cba7 size 794 diff --git a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt index 49ef014f..7e773353 100644 --- a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f59b35eee0ff776e53fa4996b6c2d2d50197bc20709e5ce4df3861ec6c80e89f +oid sha256:f10619385474e26ff157bf6871d92d81038f42b55bf3163ba2f616ff29556f2c size 1849 diff --git a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt index 139871f0..edf6336c 100644 --- a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d9b656d28cddd5db7b519da2f76588417c27e881bd9d2ba5ad89e77b50f85b7 +oid sha256:916d1a720f4252f95196f9b1f1e521060d260349995e499d470baae083d0c99d size 2258 diff --git a/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt index 7b17973a..7cce4f1d 100644 --- a/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:649c74cfdb25c49939e184b0d98638b6d593e606389a71b4375910dde0872add -size 756 +oid sha256:8043903746f5e430085ec653217d5a106de13b69221e8695aaaea9169cd1dc50 +size 722 diff --git a/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt index ffb8c4ee..cb60b226 100644 --- a/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b537090ec1feef7aa2ce9482a70589678a0588628c9e110df4e1541f7e77fa5 -size 754 +oid sha256:d72ca363e3e52449889017c3e05e7206eb429b7d10c7825b1d3ba5a20c59884c +size 721 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a1.nbt b/data/minecraft/structure/woodland_mansion/1x1_a1.nbt index d3eaaa8f..874e42b0 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bcff5f6884f99472202e84173278d0fccdf66e8f69ec174968eebb3acd96d8d +oid sha256:b8e35c00c3d8ee10e95d7b1f71966258ec87d48ba964f8e0495d7cccba17474f size 1434 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a2.nbt b/data/minecraft/structure/woodland_mansion/1x1_a2.nbt index 7d86523b..7b7bb45a 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d4c11f01f73ba94cf1ff0b384d98612a37c8dfb1b2db6ec41a437cb2e9bf18e +oid sha256:d39db576b29a014bf4f30d25841316496af4cb4c4cbc9e412b11c2e621511822 size 1529 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a3.nbt b/data/minecraft/structure/woodland_mansion/1x1_a3.nbt index b12c48f8..a83c8c53 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbb50521b7b6aa1523d0ff99f0836a9b7eebc491614ec05c6a18f0211cc7e357 +oid sha256:4d927b19460fd7ac297c940408e0475cb006b99c22bca7ec80d8648cb792e7b0 size 1417 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a4.nbt b/data/minecraft/structure/woodland_mansion/1x1_a4.nbt index a5bca5f8..d2b534cf 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8a474656eeb60f01ba9e8a65454e0092eeb2798f6a5337e01e489f13c33f4bd +oid sha256:1e7d96bc47ecb647aedfec7c5edf3157f972b56b2e287c646fe1af2166b2b27d size 1684 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a5.nbt b/data/minecraft/structure/woodland_mansion/1x1_a5.nbt index ec952d13..0585725e 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a700605cb4c40bbcad5d1ae450919d253322515a470429158a3b943bcfad949 +oid sha256:166425bb51d7c5e4b25652bdd72afe8b859ab453489bc93bb11be449ec4fe438 size 1492 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as1.nbt b/data/minecraft/structure/woodland_mansion/1x1_as1.nbt index 33a20913..749dc3d6 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9692fff774ec11e226f50ee574f485b472c2221af0e4240db830da16493c85e +oid sha256:73735bd37fa03fdd7a840552647613a1da90011bf217dfe39526de1ef8126fdd size 1486 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as2.nbt b/data/minecraft/structure/woodland_mansion/1x1_as2.nbt index 94e99b34..99d01853 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dd221728766602fc3518b13ec680c22cdb6d1d31faf6fedaeefb38e3356fc30 -size 1457 +oid sha256:90b085f69e11a09463ab68619cac06d4d1a7a75fd02637d89f141dc3cf522021 +size 1456 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as3.nbt b/data/minecraft/structure/woodland_mansion/1x1_as3.nbt index aee77612..6133484b 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:721f72374b71a205e62913098b34d588ed5e98dc16b000fe3aa3981f1dd6f3b1 +oid sha256:3468e7549919c021e1db95f79ae3d9eef8057044ed425f84ccacdbfde2bf17dc size 1212 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as4.nbt b/data/minecraft/structure/woodland_mansion/1x1_as4.nbt index 17add9e9..ccf76a2b 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8dc96fd9f45d004a1221edb4dc13911b48a3f989c876682d7ac4664a6142fbea -size 1211 +oid sha256:633f100d4ee72bca7423172870861376f0cb24aa6740cebe17cc76b7e79bb1be +size 1212 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b1.nbt b/data/minecraft/structure/woodland_mansion/1x1_b1.nbt index 5073e1ca..66ce7767 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a287922d83f57d0e3ec7d206129a6cce1c49464a6512b34e735167b80d58be7c +oid sha256:0748abbf7e10145d3c613853a1efbdbad6e329e0608746c68dc1fbe1f895413c size 1925 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b2.nbt b/data/minecraft/structure/woodland_mansion/1x1_b2.nbt index b59b75b6..f02ee3fc 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e5cbd3384f5111fc96e6a6a1163c619e9700a53e19b989b21998595671dcda1 +oid sha256:95967699cd0cf7dfc01de0c87ffdfc616dbcb446e3c51a4f9f6e88ba63ce04ea size 1865 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b3.nbt b/data/minecraft/structure/woodland_mansion/1x1_b3.nbt index 5b58e396..02c08203 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf54056a70523d8f5ee565094450cfcd90bd4b0e47bc95b537515e2a316a9b43 +oid sha256:1ed3a344146b43d2d8a1d8e40b0f52da70186af38c142a390ba3138a763c367f size 1808 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b4.nbt b/data/minecraft/structure/woodland_mansion/1x1_b4.nbt index 335c2942..84b97df0 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ba4814f805e1358977c65d9b3031b6826126addcc778728b5bd4d2a24a7a174 +oid sha256:ecff030441310fedc75e0e48757768451711a018c3d127e452a9f5521deda82d size 1832 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b5.nbt b/data/minecraft/structure/woodland_mansion/1x1_b5.nbt index c070ee73..120f6db7 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ec85edf2327a66e7cd2ba766e6e8a804483fb9f09f3bfd3a3f5079f722943d0 +oid sha256:6783e72c031711138b4ced78d16170c5a83a30be0102d149df991e1d056edefe size 1923 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a1.nbt b/data/minecraft/structure/woodland_mansion/1x2_a1.nbt index 47f4488e..68f37cf6 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78264377f00db6add122663e985a93586b4dc3c594d42c4559924dbe03792b0c +oid sha256:1a373d9eb2f45088d52dd372ae2a98fea9677835cc10b8fd6177c96004a5fb22 size 2938 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a2.nbt b/data/minecraft/structure/woodland_mansion/1x2_a2.nbt index 9be8664f..787b1b05 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08aa3f4c48652e0986369f0ba8c862d60bc5b9209f59105f61e8082be5bcae43 +oid sha256:abf0ee7eac1abf5a77dea5260213cfc62ac8505c439865f9a7316ca17c7021c8 size 2829 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a3.nbt b/data/minecraft/structure/woodland_mansion/1x2_a3.nbt index 1a95f824..3d0d5b7e 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf6d06a43f0e5a50e2530bcf616d071c0ffec08a7bb0172f129f2a7b94f93419 -size 2951 +oid sha256:e90f1bd1b7f8c513d5f0a2db1194b2fd6b67edbfe9d970a560705219ce9466f6 +size 2952 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a4.nbt b/data/minecraft/structure/woodland_mansion/1x2_a4.nbt index 83c7482f..f4ad6c07 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80e65988d90780c4b57fad008540d5e21ff3b87f1df91cd4b989002249d7ef5c +oid sha256:acabca0c4147bc8f0412206d1d897bd15fd0ac4fdf661310dfe5afed10713ba9 size 2898 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a5.nbt b/data/minecraft/structure/woodland_mansion/1x2_a5.nbt index 766a7534..306316bd 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d67792282b4b0be293da3e96cd8fdf58200fae1fa9a09916cc3346199f7774cf +oid sha256:c180017a011440d463cdba9c12e0529733db7428da1e7c27f51e2867d4324607 size 2571 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a6.nbt b/data/minecraft/structure/woodland_mansion/1x2_a6.nbt index 08d4478a..7d381fb8 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a6.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:912d5d6f4957fc39e05097d5a767f426c0f9ce820fde525e7902d26386952571 -size 2815 +oid sha256:a4699216cf524212c9dc524add5f528bfbf5c4bd2e0eb41b846c799a1960c42a +size 2810 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a7.nbt b/data/minecraft/structure/woodland_mansion/1x2_a7.nbt index 3089d1fd..7efe81fc 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a7.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8e7acf1ade7da83a2d465999fcbab8d32294b0fadf60aaca05b2386e34af6ba +oid sha256:47de6e95cd90e3f53ee2c871d50d28a811e8d79326e23c7948064e74f2497cd9 size 2949 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a8.nbt b/data/minecraft/structure/woodland_mansion/1x2_a8.nbt index 1975c11b..ed29bc34 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a8.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fca6e6725cc0d824eb913ace2ad0f333a2c8d7dab4b76ecd61e66cd890bef88 +oid sha256:a34fecc7793ebd453ebc0dbf602a86e4fbd4b5c0ff692d3322acc6dfd919b5b2 size 3191 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a9.nbt b/data/minecraft/structure/woodland_mansion/1x2_a9.nbt index 69acbede..446227f3 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a9.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:712c8e76de3327c395fd95a49853b0d13c97573d553e270adc6a7381d9f8d722 +oid sha256:6bdc5f04dee01ca2a0ef3e9c842549b9082fcd973ef2328fff8fe1e6a683d405 size 3096 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b1.nbt b/data/minecraft/structure/woodland_mansion/1x2_b1.nbt index baeb0d69..41d0e8d7 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96572d83bc1f7641daa7840d75f77888f72d2dbcb1792d64b3a7d3066fea0a0a +oid sha256:8f116daeaa3f233ae8c09fb26a1397d1a3028eaac891bae03fc7d2c29f2be617 size 3279 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b2.nbt b/data/minecraft/structure/woodland_mansion/1x2_b2.nbt index ae686ef6..6459d661 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b03406fa1703969463026ba1b6d19ea548324e7182aafd022e8bda5a11004018 -size 3135 +oid sha256:4b13941be098d1ba86cf08f0eb90a9ea2c2e152c2ee0e08a0907941f449f0e30 +size 3136 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b3.nbt b/data/minecraft/structure/woodland_mansion/1x2_b3.nbt index a305af37..8aceda5b 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba6dad0270419c831e790cd0558217cc94457ff3265481d9d90e23b51fedd7ab -size 2794 +oid sha256:81230506b96e7f06506dd1785dc9e00f5a5c5dd9d0958412fa6cc03a6b950f0c +size 2795 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b4.nbt b/data/minecraft/structure/woodland_mansion/1x2_b4.nbt index fb69d0f7..96848b98 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0222a2e37e902edabbb2211ae6ce50f2c1da81d3181f3493c7292c27b0c3423 -size 2965 +oid sha256:e17a6edb5fd88b821ce77c4d7afb6cb306a0a1b73d0c780fb1fb0b9eb87443b8 +size 2966 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b5.nbt b/data/minecraft/structure/woodland_mansion/1x2_b5.nbt index e960575a..e56cdeb0 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f0f108f43cad31535e007a713eca359213190cdbf9cc52bfe8ff5ea07319cdd +oid sha256:28ae058c56dcee187fd8fbe7559e086f026b5abcd7324d5dcb8da24e75b7cc3c size 2409 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c1.nbt b/data/minecraft/structure/woodland_mansion/1x2_c1.nbt index 5e915502..260100ad 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d74e5a919d621122874c0eaad9b988a137ce934c39659222c4957dfe6273c61 -size 3548 +oid sha256:6dd8b2e08865a03b8e8dfc95a4330d0011d47a02be4b6c0d7988c19e36057fd4 +size 3547 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c2.nbt b/data/minecraft/structure/woodland_mansion/1x2_c2.nbt index 3d91189b..cc2b62ec 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0830302037c66b1a2a40a5d0b6188deab13d9326bb82aff404368a8809c0b22d +oid sha256:ecc6729e5c01eda9afa3364ecc347f4bbbe18e55b91cf171150ffd07e3b8cf09 size 3349 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c3.nbt b/data/minecraft/structure/woodland_mansion/1x2_c3.nbt index 5705c738..062c325b 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68cc99109345d8bea9c031e3a0ab3f44a952b145ee783fb5e83084d7f092d115 +oid sha256:3d0f00f5347265061fcd62ed510b5ca7b8e7608cf7a77f397412f4a23d9bb06e size 3618 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c4.nbt b/data/minecraft/structure/woodland_mansion/1x2_c4.nbt index 50865390..b5430b90 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f108a626aae2403b1eb2db4fd362557bb00cf11be2b24eae8b38c432b16b9161 +oid sha256:84db41ed65110aa325175c192c12dc42ba506f5700fff98ebdc7a981241ae885 size 3621 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt b/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt index 343bc1db..553a8295 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:662e9334a931214a4b3167de06e3dd3ec9885fb76fb04bc5e3bca9fc36e6490d +oid sha256:835ba5bf8c353ada27a7100cdf810c3e479ea5fbf18ebbed5fce41d232dc86a0 size 6731 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d1.nbt b/data/minecraft/structure/woodland_mansion/1x2_d1.nbt index c8969539..a6da8cd9 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ac1fc9933aa82ff218e16c7fa463de48f4a1a50d935374edd4eb7c6f2ac2c9a +oid sha256:5256609a2560a1a6d9134aeef9c6d3b6d4bef7eaf290aad9d4977f344d05be52 size 3735 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d2.nbt b/data/minecraft/structure/woodland_mansion/1x2_d2.nbt index 6358268d..0255c87a 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0d9080c7b08705dcab4161b2a14c57f5b16f73a7ab06b297adb58300b962c5a -size 3906 +oid sha256:66e2cfe9e1d8dbdcdb5040ce769c4e8403fe8bcabbd61cf605f48d88d5bfe412 +size 3907 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d3.nbt b/data/minecraft/structure/woodland_mansion/1x2_d3.nbt index 8dcabbe9..6936f4d7 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7a1ad87f3f6a63a058eebdb3f577239fb614dcd53c6352c0ba67ec85c46a95f +oid sha256:5e45bec4e7d745e8cee7d4241c63ffe5c5df5168156a5dbdfd4682d36e1a8392 size 3844 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d4.nbt b/data/minecraft/structure/woodland_mansion/1x2_d4.nbt index 17d8a350..c6bbbbd4 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a9b53a66e3c1a5d4ba5c29ae68916b01e7595a799c71ea87b0a8faebfaa58f6 -size 3409 +oid sha256:cb617169a410aefa40b21f50cb644aec72caffa59ac44426743b98748420d241 +size 3410 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d5.nbt b/data/minecraft/structure/woodland_mansion/1x2_d5.nbt index 18449746..25cf2a61 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f38ab49d83b6855eb3b7f044ffb796c44d19a397dcd47a8c9fcecde66f58d3d +oid sha256:52d597f17b3d2b41867cca48f3bed21e186512b03a024aafab7de39fd24b91c2 size 3374 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt b/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt index 259fb413..420c25d6 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79f688776622c0ec3369a16a19e40d61c3f2a8e62bc540fc740b078a135417c +oid sha256:45d0103747115f59a72c8d6814db8e5e157a453bd4d80baae1eabadc89860012 size 6626 diff --git a/data/minecraft/structure/woodland_mansion/1x2_s1.nbt b/data/minecraft/structure/woodland_mansion/1x2_s1.nbt index 01a2b8d5..fb4b8a3e 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_s1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_s1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac0c253807b7e5dc03974cd87a5ceee9f0ce8f2138176c7c7233b488710d48bd -size 2687 +oid sha256:6d731c95eb6cbca9a0935331c3df23aaaa45bfaaf92254c6e5f0282ce46b3353 +size 2688 diff --git a/data/minecraft/structure/woodland_mansion/1x2_s2.nbt b/data/minecraft/structure/woodland_mansion/1x2_s2.nbt index 69e0c72c..dcccd47a 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_s2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_s2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45b474f03dd27c58fe1417eb719c0109199533cd32d32f7c72326e5a73c6d741 +oid sha256:2a68d09014a43f6589e6895003e411f6144297c15db1c88d3d0bf09ce7b3a1d3 size 2733 diff --git a/data/minecraft/structure/woodland_mansion/1x2_se1.nbt b/data/minecraft/structure/woodland_mansion/1x2_se1.nbt index 3fa84c35..1416f3eb 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_se1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_se1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7c9c736347ee6466cbe7375d0009dd5aef659eac6a5df4a1583f11ced7628ac +oid sha256:beae3d473369713463b522f0d5c38bc06a688292749ae63d03633bb6f290ab6c size 3885 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a1.nbt b/data/minecraft/structure/woodland_mansion/2x2_a1.nbt index 80ae343e..bb7b9e2b 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5964e71ed7ddbb9507ffaa6be6f1373398a6d94591c6390e63af6a9ee9075e4a +oid sha256:04d58c08dfe075f11ded73b7668d8d106e5550cd015027bff9d6bfe348fdbc50 size 6290 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a2.nbt b/data/minecraft/structure/woodland_mansion/2x2_a2.nbt index a093bec8..5ddaaad4 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:593d43b2f003a1e8498b3b6a43993e10c07d2993c7929b244bf4cd0c02486954 +oid sha256:a0cb7495bd0e8f2294a84939b72656b0a16aa657d5ba48432fca8289743e6cbf size 5634 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a3.nbt b/data/minecraft/structure/woodland_mansion/2x2_a3.nbt index 22730733..7637ca29 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ce03b05bdd3be8b1c45f12644f081c92a142d8e1c5d11dd4e1f030100fb1758 -size 5214 +oid sha256:7617035b62691ce6b7413465432214bda764c1546ee9a047221e7f0ac1643f24 +size 5215 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a4.nbt b/data/minecraft/structure/woodland_mansion/2x2_a4.nbt index 43984bca..70b266e6 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea821132effecdb4987599c2ed3b737d515a15517157e9e7c1938225fed9f6a4 +oid sha256:e7cb11b424dc3a0834402554ef76098d55cd5430b202ae3830938405ab157064 size 5410 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b1.nbt b/data/minecraft/structure/woodland_mansion/2x2_b1.nbt index 8f29a5ba..91c4e353 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50958acfab6a25af02f261266f0586019bc7b6d106b8c76c2dca830ecfd173ca -size 7314 +oid sha256:1477daced5ade3a76cbf49a24eec6ca1758e9c9c1936a2a9691d7a7dd05d2af9 +size 7315 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b2.nbt b/data/minecraft/structure/woodland_mansion/2x2_b2.nbt index b37f0ef1..16e5e8ee 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a3c253a191fb69aaa998ce21f5cd8a9847e7eb82247b953b947f2e1fc64b152 -size 7300 +oid sha256:fc2c7c0768f13e610a50900623e63c058cffd8ba0d8aee96e1c99fcfbfbecf44 +size 7301 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b3.nbt b/data/minecraft/structure/woodland_mansion/2x2_b3.nbt index 3f1d3a68..158c7840 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c714e55801e66bcb36100818e6a8154a56be7643b0249d40e61876c9bd32623f +oid sha256:958429b9b420db192a5e04cffb8fe748a2d3a692ae0ae94c6afcf8b22459e707 size 7105 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b4.nbt b/data/minecraft/structure/woodland_mansion/2x2_b4.nbt index 9ff35662..ea18d8d1 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d394e9e9ce1cae422a5531288155284a36e79fea67135c4e6ee1e982fe426ce2 -size 7242 +oid sha256:38734f189d0b8db293590c1a92cfe211009298590d226efd637aea410044c2bf +size 7243 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b5.nbt b/data/minecraft/structure/woodland_mansion/2x2_b5.nbt index cb567f59..b5a95de1 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bb4c0ad8735901846eb7d99677c4dbc0240c412ea08fc51a6ea2fa811416ba8 -size 7544 +oid sha256:00297476e57993ea4a84df08fb87e1d85bd8b92f414f488126fdf23ca7442522 +size 7545 diff --git a/data/minecraft/structure/woodland_mansion/2x2_s1.nbt b/data/minecraft/structure/woodland_mansion/2x2_s1.nbt index 1fdfee3f..f814f655 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_s1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_s1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86c01d9d5f23ada403d73af03fc11227240dc7091f4ab35c8444eeeaa6c2551f -size 6794 +oid sha256:13ce04c379c86c7e1fad007bfd69c8ea18a767c5e1f0f99815cd9d2e9676957b +size 6795 diff --git a/data/minecraft/structure/woodland_mansion/carpet_east.nbt b/data/minecraft/structure/woodland_mansion/carpet_east.nbt index 3e945d38..02d3dc31 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_east.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_east.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:794930ad8b32763243d572fb9e9e05e455868be494415e1902958b0a4d3f77af +oid sha256:b2136f216b3d74bf71e766ae3dfc364d3d2d2b9d1bc0f7e7bea85f9a6ad36d1d size 180 diff --git a/data/minecraft/structure/woodland_mansion/carpet_north.nbt b/data/minecraft/structure/woodland_mansion/carpet_north.nbt index ce3d1aa5..22435066 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_north.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_north.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:246977ec788298c4af0ff4fe06a9606f46d4a69582fd1ec9460acfef0e2ce6ce +oid sha256:8e77119aa1e5e852c331c666503777c492523734bef6470d1a6cb8832b1e92e0 size 178 diff --git a/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt b/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt index a72fe644..52c3273b 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e8a0d3a7d5d10a10a83b351f5cbc9f44e0298daf53824e8fa4a55042fd2ad07 +oid sha256:60f4b66bceb51ac4a128057d1ca4e3cb1aa0e492e88431bdfc83a686ac8be1e1 size 721 diff --git a/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt b/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt index 4893d44e..54102087 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fec55c09ac61385babe21daf873dd0fc4068c0fb0f3ab7e3edb782bf7aae42b4 -size 928 +oid sha256:144cd7d83b2cd947a28eb82650bea652db5a84148b9f00fae66f97ec15991114 +size 930 diff --git a/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt b/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt index 70001260..d4e758b7 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b477b37942d323d95cfe36238c64179c0969fa1ede01eadd7c62c14328f79876 -size 793 +oid sha256:ff184b5cdbf9a8f6b4c88b9a55bf5265bd8b2233cd403d4f5c2733d53c275190 +size 794 diff --git a/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt b/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt index ca763844..40197632 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:078c8d4ae3dbd41c85bca104e66b25eff2d547c96c00e5a0208a81f9350c4fc9 -size 1019 +oid sha256:62405d417776d0abd36b0f2a9100d93075de83996a2f76ba5757ee78b5769457 +size 1021 diff --git a/data/minecraft/structure/woodland_mansion/corridor_floor.nbt b/data/minecraft/structure/woodland_mansion/corridor_floor.nbt index 0d2598ca..e9255d4f 100644 --- a/data/minecraft/structure/woodland_mansion/corridor_floor.nbt +++ b/data/minecraft/structure/woodland_mansion/corridor_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff15125e022eac7d1e0c0534c054199b250b1c6eabb513578450083c2e3059d6 +oid sha256:8fdee78da78f72607946ca110be9f3f383f3bc8d1a9c1ea873fff490bf2fb546 size 1172 diff --git a/data/minecraft/structure/woodland_mansion/entrance.nbt b/data/minecraft/structure/woodland_mansion/entrance.nbt index 4c6a13bd..a7405f73 100644 --- a/data/minecraft/structure/woodland_mansion/entrance.nbt +++ b/data/minecraft/structure/woodland_mansion/entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1825946a75b08630adad6c0131205b12e43031c8f8b4bfd8fed0981b9e0bd09a +oid sha256:37d955bbd625165646c82c8cdeeec5dcf272ec8f3ca3dc475dbddd033f50485a size 18256 diff --git a/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt b/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt index 7cf90228..d4c1a2ed 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c558dc510da0aaa0b5c7d75aeaaf228dc2356c87a49476459b7d1a7fd3515130 +oid sha256:3184572067ef43d22b6c56eabefdb64550b03cb77caebeec4fbe2ad6fac433c1 size 410 diff --git a/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt b/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt index 40ef0505..aff781ea 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17adfe2577e314d0704a2603d60e2fbe4f2e7189ef000b4b9057a5081db019e6 +oid sha256:b56ab713f0ff5fb9a3fa0d0d1ceb00b11ea45e777a09f15b2a062d0787c60eb9 size 505 diff --git a/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt b/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt index 41d72da1..d427ab44 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c03649c1ec72dfd9f6d940cbd935072212c502f92f9dc37eb8a87386a5d2a260 +oid sha256:31d1f4b4ea4ef34623ac13e49d0007c6a4b3db2b0041dada241bc97c931d3ba3 size 366 diff --git a/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt b/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt index a204b058..19e0d201 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e67a98670c2304179e0d9225e15b724f49ea8fda43798c788d26479e6e77d469 +oid sha256:1c401e8fa63ed13fc5636b658d019d46d37dee4bc5366472ea44b31ca3cb6766 size 442 diff --git a/data/minecraft/structure/woodland_mansion/roof.nbt b/data/minecraft/structure/woodland_mansion/roof.nbt index e81f2916..86b6bd65 100644 --- a/data/minecraft/structure/woodland_mansion/roof.nbt +++ b/data/minecraft/structure/woodland_mansion/roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:492273453228dbfd1e579553c6f4530ecef4f83cbe4f39aff46d3b244184c088 +oid sha256:b26acb4c0c99d304b677e9c4621113a7c8b79511e42dca93051a4c9b18484f87 size 333 diff --git a/data/minecraft/structure/woodland_mansion/roof_corner.nbt b/data/minecraft/structure/woodland_mansion/roof_corner.nbt index 652be511..74f68aff 100644 --- a/data/minecraft/structure/woodland_mansion/roof_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72b7908140f837fe427f612ea4e8a3d7617597b0f579335b17847940644cac9d +oid sha256:a515bb0b689c61ba657bf041d675b220f1b2b81269d7bf8cd0e1c483e9fd95f1 size 450 diff --git a/data/minecraft/structure/woodland_mansion/roof_front.nbt b/data/minecraft/structure/woodland_mansion/roof_front.nbt index e5fceeb4..2ab79e2e 100644 --- a/data/minecraft/structure/woodland_mansion/roof_front.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_front.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bdbbd0ebc792c716649a8c026ea87ab3a53da02c165d8429f6c5cb4d86b5699 +oid sha256:aebfe73038d68f51202559505764cf12268d5cb0a737888714ace55e34418dae size 636 diff --git a/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt b/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt index 60461142..96a1af48 100644 --- a/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bc4ca3bf3dbda73c0846cf7f58c89df5f4395f2075ffbf80d29dcc58f750f8d +oid sha256:63aa2fa62ad819624a868dd70177026bcb63e404a3d048f3a7231acc8a4727f6 size 445 diff --git a/data/minecraft/structure/woodland_mansion/small_wall.nbt b/data/minecraft/structure/woodland_mansion/small_wall.nbt index ead6d458..e9518274 100644 --- a/data/minecraft/structure/woodland_mansion/small_wall.nbt +++ b/data/minecraft/structure/woodland_mansion/small_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a126a11dabe46c248dca27bb11b9668ccc6e53472f27135f61959bc29c46310e +oid sha256:e5a4247489ab3a2e6fdb9841bc04e863d7e4c4355a882e770d673cc4faec797a size 511 diff --git a/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt b/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt index 83179e33..e875b3af 100644 --- a/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:007847ff4b54346856bf7da822860ba7bc2853a73ce9b7a5fb85dac6e1adb240 +oid sha256:bfda42a2839d6c96bec3323a2eccd4549808bea1a14b3eeb7da8db2af5661d1f size 262 diff --git a/data/minecraft/structure/woodland_mansion/wall_corner.nbt b/data/minecraft/structure/woodland_mansion/wall_corner.nbt index 41096edb..78581730 100644 --- a/data/minecraft/structure/woodland_mansion/wall_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee3c7058ba4bfdb79424d7972215d3ad438722bdc1cd90ebfc5024d330b360c +oid sha256:e381e5a9d2d21fae441874c15237aa76e41b418a896b43583ca664ffbe433682 size 308 diff --git a/data/minecraft/structure/woodland_mansion/wall_flat.nbt b/data/minecraft/structure/woodland_mansion/wall_flat.nbt index 662e690a..73a54a56 100644 --- a/data/minecraft/structure/woodland_mansion/wall_flat.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_flat.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1338f6702ff83000e79287157dc348197be30edcde3b020cea8c1381c8b53a10 +oid sha256:46acf8bef5b3eb4510cd0128b0def652f35d302de4a983f51c05ed43b1490fb7 size 727 diff --git a/data/minecraft/structure/woodland_mansion/wall_window.nbt b/data/minecraft/structure/woodland_mansion/wall_window.nbt index b6859e0f..51c4d389 100644 --- a/data/minecraft/structure/woodland_mansion/wall_window.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_window.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8e74e985ae8b79d398e0beefeca06232fe4a89645a351a5fb27a8d987ca3a5e -size 831 +oid sha256:ee8a83acde4b6e64134d52810ed51731a05030f139179756ce42af3bb57be079 +size 830 diff --git a/data/minecraft/tags/block/bee_attractive.json b/data/minecraft/tags/block/bee_attractive.json new file mode 100644 index 00000000..f2851d5d --- /dev/null +++ b/data/minecraft/tags/block/bee_attractive.json @@ -0,0 +1,33 @@ +{ + "values": [ + "minecraft:dandelion", + "minecraft:open_eyeblossom", + "minecraft:poppy", + "minecraft:blue_orchid", + "minecraft:allium", + "minecraft:azure_bluet", + "minecraft:red_tulip", + "minecraft:orange_tulip", + "minecraft:white_tulip", + "minecraft:pink_tulip", + "minecraft:oxeye_daisy", + "minecraft:cornflower", + "minecraft:lily_of_the_valley", + "minecraft:wither_rose", + "minecraft:torchflower", + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:peony", + "minecraft:rose_bush", + "minecraft:pitcher_plant", + "minecraft:flowering_azalea_leaves", + "minecraft:flowering_azalea", + "minecraft:mangrove_propagule", + "minecraft:cherry_leaves", + "minecraft:pink_petals", + "minecraft:wildflowers", + "minecraft:chorus_flower", + "minecraft:spore_blossom", + "minecraft:cactus_flower" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/big_dripleaf_placeable.json b/data/minecraft/tags/block/big_dripleaf_placeable.json index 5ef3d369..5285e530 100644 --- a/data/minecraft/tags/block/big_dripleaf_placeable.json +++ b/data/minecraft/tags/block/big_dripleaf_placeable.json @@ -1,7 +1,15 @@ { "values": [ "#minecraft:small_dripleaf_placeable", - "#minecraft:dirt", + "minecraft:dirt", + "minecraft:grass_block", + "minecraft:podzol", + "minecraft:coarse_dirt", + "minecraft:mycelium", + "minecraft:rooted_dirt", + "minecraft:moss_block", + "minecraft:mud", + "minecraft:muddy_mangrove_roots", "minecraft:farmland" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/camels_spawnable_on.json b/data/minecraft/tags/block/camels_spawnable_on.json new file mode 100644 index 00000000..3dd992bb --- /dev/null +++ b/data/minecraft/tags/block/camels_spawnable_on.json @@ -0,0 +1,5 @@ +{ + "values": [ + "#minecraft:sand" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/ceiling_hanging_signs.json b/data/minecraft/tags/block/ceiling_hanging_signs.json index 4ca06dad..b55f67ba 100644 --- a/data/minecraft/tags/block/ceiling_hanging_signs.json +++ b/data/minecraft/tags/block/ceiling_hanging_signs.json @@ -7,6 +7,7 @@ "minecraft:cherry_hanging_sign", "minecraft:jungle_hanging_sign", "minecraft:dark_oak_hanging_sign", + "minecraft:pale_oak_hanging_sign", "minecraft:crimson_hanging_sign", "minecraft:warped_hanging_sign", "minecraft:mangrove_hanging_sign", diff --git a/data/minecraft/tags/block/combination_step_sound_blocks.json b/data/minecraft/tags/block/combination_step_sound_blocks.json index ba45e6cf..71da8418 100644 --- a/data/minecraft/tags/block/combination_step_sound_blocks.json +++ b/data/minecraft/tags/block/combination_step_sound_blocks.json @@ -2,9 +2,11 @@ "values": [ "#minecraft:wool_carpets", "minecraft:moss_carpet", + "minecraft:pale_moss_carpet", "minecraft:snow", "minecraft:nether_sprouts", "minecraft:warped_roots", - "minecraft:crimson_roots" + "minecraft:crimson_roots", + "minecraft:resin_clump" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/dead_bush_may_place_on.json b/data/minecraft/tags/block/dead_bush_may_place_on.json deleted file mode 100644 index 56f44e1f..00000000 --- a/data/minecraft/tags/block/dead_bush_may_place_on.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "values": [ - "#minecraft:sand", - "#minecraft:terracotta", - "#minecraft:dirt" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/block/dirt.json b/data/minecraft/tags/block/dirt.json index a75db4a0..2037c6a1 100644 --- a/data/minecraft/tags/block/dirt.json +++ b/data/minecraft/tags/block/dirt.json @@ -7,6 +7,7 @@ "minecraft:mycelium", "minecraft:rooted_dirt", "minecraft:moss_block", + "minecraft:pale_moss_block", "minecraft:mud", "minecraft:muddy_mangrove_roots" ] diff --git a/data/minecraft/tags/block/dragon_immune.json b/data/minecraft/tags/block/dragon_immune.json index fe9dfc5e..a04c3db3 100644 --- a/data/minecraft/tags/block/dragon_immune.json +++ b/data/minecraft/tags/block/dragon_immune.json @@ -16,6 +16,8 @@ "minecraft:end_stone", "minecraft:iron_bars", "minecraft:respawn_anchor", - "minecraft:reinforced_deepslate" + "minecraft:reinforced_deepslate", + "minecraft:test_block", + "minecraft:test_instance_block" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/dry_vegetation_may_place_on.json b/data/minecraft/tags/block/dry_vegetation_may_place_on.json new file mode 100644 index 00000000..ac023d9f --- /dev/null +++ b/data/minecraft/tags/block/dry_vegetation_may_place_on.json @@ -0,0 +1,8 @@ +{ + "values": [ + "#minecraft:sand", + "#minecraft:terracotta", + "#minecraft:dirt", + "minecraft:farmland" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/edible_for_sheep.json b/data/minecraft/tags/block/edible_for_sheep.json new file mode 100644 index 00000000..91cc71b0 --- /dev/null +++ b/data/minecraft/tags/block/edible_for_sheep.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:short_grass", + "minecraft:short_dry_grass", + "minecraft:tall_dry_grass", + "minecraft:fern" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/enderman_holdable.json b/data/minecraft/tags/block/enderman_holdable.json index 28a83e79..4454c0ae 100644 --- a/data/minecraft/tags/block/enderman_holdable.json +++ b/data/minecraft/tags/block/enderman_holdable.json @@ -18,6 +18,7 @@ "minecraft:crimson_roots", "minecraft:warped_fungus", "minecraft:warped_nylium", - "minecraft:warped_roots" + "minecraft:warped_roots", + "minecraft:cactus_flower" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/fence_gates.json b/data/minecraft/tags/block/fence_gates.json index 2a8d2924..9904fc97 100644 --- a/data/minecraft/tags/block/fence_gates.json +++ b/data/minecraft/tags/block/fence_gates.json @@ -3,6 +3,7 @@ "minecraft:acacia_fence_gate", "minecraft:birch_fence_gate", "minecraft:dark_oak_fence_gate", + "minecraft:pale_oak_fence_gate", "minecraft:jungle_fence_gate", "minecraft:oak_fence_gate", "minecraft:spruce_fence_gate", diff --git a/data/minecraft/tags/block/flower_pots.json b/data/minecraft/tags/block/flower_pots.json index a1e7c896..7e1fd65a 100644 --- a/data/minecraft/tags/block/flower_pots.json +++ b/data/minecraft/tags/block/flower_pots.json @@ -1,6 +1,8 @@ { "values": [ "minecraft:flower_pot", + "minecraft:potted_open_eyeblossom", + "minecraft:potted_closed_eyeblossom", "minecraft:potted_poppy", "minecraft:potted_blue_orchid", "minecraft:potted_allium", @@ -17,6 +19,7 @@ "minecraft:potted_jungle_sapling", "minecraft:potted_acacia_sapling", "minecraft:potted_dark_oak_sapling", + "minecraft:potted_pale_oak_sapling", "minecraft:potted_red_mushroom", "minecraft:potted_brown_mushroom", "minecraft:potted_dead_bush", diff --git a/data/minecraft/tags/block/flowers.json b/data/minecraft/tags/block/flowers.json index 9e10a4de..e0095f65 100644 --- a/data/minecraft/tags/block/flowers.json +++ b/data/minecraft/tags/block/flowers.json @@ -1,13 +1,19 @@ { "values": [ "#minecraft:small_flowers", - "#minecraft:tall_flowers", + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:peony", + "minecraft:rose_bush", + "minecraft:pitcher_plant", "minecraft:flowering_azalea_leaves", "minecraft:flowering_azalea", "minecraft:mangrove_propagule", "minecraft:cherry_leaves", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:chorus_flower", - "minecraft:spore_blossom" + "minecraft:spore_blossom", + "minecraft:cactus_flower" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/inside_step_sound_blocks.json b/data/minecraft/tags/block/inside_step_sound_blocks.json index bd63a6c1..c376c71d 100644 --- a/data/minecraft/tags/block/inside_step_sound_blocks.json +++ b/data/minecraft/tags/block/inside_step_sound_blocks.json @@ -5,6 +5,8 @@ "minecraft:glow_lichen", "minecraft:lily_pad", "minecraft:small_amethyst_bud", - "minecraft:pink_petals" + "minecraft:pink_petals", + "minecraft:wildflowers", + "minecraft:leaf_litter" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/leaves.json b/data/minecraft/tags/block/leaves.json index 6815479c..523787f2 100644 --- a/data/minecraft/tags/block/leaves.json +++ b/data/minecraft/tags/block/leaves.json @@ -3,6 +3,7 @@ "minecraft:jungle_leaves", "minecraft:oak_leaves", "minecraft:spruce_leaves", + "minecraft:pale_oak_leaves", "minecraft:dark_oak_leaves", "minecraft:acacia_leaves", "minecraft:birch_leaves", diff --git a/data/minecraft/tags/block/logs_that_burn.json b/data/minecraft/tags/block/logs_that_burn.json index 3b2590c9..00f0e7fd 100644 --- a/data/minecraft/tags/block/logs_that_burn.json +++ b/data/minecraft/tags/block/logs_that_burn.json @@ -1,6 +1,7 @@ { "values": [ "#minecraft:dark_oak_logs", + "#minecraft:pale_oak_logs", "#minecraft:oak_logs", "#minecraft:acacia_logs", "#minecraft:birch_logs", diff --git a/data/minecraft/tags/block/mineable/axe.json b/data/minecraft/tags/block/mineable/axe.json index a5e87dde..62b74b06 100644 --- a/data/minecraft/tags/block/mineable/axe.json +++ b/data/minecraft/tags/block/mineable/axe.json @@ -1,76 +1,43 @@ { "values": [ "minecraft:note_block", - "minecraft:attached_melon_stem", - "minecraft:attached_pumpkin_stem", - "minecraft:azalea", "minecraft:bamboo", "minecraft:barrel", "minecraft:bee_nest", "minecraft:beehive", - "minecraft:beetroots", "minecraft:big_dripleaf_stem", "minecraft:big_dripleaf", "minecraft:bookshelf", "minecraft:brown_mushroom_block", - "minecraft:brown_mushroom", "minecraft:campfire", - "minecraft:carrots", "minecraft:cartography_table", "minecraft:carved_pumpkin", - "minecraft:cave_vines_plant", - "minecraft:cave_vines", "minecraft:chest", "minecraft:chorus_flower", "minecraft:chorus_plant", "minecraft:cocoa", "minecraft:composter", "minecraft:crafting_table", - "minecraft:crimson_fungus", "minecraft:daylight_detector", - "minecraft:dead_bush", - "minecraft:fern", "minecraft:fletching_table", "minecraft:glow_lichen", - "minecraft:short_grass", - "minecraft:hanging_roots", "minecraft:jack_o_lantern", "minecraft:jukebox", "minecraft:ladder", - "minecraft:large_fern", "minecraft:lectern", - "minecraft:lily_pad", "minecraft:loom", - "minecraft:melon_stem", "minecraft:melon", "minecraft:mushroom_stem", - "minecraft:nether_wart", - "minecraft:potatoes", - "minecraft:pumpkin_stem", "minecraft:pumpkin", "minecraft:red_mushroom_block", - "minecraft:red_mushroom", - "minecraft:scaffolding", - "minecraft:small_dripleaf", "minecraft:smithing_table", "minecraft:soul_campfire", - "minecraft:spore_blossom", - "minecraft:sugar_cane", - "minecraft:sweet_berry_bush", - "minecraft:tall_grass", "minecraft:trapped_chest", - "minecraft:twisting_vines_plant", - "minecraft:twisting_vines", "minecraft:vine", - "minecraft:warped_fungus", - "minecraft:weeping_vines_plant", - "minecraft:weeping_vines", - "minecraft:wheat", "#minecraft:banners", "#minecraft:fence_gates", "#minecraft:logs", "#minecraft:planks", - "#minecraft:saplings", "#minecraft:signs", "#minecraft:wooden_buttons", "#minecraft:wooden_doors", @@ -85,6 +52,7 @@ "minecraft:bamboo_mosaic_slab", "minecraft:bamboo_mosaic_stairs", "#minecraft:bamboo_blocks", - "minecraft:chiseled_bookshelf" + "minecraft:chiseled_bookshelf", + "minecraft:creaking_heart" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/mineable/hoe.json b/data/minecraft/tags/block/mineable/hoe.json index d692b729..ed7b791a 100644 --- a/data/minecraft/tags/block/mineable/hoe.json +++ b/data/minecraft/tags/block/mineable/hoe.json @@ -1,5 +1,6 @@ { "values": [ + "#minecraft:leaves", "minecraft:nether_wart_block", "minecraft:warped_wart_block", "minecraft:hay_block", @@ -8,24 +9,15 @@ "minecraft:shroomlight", "minecraft:sponge", "minecraft:wet_sponge", - "minecraft:jungle_leaves", - "minecraft:oak_leaves", - "minecraft:spruce_leaves", - "minecraft:dark_oak_leaves", - "minecraft:acacia_leaves", - "minecraft:birch_leaves", - "minecraft:azalea_leaves", - "minecraft:flowering_azalea_leaves", - "minecraft:mangrove_leaves", "minecraft:sculk_sensor", "minecraft:calibrated_sculk_sensor", "minecraft:moss_block", "minecraft:moss_carpet", + "minecraft:pale_moss_block", + "minecraft:pale_moss_carpet", "minecraft:sculk", "minecraft:sculk_catalyst", "minecraft:sculk_vein", - "minecraft:sculk_shrieker", - "minecraft:pink_petals", - "minecraft:cherry_leaves" + "minecraft:sculk_shrieker" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/mineable/pickaxe.json b/data/minecraft/tags/block/mineable/pickaxe.json index 0cdbf154..c9b8d1b8 100644 --- a/data/minecraft/tags/block/mineable/pickaxe.json +++ b/data/minecraft/tags/block/mineable/pickaxe.json @@ -383,6 +383,11 @@ "minecraft:waxed_exposed_copper_trapdoor", "minecraft:waxed_weathered_copper_trapdoor", "minecraft:waxed_oxidized_copper_trapdoor", - "minecraft:heavy_core" + "minecraft:heavy_core", + "minecraft:resin_bricks", + "minecraft:resin_brick_slab", + "minecraft:resin_brick_wall", + "minecraft:resin_brick_stairs", + "minecraft:chiseled_resin_bricks" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/needs_stone_tool.json b/data/minecraft/tags/block/needs_stone_tool.json index 52ac1ec3..536ba02a 100644 --- a/data/minecraft/tags/block/needs_stone_tool.json +++ b/data/minecraft/tags/block/needs_stone_tool.json @@ -75,14 +75,6 @@ "minecraft:waxed_copper_trapdoor", "minecraft:waxed_exposed_copper_trapdoor", "minecraft:waxed_weathered_copper_trapdoor", - "minecraft:waxed_oxidized_copper_trapdoor", - "minecraft:copper_door", - "minecraft:exposed_copper_door", - "minecraft:weathered_copper_door", - "minecraft:oxidized_copper_door", - "minecraft:waxed_copper_door", - "minecraft:waxed_exposed_copper_door", - "minecraft:waxed_weathered_copper_door", - "minecraft:waxed_oxidized_copper_door" + "minecraft:waxed_oxidized_copper_trapdoor" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/overworld_carver_replaceables.json b/data/minecraft/tags/block/overworld_carver_replaceables.json index 60bfd842..2830ac2b 100644 --- a/data/minecraft/tags/block/overworld_carver_replaceables.json +++ b/data/minecraft/tags/block/overworld_carver_replaceables.json @@ -6,13 +6,13 @@ "#minecraft:terracotta", "#minecraft:iron_ores", "#minecraft:copper_ores", + "#minecraft:snow", "minecraft:water", "minecraft:gravel", "minecraft:suspicious_gravel", "minecraft:sandstone", "minecraft:red_sandstone", "minecraft:calcite", - "minecraft:snow", "minecraft:packed_ice", "minecraft:raw_iron_block", "minecraft:raw_copper_block" diff --git a/data/minecraft/tags/block/overworld_natural_logs.json b/data/minecraft/tags/block/overworld_natural_logs.json index b3f1520d..940bdb74 100644 --- a/data/minecraft/tags/block/overworld_natural_logs.json +++ b/data/minecraft/tags/block/overworld_natural_logs.json @@ -6,6 +6,7 @@ "minecraft:jungle_log", "minecraft:spruce_log", "minecraft:dark_oak_log", + "minecraft:pale_oak_log", "minecraft:mangrove_log", "minecraft:cherry_log" ] diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/pale_oak_logs.json b/data/minecraft/tags/block/pale_oak_logs.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/tags/block/pale_oak_logs.json rename to data/minecraft/tags/block/pale_oak_logs.json diff --git a/data/minecraft/tags/block/planks.json b/data/minecraft/tags/block/planks.json index a8ff5bb5..55fa6f30 100644 --- a/data/minecraft/tags/block/planks.json +++ b/data/minecraft/tags/block/planks.json @@ -6,6 +6,7 @@ "minecraft:jungle_planks", "minecraft:acacia_planks", "minecraft:dark_oak_planks", + "minecraft:pale_oak_planks", "minecraft:crimson_planks", "minecraft:warped_planks", "minecraft:mangrove_planks", diff --git a/data/minecraft/tags/block/plays_ambient_desert_block_sounds.json b/data/minecraft/tags/block/plays_ambient_desert_block_sounds.json new file mode 100644 index 00000000..abb97570 --- /dev/null +++ b/data/minecraft/tags/block/plays_ambient_desert_block_sounds.json @@ -0,0 +1,7 @@ +{ + "values": [ + "#minecraft:terracotta", + "minecraft:sand", + "minecraft:red_sand" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/replaceable.json b/data/minecraft/tags/block/replaceable.json index d4e6df2e..da052432 100644 --- a/data/minecraft/tags/block/replaceable.json +++ b/data/minecraft/tags/block/replaceable.json @@ -6,6 +6,9 @@ "minecraft:short_grass", "minecraft:fern", "minecraft:dead_bush", + "minecraft:bush", + "minecraft:short_dry_grass", + "minecraft:tall_dry_grass", "minecraft:seagrass", "minecraft:tall_seagrass", "minecraft:fire", @@ -13,6 +16,7 @@ "minecraft:snow", "minecraft:vine", "minecraft:glow_lichen", + "minecraft:resin_clump", "minecraft:light", "minecraft:tall_grass", "minecraft:large_fern", @@ -23,6 +27,7 @@ "minecraft:warped_roots", "minecraft:nether_sprouts", "minecraft:crimson_roots", + "minecraft:leaf_litter", "minecraft:hanging_roots" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/replaceable_by_mushrooms.json b/data/minecraft/tags/block/replaceable_by_mushrooms.json new file mode 100644 index 00000000..d2894adf --- /dev/null +++ b/data/minecraft/tags/block/replaceable_by_mushrooms.json @@ -0,0 +1,35 @@ +{ + "values": [ + "#minecraft:leaves", + "#minecraft:small_flowers", + "minecraft:pale_moss_carpet", + "minecraft:short_grass", + "minecraft:fern", + "minecraft:dead_bush", + "minecraft:vine", + "minecraft:glow_lichen", + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:rose_bush", + "minecraft:peony", + "minecraft:tall_grass", + "minecraft:large_fern", + "minecraft:hanging_roots", + "minecraft:pitcher_plant", + "minecraft:water", + "minecraft:seagrass", + "minecraft:tall_seagrass", + "minecraft:brown_mushroom", + "minecraft:red_mushroom", + "minecraft:brown_mushroom_block", + "minecraft:red_mushroom_block", + "minecraft:warped_roots", + "minecraft:nether_sprouts", + "minecraft:crimson_roots", + "minecraft:leaf_litter", + "minecraft:short_dry_grass", + "minecraft:tall_dry_grass", + "minecraft:bush", + "minecraft:firefly_bush" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/replaceable_by_trees.json b/data/minecraft/tags/block/replaceable_by_trees.json index 9e7856bf..c04ade87 100644 --- a/data/minecraft/tags/block/replaceable_by_trees.json +++ b/data/minecraft/tags/block/replaceable_by_trees.json @@ -1,6 +1,8 @@ { "values": [ "#minecraft:leaves", + "#minecraft:small_flowers", + "minecraft:pale_moss_carpet", "minecraft:short_grass", "minecraft:fern", "minecraft:dead_bush", @@ -17,8 +19,13 @@ "minecraft:water", "minecraft:seagrass", "minecraft:tall_seagrass", + "minecraft:bush", + "minecraft:firefly_bush", "minecraft:warped_roots", "minecraft:nether_sprouts", - "minecraft:crimson_roots" + "minecraft:crimson_roots", + "minecraft:leaf_litter", + "minecraft:short_dry_grass", + "minecraft:tall_dry_grass" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/saplings.json b/data/minecraft/tags/block/saplings.json index cebde163..286497bf 100644 --- a/data/minecraft/tags/block/saplings.json +++ b/data/minecraft/tags/block/saplings.json @@ -6,6 +6,7 @@ "minecraft:jungle_sapling", "minecraft:acacia_sapling", "minecraft:dark_oak_sapling", + "minecraft:pale_oak_sapling", "minecraft:azalea", "minecraft:flowering_azalea", "minecraft:mangrove_propagule", diff --git a/data/minecraft/tags/block/slabs.json b/data/minecraft/tags/block/slabs.json index 0f3f5aea..ebc3f8e1 100644 --- a/data/minecraft/tags/block/slabs.json +++ b/data/minecraft/tags/block/slabs.json @@ -49,6 +49,7 @@ "minecraft:mud_brick_slab", "minecraft:tuff_slab", "minecraft:polished_tuff_slab", - "minecraft:tuff_brick_slab" + "minecraft:tuff_brick_slab", + "minecraft:resin_brick_slab" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/small_flowers.json b/data/minecraft/tags/block/small_flowers.json index 2477625f..c77dca4b 100644 --- a/data/minecraft/tags/block/small_flowers.json +++ b/data/minecraft/tags/block/small_flowers.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:dandelion", + "minecraft:open_eyeblossom", "minecraft:poppy", "minecraft:blue_orchid", "minecraft:allium", @@ -13,6 +14,7 @@ "minecraft:cornflower", "minecraft:lily_of_the_valley", "minecraft:wither_rose", - "minecraft:torchflower" + "minecraft:torchflower", + "minecraft:closed_eyeblossom" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/sniffer_diggable_block.json b/data/minecraft/tags/block/sniffer_diggable_block.json index 2aead93a..9948ad3b 100644 --- a/data/minecraft/tags/block/sniffer_diggable_block.json +++ b/data/minecraft/tags/block/sniffer_diggable_block.json @@ -6,6 +6,7 @@ "minecraft:coarse_dirt", "minecraft:rooted_dirt", "minecraft:moss_block", + "minecraft:pale_moss_block", "minecraft:mud", "minecraft:muddy_mangrove_roots" ] diff --git a/data/minecraft/tags/block/stairs.json b/data/minecraft/tags/block/stairs.json index eb67a9fe..fd135fc2 100644 --- a/data/minecraft/tags/block/stairs.json +++ b/data/minecraft/tags/block/stairs.json @@ -45,6 +45,7 @@ "minecraft:mud_brick_stairs", "minecraft:tuff_stairs", "minecraft:polished_tuff_stairs", - "minecraft:tuff_brick_stairs" + "minecraft:tuff_brick_stairs", + "minecraft:resin_brick_stairs" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/standing_signs.json b/data/minecraft/tags/block/standing_signs.json index 7b4ddb48..84fda375 100644 --- a/data/minecraft/tags/block/standing_signs.json +++ b/data/minecraft/tags/block/standing_signs.json @@ -6,6 +6,7 @@ "minecraft:acacia_sign", "minecraft:jungle_sign", "minecraft:dark_oak_sign", + "minecraft:pale_oak_sign", "minecraft:crimson_sign", "minecraft:warped_sign", "minecraft:mangrove_sign", diff --git a/data/minecraft/tags/block/sword_efficient.json b/data/minecraft/tags/block/sword_efficient.json index 57670bed..bdfcc89d 100644 --- a/data/minecraft/tags/block/sword_efficient.json +++ b/data/minecraft/tags/block/sword_efficient.json @@ -1,53 +1,15 @@ { "values": [ "#minecraft:leaves", - "#minecraft:saplings", - "#minecraft:small_flowers", - "#minecraft:crops", - "minecraft:short_grass", - "minecraft:fern", - "minecraft:dead_bush", "minecraft:vine", "minecraft:glow_lichen", - "minecraft:sunflower", - "minecraft:lilac", - "minecraft:rose_bush", - "minecraft:peony", - "minecraft:tall_grass", - "minecraft:large_fern", - "minecraft:hanging_roots", - "minecraft:pitcher_plant", - "minecraft:brown_mushroom", - "minecraft:red_mushroom", - "minecraft:sugar_cane", "minecraft:pumpkin", "minecraft:carved_pumpkin", "minecraft:jack_o_lantern", "minecraft:melon", - "minecraft:attached_pumpkin_stem", - "minecraft:attached_melon_stem", - "minecraft:lily_pad", "minecraft:cocoa", - "minecraft:pitcher_crop", - "minecraft:sweet_berry_bush", - "minecraft:cave_vines", - "minecraft:cave_vines_plant", - "minecraft:spore_blossom", - "minecraft:moss_carpet", - "minecraft:pink_petals", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", - "minecraft:small_dripleaf", - "minecraft:nether_wart", - "minecraft:warped_fungus", - "minecraft:warped_roots", - "minecraft:nether_sprouts", - "minecraft:crimson_fungus", - "minecraft:weeping_vines", - "minecraft:weeping_vines_plant", - "minecraft:twisting_vines", - "minecraft:twisting_vines_plant", - "minecraft:crimson_roots", "minecraft:chorus_plant", "minecraft:chorus_flower" ] diff --git a/data/minecraft/tags/block/sword_instantly_mines.json b/data/minecraft/tags/block/sword_instantly_mines.json new file mode 100644 index 00000000..5059bebb --- /dev/null +++ b/data/minecraft/tags/block/sword_instantly_mines.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:bamboo", + "minecraft:bamboo_sapling" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/block/tall_flowers.json b/data/minecraft/tags/block/tall_flowers.json deleted file mode 100644 index 144eb89e..00000000 --- a/data/minecraft/tags/block/tall_flowers.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "values": [ - "minecraft:sunflower", - "minecraft:lilac", - "minecraft:peony", - "minecraft:rose_bush", - "minecraft:pitcher_plant" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/block/wall_hanging_signs.json b/data/minecraft/tags/block/wall_hanging_signs.json index b1ebe41f..4afc13d5 100644 --- a/data/minecraft/tags/block/wall_hanging_signs.json +++ b/data/minecraft/tags/block/wall_hanging_signs.json @@ -7,6 +7,7 @@ "minecraft:cherry_wall_hanging_sign", "minecraft:jungle_wall_hanging_sign", "minecraft:dark_oak_wall_hanging_sign", + "minecraft:pale_oak_wall_hanging_sign", "minecraft:crimson_wall_hanging_sign", "minecraft:warped_wall_hanging_sign", "minecraft:mangrove_wall_hanging_sign", diff --git a/data/minecraft/tags/block/wall_post_override.json b/data/minecraft/tags/block/wall_post_override.json index 0595e842..51925946 100644 --- a/data/minecraft/tags/block/wall_post_override.json +++ b/data/minecraft/tags/block/wall_post_override.json @@ -6,6 +6,7 @@ "minecraft:tripwire", "#minecraft:signs", "#minecraft:banners", - "#minecraft:pressure_plates" + "#minecraft:pressure_plates", + "minecraft:cactus_flower" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/wall_signs.json b/data/minecraft/tags/block/wall_signs.json index bf1d1f6f..6f430df4 100644 --- a/data/minecraft/tags/block/wall_signs.json +++ b/data/minecraft/tags/block/wall_signs.json @@ -6,6 +6,7 @@ "minecraft:acacia_wall_sign", "minecraft:jungle_wall_sign", "minecraft:dark_oak_wall_sign", + "minecraft:pale_oak_wall_sign", "minecraft:crimson_wall_sign", "minecraft:warped_wall_sign", "minecraft:mangrove_wall_sign", diff --git a/data/minecraft/tags/block/walls.json b/data/minecraft/tags/block/walls.json index b4d42842..aa80022b 100644 --- a/data/minecraft/tags/block/walls.json +++ b/data/minecraft/tags/block/walls.json @@ -24,6 +24,7 @@ "minecraft:mud_brick_wall", "minecraft:tuff_wall", "minecraft:polished_tuff_wall", - "minecraft:tuff_brick_wall" + "minecraft:tuff_brick_wall", + "minecraft:resin_brick_wall" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/wither_immune.json b/data/minecraft/tags/block/wither_immune.json index c926979e..5c14361a 100644 --- a/data/minecraft/tags/block/wither_immune.json +++ b/data/minecraft/tags/block/wither_immune.json @@ -12,6 +12,8 @@ "minecraft:jigsaw", "minecraft:moving_piston", "minecraft:light", - "minecraft:reinforced_deepslate" + "minecraft:reinforced_deepslate", + "minecraft:test_block", + "minecraft:test_instance_block" ] } \ No newline at end of file diff --git a/data/minecraft/tags/block/wooden_buttons.json b/data/minecraft/tags/block/wooden_buttons.json index fe5e0572..f6646d7d 100644 --- a/data/minecraft/tags/block/wooden_buttons.json +++ b/data/minecraft/tags/block/wooden_buttons.json @@ -6,6 +6,7 @@ "minecraft:jungle_button", "minecraft:acacia_button", "minecraft:dark_oak_button", + "minecraft:pale_oak_button", "minecraft:crimson_button", "minecraft:warped_button", "minecraft:mangrove_button", diff --git a/data/minecraft/tags/block/wooden_doors.json b/data/minecraft/tags/block/wooden_doors.json index 5c9de920..be8b7def 100644 --- a/data/minecraft/tags/block/wooden_doors.json +++ b/data/minecraft/tags/block/wooden_doors.json @@ -6,6 +6,7 @@ "minecraft:jungle_door", "minecraft:acacia_door", "minecraft:dark_oak_door", + "minecraft:pale_oak_door", "minecraft:crimson_door", "minecraft:warped_door", "minecraft:mangrove_door", diff --git a/data/minecraft/tags/block/wooden_fences.json b/data/minecraft/tags/block/wooden_fences.json index cecdd724..dc051583 100644 --- a/data/minecraft/tags/block/wooden_fences.json +++ b/data/minecraft/tags/block/wooden_fences.json @@ -3,6 +3,7 @@ "minecraft:oak_fence", "minecraft:acacia_fence", "minecraft:dark_oak_fence", + "minecraft:pale_oak_fence", "minecraft:spruce_fence", "minecraft:birch_fence", "minecraft:jungle_fence", diff --git a/data/minecraft/tags/block/wooden_pressure_plates.json b/data/minecraft/tags/block/wooden_pressure_plates.json index 79558b92..008f0063 100644 --- a/data/minecraft/tags/block/wooden_pressure_plates.json +++ b/data/minecraft/tags/block/wooden_pressure_plates.json @@ -6,6 +6,7 @@ "minecraft:jungle_pressure_plate", "minecraft:acacia_pressure_plate", "minecraft:dark_oak_pressure_plate", + "minecraft:pale_oak_pressure_plate", "minecraft:crimson_pressure_plate", "minecraft:warped_pressure_plate", "minecraft:mangrove_pressure_plate", diff --git a/data/minecraft/tags/block/wooden_slabs.json b/data/minecraft/tags/block/wooden_slabs.json index be1fba2b..795bd3b7 100644 --- a/data/minecraft/tags/block/wooden_slabs.json +++ b/data/minecraft/tags/block/wooden_slabs.json @@ -6,6 +6,7 @@ "minecraft:jungle_slab", "minecraft:acacia_slab", "minecraft:dark_oak_slab", + "minecraft:pale_oak_slab", "minecraft:crimson_slab", "minecraft:warped_slab", "minecraft:mangrove_slab", diff --git a/data/minecraft/tags/block/wooden_stairs.json b/data/minecraft/tags/block/wooden_stairs.json index 7561537f..86239e4c 100644 --- a/data/minecraft/tags/block/wooden_stairs.json +++ b/data/minecraft/tags/block/wooden_stairs.json @@ -6,6 +6,7 @@ "minecraft:jungle_stairs", "minecraft:acacia_stairs", "minecraft:dark_oak_stairs", + "minecraft:pale_oak_stairs", "minecraft:crimson_stairs", "minecraft:warped_stairs", "minecraft:mangrove_stairs", diff --git a/data/minecraft/tags/block/wooden_trapdoors.json b/data/minecraft/tags/block/wooden_trapdoors.json index 8e93dc6d..050e05f7 100644 --- a/data/minecraft/tags/block/wooden_trapdoors.json +++ b/data/minecraft/tags/block/wooden_trapdoors.json @@ -3,6 +3,7 @@ "minecraft:acacia_trapdoor", "minecraft:birch_trapdoor", "minecraft:dark_oak_trapdoor", + "minecraft:pale_oak_trapdoor", "minecraft:jungle_trapdoor", "minecraft:oak_trapdoor", "minecraft:spruce_trapdoor", diff --git a/data/minecraft/tags/cat_variant/default_spawns.json b/data/minecraft/tags/cat_variant/default_spawns.json deleted file mode 100644 index dc6f9e88..00000000 --- a/data/minecraft/tags/cat_variant/default_spawns.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "values": [ - "minecraft:tabby", - "minecraft:black", - "minecraft:red", - "minecraft:siamese", - "minecraft:british_shorthair", - "minecraft:calico", - "minecraft:persian", - "minecraft:ragdoll", - "minecraft:white", - "minecraft:jellie" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/cat_variant/full_moon_spawns.json b/data/minecraft/tags/cat_variant/full_moon_spawns.json deleted file mode 100644 index 039963f9..00000000 --- a/data/minecraft/tags/cat_variant/full_moon_spawns.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "values": [ - "#minecraft:default_spawns", - "minecraft:all_black" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/damage_type/bypasses_shield.json b/data/minecraft/tags/damage_type/bypasses_shield.json index a12ed3cf..e5c6ff1b 100644 --- a/data/minecraft/tags/damage_type/bypasses_shield.json +++ b/data/minecraft/tags/damage_type/bypasses_shield.json @@ -1,7 +1,15 @@ { "values": [ "#minecraft:bypasses_armor", + "minecraft:cactus", + "minecraft:campfire", + "minecraft:dry_out", "minecraft:falling_anvil", - "minecraft:falling_stalactite" + "minecraft:falling_stalactite", + "minecraft:hot_floor", + "minecraft:in_fire", + "minecraft:lava", + "minecraft:lightning_bolt", + "minecraft:sweet_berry_bush" ] } \ No newline at end of file diff --git a/data/minecraft/tags/entity_type/boat.json b/data/minecraft/tags/entity_type/boat.json index bd774486..252370c6 100644 --- a/data/minecraft/tags/entity_type/boat.json +++ b/data/minecraft/tags/entity_type/boat.json @@ -7,6 +7,7 @@ "minecraft:acacia_boat", "minecraft:cherry_boat", "minecraft:dark_oak_boat", + "minecraft:pale_oak_boat", "minecraft:mangrove_boat", "minecraft:bamboo_raft" ] diff --git a/data/minecraft/tags/entity_type/can_equip_saddle.json b/data/minecraft/tags/entity_type/can_equip_saddle.json new file mode 100644 index 00000000..86bc5563 --- /dev/null +++ b/data/minecraft/tags/entity_type/can_equip_saddle.json @@ -0,0 +1,12 @@ +{ + "values": [ + "minecraft:horse", + "minecraft:skeleton_horse", + "minecraft:zombie_horse", + "minecraft:donkey", + "minecraft:mule", + "minecraft:pig", + "minecraft:strider", + "minecraft:camel" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/entity_type/can_wear_horse_armor.json b/data/minecraft/tags/entity_type/can_wear_horse_armor.json new file mode 100644 index 00000000..b6847820 --- /dev/null +++ b/data/minecraft/tags/entity_type/can_wear_horse_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:horse" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/bee_food.json b/data/minecraft/tags/item/bee_food.json index 42a09c21..f2851d5d 100644 --- a/data/minecraft/tags/item/bee_food.json +++ b/data/minecraft/tags/item/bee_food.json @@ -1,5 +1,33 @@ { "values": [ - "#minecraft:flowers" + "minecraft:dandelion", + "minecraft:open_eyeblossom", + "minecraft:poppy", + "minecraft:blue_orchid", + "minecraft:allium", + "minecraft:azure_bluet", + "minecraft:red_tulip", + "minecraft:orange_tulip", + "minecraft:white_tulip", + "minecraft:pink_tulip", + "minecraft:oxeye_daisy", + "minecraft:cornflower", + "minecraft:lily_of_the_valley", + "minecraft:wither_rose", + "minecraft:torchflower", + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:peony", + "minecraft:rose_bush", + "minecraft:pitcher_plant", + "minecraft:flowering_azalea_leaves", + "minecraft:flowering_azalea", + "minecraft:mangrove_propagule", + "minecraft:cherry_leaves", + "minecraft:pink_petals", + "minecraft:wildflowers", + "minecraft:chorus_flower", + "minecraft:spore_blossom", + "minecraft:cactus_flower" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/boats.json b/data/minecraft/tags/item/boats.json index 4949f62a..c04cb9ad 100644 --- a/data/minecraft/tags/item/boats.json +++ b/data/minecraft/tags/item/boats.json @@ -6,6 +6,7 @@ "minecraft:jungle_boat", "minecraft:acacia_boat", "minecraft:dark_oak_boat", + "minecraft:pale_oak_boat", "minecraft:mangrove_boat", "minecraft:bamboo_raft", "minecraft:cherry_boat", diff --git a/data/minecraft/tags/item/book_cloning_target.json b/data/minecraft/tags/item/book_cloning_target.json new file mode 100644 index 00000000..0fdf7a21 --- /dev/null +++ b/data/minecraft/tags/item/book_cloning_target.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:writable_book" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/chest_boats.json b/data/minecraft/tags/item/chest_boats.json index 26cb2e34..ab1b5c07 100644 --- a/data/minecraft/tags/item/chest_boats.json +++ b/data/minecraft/tags/item/chest_boats.json @@ -6,6 +6,7 @@ "minecraft:jungle_chest_boat", "minecraft:acacia_chest_boat", "minecraft:dark_oak_chest_boat", + "minecraft:pale_oak_chest_boat", "minecraft:mangrove_chest_boat", "minecraft:bamboo_chest_raft", "minecraft:cherry_chest_boat" diff --git a/data/minecraft/tags/item/dirt.json b/data/minecraft/tags/item/dirt.json index a75db4a0..2037c6a1 100644 --- a/data/minecraft/tags/item/dirt.json +++ b/data/minecraft/tags/item/dirt.json @@ -7,6 +7,7 @@ "minecraft:mycelium", "minecraft:rooted_dirt", "minecraft:moss_block", + "minecraft:pale_moss_block", "minecraft:mud", "minecraft:muddy_mangrove_roots" ] diff --git a/data/minecraft/tags/item/drowned_preferred_weapons.json b/data/minecraft/tags/item/drowned_preferred_weapons.json new file mode 100644 index 00000000..7a2c450b --- /dev/null +++ b/data/minecraft/tags/item/drowned_preferred_weapons.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:trident" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/eggs.json b/data/minecraft/tags/item/eggs.json new file mode 100644 index 00000000..828fbcc1 --- /dev/null +++ b/data/minecraft/tags/item/eggs.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:egg", + "minecraft:blue_egg", + "minecraft:brown_egg" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/fence_gates.json b/data/minecraft/tags/item/fence_gates.json index 2a8d2924..9904fc97 100644 --- a/data/minecraft/tags/item/fence_gates.json +++ b/data/minecraft/tags/item/fence_gates.json @@ -3,6 +3,7 @@ "minecraft:acacia_fence_gate", "minecraft:birch_fence_gate", "minecraft:dark_oak_fence_gate", + "minecraft:pale_oak_fence_gate", "minecraft:jungle_fence_gate", "minecraft:oak_fence_gate", "minecraft:spruce_fence_gate", diff --git a/data/minecraft/tags/item/flowers.json b/data/minecraft/tags/item/flowers.json index 9e10a4de..e0095f65 100644 --- a/data/minecraft/tags/item/flowers.json +++ b/data/minecraft/tags/item/flowers.json @@ -1,13 +1,19 @@ { "values": [ "#minecraft:small_flowers", - "#minecraft:tall_flowers", + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:peony", + "minecraft:rose_bush", + "minecraft:pitcher_plant", "minecraft:flowering_azalea_leaves", "minecraft:flowering_azalea", "minecraft:mangrove_propagule", "minecraft:cherry_leaves", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:chorus_flower", - "minecraft:spore_blossom" + "minecraft:spore_blossom", + "minecraft:cactus_flower" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/hanging_signs.json b/data/minecraft/tags/item/hanging_signs.json index 4ca06dad..b55f67ba 100644 --- a/data/minecraft/tags/item/hanging_signs.json +++ b/data/minecraft/tags/item/hanging_signs.json @@ -7,6 +7,7 @@ "minecraft:cherry_hanging_sign", "minecraft:jungle_hanging_sign", "minecraft:dark_oak_hanging_sign", + "minecraft:pale_oak_hanging_sign", "minecraft:crimson_hanging_sign", "minecraft:warped_hanging_sign", "minecraft:mangrove_hanging_sign", diff --git a/data/minecraft/tags/item/leaves.json b/data/minecraft/tags/item/leaves.json index 6815479c..523787f2 100644 --- a/data/minecraft/tags/item/leaves.json +++ b/data/minecraft/tags/item/leaves.json @@ -3,6 +3,7 @@ "minecraft:jungle_leaves", "minecraft:oak_leaves", "minecraft:spruce_leaves", + "minecraft:pale_oak_leaves", "minecraft:dark_oak_leaves", "minecraft:acacia_leaves", "minecraft:birch_leaves", diff --git a/data/minecraft/tags/item/logs_that_burn.json b/data/minecraft/tags/item/logs_that_burn.json index 3b2590c9..00f0e7fd 100644 --- a/data/minecraft/tags/item/logs_that_burn.json +++ b/data/minecraft/tags/item/logs_that_burn.json @@ -1,6 +1,7 @@ { "values": [ "#minecraft:dark_oak_logs", + "#minecraft:pale_oak_logs", "#minecraft:oak_logs", "#minecraft:acacia_logs", "#minecraft:birch_logs", diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/pale_oak_logs.json b/data/minecraft/tags/item/pale_oak_logs.json similarity index 100% rename from data/minecraft/datapacks/winter_drop/data/minecraft/tags/item/pale_oak_logs.json rename to data/minecraft/tags/item/pale_oak_logs.json diff --git a/data/minecraft/tags/item/piglin_preferred_weapons.json b/data/minecraft/tags/item/piglin_preferred_weapons.json new file mode 100644 index 00000000..848f97bc --- /dev/null +++ b/data/minecraft/tags/item/piglin_preferred_weapons.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:crossbow" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/pillager_preferred_weapons.json b/data/minecraft/tags/item/pillager_preferred_weapons.json new file mode 100644 index 00000000..848f97bc --- /dev/null +++ b/data/minecraft/tags/item/pillager_preferred_weapons.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:crossbow" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/planks.json b/data/minecraft/tags/item/planks.json index a8ff5bb5..55fa6f30 100644 --- a/data/minecraft/tags/item/planks.json +++ b/data/minecraft/tags/item/planks.json @@ -6,6 +6,7 @@ "minecraft:jungle_planks", "minecraft:acacia_planks", "minecraft:dark_oak_planks", + "minecraft:pale_oak_planks", "minecraft:crimson_planks", "minecraft:warped_planks", "minecraft:mangrove_planks", diff --git a/data/minecraft/tags/item/saplings.json b/data/minecraft/tags/item/saplings.json index cebde163..286497bf 100644 --- a/data/minecraft/tags/item/saplings.json +++ b/data/minecraft/tags/item/saplings.json @@ -6,6 +6,7 @@ "minecraft:jungle_sapling", "minecraft:acacia_sapling", "minecraft:dark_oak_sapling", + "minecraft:pale_oak_sapling", "minecraft:azalea", "minecraft:flowering_azalea", "minecraft:mangrove_propagule", diff --git a/data/minecraft/tags/item/signs.json b/data/minecraft/tags/item/signs.json index 7b4ddb48..84fda375 100644 --- a/data/minecraft/tags/item/signs.json +++ b/data/minecraft/tags/item/signs.json @@ -6,6 +6,7 @@ "minecraft:acacia_sign", "minecraft:jungle_sign", "minecraft:dark_oak_sign", + "minecraft:pale_oak_sign", "minecraft:crimson_sign", "minecraft:warped_sign", "minecraft:mangrove_sign", diff --git a/data/minecraft/tags/item/skeleton_preferred_weapons.json b/data/minecraft/tags/item/skeleton_preferred_weapons.json new file mode 100644 index 00000000..a1c8a443 --- /dev/null +++ b/data/minecraft/tags/item/skeleton_preferred_weapons.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:bow" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/slabs.json b/data/minecraft/tags/item/slabs.json index 0f3f5aea..ebc3f8e1 100644 --- a/data/minecraft/tags/item/slabs.json +++ b/data/minecraft/tags/item/slabs.json @@ -49,6 +49,7 @@ "minecraft:mud_brick_slab", "minecraft:tuff_slab", "minecraft:polished_tuff_slab", - "minecraft:tuff_brick_slab" + "minecraft:tuff_brick_slab", + "minecraft:resin_brick_slab" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/small_flowers.json b/data/minecraft/tags/item/small_flowers.json index 2477625f..c77dca4b 100644 --- a/data/minecraft/tags/item/small_flowers.json +++ b/data/minecraft/tags/item/small_flowers.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:dandelion", + "minecraft:open_eyeblossom", "minecraft:poppy", "minecraft:blue_orchid", "minecraft:allium", @@ -13,6 +14,7 @@ "minecraft:cornflower", "minecraft:lily_of_the_valley", "minecraft:wither_rose", - "minecraft:torchflower" + "minecraft:torchflower", + "minecraft:closed_eyeblossom" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/stairs.json b/data/minecraft/tags/item/stairs.json index eb67a9fe..fd135fc2 100644 --- a/data/minecraft/tags/item/stairs.json +++ b/data/minecraft/tags/item/stairs.json @@ -45,6 +45,7 @@ "minecraft:mud_brick_stairs", "minecraft:tuff_stairs", "minecraft:polished_tuff_stairs", - "minecraft:tuff_brick_stairs" + "minecraft:tuff_brick_stairs", + "minecraft:resin_brick_stairs" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/tall_flowers.json b/data/minecraft/tags/item/tall_flowers.json deleted file mode 100644 index 144eb89e..00000000 --- a/data/minecraft/tags/item/tall_flowers.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "values": [ - "minecraft:sunflower", - "minecraft:lilac", - "minecraft:peony", - "minecraft:rose_bush", - "minecraft:pitcher_plant" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/item/trim_materials.json b/data/minecraft/tags/item/trim_materials.json index d105d4f0..c2fc877c 100644 --- a/data/minecraft/tags/item/trim_materials.json +++ b/data/minecraft/tags/item/trim_materials.json @@ -1,14 +1,15 @@ { "values": [ - "minecraft:iron_ingot", + "minecraft:amethyst_shard", "minecraft:copper_ingot", - "minecraft:gold_ingot", - "minecraft:lapis_lazuli", - "minecraft:emerald", "minecraft:diamond", + "minecraft:emerald", + "minecraft:gold_ingot", + "minecraft:iron_ingot", + "minecraft:lapis_lazuli", "minecraft:netherite_ingot", - "minecraft:redstone", "minecraft:quartz", - "minecraft:amethyst_shard" + "minecraft:redstone", + "minecraft:resin_brick" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/trim_templates.json b/data/minecraft/tags/item/trim_templates.json deleted file mode 100644 index 360be130..00000000 --- a/data/minecraft/tags/item/trim_templates.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "values": [ - "minecraft:ward_armor_trim_smithing_template", - "minecraft:spire_armor_trim_smithing_template", - "minecraft:coast_armor_trim_smithing_template", - "minecraft:eye_armor_trim_smithing_template", - "minecraft:dune_armor_trim_smithing_template", - "minecraft:wild_armor_trim_smithing_template", - "minecraft:rib_armor_trim_smithing_template", - "minecraft:tide_armor_trim_smithing_template", - "minecraft:sentry_armor_trim_smithing_template", - "minecraft:vex_armor_trim_smithing_template", - "minecraft:snout_armor_trim_smithing_template", - "minecraft:wayfinder_armor_trim_smithing_template", - "minecraft:shaper_armor_trim_smithing_template", - "minecraft:silence_armor_trim_smithing_template", - "minecraft:raiser_armor_trim_smithing_template", - "minecraft:host_armor_trim_smithing_template", - "minecraft:flow_armor_trim_smithing_template", - "minecraft:bolt_armor_trim_smithing_template" - ] -} \ No newline at end of file diff --git a/data/minecraft/tags/item/walls.json b/data/minecraft/tags/item/walls.json index b4d42842..aa80022b 100644 --- a/data/minecraft/tags/item/walls.json +++ b/data/minecraft/tags/item/walls.json @@ -24,6 +24,7 @@ "minecraft:mud_brick_wall", "minecraft:tuff_wall", "minecraft:polished_tuff_wall", - "minecraft:tuff_brick_wall" + "minecraft:tuff_brick_wall", + "minecraft:resin_brick_wall" ] } \ No newline at end of file diff --git a/data/minecraft/tags/item/wither_skeleton_disliked_weapons.json b/data/minecraft/tags/item/wither_skeleton_disliked_weapons.json new file mode 100644 index 00000000..0783487a --- /dev/null +++ b/data/minecraft/tags/item/wither_skeleton_disliked_weapons.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:bow", + "minecraft:crossbow" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/item/wooden_buttons.json b/data/minecraft/tags/item/wooden_buttons.json index fe5e0572..f6646d7d 100644 --- a/data/minecraft/tags/item/wooden_buttons.json +++ b/data/minecraft/tags/item/wooden_buttons.json @@ -6,6 +6,7 @@ "minecraft:jungle_button", "minecraft:acacia_button", "minecraft:dark_oak_button", + "minecraft:pale_oak_button", "minecraft:crimson_button", "minecraft:warped_button", "minecraft:mangrove_button", diff --git a/data/minecraft/tags/item/wooden_doors.json b/data/minecraft/tags/item/wooden_doors.json index 5c9de920..be8b7def 100644 --- a/data/minecraft/tags/item/wooden_doors.json +++ b/data/minecraft/tags/item/wooden_doors.json @@ -6,6 +6,7 @@ "minecraft:jungle_door", "minecraft:acacia_door", "minecraft:dark_oak_door", + "minecraft:pale_oak_door", "minecraft:crimson_door", "minecraft:warped_door", "minecraft:mangrove_door", diff --git a/data/minecraft/tags/item/wooden_fences.json b/data/minecraft/tags/item/wooden_fences.json index cecdd724..dc051583 100644 --- a/data/minecraft/tags/item/wooden_fences.json +++ b/data/minecraft/tags/item/wooden_fences.json @@ -3,6 +3,7 @@ "minecraft:oak_fence", "minecraft:acacia_fence", "minecraft:dark_oak_fence", + "minecraft:pale_oak_fence", "minecraft:spruce_fence", "minecraft:birch_fence", "minecraft:jungle_fence", diff --git a/data/minecraft/tags/item/wooden_pressure_plates.json b/data/minecraft/tags/item/wooden_pressure_plates.json index 79558b92..008f0063 100644 --- a/data/minecraft/tags/item/wooden_pressure_plates.json +++ b/data/minecraft/tags/item/wooden_pressure_plates.json @@ -6,6 +6,7 @@ "minecraft:jungle_pressure_plate", "minecraft:acacia_pressure_plate", "minecraft:dark_oak_pressure_plate", + "minecraft:pale_oak_pressure_plate", "minecraft:crimson_pressure_plate", "minecraft:warped_pressure_plate", "minecraft:mangrove_pressure_plate", diff --git a/data/minecraft/tags/item/wooden_slabs.json b/data/minecraft/tags/item/wooden_slabs.json index be1fba2b..795bd3b7 100644 --- a/data/minecraft/tags/item/wooden_slabs.json +++ b/data/minecraft/tags/item/wooden_slabs.json @@ -6,6 +6,7 @@ "minecraft:jungle_slab", "minecraft:acacia_slab", "minecraft:dark_oak_slab", + "minecraft:pale_oak_slab", "minecraft:crimson_slab", "minecraft:warped_slab", "minecraft:mangrove_slab", diff --git a/data/minecraft/tags/item/wooden_stairs.json b/data/minecraft/tags/item/wooden_stairs.json index 7561537f..86239e4c 100644 --- a/data/minecraft/tags/item/wooden_stairs.json +++ b/data/minecraft/tags/item/wooden_stairs.json @@ -6,6 +6,7 @@ "minecraft:jungle_stairs", "minecraft:acacia_stairs", "minecraft:dark_oak_stairs", + "minecraft:pale_oak_stairs", "minecraft:crimson_stairs", "minecraft:warped_stairs", "minecraft:mangrove_stairs", diff --git a/data/minecraft/tags/item/wooden_trapdoors.json b/data/minecraft/tags/item/wooden_trapdoors.json index 8e93dc6d..050e05f7 100644 --- a/data/minecraft/tags/item/wooden_trapdoors.json +++ b/data/minecraft/tags/item/wooden_trapdoors.json @@ -3,6 +3,7 @@ "minecraft:acacia_trapdoor", "minecraft:birch_trapdoor", "minecraft:dark_oak_trapdoor", + "minecraft:pale_oak_trapdoor", "minecraft:jungle_trapdoor", "minecraft:oak_trapdoor", "minecraft:spruce_trapdoor", diff --git a/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json b/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json index 960b9815..ff5c6a15 100644 --- a/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json +++ b/data/minecraft/tags/worldgen/biome/has_structure/trial_chambers.json @@ -30,6 +30,7 @@ "minecraft:flower_forest", "minecraft:birch_forest", "minecraft:dark_forest", + "minecraft:pale_garden", "minecraft:savanna_plateau", "minecraft:savanna", "minecraft:jungle", diff --git a/data/minecraft/tags/worldgen/biome/has_structure/woodland_mansion.json b/data/minecraft/tags/worldgen/biome/has_structure/woodland_mansion.json index 2d31b9e8..33519bb4 100644 --- a/data/minecraft/tags/worldgen/biome/has_structure/woodland_mansion.json +++ b/data/minecraft/tags/worldgen/biome/has_structure/woodland_mansion.json @@ -1,5 +1,6 @@ { "values": [ - "minecraft:dark_forest" + "minecraft:dark_forest", + "minecraft:pale_garden" ] } \ No newline at end of file diff --git a/data/minecraft/tags/worldgen/biome/is_forest.json b/data/minecraft/tags/worldgen/biome/is_forest.json index 10d6d89e..bcd87f0b 100644 --- a/data/minecraft/tags/worldgen/biome/is_forest.json +++ b/data/minecraft/tags/worldgen/biome/is_forest.json @@ -5,6 +5,7 @@ "minecraft:birch_forest", "minecraft:old_growth_birch_forest", "minecraft:dark_forest", + "minecraft:pale_garden", "minecraft:grove" ] } \ No newline at end of file diff --git a/data/minecraft/tags/worldgen/biome/is_overworld.json b/data/minecraft/tags/worldgen/biome/is_overworld.json index caf0b878..9de4c3f3 100644 --- a/data/minecraft/tags/worldgen/biome/is_overworld.json +++ b/data/minecraft/tags/worldgen/biome/is_overworld.json @@ -30,6 +30,7 @@ "minecraft:flower_forest", "minecraft:birch_forest", "minecraft:dark_forest", + "minecraft:pale_garden", "minecraft:savanna_plateau", "minecraft:savanna", "minecraft:jungle", diff --git a/data/minecraft/tags/worldgen/biome/spawns_cold_variant_farm_animals.json b/data/minecraft/tags/worldgen/biome/spawns_cold_variant_farm_animals.json new file mode 100644 index 00000000..c9da19ea --- /dev/null +++ b/data/minecraft/tags/worldgen/biome/spawns_cold_variant_farm_animals.json @@ -0,0 +1,26 @@ +{ + "values": [ + "minecraft:snowy_plains", + "minecraft:ice_spikes", + "minecraft:frozen_peaks", + "minecraft:jagged_peaks", + "minecraft:snowy_slopes", + "minecraft:frozen_ocean", + "minecraft:deep_frozen_ocean", + "minecraft:grove", + "minecraft:deep_dark", + "minecraft:frozen_river", + "minecraft:snowy_taiga", + "minecraft:snowy_beach", + "#minecraft:is_end", + "minecraft:cold_ocean", + "minecraft:deep_cold_ocean", + "minecraft:old_growth_pine_taiga", + "minecraft:old_growth_spruce_taiga", + "minecraft:taiga", + "minecraft:windswept_forest", + "minecraft:windswept_gravelly_hills", + "minecraft:windswept_hills", + "minecraft:stony_peaks" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/worldgen/biome/spawns_warm_variant_farm_animals.json b/data/minecraft/tags/worldgen/biome/spawns_warm_variant_farm_animals.json new file mode 100644 index 00000000..b009f682 --- /dev/null +++ b/data/minecraft/tags/worldgen/biome/spawns_warm_variant_farm_animals.json @@ -0,0 +1,13 @@ +{ + "values": [ + "minecraft:desert", + "minecraft:warm_ocean", + "#minecraft:is_jungle", + "#minecraft:is_savanna", + "#minecraft:is_nether", + "#minecraft:is_badlands", + "minecraft:mangrove_swamp", + "minecraft:deep_lukewarm_ocean", + "minecraft:lukewarm_ocean" + ] +} \ No newline at end of file diff --git a/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json b/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json index 124112fc..40421c6f 100644 --- a/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json +++ b/data/minecraft/tags/worldgen/biome/stronghold_biased_to.json @@ -9,6 +9,7 @@ "minecraft:flower_forest", "minecraft:birch_forest", "minecraft:dark_forest", + "minecraft:pale_garden", "minecraft:old_growth_birch_forest", "minecraft:old_growth_pine_taiga", "minecraft:old_growth_spruce_taiga", diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_desert_village_maps.json b/data/minecraft/tags/worldgen/structure/on_desert_village_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_desert_village_maps.json rename to data/minecraft/tags/worldgen/structure/on_desert_village_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_jungle_explorer_maps.json b/data/minecraft/tags/worldgen/structure/on_jungle_explorer_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_jungle_explorer_maps.json rename to data/minecraft/tags/worldgen/structure/on_jungle_explorer_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_plains_village_maps.json b/data/minecraft/tags/worldgen/structure/on_plains_village_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_plains_village_maps.json rename to data/minecraft/tags/worldgen/structure/on_plains_village_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_savanna_village_maps.json b/data/minecraft/tags/worldgen/structure/on_savanna_village_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_savanna_village_maps.json rename to data/minecraft/tags/worldgen/structure/on_savanna_village_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_snowy_village_maps.json b/data/minecraft/tags/worldgen/structure/on_snowy_village_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_snowy_village_maps.json rename to data/minecraft/tags/worldgen/structure/on_snowy_village_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_swamp_explorer_maps.json b/data/minecraft/tags/worldgen/structure/on_swamp_explorer_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_swamp_explorer_maps.json rename to data/minecraft/tags/worldgen/structure/on_swamp_explorer_maps.json diff --git a/data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_taiga_village_maps.json b/data/minecraft/tags/worldgen/structure/on_taiga_village_maps.json similarity index 100% rename from data/minecraft/datapacks/trade_rebalance/data/minecraft/tags/worldgen/structure/on_taiga_village_maps.json rename to data/minecraft/tags/worldgen/structure/on_taiga_village_maps.json diff --git a/data/minecraft/test_environment/default.json b/data/minecraft/test_environment/default.json new file mode 100644 index 00000000..8808857c --- /dev/null +++ b/data/minecraft/test_environment/default.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:all_of", + "definitions": [] +} \ No newline at end of file diff --git a/data/minecraft/test_instance/always_pass.json b/data/minecraft/test_instance/always_pass.json new file mode 100644 index 00000000..b4effb8c --- /dev/null +++ b/data/minecraft/test_instance/always_pass.json @@ -0,0 +1,9 @@ +{ + "type": "minecraft:function", + "environment": "minecraft:default", + "function": "minecraft:always_pass", + "max_ticks": 1, + "required": false, + "setup_ticks": 1, + "structure": "minecraft:empty" +} \ No newline at end of file diff --git a/data/minecraft/trim_material/amethyst.json b/data/minecraft/trim_material/amethyst.json index 85945cbd..8ee4630b 100644 --- a/data/minecraft/trim_material/amethyst.json +++ b/data/minecraft/trim_material/amethyst.json @@ -3,7 +3,5 @@ "description": { "color": "#9A5CC6", "translate": "trim_material.minecraft.amethyst" - }, - "ingredient": "minecraft:amethyst_shard", - "item_model_index": 1.0 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/copper.json b/data/minecraft/trim_material/copper.json index a014bf74..57948bb5 100644 --- a/data/minecraft/trim_material/copper.json +++ b/data/minecraft/trim_material/copper.json @@ -3,7 +3,5 @@ "description": { "color": "#B4684D", "translate": "trim_material.minecraft.copper" - }, - "ingredient": "minecraft:copper_ingot", - "item_model_index": 0.5 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/diamond.json b/data/minecraft/trim_material/diamond.json index 21b27e99..bf9d314f 100644 --- a/data/minecraft/trim_material/diamond.json +++ b/data/minecraft/trim_material/diamond.json @@ -4,9 +4,7 @@ "color": "#6EECD2", "translate": "trim_material.minecraft.diamond" }, - "ingredient": "minecraft:diamond", - "item_model_index": 0.8, - "override_armor_materials": { + "override_armor_assets": { "minecraft:diamond": "diamond_darker" } } \ No newline at end of file diff --git a/data/minecraft/trim_material/emerald.json b/data/minecraft/trim_material/emerald.json index 5776f6c2..10c7c240 100644 --- a/data/minecraft/trim_material/emerald.json +++ b/data/minecraft/trim_material/emerald.json @@ -3,7 +3,5 @@ "description": { "color": "#11A036", "translate": "trim_material.minecraft.emerald" - }, - "ingredient": "minecraft:emerald", - "item_model_index": 0.7 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/gold.json b/data/minecraft/trim_material/gold.json index 195e14f2..3c0eff3b 100644 --- a/data/minecraft/trim_material/gold.json +++ b/data/minecraft/trim_material/gold.json @@ -4,9 +4,7 @@ "color": "#DEB12D", "translate": "trim_material.minecraft.gold" }, - "ingredient": "minecraft:gold_ingot", - "item_model_index": 0.6, - "override_armor_materials": { + "override_armor_assets": { "minecraft:gold": "gold_darker" } } \ No newline at end of file diff --git a/data/minecraft/trim_material/iron.json b/data/minecraft/trim_material/iron.json index 69ba5ec1..208e50f9 100644 --- a/data/minecraft/trim_material/iron.json +++ b/data/minecraft/trim_material/iron.json @@ -4,9 +4,7 @@ "color": "#ECECEC", "translate": "trim_material.minecraft.iron" }, - "ingredient": "minecraft:iron_ingot", - "item_model_index": 0.2, - "override_armor_materials": { + "override_armor_assets": { "minecraft:iron": "iron_darker" } } \ No newline at end of file diff --git a/data/minecraft/trim_material/lapis.json b/data/minecraft/trim_material/lapis.json index eb31702d..2f78caad 100644 --- a/data/minecraft/trim_material/lapis.json +++ b/data/minecraft/trim_material/lapis.json @@ -3,7 +3,5 @@ "description": { "color": "#416E97", "translate": "trim_material.minecraft.lapis" - }, - "ingredient": "minecraft:lapis_lazuli", - "item_model_index": 0.9 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/netherite.json b/data/minecraft/trim_material/netherite.json index 6cdd97a6..f787cde2 100644 --- a/data/minecraft/trim_material/netherite.json +++ b/data/minecraft/trim_material/netherite.json @@ -4,9 +4,7 @@ "color": "#625859", "translate": "trim_material.minecraft.netherite" }, - "ingredient": "minecraft:netherite_ingot", - "item_model_index": 0.3, - "override_armor_materials": { + "override_armor_assets": { "minecraft:netherite": "netherite_darker" } } \ No newline at end of file diff --git a/data/minecraft/trim_material/quartz.json b/data/minecraft/trim_material/quartz.json index 7600a105..67588503 100644 --- a/data/minecraft/trim_material/quartz.json +++ b/data/minecraft/trim_material/quartz.json @@ -3,7 +3,5 @@ "description": { "color": "#E3D4C4", "translate": "trim_material.minecraft.quartz" - }, - "ingredient": "minecraft:quartz", - "item_model_index": 0.1 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/redstone.json b/data/minecraft/trim_material/redstone.json index 797bd0cd..a2e7750b 100644 --- a/data/minecraft/trim_material/redstone.json +++ b/data/minecraft/trim_material/redstone.json @@ -3,7 +3,5 @@ "description": { "color": "#971607", "translate": "trim_material.minecraft.redstone" - }, - "ingredient": "minecraft:redstone", - "item_model_index": 0.4 + } } \ No newline at end of file diff --git a/data/minecraft/trim_material/resin.json b/data/minecraft/trim_material/resin.json new file mode 100644 index 00000000..3798c0e7 --- /dev/null +++ b/data/minecraft/trim_material/resin.json @@ -0,0 +1,7 @@ +{ + "asset_name": "resin", + "description": { + "color": "#FC7812", + "translate": "trim_material.minecraft.resin" + } +} \ No newline at end of file diff --git a/data/minecraft/trim_pattern/bolt.json b/data/minecraft/trim_pattern/bolt.json index 27c0d9bc..55989273 100644 --- a/data/minecraft/trim_pattern/bolt.json +++ b/data/minecraft/trim_pattern/bolt.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.bolt" - }, - "template_item": "minecraft:bolt_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/coast.json b/data/minecraft/trim_pattern/coast.json index 6e77fc37..174e48e5 100644 --- a/data/minecraft/trim_pattern/coast.json +++ b/data/minecraft/trim_pattern/coast.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.coast" - }, - "template_item": "minecraft:coast_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/dune.json b/data/minecraft/trim_pattern/dune.json index 2b825b34..09293865 100644 --- a/data/minecraft/trim_pattern/dune.json +++ b/data/minecraft/trim_pattern/dune.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.dune" - }, - "template_item": "minecraft:dune_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/eye.json b/data/minecraft/trim_pattern/eye.json index 52260df5..86265106 100644 --- a/data/minecraft/trim_pattern/eye.json +++ b/data/minecraft/trim_pattern/eye.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.eye" - }, - "template_item": "minecraft:eye_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/flow.json b/data/minecraft/trim_pattern/flow.json index 2d94de80..21ad7420 100644 --- a/data/minecraft/trim_pattern/flow.json +++ b/data/minecraft/trim_pattern/flow.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.flow" - }, - "template_item": "minecraft:flow_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/host.json b/data/minecraft/trim_pattern/host.json index 483d3f41..b43cc5ed 100644 --- a/data/minecraft/trim_pattern/host.json +++ b/data/minecraft/trim_pattern/host.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.host" - }, - "template_item": "minecraft:host_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/raiser.json b/data/minecraft/trim_pattern/raiser.json index b7d69d45..448d93fd 100644 --- a/data/minecraft/trim_pattern/raiser.json +++ b/data/minecraft/trim_pattern/raiser.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.raiser" - }, - "template_item": "minecraft:raiser_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/rib.json b/data/minecraft/trim_pattern/rib.json index ae0e5159..0e77a83f 100644 --- a/data/minecraft/trim_pattern/rib.json +++ b/data/minecraft/trim_pattern/rib.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.rib" - }, - "template_item": "minecraft:rib_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/sentry.json b/data/minecraft/trim_pattern/sentry.json index 1d864542..e32df2ca 100644 --- a/data/minecraft/trim_pattern/sentry.json +++ b/data/minecraft/trim_pattern/sentry.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.sentry" - }, - "template_item": "minecraft:sentry_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/shaper.json b/data/minecraft/trim_pattern/shaper.json index 38a76d94..9636aa24 100644 --- a/data/minecraft/trim_pattern/shaper.json +++ b/data/minecraft/trim_pattern/shaper.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.shaper" - }, - "template_item": "minecraft:shaper_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/silence.json b/data/minecraft/trim_pattern/silence.json index 0cf9ca84..2c073608 100644 --- a/data/minecraft/trim_pattern/silence.json +++ b/data/minecraft/trim_pattern/silence.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.silence" - }, - "template_item": "minecraft:silence_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/snout.json b/data/minecraft/trim_pattern/snout.json index 0b23038b..bf3686d7 100644 --- a/data/minecraft/trim_pattern/snout.json +++ b/data/minecraft/trim_pattern/snout.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.snout" - }, - "template_item": "minecraft:snout_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/spire.json b/data/minecraft/trim_pattern/spire.json index 9df73f59..c57dc165 100644 --- a/data/minecraft/trim_pattern/spire.json +++ b/data/minecraft/trim_pattern/spire.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.spire" - }, - "template_item": "minecraft:spire_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/tide.json b/data/minecraft/trim_pattern/tide.json index a01adda4..9d6332dd 100644 --- a/data/minecraft/trim_pattern/tide.json +++ b/data/minecraft/trim_pattern/tide.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.tide" - }, - "template_item": "minecraft:tide_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/vex.json b/data/minecraft/trim_pattern/vex.json index bc010f1f..231f7d36 100644 --- a/data/minecraft/trim_pattern/vex.json +++ b/data/minecraft/trim_pattern/vex.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.vex" - }, - "template_item": "minecraft:vex_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/ward.json b/data/minecraft/trim_pattern/ward.json index e07ffbc1..bcdfcf77 100644 --- a/data/minecraft/trim_pattern/ward.json +++ b/data/minecraft/trim_pattern/ward.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.ward" - }, - "template_item": "minecraft:ward_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/wayfinder.json b/data/minecraft/trim_pattern/wayfinder.json index ecb8cc90..61838729 100644 --- a/data/minecraft/trim_pattern/wayfinder.json +++ b/data/minecraft/trim_pattern/wayfinder.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.wayfinder" - }, - "template_item": "minecraft:wayfinder_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/trim_pattern/wild.json b/data/minecraft/trim_pattern/wild.json index 4696f382..18d392b5 100644 --- a/data/minecraft/trim_pattern/wild.json +++ b/data/minecraft/trim_pattern/wild.json @@ -3,6 +3,5 @@ "decal": false, "description": { "translate": "trim_pattern.minecraft.wild" - }, - "template_item": "minecraft:wild_armor_trim_smithing_template" + } } \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/angry.json b/data/minecraft/wolf_sound_variant/angry.json new file mode 100644 index 00000000..b8e40f3d --- /dev/null +++ b/data/minecraft/wolf_sound_variant/angry.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_angry.ambient", + "death_sound": "minecraft:entity.wolf_angry.death", + "growl_sound": "minecraft:entity.wolf_angry.growl", + "hurt_sound": "minecraft:entity.wolf_angry.hurt", + "pant_sound": "minecraft:entity.wolf_angry.pant", + "whine_sound": "minecraft:entity.wolf_angry.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/big.json b/data/minecraft/wolf_sound_variant/big.json new file mode 100644 index 00000000..27f167e7 --- /dev/null +++ b/data/minecraft/wolf_sound_variant/big.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_big.ambient", + "death_sound": "minecraft:entity.wolf_big.death", + "growl_sound": "minecraft:entity.wolf_big.growl", + "hurt_sound": "minecraft:entity.wolf_big.hurt", + "pant_sound": "minecraft:entity.wolf_big.pant", + "whine_sound": "minecraft:entity.wolf_big.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/classic.json b/data/minecraft/wolf_sound_variant/classic.json new file mode 100644 index 00000000..7c43a8a4 --- /dev/null +++ b/data/minecraft/wolf_sound_variant/classic.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf.ambient", + "death_sound": "minecraft:entity.wolf.death", + "growl_sound": "minecraft:entity.wolf.growl", + "hurt_sound": "minecraft:entity.wolf.hurt", + "pant_sound": "minecraft:entity.wolf.pant", + "whine_sound": "minecraft:entity.wolf.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/cute.json b/data/minecraft/wolf_sound_variant/cute.json new file mode 100644 index 00000000..83b26be2 --- /dev/null +++ b/data/minecraft/wolf_sound_variant/cute.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_cute.ambient", + "death_sound": "minecraft:entity.wolf_cute.death", + "growl_sound": "minecraft:entity.wolf_cute.growl", + "hurt_sound": "minecraft:entity.wolf_cute.hurt", + "pant_sound": "minecraft:entity.wolf_cute.pant", + "whine_sound": "minecraft:entity.wolf_cute.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/grumpy.json b/data/minecraft/wolf_sound_variant/grumpy.json new file mode 100644 index 00000000..94ada85b --- /dev/null +++ b/data/minecraft/wolf_sound_variant/grumpy.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_grumpy.ambient", + "death_sound": "minecraft:entity.wolf_grumpy.death", + "growl_sound": "minecraft:entity.wolf_grumpy.growl", + "hurt_sound": "minecraft:entity.wolf_grumpy.hurt", + "pant_sound": "minecraft:entity.wolf_grumpy.pant", + "whine_sound": "minecraft:entity.wolf_grumpy.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/puglin.json b/data/minecraft/wolf_sound_variant/puglin.json new file mode 100644 index 00000000..09194d34 --- /dev/null +++ b/data/minecraft/wolf_sound_variant/puglin.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_puglin.ambient", + "death_sound": "minecraft:entity.wolf_puglin.death", + "growl_sound": "minecraft:entity.wolf_puglin.growl", + "hurt_sound": "minecraft:entity.wolf_puglin.hurt", + "pant_sound": "minecraft:entity.wolf_puglin.pant", + "whine_sound": "minecraft:entity.wolf_puglin.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_sound_variant/sad.json b/data/minecraft/wolf_sound_variant/sad.json new file mode 100644 index 00000000..80cbaa34 --- /dev/null +++ b/data/minecraft/wolf_sound_variant/sad.json @@ -0,0 +1,8 @@ +{ + "ambient_sound": "minecraft:entity.wolf_sad.ambient", + "death_sound": "minecraft:entity.wolf_sad.death", + "growl_sound": "minecraft:entity.wolf_sad.growl", + "hurt_sound": "minecraft:entity.wolf_sad.hurt", + "pant_sound": "minecraft:entity.wolf_sad.pant", + "whine_sound": "minecraft:entity.wolf_sad.whine" +} \ No newline at end of file diff --git a/data/minecraft/wolf_variant/ashen.json b/data/minecraft/wolf_variant/ashen.json index 16ad8aef..0322dba9 100644 --- a/data/minecraft/wolf_variant/ashen.json +++ b/data/minecraft/wolf_variant/ashen.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_ashen_angry", - "biomes": "minecraft:snowy_taiga", - "tame_texture": "minecraft:entity/wolf/wolf_ashen_tame", - "wild_texture": "minecraft:entity/wolf/wolf_ashen" + "assets": { + "angry": "minecraft:entity/wolf/wolf_ashen_angry", + "tame": "minecraft:entity/wolf/wolf_ashen_tame", + "wild": "minecraft:entity/wolf/wolf_ashen" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "minecraft:snowy_taiga" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/black.json b/data/minecraft/wolf_variant/black.json index fe704d12..52d7db61 100644 --- a/data/minecraft/wolf_variant/black.json +++ b/data/minecraft/wolf_variant/black.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_black_angry", - "biomes": "minecraft:old_growth_pine_taiga", - "tame_texture": "minecraft:entity/wolf/wolf_black_tame", - "wild_texture": "minecraft:entity/wolf/wolf_black" + "assets": { + "angry": "minecraft:entity/wolf/wolf_black_angry", + "tame": "minecraft:entity/wolf/wolf_black_tame", + "wild": "minecraft:entity/wolf/wolf_black" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "minecraft:old_growth_pine_taiga" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/chestnut.json b/data/minecraft/wolf_variant/chestnut.json index c94e4f52..88f48773 100644 --- a/data/minecraft/wolf_variant/chestnut.json +++ b/data/minecraft/wolf_variant/chestnut.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_chestnut_angry", - "biomes": "minecraft:old_growth_spruce_taiga", - "tame_texture": "minecraft:entity/wolf/wolf_chestnut_tame", - "wild_texture": "minecraft:entity/wolf/wolf_chestnut" + "assets": { + "angry": "minecraft:entity/wolf/wolf_chestnut_angry", + "tame": "minecraft:entity/wolf/wolf_chestnut_tame", + "wild": "minecraft:entity/wolf/wolf_chestnut" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "minecraft:old_growth_spruce_taiga" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/pale.json b/data/minecraft/wolf_variant/pale.json index fde95058..f90fdc72 100644 --- a/data/minecraft/wolf_variant/pale.json +++ b/data/minecraft/wolf_variant/pale.json @@ -1,6 +1,12 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_angry", - "biomes": "minecraft:taiga", - "tame_texture": "minecraft:entity/wolf/wolf_tame", - "wild_texture": "minecraft:entity/wolf/wolf" + "assets": { + "angry": "minecraft:entity/wolf/wolf_angry", + "tame": "minecraft:entity/wolf/wolf_tame", + "wild": "minecraft:entity/wolf/wolf" + }, + "spawn_conditions": [ + { + "priority": 0 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/rusty.json b/data/minecraft/wolf_variant/rusty.json index 834607a9..87635835 100644 --- a/data/minecraft/wolf_variant/rusty.json +++ b/data/minecraft/wolf_variant/rusty.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_rusty_angry", - "biomes": "#minecraft:is_jungle", - "tame_texture": "minecraft:entity/wolf/wolf_rusty_tame", - "wild_texture": "minecraft:entity/wolf/wolf_rusty" + "assets": { + "angry": "minecraft:entity/wolf/wolf_rusty_angry", + "tame": "minecraft:entity/wolf/wolf_rusty_tame", + "wild": "minecraft:entity/wolf/wolf_rusty" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:is_jungle" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/snowy.json b/data/minecraft/wolf_variant/snowy.json index 41441e8d..f8291232 100644 --- a/data/minecraft/wolf_variant/snowy.json +++ b/data/minecraft/wolf_variant/snowy.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_snowy_angry", - "biomes": "minecraft:grove", - "tame_texture": "minecraft:entity/wolf/wolf_snowy_tame", - "wild_texture": "minecraft:entity/wolf/wolf_snowy" + "assets": { + "angry": "minecraft:entity/wolf/wolf_snowy_angry", + "tame": "minecraft:entity/wolf/wolf_snowy_tame", + "wild": "minecraft:entity/wolf/wolf_snowy" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "minecraft:grove" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/spotted.json b/data/minecraft/wolf_variant/spotted.json index f4c52147..96ee0aff 100644 --- a/data/minecraft/wolf_variant/spotted.json +++ b/data/minecraft/wolf_variant/spotted.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_spotted_angry", - "biomes": "#minecraft:is_savanna", - "tame_texture": "minecraft:entity/wolf/wolf_spotted_tame", - "wild_texture": "minecraft:entity/wolf/wolf_spotted" + "assets": { + "angry": "minecraft:entity/wolf/wolf_spotted_angry", + "tame": "minecraft:entity/wolf/wolf_spotted_tame", + "wild": "minecraft:entity/wolf/wolf_spotted" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:is_savanna" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/striped.json b/data/minecraft/wolf_variant/striped.json index c36f7a6d..90d714cd 100644 --- a/data/minecraft/wolf_variant/striped.json +++ b/data/minecraft/wolf_variant/striped.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_striped_angry", - "biomes": "#minecraft:is_badlands", - "tame_texture": "minecraft:entity/wolf/wolf_striped_tame", - "wild_texture": "minecraft:entity/wolf/wolf_striped" + "assets": { + "angry": "minecraft:entity/wolf/wolf_striped_angry", + "tame": "minecraft:entity/wolf/wolf_striped_tame", + "wild": "minecraft:entity/wolf/wolf_striped" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "#minecraft:is_badlands" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/wolf_variant/woods.json b/data/minecraft/wolf_variant/woods.json index 7c2afa20..35dba8c4 100644 --- a/data/minecraft/wolf_variant/woods.json +++ b/data/minecraft/wolf_variant/woods.json @@ -1,6 +1,16 @@ { - "angry_texture": "minecraft:entity/wolf/wolf_woods_angry", - "biomes": "minecraft:forest", - "tame_texture": "minecraft:entity/wolf/wolf_woods_tame", - "wild_texture": "minecraft:entity/wolf/wolf_woods" + "assets": { + "angry": "minecraft:entity/wolf/wolf_woods_angry", + "tame": "minecraft:entity/wolf/wolf_woods_tame", + "wild": "minecraft:entity/wolf/wolf_woods" + }, + "spawn_conditions": [ + { + "condition": { + "type": "minecraft:biome", + "biomes": "minecraft:forest" + }, + "priority": 1 + } + ] } \ No newline at end of file diff --git a/data/minecraft/worldgen/biome/badlands.json b/data/minecraft/worldgen/biome/badlands.json index 910c3af3..ae75cf61 100644 --- a/data/minecraft/worldgen/biome/badlands.json +++ b/data/minecraft/worldgen/biome/badlands.json @@ -16,12 +16,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.badlands" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.badlands" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -81,12 +87,14 @@ [ "minecraft:glow_lichen", "minecraft:patch_grass_badlands", + "minecraft:patch_dry_grass_badlands", "minecraft:patch_dead_bush_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane_badlands", "minecraft:patch_pumpkin", - "minecraft:patch_cactus_decorated" + "minecraft:patch_cactus_decorated", + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" @@ -105,6 +113,30 @@ ], "axolotls": [], "creature": [ + { + "type": "minecraft:sheep", + "maxCount": 4, + "minCount": 4, + "weight": 12 + }, + { + "type": "minecraft:pig", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:chicken", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:cow", + "maxCount": 4, + "minCount": 4, + "weight": 8 + }, { "type": "minecraft:armadillo", "maxCount": 2, diff --git a/data/minecraft/worldgen/biome/bamboo_jungle.json b/data/minecraft/worldgen/biome/bamboo_jungle.json index 67f8168a..8d681239 100644 --- a/data/minecraft/worldgen/biome/bamboo_jungle.json +++ b/data/minecraft/worldgen/biome/bamboo_jungle.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.bamboo_jungle" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.bamboo_jungle" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7842047, "water_color": 4159204, "water_fog_color": 329011 @@ -82,8 +88,9 @@ "minecraft:patch_grass_jungle", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:vines", "minecraft:patch_melon" ], diff --git a/data/minecraft/worldgen/biome/basalt_deltas.json b/data/minecraft/worldgen/biome/basalt_deltas.json index e73087b0..e3571a1c 100644 --- a/data/minecraft/worldgen/biome/basalt_deltas.json +++ b/data/minecraft/worldgen/biome/basalt_deltas.json @@ -14,12 +14,18 @@ "sound": "minecraft:ambient.basalt_deltas.mood", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.nether.basalt_deltas" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.nether.basalt_deltas" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "particle": { "options": { "type": "minecraft:white_ash" diff --git a/data/minecraft/worldgen/biome/beach.json b/data/minecraft/worldgen/biome/beach.json index 9d426677..8de498ec 100644 --- a/data/minecraft/worldgen/biome/beach.json +++ b/data/minecraft/worldgen/biome/beach.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7907327, "water_color": 4159204, "water_fog_color": 329011 @@ -74,8 +75,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/birch_forest.json b/data/minecraft/worldgen/biome/birch_forest.json index f733f137..6778612e 100644 --- a/data/minecraft/worldgen/biome/birch_forest.json +++ b/data/minecraft/worldgen/biome/birch_forest.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8037887, "water_color": 4159204, "water_fog_color": 329011 @@ -77,13 +83,16 @@ [ "minecraft:glow_lichen", "minecraft:forest_flowers", + "minecraft:wildflowers_birch_forest", "minecraft:trees_birch", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/cherry_grove.json b/data/minecraft/worldgen/biome/cherry_grove.json index 649251d1..fd62577f 100644 --- a/data/minecraft/worldgen/biome/cherry_grove.json +++ b/data/minecraft/worldgen/biome/cherry_grove.json @@ -15,12 +15,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.cherry_grove" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.cherry_grove" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8103167, "water_color": 6141935, "water_fog_color": 6141935 diff --git a/data/minecraft/worldgen/biome/cold_ocean.json b/data/minecraft/worldgen/biome/cold_ocean.json index 03c21cf3..6d96a7b7 100644 --- a/data/minecraft/worldgen/biome/cold_ocean.json +++ b/data/minecraft/worldgen/biome/cold_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4020182, "water_fog_color": 329011 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_cold", "minecraft:kelp_cold" ], diff --git a/data/minecraft/worldgen/biome/crimson_forest.json b/data/minecraft/worldgen/biome/crimson_forest.json index 6ee72b45..57cff15d 100644 --- a/data/minecraft/worldgen/biome/crimson_forest.json +++ b/data/minecraft/worldgen/biome/crimson_forest.json @@ -14,12 +14,18 @@ "sound": "minecraft:ambient.crimson_forest.mood", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.nether.crimson_forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.nether.crimson_forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "particle": { "options": { "type": "minecraft:crimson_spore" diff --git a/data/minecraft/worldgen/biome/dark_forest.json b/data/minecraft/worldgen/biome/dark_forest.json index 51a8b331..f44558bc 100644 --- a/data/minecraft/worldgen/biome/dark_forest.json +++ b/data/minecraft/worldgen/biome/dark_forest.json @@ -6,6 +6,7 @@ ], "downfall": 0.8, "effects": { + "dry_foliage_color": 8082228, "fog_color": 12638463, "grass_color_modifier": "dark_forest", "mood_sound": { @@ -14,12 +15,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7972607, "water_color": 4159204, "water_fog_color": 329011 @@ -83,8 +90,10 @@ "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_leaf_litter", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/deep_cold_ocean.json b/data/minecraft/worldgen/biome/deep_cold_ocean.json index 62fa3cea..214327c8 100644 --- a/data/minecraft/worldgen/biome/deep_cold_ocean.json +++ b/data/minecraft/worldgen/biome/deep_cold_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4020182, "water_fog_color": 329011 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_deep_cold", "minecraft:kelp_cold" ], diff --git a/data/minecraft/worldgen/biome/deep_dark.json b/data/minecraft/worldgen/biome/deep_dark.json index ede56265..81e98dd1 100644 --- a/data/minecraft/worldgen/biome/deep_dark.json +++ b/data/minecraft/worldgen/biome/deep_dark.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.deep_dark" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.deep_dark" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7907327, "water_color": 4159204, "water_fog_color": 329011 @@ -79,7 +85,6 @@ "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin" ], [ diff --git a/data/minecraft/worldgen/biome/deep_frozen_ocean.json b/data/minecraft/worldgen/biome/deep_frozen_ocean.json index 5f7894b9..b01af165 100644 --- a/data/minecraft/worldgen/biome/deep_frozen_ocean.json +++ b/data/minecraft/worldgen/biome/deep_frozen_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 3750089, "water_fog_color": 329011 @@ -79,8 +80,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/deep_lukewarm_ocean.json b/data/minecraft/worldgen/biome/deep_lukewarm_ocean.json index 8e476c1e..fdf7f559 100644 --- a/data/minecraft/worldgen/biome/deep_lukewarm_ocean.json +++ b/data/minecraft/worldgen/biome/deep_lukewarm_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4566514, "water_fog_color": 267827 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_deep_warm", "minecraft:kelp_warm" ], diff --git a/data/minecraft/worldgen/biome/deep_ocean.json b/data/minecraft/worldgen/biome/deep_ocean.json index aa977575..302bd3a3 100644 --- a/data/minecraft/worldgen/biome/deep_ocean.json +++ b/data/minecraft/worldgen/biome/deep_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4159204, "water_fog_color": 329011 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_deep", "minecraft:kelp_cold" ], diff --git a/data/minecraft/worldgen/biome/desert.json b/data/minecraft/worldgen/biome/desert.json index 2e8eaa08..cb4d62b2 100644 --- a/data/minecraft/worldgen/biome/desert.json +++ b/data/minecraft/worldgen/biome/desert.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.desert" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.desert" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -82,6 +88,7 @@ "minecraft:glow_lichen", "minecraft:flower_default", "minecraft:patch_grass_badlands", + "minecraft:patch_dry_grass_desert", "minecraft:patch_dead_bush_2", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", @@ -110,7 +117,13 @@ "type": "minecraft:rabbit", "maxCount": 3, "minCount": 2, - "weight": 4 + "weight": 12 + }, + { + "type": "minecraft:camel", + "maxCount": 1, + "minCount": 1, + "weight": 1 } ], "misc": [], diff --git a/data/minecraft/worldgen/biome/dripstone_caves.json b/data/minecraft/worldgen/biome/dripstone_caves.json index a314172f..2c52745d 100644 --- a/data/minecraft/worldgen/biome/dripstone_caves.json +++ b/data/minecraft/worldgen/biome/dripstone_caves.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.dripstone_caves" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.dripstone_caves" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7907327, "water_color": 4159204, "water_fog_color": 329011 @@ -86,7 +92,6 @@ "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin" ], [ diff --git a/data/minecraft/worldgen/biome/end_barrens.json b/data/minecraft/worldgen/biome/end_barrens.json index 06dc9809..e3e7b7ee 100644 --- a/data/minecraft/worldgen/biome/end_barrens.json +++ b/data/minecraft/worldgen/biome/end_barrens.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 0, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/end_highlands.json b/data/minecraft/worldgen/biome/end_highlands.json index 9f326274..87c800cc 100644 --- a/data/minecraft/worldgen/biome/end_highlands.json +++ b/data/minecraft/worldgen/biome/end_highlands.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 0, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/end_midlands.json b/data/minecraft/worldgen/biome/end_midlands.json index 06dc9809..e3e7b7ee 100644 --- a/data/minecraft/worldgen/biome/end_midlands.json +++ b/data/minecraft/worldgen/biome/end_midlands.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 0, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/eroded_badlands.json b/data/minecraft/worldgen/biome/eroded_badlands.json index 910c3af3..ae75cf61 100644 --- a/data/minecraft/worldgen/biome/eroded_badlands.json +++ b/data/minecraft/worldgen/biome/eroded_badlands.json @@ -16,12 +16,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.badlands" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.badlands" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -81,12 +87,14 @@ [ "minecraft:glow_lichen", "minecraft:patch_grass_badlands", + "minecraft:patch_dry_grass_badlands", "minecraft:patch_dead_bush_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane_badlands", "minecraft:patch_pumpkin", - "minecraft:patch_cactus_decorated" + "minecraft:patch_cactus_decorated", + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" @@ -105,6 +113,30 @@ ], "axolotls": [], "creature": [ + { + "type": "minecraft:sheep", + "maxCount": 4, + "minCount": 4, + "weight": 12 + }, + { + "type": "minecraft:pig", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:chicken", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:cow", + "maxCount": 4, + "minCount": 4, + "weight": 8 + }, { "type": "minecraft:armadillo", "maxCount": 2, diff --git a/data/minecraft/worldgen/biome/flower_forest.json b/data/minecraft/worldgen/biome/flower_forest.json index 785bd11d..cac1e70b 100644 --- a/data/minecraft/worldgen/biome/flower_forest.json +++ b/data/minecraft/worldgen/biome/flower_forest.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.flower_forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.flower_forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7972607, "water_color": 4159204, "water_fog_color": 329011 @@ -82,8 +88,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/forest.json b/data/minecraft/worldgen/biome/forest.json index 3ab14a6a..6d16e033 100644 --- a/data/minecraft/worldgen/biome/forest.json +++ b/data/minecraft/worldgen/biome/forest.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7972607, "water_color": 4159204, "water_fog_color": 329011 @@ -77,13 +83,15 @@ [ "minecraft:glow_lichen", "minecraft:forest_flowers", - "minecraft:trees_birch_and_oak", + "minecraft:trees_birch_and_oak_leaf_litter", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/frozen_ocean.json b/data/minecraft/worldgen/biome/frozen_ocean.json index cf476e5e..f60bd4d9 100644 --- a/data/minecraft/worldgen/biome/frozen_ocean.json +++ b/data/minecraft/worldgen/biome/frozen_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8364543, "water_color": 3750089, "water_fog_color": 329011 @@ -79,8 +80,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/frozen_peaks.json b/data/minecraft/worldgen/biome/frozen_peaks.json index c90f1926..e192a597 100644 --- a/data/minecraft/worldgen/biome/frozen_peaks.json +++ b/data/minecraft/worldgen/biome/frozen_peaks.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.frozen_peaks" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.frozen_peaks" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8756735, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/frozen_river.json b/data/minecraft/worldgen/biome/frozen_river.json index aa571080..279bbc38 100644 --- a/data/minecraft/worldgen/biome/frozen_river.json +++ b/data/minecraft/worldgen/biome/frozen_river.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8364543, "water_color": 3750089, "water_fog_color": 329011 @@ -71,12 +72,14 @@ [ "minecraft:glow_lichen", "minecraft:trees_water", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/grove.json b/data/minecraft/worldgen/biome/grove.json index f6c2c49b..af07cbde 100644 --- a/data/minecraft/worldgen/biome/grove.json +++ b/data/minecraft/worldgen/biome/grove.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.grove" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.grove" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8495359, "water_color": 4159204, "water_fog_color": 329011 @@ -81,7 +87,6 @@ [ "minecraft:glow_lichen", "minecraft:trees_grove", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin" ], [ diff --git a/data/minecraft/worldgen/biome/ice_spikes.json b/data/minecraft/worldgen/biome/ice_spikes.json index a67947e6..68f99d70 100644 --- a/data/minecraft/worldgen/biome/ice_spikes.json +++ b/data/minecraft/worldgen/biome/ice_spikes.json @@ -14,6 +14,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8364543, "water_color": 4159204, "water_fog_color": 329011 @@ -79,8 +80,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/jagged_peaks.json b/data/minecraft/worldgen/biome/jagged_peaks.json index 9628eb1a..b7ca0093 100644 --- a/data/minecraft/worldgen/biome/jagged_peaks.json +++ b/data/minecraft/worldgen/biome/jagged_peaks.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.jagged_peaks" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.jagged_peaks" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8756735, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/jungle.json b/data/minecraft/worldgen/biome/jungle.json index 64360910..67b5fe7a 100644 --- a/data/minecraft/worldgen/biome/jungle.json +++ b/data/minecraft/worldgen/biome/jungle.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.jungle" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.jungle" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7842047, "water_color": 4159204, "water_fog_color": 329011 @@ -82,8 +88,9 @@ "minecraft:patch_grass_jungle", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:vines", "minecraft:patch_melon" ], diff --git a/data/minecraft/worldgen/biome/lukewarm_ocean.json b/data/minecraft/worldgen/biome/lukewarm_ocean.json index adc1e79b..54a836a7 100644 --- a/data/minecraft/worldgen/biome/lukewarm_ocean.json +++ b/data/minecraft/worldgen/biome/lukewarm_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4566514, "water_fog_color": 267827 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_warm", "minecraft:kelp_warm" ], diff --git a/data/minecraft/worldgen/biome/lush_caves.json b/data/minecraft/worldgen/biome/lush_caves.json index 4a3875c5..a35df300 100644 --- a/data/minecraft/worldgen/biome/lush_caves.json +++ b/data/minecraft/worldgen/biome/lush_caves.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.lush_caves" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.lush_caves" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/mangrove_swamp.json b/data/minecraft/worldgen/biome/mangrove_swamp.json index cbf0f6c2..178f8866 100644 --- a/data/minecraft/worldgen/biome/mangrove_swamp.json +++ b/data/minecraft/worldgen/biome/mangrove_swamp.json @@ -6,6 +6,7 @@ ], "downfall": 0.9, "effects": { + "dry_foliage_color": 8082228, "fog_color": 12638463, "foliage_color": 9285927, "grass_color_modifier": "swamp", @@ -15,12 +16,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.swamp" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.swamp" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7907327, "water_color": 3832426, "water_fog_color": 5077600 @@ -83,7 +90,8 @@ "minecraft:patch_grass_normal", "minecraft:patch_dead_bush", "minecraft:patch_waterlily", - "minecraft:seagrass_swamp" + "minecraft:seagrass_swamp", + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/meadow.json b/data/minecraft/worldgen/biome/meadow.json index 818a2df6..5768f877 100644 --- a/data/minecraft/worldgen/biome/meadow.json +++ b/data/minecraft/worldgen/biome/meadow.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.meadow" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.meadow" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8103167, "water_color": 937679, "water_fog_color": 329011 @@ -80,9 +86,10 @@ [ "minecraft:glow_lichen", "minecraft:patch_tall_grass_2", - "minecraft:patch_grass_plain", + "minecraft:patch_grass_meadow", "minecraft:flower_meadow", - "minecraft:trees_meadow" + "minecraft:trees_meadow", + "minecraft:wildflowers_meadow" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/mushroom_fields.json b/data/minecraft/worldgen/biome/mushroom_fields.json index 75943d09..d03e1792 100644 --- a/data/minecraft/worldgen/biome/mushroom_fields.json +++ b/data/minecraft/worldgen/biome/mushroom_fields.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7842047, "water_color": 4159204, "water_fog_color": 329011 @@ -73,8 +74,9 @@ "minecraft:mushroom_island_vegetation", "minecraft:brown_mushroom_taiga", "minecraft:red_mushroom_taiga", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/nether_wastes.json b/data/minecraft/worldgen/biome/nether_wastes.json index 31572625..c91ce401 100644 --- a/data/minecraft/worldgen/biome/nether_wastes.json +++ b/data/minecraft/worldgen/biome/nether_wastes.json @@ -14,12 +14,18 @@ "sound": "minecraft:ambient.nether_wastes.mood", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.nether.nether_wastes" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.nether.nether_wastes" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/ocean.json b/data/minecraft/worldgen/biome/ocean.json index 26ca1b73..3513295e 100644 --- a/data/minecraft/worldgen/biome/ocean.json +++ b/data/minecraft/worldgen/biome/ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4159204, "water_fog_color": 329011 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_normal", "minecraft:kelp_cold" ], diff --git a/data/minecraft/worldgen/biome/old_growth_birch_forest.json b/data/minecraft/worldgen/biome/old_growth_birch_forest.json index ea998ab3..28a1d945 100644 --- a/data/minecraft/worldgen/biome/old_growth_birch_forest.json +++ b/data/minecraft/worldgen/biome/old_growth_birch_forest.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8037887, "water_color": 4159204, "water_fog_color": 329011 @@ -77,13 +83,16 @@ [ "minecraft:glow_lichen", "minecraft:forest_flowers", + "minecraft:wildflowers_birch_forest", "minecraft:birch_tall", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_forest", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/old_growth_pine_taiga.json b/data/minecraft/worldgen/biome/old_growth_pine_taiga.json index b46f36e6..e221c248 100644 --- a/data/minecraft/worldgen/biome/old_growth_pine_taiga.json +++ b/data/minecraft/worldgen/biome/old_growth_pine_taiga.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.old_growth_taiga" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.old_growth_taiga" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8168447, "water_color": 4159204, "water_fog_color": 329011 @@ -86,8 +92,9 @@ "minecraft:red_mushroom_old_growth", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:patch_berry_common" ], [ diff --git a/data/minecraft/worldgen/biome/old_growth_spruce_taiga.json b/data/minecraft/worldgen/biome/old_growth_spruce_taiga.json index 890145e7..7f393afc 100644 --- a/data/minecraft/worldgen/biome/old_growth_spruce_taiga.json +++ b/data/minecraft/worldgen/biome/old_growth_spruce_taiga.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.old_growth_taiga" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.old_growth_taiga" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8233983, "water_color": 4159204, "water_fog_color": 329011 @@ -86,8 +92,9 @@ "minecraft:red_mushroom_old_growth", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:patch_berry_common" ], [ diff --git a/data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/biome/pale_garden.json b/data/minecraft/worldgen/biome/pale_garden.json similarity index 92% rename from data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/biome/pale_garden.json rename to data/minecraft/worldgen/biome/pale_garden.json index 1aa58bdc..ac2df049 100644 --- a/data/minecraft/datapacks/winter_drop/data/minecraft/worldgen/biome/pale_garden.json +++ b/data/minecraft/worldgen/biome/pale_garden.json @@ -6,6 +6,7 @@ ], "downfall": 0.8, "effects": { + "dry_foliage_color": 10528412, "fog_color": 8484720, "foliage_color": 8883574, "grass_color": 7832178, @@ -15,12 +16,8 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.forest" - }, + "music": [], + "music_volume": 0.0, "sky_color": 12171705, "water_color": 7768221, "water_fog_color": 5597568 @@ -79,9 +76,13 @@ [ "minecraft:glow_lichen", "minecraft:pale_garden_vegetation", + "minecraft:pale_moss_patch", + "minecraft:pale_garden_flowers", + "minecraft:flower_pale_garden", "minecraft:patch_grass_forest", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/plains.json b/data/minecraft/worldgen/biome/plains.json index 55e186a7..a396056c 100644 --- a/data/minecraft/worldgen/biome/plains.json +++ b/data/minecraft/worldgen/biome/plains.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7907327, "water_color": 4159204, "water_fog_color": 329011 @@ -71,13 +72,15 @@ [ "minecraft:glow_lichen", "minecraft:patch_tall_grass_2", + "minecraft:patch_bush", "minecraft:trees_plains", "minecraft:flower_plains", "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/river.json b/data/minecraft/worldgen/biome/river.json index 71ab8f27..0221bd99 100644 --- a/data/minecraft/worldgen/biome/river.json +++ b/data/minecraft/worldgen/biome/river.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4159204, "water_fog_color": 329011 @@ -71,12 +72,14 @@ [ "minecraft:glow_lichen", "minecraft:trees_water", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:seagrass_river" ], [ diff --git a/data/minecraft/worldgen/biome/savanna.json b/data/minecraft/worldgen/biome/savanna.json index d2b5a1cb..59b9a6c7 100644 --- a/data/minecraft/worldgen/biome/savanna.json +++ b/data/minecraft/worldgen/biome/savanna.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -76,8 +77,9 @@ "minecraft:patch_grass_savanna", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/savanna_plateau.json b/data/minecraft/worldgen/biome/savanna_plateau.json index 1fd89b88..eafc228a 100644 --- a/data/minecraft/worldgen/biome/savanna_plateau.json +++ b/data/minecraft/worldgen/biome/savanna_plateau.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -76,8 +77,9 @@ "minecraft:patch_grass_savanna", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/small_end_islands.json b/data/minecraft/worldgen/biome/small_end_islands.json index fca51ade..13029b49 100644 --- a/data/minecraft/worldgen/biome/small_end_islands.json +++ b/data/minecraft/worldgen/biome/small_end_islands.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 0, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/snowy_beach.json b/data/minecraft/worldgen/biome/snowy_beach.json index 134689df..e87419ca 100644 --- a/data/minecraft/worldgen/biome/snowy_beach.json +++ b/data/minecraft/worldgen/biome/snowy_beach.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8364543, "water_color": 4020182, "water_fog_color": 329011 @@ -74,8 +75,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/snowy_plains.json b/data/minecraft/worldgen/biome/snowy_plains.json index 8f009acf..845813c5 100644 --- a/data/minecraft/worldgen/biome/snowy_plains.json +++ b/data/minecraft/worldgen/biome/snowy_plains.json @@ -14,6 +14,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8364543, "water_color": 4159204, "water_fog_color": 329011 @@ -76,8 +77,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/snowy_slopes.json b/data/minecraft/worldgen/biome/snowy_slopes.json index 4a4e75e4..c601af88 100644 --- a/data/minecraft/worldgen/biome/snowy_slopes.json +++ b/data/minecraft/worldgen/biome/snowy_slopes.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.snowy_slopes" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.snowy_slopes" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 8560639, "water_color": 4159204, "water_fog_color": 329011 @@ -80,7 +86,6 @@ ], [ "minecraft:glow_lichen", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin" ], [ diff --git a/data/minecraft/worldgen/biome/snowy_taiga.json b/data/minecraft/worldgen/biome/snowy_taiga.json index baedf4ca..bb792a2b 100644 --- a/data/minecraft/worldgen/biome/snowy_taiga.json +++ b/data/minecraft/worldgen/biome/snowy_taiga.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8625919, "water_color": 4020182, "water_fog_color": 329011 @@ -76,8 +77,9 @@ "minecraft:patch_grass_taiga_2", "minecraft:brown_mushroom_taiga", "minecraft:red_mushroom_taiga", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:patch_berry_rare" ], [ diff --git a/data/minecraft/worldgen/biome/soul_sand_valley.json b/data/minecraft/worldgen/biome/soul_sand_valley.json index 5bdb7227..3ae968fb 100644 --- a/data/minecraft/worldgen/biome/soul_sand_valley.json +++ b/data/minecraft/worldgen/biome/soul_sand_valley.json @@ -14,12 +14,18 @@ "sound": "minecraft:ambient.soul_sand_valley.mood", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.nether.soul_sand_valley" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.nether.soul_sand_valley" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "particle": { "options": { "type": "minecraft:ash" diff --git a/data/minecraft/worldgen/biome/sparse_jungle.json b/data/minecraft/worldgen/biome/sparse_jungle.json index c7a88d43..5e37d71c 100644 --- a/data/minecraft/worldgen/biome/sparse_jungle.json +++ b/data/minecraft/worldgen/biome/sparse_jungle.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.sparse_jungle" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.sparse_jungle" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7842047, "water_color": 4159204, "water_fog_color": 329011 @@ -81,8 +87,9 @@ "minecraft:patch_grass_jungle", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:vines", "minecraft:patch_melon_sparse" ], diff --git a/data/minecraft/worldgen/biome/stony_peaks.json b/data/minecraft/worldgen/biome/stony_peaks.json index 4ae7dcae..1312d6b4 100644 --- a/data/minecraft/worldgen/biome/stony_peaks.json +++ b/data/minecraft/worldgen/biome/stony_peaks.json @@ -13,12 +13,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.stony_peaks" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.stony_peaks" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7776511, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/stony_shore.json b/data/minecraft/worldgen/biome/stony_shore.json index 0e9b0862..5371b007 100644 --- a/data/minecraft/worldgen/biome/stony_shore.json +++ b/data/minecraft/worldgen/biome/stony_shore.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8233727, "water_color": 4159204, "water_fog_color": 329011 @@ -74,8 +75,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/sunflower_plains.json b/data/minecraft/worldgen/biome/sunflower_plains.json index 3a1a8bd7..0e007c0d 100644 --- a/data/minecraft/worldgen/biome/sunflower_plains.json +++ b/data/minecraft/worldgen/biome/sunflower_plains.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7907327, "water_color": 4159204, "water_fog_color": 329011 @@ -77,8 +78,9 @@ "minecraft:patch_grass_plain", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/swamp.json b/data/minecraft/worldgen/biome/swamp.json index 7b3b9321..3816f56d 100644 --- a/data/minecraft/worldgen/biome/swamp.json +++ b/data/minecraft/worldgen/biome/swamp.json @@ -6,6 +6,7 @@ ], "downfall": 0.9, "effects": { + "dry_foliage_color": 8082228, "fog_color": 12638463, "foliage_color": 6975545, "grass_color_modifier": "swamp", @@ -15,12 +16,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.swamp" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.swamp" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7907327, "water_color": 6388580, "water_fog_color": 2302743 @@ -89,6 +96,8 @@ "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane_swamp", "minecraft:patch_pumpkin", + "minecraft:patch_firefly_bush_swamp", + "minecraft:patch_firefly_bush_near_water_swamp", "minecraft:seagrass_swamp" ], [ diff --git a/data/minecraft/worldgen/biome/taiga.json b/data/minecraft/worldgen/biome/taiga.json index ebbb1ba1..5947919e 100644 --- a/data/minecraft/worldgen/biome/taiga.json +++ b/data/minecraft/worldgen/biome/taiga.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8233983, "water_color": 4159204, "water_fog_color": 329011 @@ -76,8 +77,9 @@ "minecraft:patch_grass_taiga_2", "minecraft:brown_mushroom_taiga", "minecraft:red_mushroom_taiga", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:patch_berry_common" ], [ diff --git a/data/minecraft/worldgen/biome/the_end.json b/data/minecraft/worldgen/biome/the_end.json index 58085833..4a26b4e6 100644 --- a/data/minecraft/worldgen/biome/the_end.json +++ b/data/minecraft/worldgen/biome/the_end.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 0, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/the_void.json b/data/minecraft/worldgen/biome/the_void.json index 1fd87f5e..a83c8cd7 100644 --- a/data/minecraft/worldgen/biome/the_void.json +++ b/data/minecraft/worldgen/biome/the_void.json @@ -9,6 +9,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4159204, "water_fog_color": 329011 diff --git a/data/minecraft/worldgen/biome/warm_ocean.json b/data/minecraft/worldgen/biome/warm_ocean.json index a2d17353..32383491 100644 --- a/data/minecraft/worldgen/biome/warm_ocean.json +++ b/data/minecraft/worldgen/biome/warm_ocean.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8103167, "water_color": 4445678, "water_fog_color": 270131 @@ -75,8 +76,9 @@ "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", - "minecraft:patch_sugar_cane", "minecraft:patch_pumpkin", + "minecraft:patch_sugar_cane", + "minecraft:patch_firefly_bush_near_water", "minecraft:warm_ocean_vegetation", "minecraft:seagrass_warm", "minecraft:sea_pickle" diff --git a/data/minecraft/worldgen/biome/warped_forest.json b/data/minecraft/worldgen/biome/warped_forest.json index c040ec34..cd258a14 100644 --- a/data/minecraft/worldgen/biome/warped_forest.json +++ b/data/minecraft/worldgen/biome/warped_forest.json @@ -14,12 +14,18 @@ "sound": "minecraft:ambient.warped_forest.mood", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.nether.warped_forest" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.nether.warped_forest" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "particle": { "options": { "type": "minecraft:warped_spore" diff --git a/data/minecraft/worldgen/biome/windswept_forest.json b/data/minecraft/worldgen/biome/windswept_forest.json index 79df5cd2..4e4dd49c 100644 --- a/data/minecraft/worldgen/biome/windswept_forest.json +++ b/data/minecraft/worldgen/biome/windswept_forest.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8233727, "water_color": 4159204, "water_fog_color": 329011 @@ -74,12 +75,14 @@ [ "minecraft:glow_lichen", "minecraft:trees_windswept_forest", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/windswept_gravelly_hills.json b/data/minecraft/worldgen/biome/windswept_gravelly_hills.json index 504f3ca9..e0c01405 100644 --- a/data/minecraft/worldgen/biome/windswept_gravelly_hills.json +++ b/data/minecraft/worldgen/biome/windswept_gravelly_hills.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8233727, "water_color": 4159204, "water_fog_color": 329011 @@ -74,12 +75,14 @@ [ "minecraft:glow_lichen", "minecraft:trees_windswept_hills", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/windswept_hills.json b/data/minecraft/worldgen/biome/windswept_hills.json index 504f3ca9..e0c01405 100644 --- a/data/minecraft/worldgen/biome/windswept_hills.json +++ b/data/minecraft/worldgen/biome/windswept_hills.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 8233727, "water_color": 4159204, "water_fog_color": 329011 @@ -74,12 +75,14 @@ [ "minecraft:glow_lichen", "minecraft:trees_windswept_hills", + "minecraft:patch_bush", "minecraft:flower_default", "minecraft:patch_grass_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/windswept_savanna.json b/data/minecraft/worldgen/biome/windswept_savanna.json index caad9671..3d4b7388 100644 --- a/data/minecraft/worldgen/biome/windswept_savanna.json +++ b/data/minecraft/worldgen/biome/windswept_savanna.json @@ -13,6 +13,7 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -75,8 +76,9 @@ "minecraft:patch_grass_normal", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", + "minecraft:patch_pumpkin", "minecraft:patch_sugar_cane", - "minecraft:patch_pumpkin" + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" diff --git a/data/minecraft/worldgen/biome/wooded_badlands.json b/data/minecraft/worldgen/biome/wooded_badlands.json index 52f7fc2b..9db71008 100644 --- a/data/minecraft/worldgen/biome/wooded_badlands.json +++ b/data/minecraft/worldgen/biome/wooded_badlands.json @@ -16,12 +16,18 @@ "sound": "minecraft:ambient.cave", "tick_delay": 6000 }, - "music": { - "max_delay": 24000, - "min_delay": 12000, - "replace_current_music": false, - "sound": "minecraft:music.overworld.badlands" - }, + "music": [ + { + "data": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "minecraft:music.overworld.badlands" + }, + "weight": 1 + } + ], + "music_volume": 1.0, "sky_color": 7254527, "water_color": 4159204, "water_fog_color": 329011 @@ -82,12 +88,14 @@ "minecraft:glow_lichen", "minecraft:trees_badlands", "minecraft:patch_grass_badlands", + "minecraft:patch_dry_grass_badlands", "minecraft:patch_dead_bush_badlands", "minecraft:brown_mushroom_normal", "minecraft:red_mushroom_normal", "minecraft:patch_sugar_cane_badlands", "minecraft:patch_pumpkin", - "minecraft:patch_cactus_decorated" + "minecraft:patch_cactus_decorated", + "minecraft:patch_firefly_bush_near_water" ], [ "minecraft:freeze_top_layer" @@ -106,6 +114,30 @@ ], "axolotls": [], "creature": [ + { + "type": "minecraft:sheep", + "maxCount": 4, + "minCount": 4, + "weight": 12 + }, + { + "type": "minecraft:pig", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:chicken", + "maxCount": 4, + "minCount": 4, + "weight": 10 + }, + { + "type": "minecraft:cow", + "maxCount": 4, + "minCount": 4, + "weight": 8 + }, { "type": "minecraft:armadillo", "maxCount": 2, diff --git a/data/minecraft/worldgen/configured_feature/birch_bees_0002_leaf_litter.json b/data/minecraft/worldgen/configured_feature/birch_bees_0002_leaf_litter.json new file mode 100644 index 00000000..3cc8c9bd --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/birch_bees_0002_leaf_litter.json @@ -0,0 +1,359 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:beehive", + "probability": 0.002 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:blob_foliage_placer", + "height": 3, + "offset": 0, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 1, + "lower_size": 0, + "upper_size": 1 + }, + "trunk_placer": { + "type": "minecraft:straight_trunk_placer", + "base_height": 5, + "height_rand_a": 2, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/birch_leaf_litter.json b/data/minecraft/worldgen/configured_feature/birch_leaf_litter.json new file mode 100644 index 00000000..4ad4310b --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/birch_leaf_litter.json @@ -0,0 +1,355 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:blob_foliage_placer", + "height": 3, + "offset": 0, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 1, + "lower_size": 0, + "upper_size": 1 + }, + "trunk_placer": { + "type": "minecraft:straight_trunk_placer", + "base_height": 5, + "height_rand_a": 2, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/birch_tall.json b/data/minecraft/worldgen/configured_feature/birch_tall.json index 7701dbad..ee8d6377 100644 --- a/data/minecraft/worldgen/configured_feature/birch_tall.json +++ b/data/minecraft/worldgen/configured_feature/birch_tall.json @@ -3,9 +3,17 @@ "config": { "default": "minecraft:birch_bees_0002", "features": [ + { + "chance": 0.00625, + "feature": "minecraft:fallen_super_birch_tree" + }, { "chance": 0.5, "feature": "minecraft:super_birch_bees_0002" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_birch_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/crimson_fungus.json b/data/minecraft/worldgen/configured_feature/crimson_fungus.json index 451af841..420cc88b 100644 --- a/data/minecraft/worldgen/configured_feature/crimson_fungus.json +++ b/data/minecraft/worldgen/configured_feature/crimson_fungus.json @@ -66,6 +66,7 @@ "minecraft:flowering_azalea", "minecraft:moss_carpet", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:small_dripleaf" diff --git a/data/minecraft/worldgen/configured_feature/crimson_fungus_planted.json b/data/minecraft/worldgen/configured_feature/crimson_fungus_planted.json index 2d67804b..18a41976 100644 --- a/data/minecraft/worldgen/configured_feature/crimson_fungus_planted.json +++ b/data/minecraft/worldgen/configured_feature/crimson_fungus_planted.json @@ -66,6 +66,7 @@ "minecraft:flowering_azalea", "minecraft:moss_carpet", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:small_dripleaf" diff --git a/data/minecraft/worldgen/configured_feature/dark_forest_vegetation.json b/data/minecraft/worldgen/configured_feature/dark_forest_vegetation.json index ad2c35d4..ba26b1be 100644 --- a/data/minecraft/worldgen/configured_feature/dark_forest_vegetation.json +++ b/data/minecraft/worldgen/configured_feature/dark_forest_vegetation.json @@ -1,7 +1,7 @@ { "type": "minecraft:random_selector", "config": { - "default": "minecraft:oak_checked", + "default": "minecraft:oak_leaf_litter", "features": [ { "chance": 0.025, @@ -19,15 +19,23 @@ }, { "chance": 0.6666667, - "feature": "minecraft:dark_oak_checked" + "feature": "minecraft:dark_oak_leaf_litter" + }, + { + "chance": 0.0025, + "feature": "minecraft:fallen_birch_tree" }, { "chance": 0.2, - "feature": "minecraft:birch_checked" + "feature": "minecraft:birch_leaf_litter" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" }, { "chance": 0.1, - "feature": "minecraft:fancy_oak_checked" + "feature": "minecraft:fancy_oak_leaf_litter" } ] } diff --git a/data/minecraft/worldgen/configured_feature/dark_oak_leaf_litter.json b/data/minecraft/worldgen/configured_feature/dark_oak_leaf_litter.json new file mode 100644 index 00000000..d8f43473 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/dark_oak_leaf_litter.json @@ -0,0 +1,356 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:dark_oak_foliage_placer", + "offset": 0, + "radius": 0 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dark_oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:three_layers_feature_size", + "limit": 1, + "lower_size": 0, + "middle_size": 1, + "upper_limit": 1, + "upper_size": 2 + }, + "trunk_placer": { + "type": "minecraft:dark_oak_trunk_placer", + "base_height": 6, + "height_rand_a": 2, + "height_rand_b": 1 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dark_oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fallen_birch_tree.json b/data/minecraft/worldgen/configured_feature/fallen_birch_tree.json new file mode 100644 index 00000000..1f95f2b1 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fallen_birch_tree.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:fallen_tree", + "config": { + "log_decorators": [ + { + "type": "minecraft:attached_to_logs", + "block_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:red_mushroom" + }, + "weight": 2 + }, + { + "data": { + "Name": "minecraft:brown_mushroom" + }, + "weight": 1 + } + ] + }, + "directions": [ + "up" + ], + "probability": 0.1 + } + ], + "log_length": { + "type": "minecraft:uniform", + "max_inclusive": 8, + "min_inclusive": 5 + }, + "stump_decorators": [], + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fallen_jungle_tree.json b/data/minecraft/worldgen/configured_feature/fallen_jungle_tree.json new file mode 100644 index 00000000..29cfe152 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fallen_jungle_tree.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:fallen_tree", + "config": { + "log_decorators": [ + { + "type": "minecraft:attached_to_logs", + "block_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:red_mushroom" + }, + "weight": 2 + }, + { + "data": { + "Name": "minecraft:brown_mushroom" + }, + "weight": 1 + } + ] + }, + "directions": [ + "up" + ], + "probability": 0.1 + } + ], + "log_length": { + "type": "minecraft:uniform", + "max_inclusive": 11, + "min_inclusive": 4 + }, + "stump_decorators": [ + { + "type": "minecraft:trunk_vine" + } + ], + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:jungle_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fallen_oak_tree.json b/data/minecraft/worldgen/configured_feature/fallen_oak_tree.json new file mode 100644 index 00000000..59e49f03 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fallen_oak_tree.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:fallen_tree", + "config": { + "log_decorators": [ + { + "type": "minecraft:attached_to_logs", + "block_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:red_mushroom" + }, + "weight": 2 + }, + { + "data": { + "Name": "minecraft:brown_mushroom" + }, + "weight": 1 + } + ] + }, + "directions": [ + "up" + ], + "probability": 0.1 + } + ], + "log_length": { + "type": "minecraft:uniform", + "max_inclusive": 7, + "min_inclusive": 4 + }, + "stump_decorators": [ + { + "type": "minecraft:trunk_vine" + } + ], + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fallen_spruce_tree.json b/data/minecraft/worldgen/configured_feature/fallen_spruce_tree.json new file mode 100644 index 00000000..30113ea3 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fallen_spruce_tree.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:fallen_tree", + "config": { + "log_decorators": [ + { + "type": "minecraft:attached_to_logs", + "block_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:red_mushroom" + }, + "weight": 2 + }, + { + "data": { + "Name": "minecraft:brown_mushroom" + }, + "weight": 1 + } + ] + }, + "directions": [ + "up" + ], + "probability": 0.1 + } + ], + "log_length": { + "type": "minecraft:uniform", + "max_inclusive": 10, + "min_inclusive": 6 + }, + "stump_decorators": [], + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:spruce_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fallen_super_birch_tree.json b/data/minecraft/worldgen/configured_feature/fallen_super_birch_tree.json new file mode 100644 index 00000000..a189ea4c --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fallen_super_birch_tree.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:fallen_tree", + "config": { + "log_decorators": [ + { + "type": "minecraft:attached_to_logs", + "block_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:red_mushroom" + }, + "weight": 2 + }, + { + "data": { + "Name": "minecraft:brown_mushroom" + }, + "weight": 1 + } + ] + }, + "directions": [ + "up" + ], + "probability": 0.1 + } + ], + "log_length": { + "type": "minecraft:uniform", + "max_inclusive": 15, + "min_inclusive": 5 + }, + "stump_decorators": [], + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:birch_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002.json b/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002.json deleted file mode 100644 index 18932aa3..00000000 --- a/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "type": "minecraft:tree", - "config": { - "decorators": [ - { - "type": "minecraft:beehive", - "probability": 0.002 - } - ], - "dirt_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:dirt" - } - }, - "foliage_placer": { - "type": "minecraft:fancy_foliage_placer", - "height": 4, - "offset": 4, - "radius": 2 - }, - "foliage_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:oak_leaves", - "Properties": { - "distance": "7", - "persistent": "false", - "waterlogged": "false" - } - } - }, - "force_dirt": false, - "ignore_vines": true, - "minimum_size": { - "type": "minecraft:two_layers_feature_size", - "limit": 0, - "lower_size": 0, - "min_clipped_height": 4, - "upper_size": 0 - }, - "trunk_placer": { - "type": "minecraft:fancy_trunk_placer", - "base_height": 3, - "height_rand_a": 11, - "height_rand_b": 0 - }, - "trunk_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:oak_log", - "Properties": { - "axis": "y" - } - } - } - } -} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002_leaf_litter.json b/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002_leaf_litter.json new file mode 100644 index 00000000..efd3d4bd --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fancy_oak_bees_0002_leaf_litter.json @@ -0,0 +1,360 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:beehive", + "probability": 0.002 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 4, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 3, + "height_rand_a": 11, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/fancy_oak_leaf_litter.json b/data/minecraft/worldgen/configured_feature/fancy_oak_leaf_litter.json new file mode 100644 index 00000000..37ef0fe8 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/fancy_oak_leaf_litter.json @@ -0,0 +1,356 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 4, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 3, + "height_rand_a": 11, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/flower_pale_garden.json b/data/minecraft/worldgen/configured_feature/flower_pale_garden.json new file mode 100644 index 00000000..fdb69482 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/flower_pale_garden.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:flower", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "schedule_tick": true, + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:closed_eyeblossom" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 1, + "xz_spread": 0, + "y_spread": 0 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/oak_bees_0002.json b/data/minecraft/worldgen/configured_feature/oak_bees_0002.json deleted file mode 100644 index ef3b7b7d..00000000 --- a/data/minecraft/worldgen/configured_feature/oak_bees_0002.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "type": "minecraft:tree", - "config": { - "decorators": [ - { - "type": "minecraft:beehive", - "probability": 0.002 - } - ], - "dirt_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:dirt" - } - }, - "foliage_placer": { - "type": "minecraft:blob_foliage_placer", - "height": 3, - "offset": 0, - "radius": 2 - }, - "foliage_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:oak_leaves", - "Properties": { - "distance": "7", - "persistent": "false", - "waterlogged": "false" - } - } - }, - "force_dirt": false, - "ignore_vines": true, - "minimum_size": { - "type": "minecraft:two_layers_feature_size", - "limit": 1, - "lower_size": 0, - "upper_size": 1 - }, - "trunk_placer": { - "type": "minecraft:straight_trunk_placer", - "base_height": 4, - "height_rand_a": 2, - "height_rand_b": 0 - }, - "trunk_provider": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:oak_log", - "Properties": { - "axis": "y" - } - } - } - } -} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/oak_bees_0002_leaf_litter.json b/data/minecraft/worldgen/configured_feature/oak_bees_0002_leaf_litter.json new file mode 100644 index 00000000..2b559098 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/oak_bees_0002_leaf_litter.json @@ -0,0 +1,359 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:beehive", + "probability": 0.002 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:blob_foliage_placer", + "height": 3, + "offset": 0, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 1, + "lower_size": 0, + "upper_size": 1 + }, + "trunk_placer": { + "type": "minecraft:straight_trunk_placer", + "base_height": 4, + "height_rand_a": 2, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/oak_leaf_litter.json b/data/minecraft/worldgen/configured_feature/oak_leaf_litter.json new file mode 100644 index 00000000..77151bac --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/oak_leaf_litter.json @@ -0,0 +1,355 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [ + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 4, + "tries": 96 + }, + { + "type": "minecraft:place_on_ground", + "block_state_provider": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "4" + } + }, + "weight": 1 + } + ] + }, + "height": 2, + "radius": 2, + "tries": 150 + } + ], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:blob_foliage_placer", + "height": 3, + "offset": 0, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 1, + "lower_size": 0, + "upper_size": 1 + }, + "trunk_placer": { + "type": "minecraft:straight_trunk_placer", + "base_height": 4, + "height_rand_a": 2, + "height_rand_b": 0 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/pale_forest_flowers.json b/data/minecraft/worldgen/configured_feature/pale_forest_flowers.json new file mode 100644 index 00000000..b73da488 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/pale_forest_flowers.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "schedule_tick": true, + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:closed_eyeblossom" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 96, + "xz_spread": 7, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/pale_garden_vegetation.json b/data/minecraft/worldgen/configured_feature/pale_garden_vegetation.json index 8bb4b6f2..d0d5fb36 100644 --- a/data/minecraft/worldgen/configured_feature/pale_garden_vegetation.json +++ b/data/minecraft/worldgen/configured_feature/pale_garden_vegetation.json @@ -4,11 +4,11 @@ "default": "minecraft:pale_oak_checked", "features": [ { - "chance": 0.2, + "chance": 0.1, "feature": "minecraft:pale_oak_creaking_checked" }, { - "chance": 0.8, + "chance": 0.9, "feature": "minecraft:pale_oak_checked" } ] diff --git a/data/minecraft/worldgen/configured_feature/pale_moss_patch.json b/data/minecraft/worldgen/configured_feature/pale_moss_patch.json new file mode 100644 index 00000000..ed4aea4c --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/pale_moss_patch.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:vegetation_patch", + "config": { + "depth": 1, + "extra_bottom_block_chance": 0.0, + "extra_edge_column_chance": 0.75, + "ground_state": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:pale_moss_block" + } + }, + "replaceable": "#minecraft:moss_replaceable", + "surface": "floor", + "vegetation_chance": 0.3, + "vegetation_feature": { + "feature": "minecraft:pale_moss_vegetation", + "placement": [] + }, + "vertical_range": 5, + "xz_radius": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 2 + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/pale_moss_vegetation.json b/data/minecraft/worldgen/configured_feature/pale_moss_vegetation.json index 2a23ec54..31c8110c 100644 --- a/data/minecraft/worldgen/configured_feature/pale_moss_vegetation.json +++ b/data/minecraft/worldgen/configured_feature/pale_moss_vegetation.json @@ -21,7 +21,7 @@ "data": { "Name": "minecraft:short_grass" }, - "weight": 50 + "weight": 25 }, { "data": { diff --git a/data/minecraft/worldgen/configured_feature/pale_oak_bonemeal.json b/data/minecraft/worldgen/configured_feature/pale_oak_bonemeal.json new file mode 100644 index 00000000..317d7b73 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/pale_oak_bonemeal.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:dark_oak_foliage_placer", + "offset": 0, + "radius": 0 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:pale_oak_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:three_layers_feature_size", + "limit": 1, + "lower_size": 0, + "middle_size": 1, + "upper_limit": 1, + "upper_size": 2 + }, + "trunk_placer": { + "type": "minecraft:dark_oak_trunk_placer", + "base_height": 6, + "height_rand_a": 2, + "height_rand_b": 1 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:pale_oak_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/patch_bush.json b/data/minecraft/worldgen/configured_feature/patch_bush.json new file mode 100644 index 00000000..211e0230 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/patch_bush.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:bush" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 24, + "xz_spread": 5, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/patch_cactus.json b/data/minecraft/worldgen/configured_feature/patch_cactus.json index 406cf985..98f3ea87 100644 --- a/data/minecraft/worldgen/configured_feature/patch_cactus.json +++ b/data/minecraft/worldgen/configured_feature/patch_cactus.json @@ -26,6 +26,27 @@ } } } + }, + { + "height": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 0, + "weight": 3 + }, + { + "data": 1, + "weight": 1 + } + ] + }, + "provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:cactus_flower" + } + } } ], "prioritize_tip": false diff --git a/data/minecraft/worldgen/configured_feature/patch_dry_grass.json b/data/minecraft/worldgen/configured_feature/patch_dry_grass.json new file mode 100644 index 00000000..0b392e75 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/patch_dry_grass.json @@ -0,0 +1,41 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:short_dry_grass" + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:tall_dry_grass" + }, + "weight": 1 + } + ] + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/patch_firefly_bush.json b/data/minecraft/worldgen/configured_feature/patch_firefly_bush.json new file mode 100644 index 00000000..8fc824aa --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/patch_firefly_bush.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:firefly_bush" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 20, + "xz_spread": 4, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/patch_grass_meadow.json b/data/minecraft/worldgen/configured_feature/patch_grass_meadow.json new file mode 100644 index 00000000..913d615f --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/patch_grass_meadow.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:short_grass" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 16, + "xz_spread": 7, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/patch_leaf_litter.json b/data/minecraft/worldgen/configured_feature/patch_leaf_litter.json new file mode 100644 index 00000000..6e38b375 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/patch_leaf_litter.json @@ -0,0 +1,149 @@ +{ + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "north", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "east", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "south", + "segment_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:leaf_litter", + "Properties": { + "facing": "west", + "segment_amount": "3" + } + }, + "weight": 1 + } + ] + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 32, + "xz_spread": 7, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_badlands.json b/data/minecraft/worldgen/configured_feature/trees_badlands.json new file mode 100644 index 00000000..661d28ae --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/trees_badlands.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:random_selector", + "config": { + "default": "minecraft:oak_leaf_litter", + "features": [ + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" + } + ] + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_birch.json b/data/minecraft/worldgen/configured_feature/trees_birch.json new file mode 100644 index 00000000..6d309c01 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/trees_birch.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:random_selector", + "config": { + "default": "minecraft:birch_bees_0002", + "features": [ + { + "chance": 0.0125, + "feature": "minecraft:fallen_birch_tree" + } + ] + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_birch_and_oak.json b/data/minecraft/worldgen/configured_feature/trees_birch_and_oak.json deleted file mode 100644 index f779aad0..00000000 --- a/data/minecraft/worldgen/configured_feature/trees_birch_and_oak.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "minecraft:random_selector", - "config": { - "default": "minecraft:oak_bees_0002", - "features": [ - { - "chance": 0.2, - "feature": "minecraft:birch_bees_0002" - }, - { - "chance": 0.1, - "feature": "minecraft:fancy_oak_bees_0002" - } - ] - } -} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_birch_and_oak_leaf_litter.json b/data/minecraft/worldgen/configured_feature/trees_birch_and_oak_leaf_litter.json new file mode 100644 index 00000000..179fdbec --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/trees_birch_and_oak_leaf_litter.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:random_selector", + "config": { + "default": "minecraft:oak_bees_0002_leaf_litter", + "features": [ + { + "chance": 0.0025, + "feature": "minecraft:fallen_birch_tree" + }, + { + "chance": 0.2, + "feature": "minecraft:birch_bees_0002_leaf_litter" + }, + { + "chance": 0.1, + "feature": "minecraft:fancy_oak_bees_0002_leaf_litter" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" + } + ] + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_flower_forest.json b/data/minecraft/worldgen/configured_feature/trees_flower_forest.json index d8095f78..ecdadd9d 100644 --- a/data/minecraft/worldgen/configured_feature/trees_flower_forest.json +++ b/data/minecraft/worldgen/configured_feature/trees_flower_forest.json @@ -3,6 +3,10 @@ "config": { "default": "minecraft:oak_bees_002", "features": [ + { + "chance": 0.0025, + "feature": "minecraft:fallen_birch_tree" + }, { "chance": 0.2, "feature": "minecraft:birch_bees_002" diff --git a/data/minecraft/worldgen/configured_feature/trees_jungle.json b/data/minecraft/worldgen/configured_feature/trees_jungle.json index 39bdb585..98a5c862 100644 --- a/data/minecraft/worldgen/configured_feature/trees_jungle.json +++ b/data/minecraft/worldgen/configured_feature/trees_jungle.json @@ -14,6 +14,10 @@ { "chance": 0.33333334, "feature": "minecraft:mega_jungle_tree_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_jungle_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_old_growth_pine_taiga.json b/data/minecraft/worldgen/configured_feature/trees_old_growth_pine_taiga.json index 1e4efd39..162d5d2f 100644 --- a/data/minecraft/worldgen/configured_feature/trees_old_growth_pine_taiga.json +++ b/data/minecraft/worldgen/configured_feature/trees_old_growth_pine_taiga.json @@ -14,6 +14,10 @@ { "chance": 0.33333334, "feature": "minecraft:pine_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_spruce_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_old_growth_spruce_taiga.json b/data/minecraft/worldgen/configured_feature/trees_old_growth_spruce_taiga.json index fb290593..343c030c 100644 --- a/data/minecraft/worldgen/configured_feature/trees_old_growth_spruce_taiga.json +++ b/data/minecraft/worldgen/configured_feature/trees_old_growth_spruce_taiga.json @@ -10,6 +10,10 @@ { "chance": 0.33333334, "feature": "minecraft:pine_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_spruce_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_plains.json b/data/minecraft/worldgen/configured_feature/trees_plains.json index c5f56bf6..99468ece 100644 --- a/data/minecraft/worldgen/configured_feature/trees_plains.json +++ b/data/minecraft/worldgen/configured_feature/trees_plains.json @@ -12,6 +12,10 @@ "feature": "minecraft:fancy_oak_bees_005", "placement": [] } + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_savanna.json b/data/minecraft/worldgen/configured_feature/trees_savanna.json index f3f04267..27f9535b 100644 --- a/data/minecraft/worldgen/configured_feature/trees_savanna.json +++ b/data/minecraft/worldgen/configured_feature/trees_savanna.json @@ -6,6 +6,10 @@ { "chance": 0.8, "feature": "minecraft:acacia_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_snowy.json b/data/minecraft/worldgen/configured_feature/trees_snowy.json new file mode 100644 index 00000000..b919971f --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/trees_snowy.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:random_selector", + "config": { + "default": "minecraft:spruce_checked", + "features": [ + { + "chance": 0.0125, + "feature": "minecraft:fallen_spruce_tree" + } + ] + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/trees_sparse_jungle.json b/data/minecraft/worldgen/configured_feature/trees_sparse_jungle.json index a2b593bb..6ab500eb 100644 --- a/data/minecraft/worldgen/configured_feature/trees_sparse_jungle.json +++ b/data/minecraft/worldgen/configured_feature/trees_sparse_jungle.json @@ -10,6 +10,10 @@ { "chance": 0.5, "feature": "minecraft:jungle_bush" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_jungle_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_taiga.json b/data/minecraft/worldgen/configured_feature/trees_taiga.json index 1da37322..f101351f 100644 --- a/data/minecraft/worldgen/configured_feature/trees_taiga.json +++ b/data/minecraft/worldgen/configured_feature/trees_taiga.json @@ -6,6 +6,10 @@ { "chance": 0.33333334, "feature": "minecraft:pine_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_spruce_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/trees_windswept_hills.json b/data/minecraft/worldgen/configured_feature/trees_windswept_hills.json index 3d2554bf..8a3da4be 100644 --- a/data/minecraft/worldgen/configured_feature/trees_windswept_hills.json +++ b/data/minecraft/worldgen/configured_feature/trees_windswept_hills.json @@ -3,6 +3,10 @@ "config": { "default": "minecraft:oak_checked", "features": [ + { + "chance": 0.008325, + "feature": "minecraft:fallen_spruce_tree" + }, { "chance": 0.666, "feature": "minecraft:spruce_checked" @@ -10,6 +14,10 @@ { "chance": 0.1, "feature": "minecraft:fancy_oak_checked" + }, + { + "chance": 0.0125, + "feature": "minecraft:fallen_oak_tree" } ] } diff --git a/data/minecraft/worldgen/configured_feature/warped_fungus.json b/data/minecraft/worldgen/configured_feature/warped_fungus.json index 000e8682..be66cb2d 100644 --- a/data/minecraft/worldgen/configured_feature/warped_fungus.json +++ b/data/minecraft/worldgen/configured_feature/warped_fungus.json @@ -66,6 +66,7 @@ "minecraft:flowering_azalea", "minecraft:moss_carpet", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:small_dripleaf" diff --git a/data/minecraft/worldgen/configured_feature/warped_fungus_planted.json b/data/minecraft/worldgen/configured_feature/warped_fungus_planted.json index e2391974..6136f9d7 100644 --- a/data/minecraft/worldgen/configured_feature/warped_fungus_planted.json +++ b/data/minecraft/worldgen/configured_feature/warped_fungus_planted.json @@ -66,6 +66,7 @@ "minecraft:flowering_azalea", "minecraft:moss_carpet", "minecraft:pink_petals", + "minecraft:wildflowers", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", "minecraft:small_dripleaf" diff --git a/data/minecraft/worldgen/configured_feature/wildflowers_birch_forest.json b/data/minecraft/worldgen/configured_feature/wildflowers_birch_forest.json new file mode 100644 index 00000000..8f0d68f1 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/wildflowers_birch_forest.json @@ -0,0 +1,189 @@ +{ + "type": "minecraft:flower", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "4" + } + }, + "weight": 1 + } + ] + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 6, + "y_spread": 2 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/configured_feature/wildflowers_meadow.json b/data/minecraft/worldgen/configured_feature/wildflowers_meadow.json new file mode 100644 index 00000000..7eedc193 --- /dev/null +++ b/data/minecraft/worldgen/configured_feature/wildflowers_meadow.json @@ -0,0 +1,189 @@ +{ + "type": "minecraft:flower", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:weighted_state_provider", + "entries": [ + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "1" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "2" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "3" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "north", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "east", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "south", + "flower_amount": "4" + } + }, + "weight": 1 + }, + { + "data": { + "Name": "minecraft:wildflowers", + "Properties": { + "facing": "west", + "flower_amount": "4" + } + }, + "weight": 1 + } + ] + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 8, + "xz_spread": 6, + "y_spread": 2 + } +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/birch_bees_0002_leaf_litter.json b/data/minecraft/worldgen/placed_feature/birch_bees_0002_leaf_litter.json new file mode 100644 index 00000000..4d983284 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/birch_bees_0002_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:birch_bees_0002_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:birch_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/birch_leaf_litter.json b/data/minecraft/worldgen/placed_feature/birch_leaf_litter.json new file mode 100644 index 00000000..5f64be20 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/birch_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:birch_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:birch_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/dark_oak_leaf_litter.json b/data/minecraft/worldgen/placed_feature/dark_oak_leaf_litter.json new file mode 100644 index 00000000..b46e1728 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/dark_oak_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:dark_oak_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:dark_oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fallen_birch_tree.json b/data/minecraft/worldgen/placed_feature/fallen_birch_tree.json new file mode 100644 index 00000000..f6dc2939 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fallen_birch_tree.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fallen_birch_tree", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:birch_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fallen_jungle_tree.json b/data/minecraft/worldgen/placed_feature/fallen_jungle_tree.json new file mode 100644 index 00000000..1a17826b --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fallen_jungle_tree.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fallen_jungle_tree", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:jungle_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fallen_oak_tree.json b/data/minecraft/worldgen/placed_feature/fallen_oak_tree.json new file mode 100644 index 00000000..e6aac160 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fallen_oak_tree.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fallen_oak_tree", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fallen_spruce_tree.json b/data/minecraft/worldgen/placed_feature/fallen_spruce_tree.json new file mode 100644 index 00000000..ab56e627 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fallen_spruce_tree.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fallen_spruce_tree", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:spruce_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fallen_super_birch_tree.json b/data/minecraft/worldgen/placed_feature/fallen_super_birch_tree.json new file mode 100644 index 00000000..4af5ed15 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fallen_super_birch_tree.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fallen_super_birch_tree", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:birch_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002.json b/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002.json deleted file mode 100644 index 2b07c958..00000000 --- a/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "feature": "minecraft:fancy_oak_bees_0002", - "placement": [ - { - "type": "minecraft:block_predicate_filter", - "predicate": { - "type": "minecraft:would_survive", - "state": { - "Name": "minecraft:oak_sapling", - "Properties": { - "stage": "0" - } - } - } - } - ] -} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002_leaf_litter.json b/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002_leaf_litter.json new file mode 100644 index 00000000..7a9bd273 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fancy_oak_bees_0002_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fancy_oak_bees_0002_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/fancy_oak_leaf_litter.json b/data/minecraft/worldgen/placed_feature/fancy_oak_leaf_litter.json new file mode 100644 index 00000000..96b13592 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/fancy_oak_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:fancy_oak_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/flower_pale_garden.json b/data/minecraft/worldgen/placed_feature/flower_pale_garden.json new file mode 100644 index 00000000..4ca303c3 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/flower_pale_garden.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:flower_pale_garden", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 32 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/oak_bees_0002.json b/data/minecraft/worldgen/placed_feature/oak_bees_0002.json deleted file mode 100644 index f17c0332..00000000 --- a/data/minecraft/worldgen/placed_feature/oak_bees_0002.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "feature": "minecraft:oak_bees_0002", - "placement": [ - { - "type": "minecraft:block_predicate_filter", - "predicate": { - "type": "minecraft:would_survive", - "state": { - "Name": "minecraft:oak_sapling", - "Properties": { - "stage": "0" - } - } - } - } - ] -} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/oak_bees_0002_leaf_litter.json b/data/minecraft/worldgen/placed_feature/oak_bees_0002_leaf_litter.json new file mode 100644 index 00000000..de58b9f7 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/oak_bees_0002_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:oak_bees_0002_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/oak_leaf_litter.json b/data/minecraft/worldgen/placed_feature/oak_leaf_litter.json new file mode 100644 index 00000000..3cbaadaa --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/oak_leaf_litter.json @@ -0,0 +1,17 @@ +{ + "feature": "minecraft:oak_leaf_litter", + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:oak_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/pale_garden_flowers.json b/data/minecraft/worldgen/placed_feature/pale_garden_flowers.json new file mode 100644 index 00000000..a0ae0ab5 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/pale_garden_flowers.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:pale_forest_flowers", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 8 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING_NO_LEAVES" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/pale_moss_patch.json b/data/minecraft/worldgen/placed_feature/pale_moss_patch.json new file mode 100644 index 00000000..c7da9c32 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/pale_moss_patch.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:pale_moss_patch", + "placement": [ + { + "type": "minecraft:count", + "count": 1 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING_NO_LEAVES" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_bush.json b/data/minecraft/worldgen/placed_feature/patch_bush.json new file mode 100644 index 00000000..294cc1ae --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_bush.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:patch_bush", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 4 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_dry_grass_badlands.json b/data/minecraft/worldgen/placed_feature/patch_dry_grass_badlands.json new file mode 100644 index 00000000..61002e43 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_dry_grass_badlands.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:patch_dry_grass", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 6 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_dry_grass_desert.json b/data/minecraft/worldgen/placed_feature/patch_dry_grass_desert.json new file mode 100644 index 00000000..e18ef109 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_dry_grass_desert.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:patch_dry_grass", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water.json b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water.json new file mode 100644 index 00000000..86a0190c --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water.json @@ -0,0 +1,90 @@ +{ + "feature": "minecraft:patch_firefly_bush", + "placement": [ + { + "type": "minecraft:count", + "count": 2 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING_NO_LEAVES" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:all_of", + "predicates": [ + { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:firefly_bush" + } + }, + { + "type": "minecraft:any_of", + "predicates": [ + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 1, + -1, + 0 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + -1, + -1, + 0 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 0, + -1, + 1 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 0, + -1, + -1 + ] + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water_swamp.json b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water_swamp.json new file mode 100644 index 00000000..bc8e0f3c --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_near_water_swamp.json @@ -0,0 +1,90 @@ +{ + "feature": "minecraft:patch_firefly_bush", + "placement": [ + { + "type": "minecraft:count", + "count": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:all_of", + "predicates": [ + { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + { + "type": "minecraft:would_survive", + "state": { + "Name": "minecraft:firefly_bush" + } + }, + { + "type": "minecraft:any_of", + "predicates": [ + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 1, + -1, + 0 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + -1, + -1, + 0 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 0, + -1, + 1 + ] + }, + { + "type": "minecraft:matching_fluids", + "fluids": [ + "minecraft:water", + "minecraft:flowing_water" + ], + "offset": [ + 0, + -1, + -1 + ] + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_firefly_bush_swamp.json b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_swamp.json new file mode 100644 index 00000000..9e762a7a --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_firefly_bush_swamp.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:patch_firefly_bush", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 8 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_grass_meadow.json b/data/minecraft/worldgen/placed_feature/patch_grass_meadow.json new file mode 100644 index 00000000..2e1f7145 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_grass_meadow.json @@ -0,0 +1,21 @@ +{ + "feature": "minecraft:patch_grass_meadow", + "placement": [ + { + "type": "minecraft:noise_threshold_count", + "above_noise": 10, + "below_noise": 5, + "noise_level": -0.8 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/patch_leaf_litter.json b/data/minecraft/worldgen/placed_feature/patch_leaf_litter.json new file mode 100644 index 00000000..76a56d7e --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/patch_leaf_litter.json @@ -0,0 +1,19 @@ +{ + "feature": "minecraft:patch_leaf_litter", + "placement": [ + { + "type": "minecraft:count", + "count": 2 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/trees_badlands.json b/data/minecraft/worldgen/placed_feature/trees_badlands.json index 4b85d9a0..b0bae882 100644 --- a/data/minecraft/worldgen/placed_feature/trees_badlands.json +++ b/data/minecraft/worldgen/placed_feature/trees_badlands.json @@ -1,5 +1,5 @@ { - "feature": "minecraft:oak", + "feature": "minecraft:trees_badlands", "placement": [ { "type": "minecraft:count", diff --git a/data/minecraft/worldgen/placed_feature/trees_birch.json b/data/minecraft/worldgen/placed_feature/trees_birch.json index f5e8cca4..96e1dbd0 100644 --- a/data/minecraft/worldgen/placed_feature/trees_birch.json +++ b/data/minecraft/worldgen/placed_feature/trees_birch.json @@ -1,5 +1,5 @@ { - "feature": "minecraft:birch_bees_0002", + "feature": "minecraft:trees_birch", "placement": [ { "type": "minecraft:count", diff --git a/data/minecraft/worldgen/placed_feature/trees_birch_and_oak.json b/data/minecraft/worldgen/placed_feature/trees_birch_and_oak.json deleted file mode 100644 index d690f091..00000000 --- a/data/minecraft/worldgen/placed_feature/trees_birch_and_oak.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "feature": "minecraft:trees_birch_and_oak", - "placement": [ - { - "type": "minecraft:count", - "count": { - "type": "minecraft:weighted_list", - "distribution": [ - { - "data": 10, - "weight": 9 - }, - { - "data": 11, - "weight": 1 - } - ] - } - }, - { - "type": "minecraft:in_square" - }, - { - "type": "minecraft:surface_water_depth_filter", - "max_water_depth": 0 - }, - { - "type": "minecraft:heightmap", - "heightmap": "OCEAN_FLOOR" - }, - { - "type": "minecraft:biome" - } - ] -} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/trees_birch_and_oak_leaf_litter.json b/data/minecraft/worldgen/placed_feature/trees_birch_and_oak_leaf_litter.json new file mode 100644 index 00000000..1751dd2a --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/trees_birch_and_oak_leaf_litter.json @@ -0,0 +1,35 @@ +{ + "feature": "minecraft:trees_birch_and_oak_leaf_litter", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 10, + "weight": 9 + }, + { + "data": 11, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/trees_snowy.json b/data/minecraft/worldgen/placed_feature/trees_snowy.json index 9051c074..524337a7 100644 --- a/data/minecraft/worldgen/placed_feature/trees_snowy.json +++ b/data/minecraft/worldgen/placed_feature/trees_snowy.json @@ -1,5 +1,5 @@ { - "feature": "minecraft:spruce", + "feature": "minecraft:trees_snowy", "placement": [ { "type": "minecraft:count", diff --git a/data/minecraft/worldgen/placed_feature/wildflowers_birch_forest.json b/data/minecraft/worldgen/placed_feature/wildflowers_birch_forest.json new file mode 100644 index 00000000..6cbd8112 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/wildflowers_birch_forest.json @@ -0,0 +1,23 @@ +{ + "feature": "minecraft:wildflowers_birch_forest", + "placement": [ + { + "type": "minecraft:count", + "count": 3 + }, + { + "type": "minecraft:rarity_filter", + "chance": 2 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/data/minecraft/worldgen/placed_feature/wildflowers_meadow.json b/data/minecraft/worldgen/placed_feature/wildflowers_meadow.json new file mode 100644 index 00000000..9afe9ed3 --- /dev/null +++ b/data/minecraft/worldgen/placed_feature/wildflowers_meadow.json @@ -0,0 +1,21 @@ +{ + "feature": "minecraft:wildflowers_meadow", + "placement": [ + { + "type": "minecraft:noise_threshold_count", + "above_noise": 10, + "below_noise": 5, + "noise_level": -0.8 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/net/minecraft/ChatFormatting.java b/net/minecraft/ChatFormatting.java index 28478ae6..de37ade5 100644 --- a/net/minecraft/ChatFormatting.java +++ b/net/minecraft/ChatFormatting.java @@ -2,6 +2,7 @@ package net.minecraft; import com.google.common.collect.Lists; import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -38,6 +39,11 @@ public enum ChatFormatting implements StringRepresentable { RESET("RESET", 'r', -1, null); public static final Codec CODEC = StringRepresentable.fromEnum(ChatFormatting::values); + public static final Codec COLOR_CODEC = CODEC.validate( + chatFormatting -> chatFormatting.isFormat() + ? DataResult.error(() -> "Formatting was not a valid color: " + chatFormatting) + : DataResult.success(chatFormatting) + ); public static final char PREFIX_CODE = '§'; private static final Map FORMATTING_BY_NAME = (Map)Arrays.stream(values()) .collect(Collectors.toMap(chatFormatting -> cleanName(chatFormatting.name), chatFormatting -> chatFormatting)); diff --git a/net/minecraft/CrashReportCategory.java b/net/minecraft/CrashReportCategory.java index 7ce60a93..2f433578 100644 --- a/net/minecraft/CrashReportCategory.java +++ b/net/minecraft/CrashReportCategory.java @@ -18,15 +18,15 @@ public class CrashReportCategory { this.title = title; } - public static String formatLocation(LevelHeightAccessor levelHeightAccess, double x, double y, double z) { - return String.format(Locale.ROOT, "%.2f,%.2f,%.2f - %s", x, y, z, formatLocation(levelHeightAccess, BlockPos.containing(x, y, z))); + public static String formatLocation(LevelHeightAccessor levelHeightAccessor, double x, double y, double z) { + return String.format(Locale.ROOT, "%.2f,%.2f,%.2f - %s", x, y, z, formatLocation(levelHeightAccessor, BlockPos.containing(x, y, z))); } - public static String formatLocation(LevelHeightAccessor levelHeightAccess, BlockPos pos) { - return formatLocation(levelHeightAccess, pos.getX(), pos.getY(), pos.getZ()); + public static String formatLocation(LevelHeightAccessor levelHeightAccessor, BlockPos pos) { + return formatLocation(levelHeightAccessor, pos.getX(), pos.getY(), pos.getZ()); } - public static String formatLocation(LevelHeightAccessor levelHeightAccess, int x, int y, int z) { + public static String formatLocation(LevelHeightAccessor levelHeightAccessor, int x, int y, int z) { StringBuilder stringBuilder = new StringBuilder(); try { @@ -45,10 +45,10 @@ public class CrashReportCategory { int m = y & 15; int n = z & 15; int o = SectionPos.sectionToBlockCoord(i); - int p = levelHeightAccess.getMinY(); + int p = levelHeightAccessor.getMinY(); int q = SectionPos.sectionToBlockCoord(k); int r = SectionPos.sectionToBlockCoord(i + 1) - 1; - int s = levelHeightAccess.getMaxY(); + int s = levelHeightAccessor.getMaxY(); int t = SectionPos.sectionToBlockCoord(k + 1) - 1; stringBuilder.append( String.format(Locale.ROOT, "Section: (at %d,%d,%d in %d,%d,%d; chunk contains blocks %d,%d,%d to %d,%d,%d)", l, m, n, i, j, k, o, p, q, r, s, t) @@ -67,10 +67,10 @@ public class CrashReportCategory { int m = (i + 1 << 5) - 1; int n = (j + 1 << 5) - 1; int o = i << 9; - int p = levelHeightAccess.getMinY(); + int p = levelHeightAccessor.getMinY(); int q = j << 9; int r = (i + 1 << 9) - 1; - int s = levelHeightAccess.getMaxY(); + int s = levelHeightAccessor.getMaxY(); int t = (j + 1 << 9) - 1; stringBuilder.append( String.format(Locale.ROOT, "Region: (%d,%d; contains chunks %d,%d to %d,%d, blocks %d,%d,%d to %d,%d,%d)", i, j, k, l, m, n, o, p, q, r, s, t) @@ -186,12 +186,13 @@ public class CrashReportCategory { return this.stackTrace; } - public static void populateBlockDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, @Nullable BlockState state) { - if (state != null) { - category.setDetail("Block", state::toString); - } + public static void populateBlockDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, BlockState state) { + category.setDetail("Block", state::toString); + populateBlockLocationDetails(category, levelHeightAccessor, pos); + } - category.setDetail("Block location", (CrashReportDetail)(() -> formatLocation(levelHeightAccessor, pos))); + public static CrashReportCategory populateBlockLocationDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos) { + return category.setDetail("Block location", (CrashReportDetail)(() -> formatLocation(levelHeightAccessor, pos))); } static class Entry { diff --git a/net/minecraft/DetectedVersion.java b/net/minecraft/DetectedVersion.java index a92156a0..d611d9ae 100644 --- a/net/minecraft/DetectedVersion.java +++ b/net/minecraft/DetectedVersion.java @@ -28,12 +28,12 @@ public class DetectedVersion implements WorldVersion { private DetectedVersion() { this.id = UUID.randomUUID().toString().replaceAll("-", ""); - this.name = "1.21.2"; + this.name = "1.21.5"; this.stable = true; - this.worldVersion = new DataVersion(4080, "main"); + this.worldVersion = new DataVersion(4325, "main"); this.protocolVersion = SharedConstants.getProtocolVersion(); - this.resourcePackVersion = 42; - this.dataPackVersion = 57; + this.resourcePackVersion = 55; + this.dataPackVersion = 71; this.buildTime = new Date(); } diff --git a/net/minecraft/Optionull.java b/net/minecraft/Optionull.java index 3f1b5146..4744b669 100644 --- a/net/minecraft/Optionull.java +++ b/net/minecraft/Optionull.java @@ -9,8 +9,8 @@ import org.jetbrains.annotations.Nullable; public class Optionull { @Deprecated - public static T orElse(@Nullable T object, T object2) { - return (T)Objects.requireNonNullElse(object, object2); + public static T orElse(@Nullable T value, T defaultValue) { + return (T)Objects.requireNonNullElse(value, defaultValue); } @Nullable diff --git a/net/minecraft/SharedConstants.java b/net/minecraft/SharedConstants.java index a20160bc..3c50eea0 100644 --- a/net/minecraft/SharedConstants.java +++ b/net/minecraft/SharedConstants.java @@ -34,7 +34,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()} and {@link com.mojang.bridge.game.GameVersion#getWorldVersion()} instead. */ @Deprecated - public static final int WORLD_VERSION = 4080; + public static final int WORLD_VERSION = 4325; @Deprecated public static final String SERIES = "main"; /** @@ -44,7 +44,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()} and {@link com.mojang.bridge.game.GameVersion#getName()} instead. */ @Deprecated - public static final String VERSION_STRING = "1.21.2"; + public static final String VERSION_STRING = "1.21.5"; /** * The numeric format number for the networking protocol used by the release target of this game version. * @@ -54,7 +54,7 @@ public class SharedConstants { * @deprecated Use {@link #getProtocolVersion()} instead. */ @Deprecated - public static final int RELEASE_NETWORK_PROTOCOL_VERSION = 768; + public static final int RELEASE_NETWORK_PROTOCOL_VERSION = 770; /** * The numeric format number for the networking protocol used by the snapshot of this game version. * @@ -66,8 +66,8 @@ public class SharedConstants { * @deprecated Use {@link #getProtocolVersion()} instead. */ @Deprecated - public static final int SNAPSHOT_NETWORK_PROTOCOL_VERSION = 219; - public static final int SNBT_NAG_VERSION = 4053; + public static final int SNAPSHOT_NETWORK_PROTOCOL_VERSION = 243; + public static final int SNBT_NAG_VERSION = 4292; /** * The bit in the networking protocol version for denoting {@linkplain #SNAPSHOT snapshot versions}. * @@ -82,7 +82,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()}, {@link com.mojang.bridge.game.GameVersion#com.mojang.bridge.game.GameVersion#getPackVersion(com.mojang.bridge.game.PackType)}, and com.mojang.bridge.game.PackType#RESOURCE instead. */ @Deprecated - public static final int RESOURCE_PACK_FORMAT = 42; + public static final int RESOURCE_PACK_FORMAT = 55; /** * The format of the data packs used by this game version. Data packs contain server-side data such as recipes, loot tables, and tags. * @@ -90,7 +90,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()}, {@link com.mojang.bridge.game.GameVersion#com.mojang.bridge.game.GameVersion#getPackVersion(com.mojang.bridge.game.PackType)}, and com.mojang.bridge.game.PackType#DATA instead. */ @Deprecated - public static final int DATA_PACK_FORMAT = 57; + public static final int DATA_PACK_FORMAT = 71; @Deprecated public static final int LANGUAGE_FORMAT = 1; public static final int REPORT_FORMAT_VERSION = 1; @@ -154,6 +154,7 @@ public class SharedConstants { public static final boolean DEBUG_TRIAL_SPAWNER_DETECTS_SHEEP_AS_PLAYERS = false; public static final boolean DEBUG_VAULT_DETECTS_SHEEP_AS_PLAYERS = false; public static final boolean DEBUG_FORCE_ONBOARDING_SCREEN = false; + public static final boolean DEBUG_CURSOR_POS = false; public static final boolean DEBUG_IGNORE_LOCAL_MOB_CAP = false; public static final boolean DEBUG_DISABLE_LIQUID_SPREADING = false; public static final boolean DEBUG_AQUIFERS = false; @@ -277,7 +278,7 @@ public class SharedConstants { *

For releases, this will be equivalent to {@link #RELEASE_NETWORK_PROTOCOL_VERSION}. For snapshot versions, this will be the combination (bitwise OR) of {@link #SNAPSHOT_NETWORK_PROTOCOL_VERSION} and the bit marked by {@link #SNAPSHOT_PROTOCOL_BIT}.

*/ public static int getProtocolVersion() { - return 768; + return 770; } public static boolean debugVoidTerrain(ChunkPos chunkPos) { diff --git a/net/minecraft/SuppressForbidden.java b/net/minecraft/SuppressForbidden.java new file mode 100644 index 00000000..cf5ba4c5 --- /dev/null +++ b/net/minecraft/SuppressForbidden.java @@ -0,0 +1,12 @@ +package net.minecraft; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) +public @interface SuppressForbidden { + String reason(); +} diff --git a/net/minecraft/TracingExecutor.java b/net/minecraft/TracingExecutor.java index f689e327..6d0289f0 100644 --- a/net/minecraft/TracingExecutor.java +++ b/net/minecraft/TracingExecutor.java @@ -7,14 +7,14 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; public record TracingExecutor(ExecutorService service) implements Executor { - public Executor forName(String string) { + public Executor forName(String name) { if (SharedConstants.IS_RUNNING_IN_IDE) { return runnable -> this.service.execute(() -> { Thread thread = Thread.currentThread(); String string2 = thread.getName(); - thread.setName(string); + thread.setName(name); - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { runnable.run(); } finally { thread.setName(string2); @@ -22,7 +22,7 @@ public record TracingExecutor(ExecutorService service) implements Executor { }); } else { return (Executor)(TracyClient.isAvailable() ? runnable -> this.service.execute(() -> { - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { runnable.run(); } }) : this.service); @@ -33,12 +33,12 @@ public record TracingExecutor(ExecutorService service) implements Executor { this.service.execute(wrapUnnamed(runnable)); } - public void shutdownAndAwait(long l, TimeUnit timeUnit) { + public void shutdownAndAwait(long timeout, TimeUnit unit) { this.service.shutdown(); boolean bl; try { - bl = this.service.awaitTermination(l, timeUnit); + bl = this.service.awaitTermination(timeout, unit); } catch (InterruptedException var6) { bl = false; } @@ -48,10 +48,10 @@ public record TracingExecutor(ExecutorService service) implements Executor { } } - private static Runnable wrapUnnamed(Runnable runnable) { - return !TracyClient.isAvailable() ? runnable : () -> { + private static Runnable wrapUnnamed(Runnable task) { + return !TracyClient.isAvailable() ? task : () -> { try (Zone zone = TracyClient.beginZone("task", SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + task.run(); } }; } diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java index 0a268ae1..2e912aae 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.google.common.util.concurrent.MoreExecutors; import com.mojang.datafixers.DataFixUtils; import com.mojang.datafixers.Typed; @@ -146,18 +147,18 @@ public class Util { return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now()); } - private static TracingExecutor makeExecutor(String string) { - int i = Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads()); + private static TracingExecutor makeExecutor(String name) { + int i = maxAllowedExecutorThreads(); ExecutorService executorService; if (i <= 0) { executorService = MoreExecutors.newDirectExecutorService(); } else { AtomicInteger atomicInteger = new AtomicInteger(1); executorService = new ForkJoinPool(i, forkJoinPool -> { - final String string2 = "Worker-" + string + "-" + atomicInteger.getAndIncrement(); + final String string2 = "Worker-" + name + "-" + atomicInteger.getAndIncrement(); ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(forkJoinPool) { protected void onStart() { - TracyClient.setThreadName(string2, string.hashCode()); + TracyClient.setThreadName(string2, name.hashCode()); super.onStart(); } @@ -179,6 +180,10 @@ public class Util { return new TracingExecutor(executorService); } + public static int maxAllowedExecutorThreads() { + return Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads()); + } + private static int getMaxThreads() { String string = System.getProperty("max.bg.threads"); if (string != null) { @@ -214,14 +219,14 @@ public class Util { IO_POOL.shutdownAndAwait(3L, TimeUnit.SECONDS); } - private static TracingExecutor makeIoExecutor(String string, boolean bl) { + private static TracingExecutor makeIoExecutor(String name, boolean daemon) { AtomicInteger atomicInteger = new AtomicInteger(1); return new TracingExecutor(Executors.newCachedThreadPool(runnable -> { Thread thread = new Thread(runnable); - String string2 = string + atomicInteger.getAndIncrement(); - TracyClient.setThreadName(string2, string.hashCode()); + String string2 = name + atomicInteger.getAndIncrement(); + TracyClient.setThreadName(string2, name.hashCode()); thread.setName(string2); - thread.setDaemon(bl); + thread.setDaemon(daemon); thread.setUncaughtExceptionHandler(Util::onThreadException); return thread; })); @@ -268,20 +273,20 @@ public class Util { return type2; } - public static void runNamed(Runnable runnable, String string) { + public static void runNamed(Runnable task, String name) { if (SharedConstants.IS_RUNNING_IN_IDE) { Thread thread = Thread.currentThread(); - String string2 = thread.getName(); - thread.setName(string); + String string = thread.getName(); + thread.setName(name); - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { + task.run(); } finally { - thread.setName(string2); + thread.setName(string); } } else { - try (Zone zone2 = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + try (Zone zone2 = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { + task.run(); } } } @@ -299,28 +304,28 @@ public class Util { return (Predicate)predicate; } - public static Predicate allOf(Predicate predicate, Predicate predicate2) { - return object -> predicate.test(object) && predicate2.test(object); + public static Predicate allOf(Predicate predicate1, Predicate predicate2) { + return object -> predicate1.test(object) && predicate2.test(object); } - public static Predicate allOf(Predicate predicate, Predicate predicate2, Predicate predicate3) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object); + public static Predicate allOf(Predicate predicate1, Predicate predicate2, Predicate predicate3) { + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object); } public static Predicate allOf( - Predicate predicate, Predicate predicate2, Predicate predicate3, Predicate predicate4 + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4 ) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object); + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object); } public static Predicate allOf( - Predicate predicate, + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4, Predicate predicate5 ) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object) && predicate5.test(object); + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object) && predicate5.test(object); } @SafeVarargs @@ -370,28 +375,28 @@ public class Util { return (Predicate)predicate; } - public static Predicate anyOf(Predicate predicate, Predicate predicate2) { - return object -> predicate.test(object) || predicate2.test(object); + public static Predicate anyOf(Predicate predicate1, Predicate predicate2) { + return object -> predicate1.test(object) || predicate2.test(object); } - public static Predicate anyOf(Predicate predicate, Predicate predicate2, Predicate predicate3) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object); + public static Predicate anyOf(Predicate predicate1, Predicate predicate2, Predicate predicate3) { + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object); } public static Predicate anyOf( - Predicate predicate, Predicate predicate2, Predicate predicate3, Predicate predicate4 + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4 ) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object); + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object); } public static Predicate anyOf( - Predicate predicate, + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4, Predicate predicate5 ) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object) || predicate5.test(object); + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object) || predicate5.test(object); } @SafeVarargs @@ -454,6 +459,10 @@ public class Util { } } + public static int growByHalf(int value, int minValue) { + return (int)Math.max(Math.min((long)value + (value >> 1), 2147483639L), minValue); + } + public static Util.OS getPlatform() { String string = System.getProperty("os.name").toLowerCase(Locale.ROOT); if (string.contains("win")) { @@ -543,16 +552,24 @@ public class Util { return object; } - public static , V> EnumMap makeEnumMap(Class class_, Function function) { - EnumMap enumMap = new EnumMap(class_); + public static , V> Map makeEnumMap(Class enumClass, Function valueGetter) { + EnumMap enumMap = new EnumMap(enumClass); - for (K enum_ : (Enum[])class_.getEnumConstants()) { - enumMap.put(enum_, function.apply(enum_)); + for (K enum_ : (Enum[])enumClass.getEnumConstants()) { + enumMap.put(enum_, valueGetter.apply(enum_)); } return enumMap; } + public static Map mapValues(Map map, Function mapper) { + return (Map)map.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> mapper.apply(entry.getValue()))); + } + + public static Map mapValuesLazy(Map map, com.google.common.base.Function mapper) { + return Maps.transformValues(map, mapper); + } + /** * Takes a list of futures and returns a future of list that completes when all of them succeed or any of them error, */ @@ -602,14 +619,14 @@ public class Util { return CompletableFuture.allOf(completableFutures2).thenApply(void_ -> list); } - public static Optional ifElse(Optional opt, Consumer consumer, Runnable orElse) { - if (opt.isPresent()) { - consumer.accept(opt.get()); + public static Optional ifElse(Optional optional, Consumer ifPresent, Runnable ifEmpty) { + if (optional.isPresent()) { + ifPresent.accept(optional.get()); } else { - orElse.run(); + ifEmpty.run(); } - return opt; + return optional; } public static Supplier name(Supplier item, Supplier nameSupplier) { @@ -768,13 +785,13 @@ public class Util { safeReplaceOrMoveFile(current, latest, oldBackup, false); } - public static boolean safeReplaceOrMoveFile(Path current, Path latest, Path oldBackup, boolean bl) { + public static boolean safeReplaceOrMoveFile(Path current, Path latest, Path oldBackup, boolean restore) { if (Files.exists(current, new LinkOption[0]) && !runWithRetries(10, "create backup " + oldBackup, createDeleter(oldBackup), createRenamer(current, oldBackup), createFileCreatedCheck(oldBackup))) { return false; } else if (!runWithRetries(10, "remove old " + current, createDeleter(current), createFileDeletedCheck(current))) { return false; - } else if (!runWithRetries(10, "replace " + current + " with " + latest, createRenamer(latest, current), createFileCreatedCheck(current)) && !bl) { + } else if (!runWithRetries(10, "replace " + current + " with " + latest, createRenamer(latest, current), createFileCreatedCheck(current)) && !restore) { runWithRetries(10, "restore " + current + " from " + oldBackup, createRenamer(oldBackup, current), createFileCreatedCheck(current)); return false; } else { diff --git a/net/minecraft/advancements/Advancement.java b/net/minecraft/advancements/Advancement.java index d1641e60..efd74e85 100644 --- a/net/minecraft/advancements/Advancement.java +++ b/net/minecraft/advancements/Advancement.java @@ -8,7 +8,9 @@ import java.util.Map; import java.util.Optional; import java.util.function.Consumer; import net.minecraft.ChatFormatting; +import net.minecraft.advancements.AdvancementRequirements.Strategy; import net.minecraft.advancements.critereon.CriterionValidator; +import net.minecraft.core.ClientAsset; import net.minecraft.core.HolderGetter; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -71,7 +73,7 @@ public record Advancement( Component component = display.getTitle(); ChatFormatting chatFormatting = display.getType().getChatColor(); Component component2 = ComponentUtils.mergeStyles(component.copy(), Style.EMPTY.withColor(chatFormatting)).append("\n").append(display.getDescription()); - Component component3 = component.copy().withStyle(style -> style.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, component2))); + Component component3 = component.copy().withStyle(style -> style.withHoverEvent(new HoverEvent.ShowText(component2))); return ComponentUtils.wrapInSquareBrackets(component3).withStyle(chatFormatting); } @@ -114,7 +116,7 @@ public record Advancement( private AdvancementRewards rewards = AdvancementRewards.EMPTY; private final ImmutableMap.Builder> criteria = ImmutableMap.builder(); private Optional requirements = Optional.empty(); - private AdvancementRequirements.Strategy requirementsStrategy = AdvancementRequirements.Strategy.AND; + private Strategy requirementsStrategy = Strategy.AND; private boolean sendsTelemetryEvent; public static Advancement.Builder advancement() { @@ -148,7 +150,7 @@ public record Advancement( boolean announceChat, boolean hidden ) { - return this.display(new DisplayInfo(icon, title, description, Optional.ofNullable(background), type, showToast, announceChat, hidden)); + return this.display(new DisplayInfo(icon, title, description, Optional.ofNullable(background).map(ClientAsset::new), type, showToast, announceChat, hidden)); } public Advancement.Builder display( @@ -162,7 +164,9 @@ public record Advancement( boolean hidden ) { return this.display( - new DisplayInfo(new ItemStack(icon.asItem()), title, description, Optional.ofNullable(background), type, showToast, announceChat, hidden) + new DisplayInfo( + new ItemStack(icon.asItem()), title, description, Optional.ofNullable(background).map(ClientAsset::new), type, showToast, announceChat, hidden + ) ); } @@ -185,7 +189,7 @@ public record Advancement( return this; } - public Advancement.Builder requirements(AdvancementRequirements.Strategy requirementsStrategy) { + public Advancement.Builder requirements(Strategy requirementsStrategy) { this.requirementsStrategy = requirementsStrategy; return this; } diff --git a/net/minecraft/advancements/AdvancementProgress.java b/net/minecraft/advancements/AdvancementProgress.java index 0ee174cc..191503f3 100644 --- a/net/minecraft/advancements/AdvancementProgress.java +++ b/net/minecraft/advancements/AdvancementProgress.java @@ -16,6 +16,7 @@ import java.util.Objects; import java.util.Set; import java.util.Map.Entry; import java.util.stream.Collectors; +import net.minecraft.Util; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.util.ExtraCodecs; @@ -27,7 +28,7 @@ public class AdvancementProgress implements Comparable { .xmap(Instant::from, instant -> instant.atZone(ZoneId.systemDefault())); private static final Codec> CRITERIA_CODEC = Codec.unboundedMap(Codec.STRING, OBTAINED_TIME_CODEC) .xmap( - map -> (Map)map.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> new CriterionProgress((Instant)entry.getValue()))), + map -> Util.mapValues(map, CriterionProgress::new), map -> (Map)map.entrySet() .stream() .filter(entry -> ((CriterionProgress)entry.getValue()).isDone()) diff --git a/net/minecraft/advancements/AdvancementRewards.java b/net/minecraft/advancements/AdvancementRewards.java index bb3b1fbc..1a6c38bd 100644 --- a/net/minecraft/advancements/AdvancementRewards.java +++ b/net/minecraft/advancements/AdvancementRewards.java @@ -6,7 +6,6 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.List; import java.util.Optional; import net.minecraft.commands.CacheableFunction; -import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MinecraftServer; @@ -25,8 +24,8 @@ public record AdvancementRewards(int experience, List> lo public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( Codec.INT.optionalFieldOf("experience", 0).forGetter(AdvancementRewards::experience), - ResourceKey.codec(Registries.LOOT_TABLE).listOf().optionalFieldOf("loot", List.of()).forGetter(AdvancementRewards::loot), - ResourceKey.codec(Registries.RECIPE).listOf().optionalFieldOf("recipes", List.of()).forGetter(AdvancementRewards::recipes), + LootTable.KEY_CODEC.listOf().optionalFieldOf("loot", List.of()).forGetter(AdvancementRewards::loot), + Recipe.KEY_CODEC.listOf().optionalFieldOf("recipes", List.of()).forGetter(AdvancementRewards::recipes), CacheableFunction.CODEC.optionalFieldOf("function").forGetter(AdvancementRewards::function) ) .apply(instance, AdvancementRewards::new) @@ -112,12 +111,12 @@ public record AdvancementRewards(int experience, List> lo return this; } - public static AdvancementRewards.Builder recipe(ResourceKey> resourceKey) { - return new AdvancementRewards.Builder().addRecipe(resourceKey); + public static AdvancementRewards.Builder recipe(ResourceKey> recipe) { + return new AdvancementRewards.Builder().addRecipe(recipe); } - public AdvancementRewards.Builder addRecipe(ResourceKey> resourceKey) { - this.recipes.add(resourceKey); + public AdvancementRewards.Builder addRecipe(ResourceKey> recipe) { + this.recipes.add(recipe); return this; } diff --git a/net/minecraft/advancements/DisplayInfo.java b/net/minecraft/advancements/DisplayInfo.java index bcb67f3b..3fe7a140 100644 --- a/net/minecraft/advancements/DisplayInfo.java +++ b/net/minecraft/advancements/DisplayInfo.java @@ -3,11 +3,11 @@ package net.minecraft.advancements; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.Optional; +import net.minecraft.core.ClientAsset; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentSerialization; import net.minecraft.network.codec.StreamCodec; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; public class DisplayInfo { @@ -16,7 +16,7 @@ public class DisplayInfo { ItemStack.STRICT_CODEC.fieldOf("icon").forGetter(DisplayInfo::getIcon), ComponentSerialization.CODEC.fieldOf("title").forGetter(DisplayInfo::getTitle), ComponentSerialization.CODEC.fieldOf("description").forGetter(DisplayInfo::getDescription), - ResourceLocation.CODEC.optionalFieldOf("background").forGetter(DisplayInfo::getBackground), + ClientAsset.CODEC.optionalFieldOf("background").forGetter(DisplayInfo::getBackground), AdvancementType.CODEC.optionalFieldOf("frame", AdvancementType.TASK).forGetter(DisplayInfo::getType), Codec.BOOL.optionalFieldOf("show_toast", true).forGetter(DisplayInfo::shouldShowToast), Codec.BOOL.optionalFieldOf("announce_to_chat", true).forGetter(DisplayInfo::shouldAnnounceChat), @@ -30,7 +30,7 @@ public class DisplayInfo { private final Component title; private final Component description; private final ItemStack icon; - private final Optional background; + private final Optional background; private final AdvancementType type; private final boolean showToast; private final boolean announceChat; @@ -42,7 +42,7 @@ public class DisplayInfo { ItemStack icon, Component title, Component description, - Optional background, + Optional background, AdvancementType type, boolean showToast, boolean announceChat, @@ -75,7 +75,7 @@ public class DisplayInfo { return this.icon; } - public Optional getBackground() { + public Optional getBackground() { return this.background; } @@ -122,7 +122,7 @@ public class DisplayInfo { } buffer.writeInt(i); - this.background.ifPresent(buffer::writeResourceLocation); + this.background.map(ClientAsset::id).ifPresent(buffer::writeResourceLocation); buffer.writeFloat(this.x); buffer.writeFloat(this.y); } @@ -133,7 +133,7 @@ public class DisplayInfo { ItemStack itemStack = ItemStack.STREAM_CODEC.decode(buffer); AdvancementType advancementType = buffer.readEnum(AdvancementType.class); int i = buffer.readInt(); - Optional optional = (i & 1) != 0 ? Optional.of(buffer.readResourceLocation()) : Optional.empty(); + Optional optional = (i & 1) != 0 ? Optional.of(new ClientAsset(buffer.readResourceLocation())) : Optional.empty(); boolean bl = (i & 2) != 0; boolean bl2 = (i & 4) != 0; DisplayInfo displayInfo = new DisplayInfo(itemStack, component, component2, optional, advancementType, bl, false, bl2); diff --git a/net/minecraft/advancements/critereon/BlockPredicate.java b/net/minecraft/advancements/critereon/BlockPredicate.java index 58e0468e..71f7cdd8 100644 --- a/net/minecraft/advancements/critereon/BlockPredicate.java +++ b/net/minecraft/advancements/critereon/BlockPredicate.java @@ -9,6 +9,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.HolderGetter; import net.minecraft.core.HolderSet; import net.minecraft.core.RegistryCodecs; +import net.minecraft.core.component.DataComponentGetter; import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -23,12 +24,15 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.pattern.BlockInWorld; import org.jetbrains.annotations.Nullable; -public record BlockPredicate(Optional> blocks, Optional properties, Optional nbt) { +public record BlockPredicate( + Optional> blocks, Optional properties, Optional nbt, DataComponentMatchers components +) { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( RegistryCodecs.homogeneousList(Registries.BLOCK).optionalFieldOf("blocks").forGetter(BlockPredicate::blocks), StatePropertiesPredicate.CODEC.optionalFieldOf("state").forGetter(BlockPredicate::properties), - NbtPredicate.CODEC.optionalFieldOf("nbt").forGetter(BlockPredicate::nbt) + NbtPredicate.CODEC.optionalFieldOf("nbt").forGetter(BlockPredicate::nbt), + DataComponentMatchers.CODEC.forGetter(BlockPredicate::components) ) .apply(instance, BlockPredicate::new) ); @@ -39,16 +43,29 @@ public record BlockPredicate(Optional> blocks, Optional> blocks, Optional> blocks, Optional> blocks = Optional.empty(); private Optional properties = Optional.empty(); private Optional nbt = Optional.empty(); + private DataComponentMatchers components = DataComponentMatchers.ANY; private Builder() { } @@ -84,17 +106,17 @@ public record BlockPredicate(Optional> blocks, Optional holderGetter, Block... blocks) { - return this.of(holderGetter, Arrays.asList(blocks)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, Block... blocks) { + return this.of(blockRegistry, Arrays.asList(blocks)); } - public BlockPredicate.Builder of(HolderGetter holderGetter, Collection collection) { - this.blocks = Optional.of(HolderSet.direct(Block::builtInRegistryHolder, collection)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, Collection blocks) { + this.blocks = Optional.of(HolderSet.direct(Block::builtInRegistryHolder, blocks)); return this; } - public BlockPredicate.Builder of(HolderGetter holderGetter, TagKey tagKey) { - this.blocks = Optional.of(holderGetter.getOrThrow(tagKey)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, TagKey blockTag) { + this.blocks = Optional.of(blockRegistry.getOrThrow(blockTag)); return this; } @@ -108,8 +130,13 @@ public record BlockPredicate(Optional> blocks, Optional usedItem(HolderGetter holderGetter, ItemLike itemLike) { - return usedItem(ItemPredicate.Builder.item().of(holderGetter, itemLike.asItem())); + public static Criterion usedItem(HolderGetter itemRegistry, ItemLike item) { + return usedItem(ItemPredicate.Builder.item().of(itemRegistry, item.asItem())); } public static Criterion usedItem(ItemPredicate.Builder item) { diff --git a/net/minecraft/advancements/critereon/ContextAwarePredicate.java b/net/minecraft/advancements/critereon/ContextAwarePredicate.java index 91fc4de6..108b2b8e 100644 --- a/net/minecraft/advancements/critereon/ContextAwarePredicate.java +++ b/net/minecraft/advancements/critereon/ContextAwarePredicate.java @@ -28,10 +28,10 @@ public class ContextAwarePredicate { return this.compositePredicates.test(context); } - public void validate(ValidationContext validationContext) { + public void validate(ValidationContext context) { for (int i = 0; i < this.conditions.size(); i++) { LootItemCondition lootItemCondition = (LootItemCondition)this.conditions.get(i); - lootItemCondition.validate(validationContext.forChild("[" + i + "]")); + lootItemCondition.validate(context.forChild("[" + i + "]")); } } } diff --git a/net/minecraft/advancements/critereon/CriterionValidator.java b/net/minecraft/advancements/critereon/CriterionValidator.java index 7e534614..acf64b79 100644 --- a/net/minecraft/advancements/critereon/CriterionValidator.java +++ b/net/minecraft/advancements/critereon/CriterionValidator.java @@ -29,14 +29,14 @@ public class CriterionValidator { this.validate(entity, LootContextParamSets.ADVANCEMENT_ENTITY, name); } - public void validate(ContextAwarePredicate contextAwarePredicate, ContextKeySet contextKeySet, String string) { - contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(string), contextKeySet, this.lootData)); + public void validate(ContextAwarePredicate entity, ContextKeySet contextKeySet, String name) { + entity.validate(new ValidationContext(this.reporter.forChild(name), contextKeySet, this.lootData)); } - public void validate(List list, ContextKeySet contextKeySet, String string) { - for (int i = 0; i < list.size(); i++) { - ContextAwarePredicate contextAwarePredicate = (ContextAwarePredicate)list.get(i); - contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(string + "[" + i + "]"), contextKeySet, this.lootData)); + public void validate(List entities, ContextKeySet contextKeySet, String name) { + for (int i = 0; i < entities.size(); i++) { + ContextAwarePredicate contextAwarePredicate = (ContextAwarePredicate)entities.get(i); + contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(name + "[" + i + "]"), contextKeySet, this.lootData)); } } } diff --git a/net/minecraft/advancements/critereon/DataComponentMatchers.java b/net/minecraft/advancements/critereon/DataComponentMatchers.java new file mode 100644 index 00000000..5b21c228 --- /dev/null +++ b/net/minecraft/advancements/critereon/DataComponentMatchers.java @@ -0,0 +1,75 @@ +package net.minecraft.advancements.critereon; + +import com.google.common.collect.ImmutableMap; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Map; +import java.util.function.Predicate; +import net.minecraft.core.component.DataComponentExactPredicate; +import net.minecraft.core.component.DataComponentGetter; +import net.minecraft.core.component.predicates.DataComponentPredicate; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; + +public record DataComponentMatchers(DataComponentExactPredicate exact, Map, DataComponentPredicate> partial) + implements Predicate { + public static final DataComponentMatchers ANY = new DataComponentMatchers(DataComponentExactPredicate.EMPTY, Map.of()); + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + DataComponentExactPredicate.CODEC.optionalFieldOf("components", DataComponentExactPredicate.EMPTY).forGetter(DataComponentMatchers::exact), + DataComponentPredicate.CODEC.optionalFieldOf("predicates", Map.of()).forGetter(DataComponentMatchers::partial) + ) + .apply(instance, DataComponentMatchers::new) + ); + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + DataComponentExactPredicate.STREAM_CODEC, + DataComponentMatchers::exact, + DataComponentPredicate.STREAM_CODEC, + DataComponentMatchers::partial, + DataComponentMatchers::new + ); + + public boolean test(DataComponentGetter dataComponentGetter) { + if (!this.exact.test(dataComponentGetter)) { + return false; + } else { + for (DataComponentPredicate dataComponentPredicate : this.partial.values()) { + if (!dataComponentPredicate.matches(dataComponentGetter)) { + return false; + } + } + + return true; + } + } + + public boolean isEmpty() { + return this.exact.isEmpty() && this.partial.isEmpty(); + } + + public static class Builder { + private DataComponentExactPredicate exact = DataComponentExactPredicate.EMPTY; + private final ImmutableMap.Builder, DataComponentPredicate> partial = ImmutableMap.builder(); + + private Builder() { + } + + public static DataComponentMatchers.Builder components() { + return new DataComponentMatchers.Builder(); + } + + public DataComponentMatchers.Builder partial(DataComponentPredicate.Type type, T value) { + this.partial.put(type, value); + return this; + } + + public DataComponentMatchers.Builder exact(DataComponentExactPredicate exact) { + this.exact = exact; + return this; + } + + public DataComponentMatchers build() { + return new DataComponentMatchers(this.exact, this.partial.buildOrThrow()); + } + } +} diff --git a/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java b/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java index a89c81bf..8953109a 100644 --- a/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java +++ b/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java @@ -4,7 +4,7 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.Optional; import net.minecraft.core.HolderGetter; -import net.minecraft.core.component.DataComponentPredicate; +import net.minecraft.core.component.DataComponentExactPredicate; import net.minecraft.core.component.DataComponents; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; @@ -37,13 +37,19 @@ public record EntityEquipmentPredicate( .apply(instance, EntityEquipmentPredicate::new) ); - public static EntityEquipmentPredicate captainPredicate(HolderGetter holderGetter, HolderGetter holderGetter2) { + public static EntityEquipmentPredicate captainPredicate(HolderGetter itemRegistry, HolderGetter patternRegistry) { return EntityEquipmentPredicate.Builder.equipment() .head( ItemPredicate.Builder.item() - .of(holderGetter, Items.WHITE_BANNER) - .hasComponents( - DataComponentPredicate.someOf(Raid.getOminousBannerInstance(holderGetter2).getComponents(), DataComponents.BANNER_PATTERNS, DataComponents.ITEM_NAME) + .of(itemRegistry, Items.WHITE_BANNER) + .withComponents( + DataComponentMatchers.Builder.components() + .exact( + DataComponentExactPredicate.someOf( + Raid.getOminousBannerInstance(patternRegistry).getComponents(), DataComponents.BANNER_PATTERNS, DataComponents.ITEM_NAME + ) + ) + .build() ) ) .build(); diff --git a/net/minecraft/advancements/critereon/EntityPredicate.java b/net/minecraft/advancements/critereon/EntityPredicate.java index a25dbd31..0c93f933 100644 --- a/net/minecraft/advancements/critereon/EntityPredicate.java +++ b/net/minecraft/advancements/critereon/EntityPredicate.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Stream; import net.minecraft.core.HolderGetter; +import net.minecraft.core.component.DataComponentGetter; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; @@ -39,7 +40,8 @@ public record EntityPredicate( Optional passenger, Optional targetedEntity, Optional team, - Optional slots + Optional slots, + DataComponentMatchers components ) { public static final Codec CODEC = Codec.recursive( "EntityPredicate", @@ -59,7 +61,8 @@ public record EntityPredicate( codec.optionalFieldOf("passenger").forGetter(EntityPredicate::passenger), codec.optionalFieldOf("targeted_entity").forGetter(EntityPredicate::targetedEntity), Codec.STRING.optionalFieldOf("team").forGetter(EntityPredicate::team), - SlotsPredicate.CODEC.optionalFieldOf("slots").forGetter(EntityPredicate::slots) + SlotsPredicate.CODEC.optionalFieldOf("slots").forGetter(EntityPredicate::slots), + DataComponentMatchers.CODEC.forGetter(EntityPredicate::components) ) .apply(instance, EntityPredicate::new) ) @@ -115,7 +118,7 @@ public record EntityPredicate( } else { if (this.location.steppingOn.isPresent()) { Vec3 vec3 = Vec3.atCenterOf(entity.getOnPos()); - if (!((LocationPredicate)this.location.steppingOn.get()).matches(level, vec3.x(), vec3.y(), vec3.z())) { + if (!entity.onGround() || !((LocationPredicate)this.location.steppingOn.get()).matches(level, vec3.x(), vec3.y(), vec3.z())) { return false; } } @@ -153,9 +156,11 @@ public record EntityPredicate( } } - return this.slots.isPresent() && !((SlotsPredicate)this.slots.get()).matches(entity) - ? false - : !this.nbt.isPresent() || ((NbtPredicate)this.nbt.get()).matches(entity); + if (this.slots.isPresent() && !((SlotsPredicate)this.slots.get()).matches(entity)) { + return false; + } else { + return !this.components.test((DataComponentGetter)entity) ? false : this.nbt.isEmpty() || ((NbtPredicate)this.nbt.get()).matches(entity); + } } } } @@ -187,18 +192,19 @@ public record EntityPredicate( private Optional targetedEntity = Optional.empty(); private Optional team = Optional.empty(); private Optional slots = Optional.empty(); + private DataComponentMatchers components = DataComponentMatchers.ANY; public static EntityPredicate.Builder entity() { return new EntityPredicate.Builder(); } - public EntityPredicate.Builder of(HolderGetter> holderGetter, EntityType entityType) { - this.entityType = Optional.of(EntityTypePredicate.of(holderGetter, entityType)); + public EntityPredicate.Builder of(HolderGetter> entityTypeRegistry, EntityType entityType) { + this.entityType = Optional.of(EntityTypePredicate.of(entityTypeRegistry, entityType)); return this; } - public EntityPredicate.Builder of(HolderGetter> holderGetter, TagKey> tagKey) { - this.entityType = Optional.of(EntityTypePredicate.of(holderGetter, tagKey)); + public EntityPredicate.Builder of(HolderGetter> entityTypeRegistry, TagKey> entityTypeTag) { + this.entityType = Optional.of(EntityTypePredicate.of(entityTypeRegistry, entityTypeTag)); return this; } @@ -292,6 +298,11 @@ public record EntityPredicate( return this; } + public EntityPredicate.Builder components(DataComponentMatchers components) { + this.components = components; + return this; + } + public EntityPredicate build() { return new EntityPredicate( this.entityType, @@ -308,7 +319,8 @@ public record EntityPredicate( this.passenger, this.targetedEntity, this.team, - this.slots + this.slots, + this.components ); } } diff --git a/net/minecraft/advancements/critereon/EntitySubPredicates.java b/net/minecraft/advancements/critereon/EntitySubPredicates.java index deff8c76..9f2c9fc9 100644 --- a/net/minecraft/advancements/critereon/EntitySubPredicates.java +++ b/net/minecraft/advancements/critereon/EntitySubPredicates.java @@ -1,39 +1,8 @@ package net.minecraft.advancements.critereon; -import com.mojang.serialization.Codec; import com.mojang.serialization.MapCodec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import java.util.function.Function; -import net.minecraft.advancements.critereon.EntitySubPredicates.EntityHolderVariantPredicateType.Instance; -import net.minecraft.core.Holder; -import net.minecraft.core.HolderSet; import net.minecraft.core.Registry; -import net.minecraft.core.RegistryCodecs; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.animal.Cat; -import net.minecraft.world.entity.animal.CatVariant; -import net.minecraft.world.entity.animal.Fox; -import net.minecraft.world.entity.animal.FrogVariant; -import net.minecraft.world.entity.animal.MushroomCow; -import net.minecraft.world.entity.animal.Parrot; -import net.minecraft.world.entity.animal.Rabbit; -import net.minecraft.world.entity.animal.Salmon; -import net.minecraft.world.entity.animal.TropicalFish; -import net.minecraft.world.entity.animal.Wolf; -import net.minecraft.world.entity.animal.WolfVariant; -import net.minecraft.world.entity.animal.axolotl.Axolotl; -import net.minecraft.world.entity.animal.frog.Frog; -import net.minecraft.world.entity.animal.horse.Horse; -import net.minecraft.world.entity.animal.horse.Llama; -import net.minecraft.world.entity.animal.horse.Variant; -import net.minecraft.world.entity.decoration.Painting; -import net.minecraft.world.entity.decoration.PaintingVariant; -import net.minecraft.world.entity.npc.VillagerDataHolder; -import net.minecraft.world.entity.npc.VillagerType; public class EntitySubPredicates { public static final MapCodec LIGHTNING = register("lightning", LightningBoltPredicate.CODEC); @@ -42,169 +11,12 @@ public class EntitySubPredicates { public static final MapCodec SLIME = register("slime", SlimePredicate.CODEC); public static final MapCodec RAIDER = register("raider", RaiderPredicate.CODEC); public static final MapCodec SHEEP = register("sheep", SheepPredicate.CODEC); - public static final EntitySubPredicates.EntityVariantPredicateType AXOLOTL = register( - "axolotl", - EntitySubPredicates.EntityVariantPredicateType.create( - Axolotl.Variant.CODEC, entity -> entity instanceof Axolotl axolotl ? Optional.of(axolotl.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType FOX = register( - "fox", - EntitySubPredicates.EntityVariantPredicateType.create( - Fox.Variant.CODEC, entity -> entity instanceof Fox fox ? Optional.of(fox.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType MOOSHROOM = register( - "mooshroom", - EntitySubPredicates.EntityVariantPredicateType.create( - MushroomCow.Variant.CODEC, entity -> entity instanceof MushroomCow mushroomCow ? Optional.of(mushroomCow.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType RABBIT = register( - "rabbit", - EntitySubPredicates.EntityVariantPredicateType.create( - Rabbit.Variant.CODEC, entity -> entity instanceof Rabbit rabbit ? Optional.of(rabbit.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType HORSE = register( - "horse", - EntitySubPredicates.EntityVariantPredicateType.create( - Variant.CODEC, entity -> entity instanceof Horse horse ? Optional.of(horse.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType LLAMA = register( - "llama", - EntitySubPredicates.EntityVariantPredicateType.create( - Llama.Variant.CODEC, entity -> entity instanceof Llama llama ? Optional.of(llama.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType VILLAGER = register( - "villager", - EntitySubPredicates.EntityVariantPredicateType.create( - BuiltInRegistries.VILLAGER_TYPE.byNameCodec(), - entity -> entity instanceof VillagerDataHolder villagerDataHolder ? Optional.of(villagerDataHolder.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType PARROT = register( - "parrot", - EntitySubPredicates.EntityVariantPredicateType.create( - Parrot.Variant.CODEC, entity -> entity instanceof Parrot parrot ? Optional.of(parrot.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType SALMON = register( - "salmon", - EntitySubPredicates.EntityVariantPredicateType.create( - Salmon.Variant.CODEC, entity -> entity instanceof Salmon salmon ? Optional.of(salmon.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityVariantPredicateType TROPICAL_FISH = register( - "tropical_fish", - EntitySubPredicates.EntityVariantPredicateType.create( - TropicalFish.Pattern.CODEC, entity -> entity instanceof TropicalFish tropicalFish ? Optional.of(tropicalFish.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityHolderVariantPredicateType PAINTING = register( - "painting", - EntitySubPredicates.EntityHolderVariantPredicateType.create( - Registries.PAINTING_VARIANT, entity -> entity instanceof Painting painting ? Optional.of(painting.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityHolderVariantPredicateType CAT = register( - "cat", - EntitySubPredicates.EntityHolderVariantPredicateType.create( - Registries.CAT_VARIANT, entity -> entity instanceof Cat cat ? Optional.of(cat.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityHolderVariantPredicateType FROG = register( - "frog", - EntitySubPredicates.EntityHolderVariantPredicateType.create( - Registries.FROG_VARIANT, entity -> entity instanceof Frog frog ? Optional.of(frog.getVariant()) : Optional.empty() - ) - ); - public static final EntitySubPredicates.EntityHolderVariantPredicateType WOLF = register( - "wolf", - EntitySubPredicates.EntityHolderVariantPredicateType.create( - Registries.WOLF_VARIANT, entity -> entity instanceof Wolf wolf ? Optional.of(wolf.getVariant()) : Optional.empty() - ) - ); private static MapCodec register(String name, MapCodec codec) { return Registry.register(BuiltInRegistries.ENTITY_SUB_PREDICATE_TYPE, name, codec); } - private static EntitySubPredicates.EntityVariantPredicateType register(String name, EntitySubPredicates.EntityVariantPredicateType predicateType) { - Registry.register(BuiltInRegistries.ENTITY_SUB_PREDICATE_TYPE, name, predicateType.codec); - return predicateType; - } - - private static EntitySubPredicates.EntityHolderVariantPredicateType register( - String name, EntitySubPredicates.EntityHolderVariantPredicateType predicateType - ) { - Registry.register(BuiltInRegistries.ENTITY_SUB_PREDICATE_TYPE, name, predicateType.codec); - return predicateType; - } - public static MapCodec bootstrap(Registry> registry) { return LIGHTNING; } - - public static EntitySubPredicate catVariant(Holder catVariant) { - return CAT.createPredicate(HolderSet.direct(catVariant)); - } - - public static EntitySubPredicate frogVariant(Holder frogVariant) { - return FROG.createPredicate(HolderSet.direct(frogVariant)); - } - - public static EntitySubPredicate wolfVariant(HolderSet wolfVariant) { - return WOLF.createPredicate(wolfVariant); - } - - public static class EntityHolderVariantPredicateType { - final MapCodec.Instance> codec; - final Function>> getter; - - public static EntitySubPredicates.EntityHolderVariantPredicateType create( - ResourceKey> registryKey, Function>> getter - ) { - return new EntitySubPredicates.EntityHolderVariantPredicateType<>(registryKey, getter); - } - - public EntityHolderVariantPredicateType(ResourceKey> registryKey, Function>> getter) { - this.getter = getter; - this.codec = RecordCodecBuilder.mapCodec( - instance -> instance.group(RegistryCodecs.homogeneousList(registryKey).fieldOf("variant").forGetter(instancex -> instancex.variants)) - .apply(instance, holderSet -> new Instance(this, holderSet)) - ); - } - - public EntitySubPredicate createPredicate(HolderSet variants) { - return new Instance(this, variants); - } - } - - public static class EntityVariantPredicateType { - final MapCodec.Instance> codec; - final Function> getter; - - public static EntitySubPredicates.EntityVariantPredicateType create(Registry variantRegistry, Function> getter) { - return new EntitySubPredicates.EntityVariantPredicateType<>(variantRegistry.byNameCodec(), getter); - } - - public static EntitySubPredicates.EntityVariantPredicateType create(Codec codec, Function> getter) { - return new EntitySubPredicates.EntityVariantPredicateType<>(codec, getter); - } - - public EntityVariantPredicateType(Codec codec, Function> getter) { - this.getter = getter; - this.codec = RecordCodecBuilder.mapCodec( - instance -> instance.group(codec.fieldOf("variant").forGetter(instancex -> instancex.variant)) - .apply(instance, object -> new net.minecraft.advancements.critereon.EntitySubPredicates.EntityVariantPredicateType.Instance(this, object)) - ); - } - - public EntitySubPredicate createPredicate(V variant) { - return new net.minecraft.advancements.critereon.EntitySubPredicates.EntityVariantPredicateType.Instance(this, variant); - } - } } diff --git a/net/minecraft/advancements/critereon/EntityTypePredicate.java b/net/minecraft/advancements/critereon/EntityTypePredicate.java index a4e89be7..5a4aff45 100644 --- a/net/minecraft/advancements/critereon/EntityTypePredicate.java +++ b/net/minecraft/advancements/critereon/EntityTypePredicate.java @@ -12,12 +12,12 @@ public record EntityTypePredicate(HolderSet> types) { public static final Codec CODEC = RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE) .xmap(EntityTypePredicate::new, EntityTypePredicate::types); - public static EntityTypePredicate of(HolderGetter> holderGetter, EntityType entityType) { + public static EntityTypePredicate of(HolderGetter> entityTypeRegistry, EntityType entityType) { return new EntityTypePredicate(HolderSet.direct(entityType.builtInRegistryHolder())); } - public static EntityTypePredicate of(HolderGetter> holderGetter, TagKey> tagKey) { - return new EntityTypePredicate(holderGetter.getOrThrow(tagKey)); + public static EntityTypePredicate of(HolderGetter> entityTypeRegistry, TagKey> entityTypeTag) { + return new EntityTypePredicate(entityTypeRegistry.getOrThrow(entityTypeTag)); } public boolean matches(EntityType type) { diff --git a/net/minecraft/advancements/critereon/FluidPredicate.java b/net/minecraft/advancements/critereon/FluidPredicate.java index ed0e6ada..2be41418 100644 --- a/net/minecraft/advancements/critereon/FluidPredicate.java +++ b/net/minecraft/advancements/critereon/FluidPredicate.java @@ -47,8 +47,8 @@ public record FluidPredicate(Optional> fluids, Optional holderSet) { - this.fluids = Optional.of(holderSet); + public FluidPredicate.Builder of(HolderSet fluids) { + this.fluids = Optional.of(fluids); return this; } diff --git a/net/minecraft/advancements/critereon/InputPredicate.java b/net/minecraft/advancements/critereon/InputPredicate.java index 4508a7d8..00cb0326 100644 --- a/net/minecraft/advancements/critereon/InputPredicate.java +++ b/net/minecraft/advancements/critereon/InputPredicate.java @@ -37,7 +37,7 @@ public record InputPredicate( && this.matches(this.sprint, input.sprint()); } - private boolean matches(Optional optional, boolean bl) { - return (Boolean)optional.map(boolean_ -> boolean_ == bl).orElse(true); + private boolean matches(Optional input, boolean expectedValue) { + return (Boolean)input.map(boolean_ -> boolean_ == expectedValue).orElse(true); } } diff --git a/net/minecraft/advancements/critereon/InventoryChangeTrigger.java b/net/minecraft/advancements/critereon/InventoryChangeTrigger.java index fe1c6928..fe063418 100644 --- a/net/minecraft/advancements/critereon/InventoryChangeTrigger.java +++ b/net/minecraft/advancements/critereon/InventoryChangeTrigger.java @@ -4,13 +4,13 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.stream.Stream; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.advancements.Criterion; +import net.minecraft.advancements.critereon.InventoryChangeTrigger.TriggerInstance.Slots; +import net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance; import net.minecraft.core.HolderSet; -import net.minecraft.core.component.DataComponentPredicate; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; @@ -46,14 +46,11 @@ public class InventoryChangeTrigger extends SimpleCriterionTrigger triggerInstance.matches(inventory, stack, full, empty, occupied)); } - public record TriggerInstance(Optional player, InventoryChangeTrigger.TriggerInstance.Slots slots, List items) - implements SimpleCriterionTrigger.SimpleInstance { + public record TriggerInstance(Optional player, Slots slots, List items) implements SimpleInstance { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(InventoryChangeTrigger.TriggerInstance::player), - InventoryChangeTrigger.TriggerInstance.Slots.CODEC - .optionalFieldOf("slots", InventoryChangeTrigger.TriggerInstance.Slots.ANY) - .forGetter(InventoryChangeTrigger.TriggerInstance::slots), + Slots.CODEC.optionalFieldOf("slots", Slots.ANY).forGetter(InventoryChangeTrigger.TriggerInstance::slots), ItemPredicate.CODEC.listOf().optionalFieldOf("items", List.of()).forGetter(InventoryChangeTrigger.TriggerInstance::items) ) .apply(instance, InventoryChangeTrigger.TriggerInstance::new) @@ -64,8 +61,7 @@ public class InventoryChangeTrigger extends SimpleCriterionTrigger hasItems(ItemPredicate... items) { - return CriteriaTriggers.INVENTORY_CHANGED - .createCriterion(new InventoryChangeTrigger.TriggerInstance(Optional.empty(), InventoryChangeTrigger.TriggerInstance.Slots.ANY, List.of(items))); + return CriteriaTriggers.INVENTORY_CHANGED.createCriterion(new InventoryChangeTrigger.TriggerInstance(Optional.empty(), Slots.ANY, List.of(items))); } public static Criterion hasItems(ItemLike... items) { @@ -73,7 +69,7 @@ public class InventoryChangeTrigger extends SimpleCriterionTrigger CODEC = RecordCodecBuilder.create( - instance -> instance.group( - MinMaxBounds.Ints.CODEC.optionalFieldOf("occupied", MinMaxBounds.Ints.ANY).forGetter(InventoryChangeTrigger.TriggerInstance.Slots::occupied), - MinMaxBounds.Ints.CODEC.optionalFieldOf("full", MinMaxBounds.Ints.ANY).forGetter(InventoryChangeTrigger.TriggerInstance.Slots::full), - MinMaxBounds.Ints.CODEC.optionalFieldOf("empty", MinMaxBounds.Ints.ANY).forGetter(InventoryChangeTrigger.TriggerInstance.Slots::empty) - ) - .apply(instance, InventoryChangeTrigger.TriggerInstance.Slots::new) - ); - public static final InventoryChangeTrigger.TriggerInstance.Slots ANY = new InventoryChangeTrigger.TriggerInstance.Slots( - MinMaxBounds.Ints.ANY, MinMaxBounds.Ints.ANY, MinMaxBounds.Ints.ANY - ); - - public boolean matches(int full, int empty, int occupied) { - if (!this.full.matches(full)) { - return false; - } else { - return !this.empty.matches(empty) ? false : this.occupied.matches(occupied); - } - } - } } } diff --git a/net/minecraft/advancements/critereon/ItemAttributeModifiersPredicate.java b/net/minecraft/advancements/critereon/ItemAttributeModifiersPredicate.java deleted file mode 100644 index 0c7667b1..00000000 --- a/net/minecraft/advancements/critereon/ItemAttributeModifiersPredicate.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import java.util.function.Predicate; -import net.minecraft.core.HolderSet; -import net.minecraft.core.RegistryCodecs; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.EquipmentSlotGroup; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.ItemAttributeModifiers; - -public record ItemAttributeModifiersPredicate( - Optional> modifiers -) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - CollectionPredicate.codec(ItemAttributeModifiersPredicate.EntryPredicate.CODEC) - .optionalFieldOf("modifiers") - .forGetter(ItemAttributeModifiersPredicate::modifiers) - ) - .apply(instance, ItemAttributeModifiersPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.ATTRIBUTE_MODIFIERS; - } - - public boolean matches(ItemStack stack, ItemAttributeModifiers value) { - return !this.modifiers.isPresent() || ((CollectionPredicate)this.modifiers.get()).test((Iterable)value.modifiers()); - } - - public record EntryPredicate( - Optional> attribute, - Optional id, - MinMaxBounds.Doubles amount, - Optional operation, - Optional slot - ) implements Predicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - RegistryCodecs.homogeneousList(Registries.ATTRIBUTE).optionalFieldOf("attribute").forGetter(ItemAttributeModifiersPredicate.EntryPredicate::attribute), - ResourceLocation.CODEC.optionalFieldOf("id").forGetter(ItemAttributeModifiersPredicate.EntryPredicate::id), - MinMaxBounds.Doubles.CODEC.optionalFieldOf("amount", MinMaxBounds.Doubles.ANY).forGetter(ItemAttributeModifiersPredicate.EntryPredicate::amount), - AttributeModifier.Operation.CODEC.optionalFieldOf("operation").forGetter(ItemAttributeModifiersPredicate.EntryPredicate::operation), - EquipmentSlotGroup.CODEC.optionalFieldOf("slot").forGetter(ItemAttributeModifiersPredicate.EntryPredicate::slot) - ) - .apply(instance, ItemAttributeModifiersPredicate.EntryPredicate::new) - ); - - public boolean test(ItemAttributeModifiers.Entry entry) { - if (this.attribute.isPresent() && !((HolderSet)this.attribute.get()).contains(entry.attribute())) { - return false; - } else if (this.id.isPresent() && !((ResourceLocation)this.id.get()).equals(entry.modifier().id())) { - return false; - } else if (!this.amount.matches(entry.modifier().amount())) { - return false; - } else { - return this.operation.isPresent() && this.operation.get() != entry.modifier().operation() - ? false - : !this.slot.isPresent() || this.slot.get() == entry.slot(); - } - } - } -} diff --git a/net/minecraft/advancements/critereon/ItemBundlePredicate.java b/net/minecraft/advancements/critereon/ItemBundlePredicate.java deleted file mode 100644 index e0a5707a..00000000 --- a/net/minecraft/advancements/critereon/ItemBundlePredicate.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.BundleContents; - -public record ItemBundlePredicate(Optional> items) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group(CollectionPredicate.codec(ItemPredicate.CODEC).optionalFieldOf("items").forGetter(ItemBundlePredicate::items)) - .apply(instance, ItemBundlePredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.BUNDLE_CONTENTS; - } - - public boolean matches(ItemStack stack, BundleContents value) { - return !this.items.isPresent() || ((CollectionPredicate)this.items.get()).test(value.items()); - } -} diff --git a/net/minecraft/advancements/critereon/ItemContainerPredicate.java b/net/minecraft/advancements/critereon/ItemContainerPredicate.java deleted file mode 100644 index 7782142f..00000000 --- a/net/minecraft/advancements/critereon/ItemContainerPredicate.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.ItemContainerContents; - -public record ItemContainerPredicate(Optional> items) - implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group(CollectionPredicate.codec(ItemPredicate.CODEC).optionalFieldOf("items").forGetter(ItemContainerPredicate::items)) - .apply(instance, ItemContainerPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.CONTAINER; - } - - public boolean matches(ItemStack stack, ItemContainerContents value) { - return !this.items.isPresent() || ((CollectionPredicate)this.items.get()).test(value.nonEmptyItems()); - } -} diff --git a/net/minecraft/advancements/critereon/ItemCustomDataPredicate.java b/net/minecraft/advancements/critereon/ItemCustomDataPredicate.java deleted file mode 100644 index 33ed2c48..00000000 --- a/net/minecraft/advancements/critereon/ItemCustomDataPredicate.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import net.minecraft.world.item.ItemStack; - -public record ItemCustomDataPredicate(NbtPredicate value) implements ItemSubPredicate { - public static final Codec CODEC = NbtPredicate.CODEC.xmap(ItemCustomDataPredicate::new, ItemCustomDataPredicate::value); - - @Override - public boolean matches(ItemStack stack) { - return this.value.matches(stack); - } - - public static ItemCustomDataPredicate customData(NbtPredicate value) { - return new ItemCustomDataPredicate(value); - } -} diff --git a/net/minecraft/advancements/critereon/ItemDamagePredicate.java b/net/minecraft/advancements/critereon/ItemDamagePredicate.java deleted file mode 100644 index 2a2c6d39..00000000 --- a/net/minecraft/advancements/critereon/ItemDamagePredicate.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; - -public record ItemDamagePredicate(MinMaxBounds.Ints durability, MinMaxBounds.Ints damage) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - MinMaxBounds.Ints.CODEC.optionalFieldOf("durability", MinMaxBounds.Ints.ANY).forGetter(ItemDamagePredicate::durability), - MinMaxBounds.Ints.CODEC.optionalFieldOf("damage", MinMaxBounds.Ints.ANY).forGetter(ItemDamagePredicate::damage) - ) - .apply(instance, ItemDamagePredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.DAMAGE; - } - - public boolean matches(ItemStack stack, Integer value) { - return !this.durability.matches(stack.getMaxDamage() - value) ? false : this.damage.matches(value); - } - - public static ItemDamagePredicate durability(MinMaxBounds.Ints damage) { - return new ItemDamagePredicate(damage, MinMaxBounds.Ints.ANY); - } -} diff --git a/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java b/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java deleted file mode 100644 index 03b755b9..00000000 --- a/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java +++ /dev/null @@ -1,69 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import java.util.List; -import java.util.function.Function; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.enchantment.ItemEnchantments; - -public abstract class ItemEnchantmentsPredicate implements SingleComponentItemPredicate { - private final List enchantments; - - protected ItemEnchantmentsPredicate(List enchantments) { - this.enchantments = enchantments; - } - - public static Codec codec(Function, T> predicateFactory) { - return EnchantmentPredicate.CODEC.listOf().xmap(predicateFactory, ItemEnchantmentsPredicate::enchantments); - } - - protected List enchantments() { - return this.enchantments; - } - - public boolean matches(ItemStack stack, ItemEnchantments enchantments) { - for (EnchantmentPredicate enchantmentPredicate : this.enchantments) { - if (!enchantmentPredicate.containedIn(enchantments)) { - return false; - } - } - - return true; - } - - public static ItemEnchantmentsPredicate.Enchantments enchantments(List enchantments) { - return new ItemEnchantmentsPredicate.Enchantments(enchantments); - } - - public static ItemEnchantmentsPredicate.StoredEnchantments storedEnchantments(List enchantments) { - return new ItemEnchantmentsPredicate.StoredEnchantments(enchantments); - } - - public static class Enchantments extends ItemEnchantmentsPredicate { - public static final Codec CODEC = codec(ItemEnchantmentsPredicate.Enchantments::new); - - protected Enchantments(List list) { - super(list); - } - - @Override - public DataComponentType componentType() { - return DataComponents.ENCHANTMENTS; - } - } - - public static class StoredEnchantments extends ItemEnchantmentsPredicate { - public static final Codec CODEC = codec(ItemEnchantmentsPredicate.StoredEnchantments::new); - - protected StoredEnchantments(List list) { - super(list); - } - - @Override - public DataComponentType componentType() { - return DataComponents.STORED_ENCHANTMENTS; - } - } -} diff --git a/net/minecraft/advancements/critereon/ItemFireworkExplosionPredicate.java b/net/minecraft/advancements/critereon/ItemFireworkExplosionPredicate.java deleted file mode 100644 index 7c80d35e..00000000 --- a/net/minecraft/advancements/critereon/ItemFireworkExplosionPredicate.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import java.util.function.Predicate; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.FireworkExplosion; - -public record ItemFireworkExplosionPredicate(ItemFireworkExplosionPredicate.FireworkPredicate predicate) - implements SingleComponentItemPredicate { - public static final Codec CODEC = ItemFireworkExplosionPredicate.FireworkPredicate.CODEC - .xmap(ItemFireworkExplosionPredicate::new, ItemFireworkExplosionPredicate::predicate); - - @Override - public DataComponentType componentType() { - return DataComponents.FIREWORK_EXPLOSION; - } - - public boolean matches(ItemStack stack, FireworkExplosion value) { - return this.predicate.test(value); - } - - public record FireworkPredicate(Optional shape, Optional twinkle, Optional trail) - implements Predicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - FireworkExplosion.Shape.CODEC.optionalFieldOf("shape").forGetter(ItemFireworkExplosionPredicate.FireworkPredicate::shape), - Codec.BOOL.optionalFieldOf("has_twinkle").forGetter(ItemFireworkExplosionPredicate.FireworkPredicate::twinkle), - Codec.BOOL.optionalFieldOf("has_trail").forGetter(ItemFireworkExplosionPredicate.FireworkPredicate::trail) - ) - .apply(instance, ItemFireworkExplosionPredicate.FireworkPredicate::new) - ); - - public boolean test(FireworkExplosion explosion) { - if (this.shape.isPresent() && this.shape.get() != explosion.shape()) { - return false; - } else { - return this.twinkle.isPresent() && this.twinkle.get() != explosion.hasTwinkle() - ? false - : !this.trail.isPresent() || (Boolean)this.trail.get() == explosion.hasTrail(); - } - } - } -} diff --git a/net/minecraft/advancements/critereon/ItemFireworksPredicate.java b/net/minecraft/advancements/critereon/ItemFireworksPredicate.java deleted file mode 100644 index c2bc1ab6..00000000 --- a/net/minecraft/advancements/critereon/ItemFireworksPredicate.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.FireworkExplosion; -import net.minecraft.world.item.component.Fireworks; - -public record ItemFireworksPredicate( - Optional> explosions, MinMaxBounds.Ints flightDuration -) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - CollectionPredicate.codec(ItemFireworkExplosionPredicate.FireworkPredicate.CODEC) - .optionalFieldOf("explosions") - .forGetter(ItemFireworksPredicate::explosions), - MinMaxBounds.Ints.CODEC.optionalFieldOf("flight_duration", MinMaxBounds.Ints.ANY).forGetter(ItemFireworksPredicate::flightDuration) - ) - .apply(instance, ItemFireworksPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.FIREWORKS; - } - - public boolean matches(ItemStack stack, Fireworks value) { - return this.explosions.isPresent() && !((CollectionPredicate)this.explosions.get()).test((Iterable)value.explosions()) - ? false - : this.flightDuration.matches(value.flightDuration()); - } -} diff --git a/net/minecraft/advancements/critereon/ItemJukeboxPlayablePredicate.java b/net/minecraft/advancements/critereon/ItemJukeboxPlayablePredicate.java deleted file mode 100644 index 5ee1767b..00000000 --- a/net/minecraft/advancements/critereon/ItemJukeboxPlayablePredicate.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import net.minecraft.core.Holder; -import net.minecraft.core.HolderSet; -import net.minecraft.core.RegistryCodecs; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.JukeboxPlayable; -import net.minecraft.world.item.JukeboxSong; - -public record ItemJukeboxPlayablePredicate(Optional> song) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group(RegistryCodecs.homogeneousList(Registries.JUKEBOX_SONG).optionalFieldOf("song").forGetter(ItemJukeboxPlayablePredicate::song)) - .apply(instance, ItemJukeboxPlayablePredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.JUKEBOX_PLAYABLE; - } - - public boolean matches(ItemStack stack, JukeboxPlayable value) { - if (!this.song.isPresent()) { - return true; - } else { - boolean bl = false; - - for (Holder holder : (HolderSet)this.song.get()) { - Optional> optional = holder.unwrapKey(); - if (!optional.isEmpty() && optional.get() == value.song().key()) { - bl = true; - break; - } - } - - return bl; - } - } - - public static ItemJukeboxPlayablePredicate any() { - return new ItemJukeboxPlayablePredicate(Optional.empty()); - } -} diff --git a/net/minecraft/advancements/critereon/ItemPotionsPredicate.java b/net/minecraft/advancements/critereon/ItemPotionsPredicate.java deleted file mode 100644 index e6c29c45..00000000 --- a/net/minecraft/advancements/critereon/ItemPotionsPredicate.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import java.util.Optional; -import net.minecraft.core.Holder; -import net.minecraft.core.HolderSet; -import net.minecraft.core.RegistryCodecs; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.Registries; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.alchemy.Potion; -import net.minecraft.world.item.alchemy.PotionContents; - -public record ItemPotionsPredicate(HolderSet potions) implements SingleComponentItemPredicate { - public static final Codec CODEC = RegistryCodecs.homogeneousList(Registries.POTION) - .xmap(ItemPotionsPredicate::new, ItemPotionsPredicate::potions); - - @Override - public DataComponentType componentType() { - return DataComponents.POTION_CONTENTS; - } - - public boolean matches(ItemStack stack, PotionContents value) { - Optional> optional = value.potion(); - return !optional.isEmpty() && this.potions.contains((Holder)optional.get()); - } - - public static ItemSubPredicate potions(HolderSet potions) { - return new ItemPotionsPredicate(potions); - } -} diff --git a/net/minecraft/advancements/critereon/ItemPredicate.java b/net/minecraft/advancements/critereon/ItemPredicate.java index f5d533ab..3c1648ae 100644 --- a/net/minecraft/advancements/critereon/ItemPredicate.java +++ b/net/minecraft/advancements/critereon/ItemPredicate.java @@ -1,32 +1,25 @@ package net.minecraft.advancements.critereon; -import com.google.common.collect.ImmutableMap; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Map; import java.util.Optional; import java.util.function.Predicate; -import net.minecraft.advancements.critereon.ItemSubPredicate.Type; -import net.minecraft.advancements.critereon.MinMaxBounds.Ints; import net.minecraft.core.HolderGetter; import net.minecraft.core.HolderSet; import net.minecraft.core.RegistryCodecs; -import net.minecraft.core.component.DataComponentHolder; -import net.minecraft.core.component.DataComponentPredicate; +import net.minecraft.core.component.DataComponentGetter; import net.minecraft.core.registries.Registries; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ItemLike; -public record ItemPredicate(Optional> items, Ints count, DataComponentPredicate components, Map, ItemSubPredicate> subPredicates) - implements Predicate { +public record ItemPredicate(Optional> items, MinMaxBounds.Ints count, DataComponentMatchers components) implements Predicate { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( RegistryCodecs.homogeneousList(Registries.ITEM).optionalFieldOf("items").forGetter(ItemPredicate::items), - Ints.CODEC.optionalFieldOf("count", Ints.ANY).forGetter(ItemPredicate::count), - DataComponentPredicate.CODEC.optionalFieldOf("components", DataComponentPredicate.EMPTY).forGetter(ItemPredicate::components), - ItemSubPredicate.CODEC.optionalFieldOf("predicates", Map.of()).forGetter(ItemPredicate::subPredicates) + MinMaxBounds.Ints.CODEC.optionalFieldOf("count", MinMaxBounds.Ints.ANY).forGetter(ItemPredicate::count), + DataComponentMatchers.CODEC.forGetter(ItemPredicate::components) ) .apply(instance, ItemPredicate::new) ); @@ -34,61 +27,42 @@ public record ItemPredicate(Optional> items, Ints count, DataCom public boolean test(ItemStack itemStack) { if (this.items.isPresent() && !itemStack.is((HolderSet)this.items.get())) { return false; - } else if (!this.count.matches(itemStack.getCount())) { - return false; - } else if (!this.components.test((DataComponentHolder)itemStack)) { - return false; } else { - for (ItemSubPredicate itemSubPredicate : this.subPredicates.values()) { - if (!itemSubPredicate.matches(itemStack)) { - return false; - } - } - - return true; + return !this.count.matches(itemStack.getCount()) ? false : this.components.test((DataComponentGetter)itemStack); } } public static class Builder { private Optional> items = Optional.empty(); - private Ints count = Ints.ANY; - private DataComponentPredicate components = DataComponentPredicate.EMPTY; - private final ImmutableMap.Builder, ItemSubPredicate> subPredicates = ImmutableMap.builder(); - - private Builder() { - } + private MinMaxBounds.Ints count = MinMaxBounds.Ints.ANY; + private DataComponentMatchers components = DataComponentMatchers.ANY; public static ItemPredicate.Builder item() { return new ItemPredicate.Builder(); } - public ItemPredicate.Builder of(HolderGetter holderGetter, ItemLike... itemLikes) { - this.items = Optional.of(HolderSet.direct(itemLike -> itemLike.asItem().builtInRegistryHolder(), itemLikes)); + public ItemPredicate.Builder of(HolderGetter itemRegistry, ItemLike... items) { + this.items = Optional.of(HolderSet.direct(itemLike -> itemLike.asItem().builtInRegistryHolder(), items)); return this; } - public ItemPredicate.Builder of(HolderGetter holderGetter, TagKey tagKey) { - this.items = Optional.of(holderGetter.getOrThrow(tagKey)); + public ItemPredicate.Builder of(HolderGetter itemRegistry, TagKey tag) { + this.items = Optional.of(itemRegistry.getOrThrow(tag)); return this; } - public ItemPredicate.Builder withCount(Ints count) { + public ItemPredicate.Builder withCount(MinMaxBounds.Ints count) { this.count = count; return this; } - public ItemPredicate.Builder withSubPredicate(Type type, T itemSubPredicate) { - this.subPredicates.put(type, itemSubPredicate); - return this; - } - - public ItemPredicate.Builder hasComponents(DataComponentPredicate components) { + public ItemPredicate.Builder withComponents(DataComponentMatchers components) { this.components = components; return this; } public ItemPredicate build() { - return new ItemPredicate(this.items, this.count, this.components, this.subPredicates.build()); + return new ItemPredicate(this.items, this.count, this.components); } } } diff --git a/net/minecraft/advancements/critereon/ItemSubPredicate.java b/net/minecraft/advancements/critereon/ItemSubPredicate.java deleted file mode 100644 index 04778af1..00000000 --- a/net/minecraft/advancements/critereon/ItemSubPredicate.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import java.util.Map; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.world.item.ItemStack; - -public interface ItemSubPredicate { - Codec, ItemSubPredicate>> CODEC = Codec.dispatchedMap( - BuiltInRegistries.ITEM_SUB_PREDICATE_TYPE.byNameCodec(), ItemSubPredicate.Type::codec - ); - - boolean matches(ItemStack stack); - - public record Type(Codec codec) { - } -} diff --git a/net/minecraft/advancements/critereon/ItemSubPredicates.java b/net/minecraft/advancements/critereon/ItemSubPredicates.java deleted file mode 100644 index 248eef45..00000000 --- a/net/minecraft/advancements/critereon/ItemSubPredicates.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import net.minecraft.core.Registry; -import net.minecraft.core.registries.BuiltInRegistries; - -public class ItemSubPredicates { - public static final ItemSubPredicate.Type DAMAGE = register("damage", ItemDamagePredicate.CODEC); - public static final ItemSubPredicate.Type ENCHANTMENTS = register( - "enchantments", ItemEnchantmentsPredicate.Enchantments.CODEC - ); - public static final ItemSubPredicate.Type STORED_ENCHANTMENTS = register( - "stored_enchantments", ItemEnchantmentsPredicate.StoredEnchantments.CODEC - ); - public static final ItemSubPredicate.Type POTIONS = register("potion_contents", ItemPotionsPredicate.CODEC); - public static final ItemSubPredicate.Type CUSTOM_DATA = register("custom_data", ItemCustomDataPredicate.CODEC); - public static final ItemSubPredicate.Type CONTAINER = register("container", ItemContainerPredicate.CODEC); - public static final ItemSubPredicate.Type BUNDLE_CONTENTS = register("bundle_contents", ItemBundlePredicate.CODEC); - public static final ItemSubPredicate.Type FIREWORK_EXPLOSION = register( - "firework_explosion", ItemFireworkExplosionPredicate.CODEC - ); - public static final ItemSubPredicate.Type FIREWORKS = register("fireworks", ItemFireworksPredicate.CODEC); - public static final ItemSubPredicate.Type WRITABLE_BOOK = register("writable_book_content", ItemWritableBookPredicate.CODEC); - public static final ItemSubPredicate.Type WRITTEN_BOOK = register("written_book_content", ItemWrittenBookPredicate.CODEC); - public static final ItemSubPredicate.Type ATTRIBUTE_MODIFIERS = register( - "attribute_modifiers", ItemAttributeModifiersPredicate.CODEC - ); - public static final ItemSubPredicate.Type ARMOR_TRIM = register("trim", ItemTrimPredicate.CODEC); - public static final ItemSubPredicate.Type JUKEBOX_PLAYABLE = register("jukebox_playable", ItemJukeboxPlayablePredicate.CODEC); - - private static ItemSubPredicate.Type register(String name, Codec codec) { - return Registry.register(BuiltInRegistries.ITEM_SUB_PREDICATE_TYPE, name, new ItemSubPredicate.Type<>(codec)); - } - - public static ItemSubPredicate.Type bootstrap(Registry> registry) { - return DAMAGE; - } -} diff --git a/net/minecraft/advancements/critereon/ItemTrimPredicate.java b/net/minecraft/advancements/critereon/ItemTrimPredicate.java deleted file mode 100644 index eb3230c9..00000000 --- a/net/minecraft/advancements/critereon/ItemTrimPredicate.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import net.minecraft.core.HolderSet; -import net.minecraft.core.RegistryCodecs; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.Registries; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.trim.ArmorTrim; -import net.minecraft.world.item.equipment.trim.TrimMaterial; -import net.minecraft.world.item.equipment.trim.TrimPattern; - -public record ItemTrimPredicate(Optional> material, Optional> pattern) - implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - RegistryCodecs.homogeneousList(Registries.TRIM_MATERIAL).optionalFieldOf("material").forGetter(ItemTrimPredicate::material), - RegistryCodecs.homogeneousList(Registries.TRIM_PATTERN).optionalFieldOf("pattern").forGetter(ItemTrimPredicate::pattern) - ) - .apply(instance, ItemTrimPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.TRIM; - } - - public boolean matches(ItemStack itemStack, ArmorTrim armorTrim) { - return this.material.isPresent() && !((HolderSet)this.material.get()).contains(armorTrim.material()) - ? false - : !this.pattern.isPresent() || ((HolderSet)this.pattern.get()).contains(armorTrim.pattern()); - } -} diff --git a/net/minecraft/advancements/critereon/ItemWritableBookPredicate.java b/net/minecraft/advancements/critereon/ItemWritableBookPredicate.java deleted file mode 100644 index 6ec9da2b..00000000 --- a/net/minecraft/advancements/critereon/ItemWritableBookPredicate.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import java.util.function.Predicate; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.server.network.Filterable; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.WritableBookContent; - -public record ItemWritableBookPredicate(Optional, ItemWritableBookPredicate.PagePredicate>> pages) - implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - CollectionPredicate.codec(ItemWritableBookPredicate.PagePredicate.CODEC).optionalFieldOf("pages").forGetter(ItemWritableBookPredicate::pages) - ) - .apply(instance, ItemWritableBookPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.WRITABLE_BOOK_CONTENT; - } - - public boolean matches(ItemStack stack, WritableBookContent value) { - return !this.pages.isPresent() || ((CollectionPredicate)this.pages.get()).test((Iterable)value.pages()); - } - - public record PagePredicate(String contents) implements Predicate> { - public static final Codec CODEC = Codec.STRING - .xmap(ItemWritableBookPredicate.PagePredicate::new, ItemWritableBookPredicate.PagePredicate::contents); - - public boolean test(Filterable contents) { - return contents.raw().equals(this.contents); - } - } -} diff --git a/net/minecraft/advancements/critereon/ItemWrittenBookPredicate.java b/net/minecraft/advancements/critereon/ItemWrittenBookPredicate.java deleted file mode 100644 index 1b179df5..00000000 --- a/net/minecraft/advancements/critereon/ItemWrittenBookPredicate.java +++ /dev/null @@ -1,60 +0,0 @@ -package net.minecraft.advancements.critereon; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.Optional; -import java.util.function.Predicate; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.ComponentSerialization; -import net.minecraft.server.network.Filterable; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.WrittenBookContent; - -public record ItemWrittenBookPredicate( - Optional, ItemWrittenBookPredicate.PagePredicate>> pages, - Optional author, - Optional title, - MinMaxBounds.Ints generation, - Optional resolved -) implements SingleComponentItemPredicate { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - CollectionPredicate.codec(ItemWrittenBookPredicate.PagePredicate.CODEC).optionalFieldOf("pages").forGetter(ItemWrittenBookPredicate::pages), - Codec.STRING.optionalFieldOf("author").forGetter(ItemWrittenBookPredicate::author), - Codec.STRING.optionalFieldOf("title").forGetter(ItemWrittenBookPredicate::title), - MinMaxBounds.Ints.CODEC.optionalFieldOf("generation", MinMaxBounds.Ints.ANY).forGetter(ItemWrittenBookPredicate::generation), - Codec.BOOL.optionalFieldOf("resolved").forGetter(ItemWrittenBookPredicate::resolved) - ) - .apply(instance, ItemWrittenBookPredicate::new) - ); - - @Override - public DataComponentType componentType() { - return DataComponents.WRITTEN_BOOK_CONTENT; - } - - public boolean matches(ItemStack stack, WrittenBookContent value) { - if (this.author.isPresent() && !((String)this.author.get()).equals(value.author())) { - return false; - } else if (this.title.isPresent() && !((String)this.title.get()).equals(value.title().raw())) { - return false; - } else if (!this.generation.matches(value.generation())) { - return false; - } else { - return this.resolved.isPresent() && this.resolved.get() != value.resolved() - ? false - : !this.pages.isPresent() || ((CollectionPredicate)this.pages.get()).test((Iterable)value.pages()); - } - } - - public record PagePredicate(Component contents) implements Predicate> { - public static final Codec CODEC = ComponentSerialization.CODEC - .xmap(ItemWrittenBookPredicate.PagePredicate::new, ItemWrittenBookPredicate.PagePredicate::contents); - - public boolean test(Filterable contents) { - return contents.raw().equals(this.contents); - } - } -} diff --git a/net/minecraft/advancements/critereon/KilledByArrowTrigger.java b/net/minecraft/advancements/critereon/KilledByArrowTrigger.java index 31b6b2ef..1d29e798 100644 --- a/net/minecraft/advancements/critereon/KilledByArrowTrigger.java +++ b/net/minecraft/advancements/critereon/KilledByArrowTrigger.java @@ -29,16 +29,16 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger collection, @Nullable ItemStack itemStack) { + public void trigger(ServerPlayer player, Collection victims, @Nullable ItemStack firedFromWeapon) { List list = Lists.newArrayList(); Set> set = Sets.>newHashSet(); - for (Entity entity : collection) { + for (Entity entity : victims) { set.add(entity.getType()); - list.add(EntityPredicate.createContext(serverPlayer, entity)); + list.add(EntityPredicate.createContext(player, entity)); } - this.trigger(serverPlayer, triggerInstance -> triggerInstance.matches(list, set.size(), itemStack)); + this.trigger(player, triggerInstance -> triggerInstance.matches(list, set.size(), firedFromWeapon)); } public record TriggerInstance( @@ -54,28 +54,28 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger crossbowKilled(HolderGetter holderGetter, EntityPredicate.Builder... builders) { + public static Criterion crossbowKilled(HolderGetter itemRegistry, EntityPredicate.Builder... victims) { return CriteriaTriggers.KILLED_BY_ARROW .createCriterion( new KilledByArrowTrigger.TriggerInstance( - Optional.empty(), EntityPredicate.wrap(builders), Ints.ANY, Optional.of(ItemPredicate.Builder.item().of(holderGetter, Items.CROSSBOW).build()) + Optional.empty(), EntityPredicate.wrap(victims), Ints.ANY, Optional.of(ItemPredicate.Builder.item().of(itemRegistry, Items.CROSSBOW).build()) ) ); } - public static Criterion crossbowKilled(HolderGetter holderGetter, Ints ints) { + public static Criterion crossbowKilled(HolderGetter itemRegistry, Ints uniqueEntityTypes) { return CriteriaTriggers.KILLED_BY_ARROW .createCriterion( new KilledByArrowTrigger.TriggerInstance( - Optional.empty(), List.of(), ints, Optional.of(ItemPredicate.Builder.item().of(holderGetter, Items.CROSSBOW).build()) + Optional.empty(), List.of(), uniqueEntityTypes, Optional.of(ItemPredicate.Builder.item().of(itemRegistry, Items.CROSSBOW).build()) ) ); } - public boolean matches(Collection collection, int i, @Nullable ItemStack itemStack) { - if (!this.firedFromWeapon.isPresent() || itemStack != null && ((ItemPredicate)this.firedFromWeapon.get()).test(itemStack)) { + public boolean matches(Collection context, int uniqueEntityTypes, @Nullable ItemStack firedFromWeapon) { + if (!this.firedFromWeapon.isPresent() || firedFromWeapon != null && ((ItemPredicate)this.firedFromWeapon.get()).test(firedFromWeapon)) { if (!this.victims.isEmpty()) { - List list = Lists.newArrayList(collection); + List list = Lists.newArrayList(context); for (ContextAwarePredicate contextAwarePredicate : this.victims) { boolean bl = false; @@ -96,7 +96,7 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger CODEC = RecordCodecBuilder.create( instance -> instance.group( EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(LootTableTrigger.TriggerInstance::player), - ResourceKey.codec(Registries.LOOT_TABLE).fieldOf("loot_table").forGetter(LootTableTrigger.TriggerInstance::lootTable) + LootTable.KEY_CODEC.fieldOf("loot_table").forGetter(LootTableTrigger.TriggerInstance::lootTable) ) .apply(instance, LootTableTrigger.TriggerInstance::new) ); diff --git a/net/minecraft/advancements/critereon/MinMaxBounds.java b/net/minecraft/advancements/critereon/MinMaxBounds.java index eacd7248..fe975e5d 100644 --- a/net/minecraft/advancements/critereon/MinMaxBounds.java +++ b/net/minecraft/advancements/critereon/MinMaxBounds.java @@ -7,10 +7,13 @@ import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import com.mojang.datafixers.util.Either; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; +import io.netty.buffer.ByteBuf; import java.util.Optional; import java.util.function.Function; import java.util.function.Supplier; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; public interface MinMaxBounds { SimpleCommandExceptionType ERROR_EMPTY = new SimpleCommandExceptionType(Component.translatable("argument.range.empty")); @@ -42,6 +45,30 @@ public interface MinMaxBounds { }); } + static > StreamCodec createStreamCodec( + StreamCodec streamCodec, MinMaxBounds.BoundsFactory boundsFactory + ) { + return new StreamCodec() { + private static final int MIN_FLAG = 1; + public static final int MAX_FLAG = 2; + + public R decode(B byteBuf) { + byte b = byteBuf.readByte(); + Optional optional = (b & 1) != 0 ? Optional.of(streamCodec.decode(byteBuf)) : Optional.empty(); + Optional optional2 = (b & 2) != 0 ? Optional.of(streamCodec.decode(byteBuf)) : Optional.empty(); + return boundsFactory.create(optional, optional2); + } + + public void encode(B byteBuf, R minMaxBounds) { + Optional optional = minMaxBounds.min(); + Optional optional2 = minMaxBounds.max(); + byteBuf.writeByte((optional.isPresent() ? 1 : 0) | (optional2.isPresent() ? 2 : 0)); + optional.ifPresent(number -> streamCodec.encode(byteBuf, (T)number)); + optional2.ifPresent(number -> streamCodec.encode(byteBuf, (T)number)); + } + }; + } + static > R fromReader( StringReader reader, MinMaxBounds.BoundsFromReaderFactory boundedFactory, @@ -123,6 +150,9 @@ public interface MinMaxBounds { public record Doubles(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { public static final MinMaxBounds.Doubles ANY = new MinMaxBounds.Doubles(Optional.empty(), Optional.empty()); public static final Codec CODEC = MinMaxBounds.createCodec((Codec)Codec.DOUBLE, MinMaxBounds.Doubles::new); + public static final StreamCodec STREAM_CODEC = MinMaxBounds.createStreamCodec( + (StreamCodec)ByteBufCodecs.DOUBLE, MinMaxBounds.Doubles::new + ); private Doubles(Optional min, Optional max) { this(min, max, squareOpt(min), squareOpt(max)); @@ -178,6 +208,9 @@ public interface MinMaxBounds { public record Ints(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { public static final MinMaxBounds.Ints ANY = new MinMaxBounds.Ints(Optional.empty(), Optional.empty()); public static final Codec CODEC = MinMaxBounds.createCodec((Codec)Codec.INT, MinMaxBounds.Ints::new); + public static final StreamCodec STREAM_CODEC = MinMaxBounds.createStreamCodec( + (StreamCodec)ByteBufCodecs.INT, MinMaxBounds.Ints::new + ); private Ints(Optional min, Optional max) { this(min, max, min.map(integer -> integer.longValue() * integer.longValue()), squareOpt(max)); diff --git a/net/minecraft/advancements/critereon/NbtPredicate.java b/net/minecraft/advancements/critereon/NbtPredicate.java index 1b9c06dc..3b202cc5 100644 --- a/net/minecraft/advancements/critereon/NbtPredicate.java +++ b/net/minecraft/advancements/critereon/NbtPredicate.java @@ -2,6 +2,7 @@ package net.minecraft.advancements.critereon; import com.mojang.serialization.Codec; import io.netty.buffer.ByteBuf; +import net.minecraft.core.component.DataComponentGetter; import net.minecraft.core.component.DataComponents; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; @@ -19,8 +20,8 @@ public record NbtPredicate(CompoundTag tag) { public static final Codec CODEC = TagParser.LENIENT_CODEC.xmap(NbtPredicate::new, NbtPredicate::tag); public static final StreamCodec STREAM_CODEC = ByteBufCodecs.COMPOUND_TAG.map(NbtPredicate::new, NbtPredicate::tag); - public boolean matches(ItemStack stack) { - CustomData customData = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY); + public boolean matches(DataComponentGetter componentGetter) { + CustomData customData = componentGetter.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY); return customData.matchedBy(this.tag); } @@ -34,8 +35,8 @@ public record NbtPredicate(CompoundTag tag) { public static CompoundTag getEntityTagToCompare(Entity entity) { CompoundTag compoundTag = entity.saveWithoutId(new CompoundTag()); - if (entity instanceof Player) { - ItemStack itemStack = ((Player)entity).getInventory().getSelected(); + if (entity instanceof Player player) { + ItemStack itemStack = player.getInventory().getSelectedItem(); if (!itemStack.isEmpty()) { compoundTag.put("SelectedItem", itemStack.save(entity.registryAccess())); } diff --git a/net/minecraft/advancements/critereon/PlayerPredicate.java b/net/minecraft/advancements/critereon/PlayerPredicate.java index 1bb2fc1b..52d80085 100644 --- a/net/minecraft/advancements/critereon/PlayerPredicate.java +++ b/net/minecraft/advancements/critereon/PlayerPredicate.java @@ -19,10 +19,9 @@ import java.util.function.Supplier; import net.minecraft.advancements.AdvancementHolder; import net.minecraft.advancements.AdvancementProgress; import net.minecraft.advancements.CriterionProgress; -import net.minecraft.advancements.critereon.MinMaxBounds.Ints; import net.minecraft.core.Holder; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.PlayerAdvancements; @@ -44,7 +43,7 @@ import net.minecraft.world.phys.HitResult.Type; import org.jetbrains.annotations.Nullable; public record PlayerPredicate( - Ints level, + MinMaxBounds.Ints level, GameTypePredicate gameType, List> stats, Object2BooleanMap>> recipes, @@ -55,12 +54,10 @@ public record PlayerPredicate( public static final int LOOKING_AT_RANGE = 100; public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( instance -> instance.group( - Ints.CODEC.optionalFieldOf("level", Ints.ANY).forGetter(PlayerPredicate::level), + MinMaxBounds.Ints.CODEC.optionalFieldOf("level", MinMaxBounds.Ints.ANY).forGetter(PlayerPredicate::level), GameTypePredicate.CODEC.optionalFieldOf("gamemode", GameTypePredicate.ANY).forGetter(PlayerPredicate::gameType), PlayerPredicate.StatMatcher.CODEC.listOf().optionalFieldOf("stats", List.of()).forGetter(PlayerPredicate::stats), - ExtraCodecs.object2BooleanMap(ResourceKey.codec(Registries.RECIPE)) - .optionalFieldOf("recipes", Object2BooleanMaps.emptyMap()) - .forGetter(PlayerPredicate::recipes), + ExtraCodecs.object2BooleanMap(Recipe.KEY_CODEC).optionalFieldOf("recipes", Object2BooleanMaps.emptyMap()).forGetter(PlayerPredicate::recipes), Codec.unboundedMap(ResourceLocation.CODEC, PlayerPredicate.AdvancementPredicate.CODEC) .optionalFieldOf("advancements", Map.of()) .forGetter(PlayerPredicate::advancements), @@ -76,7 +73,7 @@ public record PlayerPredicate( return false; } else if (!this.level.matches(serverPlayer.experienceLevel)) { return false; - } else if (!this.gameType.matches(serverPlayer.gameMode.getGameModeForPlayer())) { + } else if (!this.gameType.matches(serverPlayer.gameMode())) { return false; } else { StatsCounter statsCounter = serverPlayer.getStats(); @@ -176,7 +173,7 @@ public record PlayerPredicate( } public static class Builder { - private Ints level = Ints.ANY; + private MinMaxBounds.Ints level = MinMaxBounds.Ints.ANY; private GameTypePredicate gameType = GameTypePredicate.ANY; private final ImmutableList.Builder> stats = ImmutableList.builder(); private final Object2BooleanMap>> recipes = new Object2BooleanOpenHashMap<>(); @@ -188,18 +185,18 @@ public record PlayerPredicate( return new PlayerPredicate.Builder(); } - public PlayerPredicate.Builder setLevel(Ints level) { + public PlayerPredicate.Builder setLevel(MinMaxBounds.Ints level) { this.level = level; return this; } - public PlayerPredicate.Builder addStat(StatType type, Holder.Reference value, Ints range) { + public PlayerPredicate.Builder addStat(StatType type, Reference value, MinMaxBounds.Ints range) { this.stats.add(new PlayerPredicate.StatMatcher<>(type, value, range)); return this; } - public PlayerPredicate.Builder addRecipe(ResourceKey> resourceKey, boolean bl) { - this.recipes.put(resourceKey, bl); + public PlayerPredicate.Builder addRecipe(ResourceKey> recipe, boolean unlocked) { + this.recipes.put(recipe, unlocked); return this; } @@ -223,8 +220,8 @@ public record PlayerPredicate( return this; } - public PlayerPredicate.Builder hasInput(InputPredicate inputPredicate) { - this.input = Optional.of(inputPredicate); + public PlayerPredicate.Builder hasInput(InputPredicate input) { + this.input = Optional.of(input); return this; } @@ -233,12 +230,12 @@ public record PlayerPredicate( } } - record StatMatcher(StatType type, Holder value, Ints range, Supplier> stat) { + record StatMatcher(StatType type, Holder value, MinMaxBounds.Ints range, Supplier> stat) { public static final Codec> CODEC = BuiltInRegistries.STAT_TYPE .byNameCodec() .dispatch(PlayerPredicate.StatMatcher::type, PlayerPredicate.StatMatcher::createTypedCodec); - public StatMatcher(StatType type, Holder value, Ints range) { + public StatMatcher(StatType type, Holder value, MinMaxBounds.Ints range) { this(type, value, range, Suppliers.memoize(() -> type.get(value.value()))); } @@ -246,7 +243,7 @@ public record PlayerPredicate( return RecordCodecBuilder.mapCodec( instance -> instance.group( statType.getRegistry().holderByNameCodec().fieldOf("stat").forGetter(PlayerPredicate.StatMatcher::value), - Ints.CODEC.optionalFieldOf("value", Ints.ANY).forGetter(PlayerPredicate.StatMatcher::range) + MinMaxBounds.Ints.CODEC.optionalFieldOf("value", MinMaxBounds.Ints.ANY).forGetter(PlayerPredicate.StatMatcher::range) ) .apply(instance, (holder, ints) -> new PlayerPredicate.StatMatcher<>(statType, holder, ints)) ); diff --git a/net/minecraft/advancements/critereon/PlayerTrigger.java b/net/minecraft/advancements/critereon/PlayerTrigger.java index 95d0a395..01e3ddcd 100644 --- a/net/minecraft/advancements/critereon/PlayerTrigger.java +++ b/net/minecraft/advancements/critereon/PlayerTrigger.java @@ -58,12 +58,12 @@ public class PlayerTrigger extends SimpleCriterionTrigger walkOnBlockWithEquipment( - HolderGetter holderGetter, HolderGetter holderGetter2, Block block, Item item + HolderGetter blockRegistry, HolderGetter itemRegistry, Block block, Item equipment ) { return located( EntityPredicate.Builder.entity() - .equipment(EntityEquipmentPredicate.Builder.equipment().feet(ItemPredicate.Builder.item().of(holderGetter2, item))) - .steppingOn(Builder.location().setBlock(BlockPredicate.Builder.block().of(holderGetter, block))) + .equipment(EntityEquipmentPredicate.Builder.equipment().feet(ItemPredicate.Builder.item().of(itemRegistry, equipment))) + .steppingOn(Builder.location().setBlock(BlockPredicate.Builder.block().of(blockRegistry, block))) ); } } diff --git a/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java b/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java index ba65159a..b3907217 100644 --- a/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java +++ b/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java @@ -9,7 +9,6 @@ import java.util.Optional; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.advancements.Criterion; import net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance; -import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; @@ -21,8 +20,8 @@ public class RecipeCraftedTrigger extends SimpleCriterionTrigger> resourceKey, List list) { - this.trigger(serverPlayer, triggerInstance -> triggerInstance.matches(resourceKey, list)); + public void trigger(ServerPlayer player, ResourceKey> recipeId, List ingredients) { + this.trigger(player, triggerInstance -> triggerInstance.matches(recipeId, ingredients)); } public record TriggerInstance(Optional player, ResourceKey> recipeId, List ingredients) @@ -30,34 +29,34 @@ public class RecipeCraftedTrigger extends SimpleCriterionTrigger CODEC = RecordCodecBuilder.create( instance -> instance.group( EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(RecipeCraftedTrigger.TriggerInstance::player), - ResourceKey.codec(Registries.RECIPE).fieldOf("recipe_id").forGetter(RecipeCraftedTrigger.TriggerInstance::recipeId), + Recipe.KEY_CODEC.fieldOf("recipe_id").forGetter(RecipeCraftedTrigger.TriggerInstance::recipeId), ItemPredicate.CODEC.listOf().optionalFieldOf("ingredients", List.of()).forGetter(RecipeCraftedTrigger.TriggerInstance::ingredients) ) .apply(instance, RecipeCraftedTrigger.TriggerInstance::new) ); - public static Criterion craftedItem(ResourceKey> resourceKey, List list) { + public static Criterion craftedItem(ResourceKey> recipeId, List ingredients) { return CriteriaTriggers.RECIPE_CRAFTED - .createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, list.stream().map(ItemPredicate.Builder::build).toList())); + .createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, ingredients.stream().map(ItemPredicate.Builder::build).toList())); } - public static Criterion craftedItem(ResourceKey> resourceKey) { - return CriteriaTriggers.RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, List.of())); + public static Criterion craftedItem(ResourceKey> recipeId) { + return CriteriaTriggers.RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, List.of())); } - public static Criterion crafterCraftedItem(ResourceKey> resourceKey) { - return CriteriaTriggers.CRAFTER_RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, List.of())); + public static Criterion crafterCraftedItem(ResourceKey> recipeId) { + return CriteriaTriggers.CRAFTER_RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, List.of())); } - boolean matches(ResourceKey> resourceKey, List list) { - if (resourceKey != this.recipeId) { + boolean matches(ResourceKey> recipeId, List ingredients) { + if (recipeId != this.recipeId) { return false; } else { - List list2 = new ArrayList(list); + List list = new ArrayList(ingredients); for (ItemPredicate itemPredicate : this.ingredients) { boolean bl = false; - Iterator iterator = list2.iterator(); + Iterator iterator = list.iterator(); while (iterator.hasNext()) { if (itemPredicate.test((ItemStack)iterator.next())) { diff --git a/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java b/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java index db5857d8..9ca45eb6 100644 --- a/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java +++ b/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java @@ -6,7 +6,6 @@ import java.util.Optional; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.advancements.Criterion; import net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance; -import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.crafting.Recipe; @@ -22,15 +21,15 @@ public class RecipeUnlockedTrigger extends SimpleCriterionTrigger triggerInstance.matches(recipe)); } - public static Criterion unlocked(ResourceKey> resourceKey) { - return CriteriaTriggers.RECIPE_UNLOCKED.createCriterion(new RecipeUnlockedTrigger.TriggerInstance(Optional.empty(), resourceKey)); + public static Criterion unlocked(ResourceKey> recipe) { + return CriteriaTriggers.RECIPE_UNLOCKED.createCriterion(new RecipeUnlockedTrigger.TriggerInstance(Optional.empty(), recipe)); } public record TriggerInstance(Optional player, ResourceKey> recipe) implements SimpleInstance { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(RecipeUnlockedTrigger.TriggerInstance::player), - ResourceKey.codec(Registries.RECIPE).fieldOf("recipe").forGetter(RecipeUnlockedTrigger.TriggerInstance::recipe) + Recipe.KEY_CODEC.fieldOf("recipe").forGetter(RecipeUnlockedTrigger.TriggerInstance::recipe) ) .apply(instance, RecipeUnlockedTrigger.TriggerInstance::new) ); diff --git a/net/minecraft/advancements/critereon/SheepPredicate.java b/net/minecraft/advancements/critereon/SheepPredicate.java index 466a438c..0504ac59 100644 --- a/net/minecraft/advancements/critereon/SheepPredicate.java +++ b/net/minecraft/advancements/critereon/SheepPredicate.java @@ -6,17 +6,13 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.Optional; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.animal.Sheep; -import net.minecraft.world.item.DyeColor; +import net.minecraft.world.entity.animal.sheep.Sheep; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; -public record SheepPredicate(Optional sheared, Optional color) implements EntitySubPredicate { +public record SheepPredicate(Optional sheared) implements EntitySubPredicate { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( - instance -> instance.group( - Codec.BOOL.optionalFieldOf("sheared").forGetter(SheepPredicate::sheared), DyeColor.CODEC.optionalFieldOf("color").forGetter(SheepPredicate::color) - ) - .apply(instance, SheepPredicate::new) + instance -> instance.group(Codec.BOOL.optionalFieldOf("sheared").forGetter(SheepPredicate::sheared)).apply(instance, SheepPredicate::new) ); @Override @@ -26,14 +22,10 @@ public record SheepPredicate(Optional sheared, Optional color @Override public boolean matches(Entity entity, ServerLevel level, @Nullable Vec3 position) { - if (entity instanceof Sheep sheep) { - return this.sheared.isPresent() && sheep.isSheared() != this.sheared.get() ? false : !this.color.isPresent() || sheep.getColor() == this.color.get(); - } else { - return false; - } + return entity instanceof Sheep sheep ? !this.sheared.isPresent() || sheep.isSheared() == (Boolean)this.sheared.get() : false; } - public static SheepPredicate hasWool(DyeColor dyeColor) { - return new SheepPredicate(Optional.of(false), Optional.of(dyeColor)); + public static SheepPredicate hasWool() { + return new SheepPredicate(Optional.of(false)); } } diff --git a/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java b/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java index 2874c44f..75401768 100644 --- a/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java +++ b/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java @@ -35,9 +35,9 @@ public class ShotCrossbowTrigger extends SimpleCriterionTrigger shotCrossbow(HolderGetter holderGetter, ItemLike itemLike) { + public static Criterion shotCrossbow(HolderGetter itemRegistry, ItemLike item) { return CriteriaTriggers.SHOT_CROSSBOW - .createCriterion(new ShotCrossbowTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(holderGetter, itemLike).build()))); + .createCriterion(new ShotCrossbowTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(itemRegistry, item).build()))); } public boolean matches(ItemStack item) { diff --git a/net/minecraft/advancements/critereon/SingleComponentItemPredicate.java b/net/minecraft/advancements/critereon/SingleComponentItemPredicate.java index e4009c57..3554b778 100644 --- a/net/minecraft/advancements/critereon/SingleComponentItemPredicate.java +++ b/net/minecraft/advancements/critereon/SingleComponentItemPredicate.java @@ -1,16 +1,17 @@ package net.minecraft.advancements.critereon; +import net.minecraft.core.component.DataComponentGetter; import net.minecraft.core.component.DataComponentType; -import net.minecraft.world.item.ItemStack; +import net.minecraft.core.component.predicates.DataComponentPredicate; -public interface SingleComponentItemPredicate extends ItemSubPredicate { +public interface SingleComponentItemPredicate extends DataComponentPredicate { @Override - default boolean matches(ItemStack stack) { - T object = stack.get(this.componentType()); - return object != null && this.matches(stack, object); + default boolean matches(DataComponentGetter componentGetter) { + T object = componentGetter.get(this.componentType()); + return object != null && this.matches(object); } DataComponentType componentType(); - boolean matches(ItemStack stack, T value); + boolean matches(T value); } diff --git a/net/minecraft/advancements/critereon/UsedTotemTrigger.java b/net/minecraft/advancements/critereon/UsedTotemTrigger.java index f3b03f9f..75e8b992 100644 --- a/net/minecraft/advancements/critereon/UsedTotemTrigger.java +++ b/net/minecraft/advancements/critereon/UsedTotemTrigger.java @@ -35,9 +35,9 @@ public class UsedTotemTrigger extends SimpleCriterionTrigger usedTotem(HolderGetter holderGetter, ItemLike itemLike) { + public static Criterion usedTotem(HolderGetter itemRegistry, ItemLike item) { return CriteriaTriggers.USED_TOTEM - .createCriterion(new UsedTotemTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(holderGetter, itemLike).build()))); + .createCriterion(new UsedTotemTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(itemRegistry, item).build()))); } public boolean matches(ItemStack item) { diff --git a/net/minecraft/client/ClientBootstrap.java b/net/minecraft/client/ClientBootstrap.java new file mode 100644 index 00000000..34af8b87 --- /dev/null +++ b/net/minecraft/client/ClientBootstrap.java @@ -0,0 +1,29 @@ +package net.minecraft.client; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.item.ItemTintSources; +import net.minecraft.client.renderer.item.ItemModels; +import net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperties; +import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperties; +import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperties; +import net.minecraft.client.renderer.special.SpecialModelRenderers; +import net.minecraft.client.renderer.texture.atlas.SpriteSources; + +@Environment(EnvType.CLIENT) +public class ClientBootstrap { + private static volatile boolean isBootstrapped; + + public static void bootstrap() { + if (!isBootstrapped) { + isBootstrapped = true; + ItemModels.bootstrap(); + SpecialModelRenderers.bootstrap(); + ItemTintSources.bootstrap(); + SelectItemModelProperties.bootstrap(); + ConditionalItemModelProperties.bootstrap(); + RangeSelectItemModelProperties.bootstrap(); + SpriteSources.bootstrap(); + } + } +} diff --git a/net/minecraft/client/ClientRecipeBook.java b/net/minecraft/client/ClientRecipeBook.java index fceec1c3..9cef1d85 100644 --- a/net/minecraft/client/ClientRecipeBook.java +++ b/net/minecraft/client/ClientRecipeBook.java @@ -29,13 +29,13 @@ public class ClientRecipeBook extends RecipeBook { private Map> collectionsByTab = Map.of(); private List allCollections = List.of(); - public void add(RecipeDisplayEntry recipeDisplayEntry) { - this.known.put(recipeDisplayEntry.id(), recipeDisplayEntry); + public void add(RecipeDisplayEntry recipe) { + this.known.put(recipe.id(), recipe); } - public void remove(RecipeDisplayId recipeDisplayId) { - this.known.remove(recipeDisplayId); - this.highlight.remove(recipeDisplayId); + public void remove(RecipeDisplayId recipe) { + this.known.remove(recipe); + this.highlight.remove(recipe); } public void clear() { @@ -43,16 +43,16 @@ public class ClientRecipeBook extends RecipeBook { this.highlight.clear(); } - public boolean willHighlight(RecipeDisplayId recipeDisplayId) { - return this.highlight.contains(recipeDisplayId); + public boolean willHighlight(RecipeDisplayId recipe) { + return this.highlight.contains(recipe); } - public void removeHighlight(RecipeDisplayId recipeDisplayId) { - this.highlight.remove(recipeDisplayId); + public void removeHighlight(RecipeDisplayId recipe) { + this.highlight.remove(recipe); } - public void addHighlight(RecipeDisplayId recipeDisplayId) { - this.highlight.add(recipeDisplayId); + public void addHighlight(RecipeDisplayId recipe) { + this.highlight.add(recipe); } public void rebuildCollections() { @@ -107,7 +107,7 @@ public class ClientRecipeBook extends RecipeBook { return this.allCollections; } - public List getCollection(ExtendedRecipeBookCategory extendedRecipeBookCategory) { - return (List)this.collectionsByTab.getOrDefault(extendedRecipeBookCategory, Collections.emptyList()); + public List getCollection(ExtendedRecipeBookCategory category) { + return (List)this.collectionsByTab.getOrDefault(category, Collections.emptyList()); } } diff --git a/net/minecraft/client/GameNarrator.java b/net/minecraft/client/GameNarrator.java index 483b2c29..92f35ebb 100644 --- a/net/minecraft/client/GameNarrator.java +++ b/net/minecraft/client/GameNarrator.java @@ -10,6 +10,7 @@ import net.minecraft.client.gui.components.toasts.ToastManager; import net.minecraft.client.main.SilentInitException; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; +import net.minecraft.sounds.SoundSource; import org.lwjgl.util.tinyfd.TinyFileDialogs; import org.slf4j.Logger; @@ -28,7 +29,7 @@ public class GameNarrator { if (this.getStatus().shouldNarrateChat()) { String string = message.getString(); this.logNarratedMessage(string); - this.narrator.say(string, false); + this.narrateMessage(string, false); } } @@ -36,7 +37,7 @@ public class GameNarrator { String string = message.getString(); if (this.getStatus().shouldNarrateSystem() && !string.isEmpty()) { this.logNarratedMessage(string); - this.narrator.say(string, false); + this.narrateMessage(string, false); } } @@ -49,11 +50,16 @@ public class GameNarrator { this.logNarratedMessage(message); if (this.narrator.active()) { this.narrator.clear(); - this.narrator.say(message, true); + this.narrateMessage(message, true); } } } + private void narrateMessage(String message, boolean interrupt) { + this.narrator + .say(message, interrupt, this.minecraft.options.getSoundSourceVolume(SoundSource.VOICE) * this.minecraft.options.getSoundSourceVolume(SoundSource.MASTER)); + } + private NarratorStatus getStatus() { return this.minecraft.options.narrator().get(); } @@ -66,7 +72,7 @@ public class GameNarrator { public void updateNarratorStatus(NarratorStatus status) { this.clear(); - this.narrator.say(Component.translatable("options.narrator").append(" : ").append(status.getName()).getString(), true); + this.narrateMessage(Component.translatable("options.narrator").append(" : ").append(status.getName()).getString(), true); ToastManager toastManager = Minecraft.getInstance().getToastManager(); if (this.narrator.active()) { if (status == NarratorStatus.OFF) { diff --git a/net/minecraft/client/InactivityFpsLimit.java b/net/minecraft/client/InactivityFpsLimit.java index 294a571f..239ca074 100644 --- a/net/minecraft/client/InactivityFpsLimit.java +++ b/net/minecraft/client/InactivityFpsLimit.java @@ -16,10 +16,10 @@ public enum InactivityFpsLimit implements OptionEnum, StringRepresentable { private final String serializedName; private final String key; - private InactivityFpsLimit(final int j, final String string2, final String string3) { - this.id = j; - this.serializedName = string2; - this.key = string3; + private InactivityFpsLimit(final int id, final String serializedName, final String key) { + this.id = id; + this.serializedName = serializedName; + this.key = key; } @Override diff --git a/net/minecraft/client/KeyMapping.java b/net/minecraft/client/KeyMapping.java index b6ea5c18..d137fb56 100644 --- a/net/minecraft/client/KeyMapping.java +++ b/net/minecraft/client/KeyMapping.java @@ -3,6 +3,8 @@ package net.minecraft.client; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.mojang.blaze3d.platform.InputConstants; +import com.mojang.blaze3d.platform.InputConstants.Key; +import com.mojang.blaze3d.platform.InputConstants.Type; import java.util.Map; import java.util.Set; import java.util.function.Supplier; @@ -11,11 +13,12 @@ import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class KeyMapping implements Comparable { private static final Map ALL = Maps.newHashMap(); - private static final Map MAP = Maps.newHashMap(); + private static final Map MAP = Maps.newHashMap(); private static final Set CATEGORIES = Sets.newHashSet(); public static final String CATEGORY_MOVEMENT = "key.categories.movement"; public static final String CATEGORY_MISC = "key.categories.misc"; @@ -34,20 +37,20 @@ public class KeyMapping implements Comparable { hashMap.put("key.categories.misc", 7); }); private final String name; - private final InputConstants.Key defaultKey; + private final Key defaultKey; private final String category; - private InputConstants.Key key; + private Key key; private boolean isDown; private int clickCount; - public static void click(InputConstants.Key key) { + public static void click(Key key) { KeyMapping keyMapping = (KeyMapping)MAP.get(key); if (keyMapping != null) { keyMapping.clickCount++; } } - public static void set(InputConstants.Key key, boolean held) { + public static void set(Key key, boolean held) { KeyMapping keyMapping = (KeyMapping)MAP.get(key); if (keyMapping != null) { keyMapping.setDown(held); @@ -59,7 +62,7 @@ public class KeyMapping implements Comparable { */ public static void setAll() { for (KeyMapping keyMapping : ALL.values()) { - if (keyMapping.key.getType() == InputConstants.Type.KEYSYM && keyMapping.key.getValue() != InputConstants.UNKNOWN.getValue()) { + if (keyMapping.key.getType() == Type.KEYSYM && keyMapping.key.getValue() != InputConstants.UNKNOWN.getValue()) { keyMapping.setDown(InputConstants.isKeyDown(Minecraft.getInstance().getWindow().getWindow(), keyMapping.key.getValue())); } } @@ -88,10 +91,10 @@ public class KeyMapping implements Comparable { } public KeyMapping(String name, int keyCode, String category) { - this(name, InputConstants.Type.KEYSYM, keyCode, category); + this(name, Type.KEYSYM, keyCode, category); } - public KeyMapping(String name, InputConstants.Type type, int keyCode, String category) { + public KeyMapping(String name, Type type, int keyCode, String category) { this.name = name; this.key = type.getOrCreate(keyCode); this.defaultKey = this.key; @@ -133,14 +136,14 @@ public class KeyMapping implements Comparable { return this.name; } - public InputConstants.Key getDefaultKey() { + public Key getDefaultKey() { return this.defaultKey; } /** * Binds a new KeyCode to this */ - public void setKey(InputConstants.Key key) { + public void setKey(Key key) { this.key = key; } @@ -171,15 +174,15 @@ public class KeyMapping implements Comparable { public boolean matches(int keysym, int scancode) { return keysym == InputConstants.UNKNOWN.getValue() - ? this.key.getType() == InputConstants.Type.SCANCODE && this.key.getValue() == scancode - : this.key.getType() == InputConstants.Type.KEYSYM && this.key.getValue() == keysym; + ? this.key.getType() == Type.SCANCODE && this.key.getValue() == scancode + : this.key.getType() == Type.KEYSYM && this.key.getValue() == keysym; } /** * Returns {@code true} if the {@code KeyMapping} is set to a mouse key and the key matches. */ public boolean matchesMouse(int key) { - return this.key.getType() == InputConstants.Type.MOUSE && this.key.getValue() == key; + return this.key.getType() == Type.MOUSE && this.key.getValue() == key; } public Component getTranslatedKeyMessage() { @@ -200,4 +203,9 @@ public class KeyMapping implements Comparable { public void setDown(boolean value) { this.isDown = value; } + + @Nullable + public static KeyMapping get(String name) { + return (KeyMapping)ALL.get(name); + } } diff --git a/net/minecraft/client/KeyboardHandler.java b/net/minecraft/client/KeyboardHandler.java index b90a48b1..af958aa9 100644 --- a/net/minecraft/client/KeyboardHandler.java +++ b/net/minecraft/client/KeyboardHandler.java @@ -21,6 +21,7 @@ import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.gui.screens.PauseScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.debug.GameModeSwitcherScreen; +import net.minecraft.client.gui.screens.options.VideoSettingsScreen; import net.minecraft.client.gui.screens.options.controls.KeyBindsScreen; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.player.LocalPlayer; @@ -256,7 +257,7 @@ public class KeyboardHandler { this.minecraft.getTextureManager().dumpAllSheets(path2); Component component = Component.literal(path.relativize(path2).toString()) .withStyle(ChatFormatting.UNDERLINE) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, path2.toFile().toString()))); + .withStyle(style -> style.withClickEvent(new ClickEvent.OpenFile(path2))); this.debugFeedbackTranslated("debug.dump_dynamic_textures", component); return true; case 84: @@ -385,7 +386,13 @@ public class KeyboardHandler { if (action == 1 && (!(this.minecraft.screen instanceof KeyBindsScreen) || ((KeyBindsScreen)screen).lastKeySelection <= Util.getMillis() - 20L)) { if (this.minecraft.options.keyFullscreen.matches(key, scanCode)) { this.minecraft.getWindow().toggleFullScreen(); - this.minecraft.options.fullscreen().set(this.minecraft.getWindow().isFullscreen()); + boolean bl2 = this.minecraft.getWindow().isFullscreen(); + this.minecraft.options.fullscreen().set(bl2); + this.minecraft.options.save(); + if (this.minecraft.screen instanceof VideoSettingsScreen videoSettingsScreen) { + videoSettingsScreen.updateFullscreenButton(bl2); + } + return; } @@ -414,7 +421,7 @@ public class KeyboardHandler { } } - LocalPlayer var16 = this.minecraft.player; + LocalPlayer var17 = this.minecraft.player; } } diff --git a/net/minecraft/client/Minecraft.java b/net/minecraft/client/Minecraft.java index 2d6ef240..3252e654 100644 --- a/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java @@ -20,15 +20,14 @@ import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.platform.ClientShutdownWatchdog; import com.mojang.blaze3d.platform.DisplayData; import com.mojang.blaze3d.platform.FramerateLimitTracker; -import com.mojang.blaze3d.platform.GlDebug; -import com.mojang.blaze3d.platform.GlUtil; +import com.mojang.blaze3d.platform.GLX; import com.mojang.blaze3d.platform.IconSet; import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.platform.WindowEventHandler; +import com.mojang.blaze3d.systems.GpuDevice; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.TimerQuery; import com.mojang.blaze3d.systems.TimerQuery.FrameProfile; -import com.mojang.blaze3d.vertex.BufferUploader; import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.datafixers.DataFixer; import com.mojang.jtracy.DiscontinuousFrame; @@ -42,7 +41,6 @@ import java.io.UncheckedIOException; import java.lang.management.ManagementFactory; import java.net.Proxy; import java.net.SocketAddress; -import java.nio.ByteBuffer; import java.nio.file.Path; import java.nio.file.Paths; import java.time.Duration; @@ -52,6 +50,7 @@ import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.MissingResourceException; +import java.util.Optional; import java.util.Queue; import java.util.Set; import java.util.UUID; @@ -77,7 +76,6 @@ import net.minecraft.client.DeltaTracker.Timer; import net.minecraft.client.ResourceLoadStateTracker.ReloadReason; import net.minecraft.client.User.Type; import net.minecraft.client.color.block.BlockColors; -import net.minecraft.client.color.item.ItemColors; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiSpriteManager; @@ -128,7 +126,6 @@ import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.profiling.ClientMetricsSamplersProvider; import net.minecraft.client.quickplay.QuickPlay; import net.minecraft.client.quickplay.QuickPlayLog; -import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; import net.minecraft.client.renderer.FogParameters; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.client.renderer.GpuWarnlistManager; @@ -139,15 +136,17 @@ import net.minecraft.client.renderer.ShaderManager; import net.minecraft.client.renderer.VirtualScreen; import net.minecraft.client.renderer.block.BlockModelShaper; import net.minecraft.client.renderer.block.BlockRenderDispatcher; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.client.renderer.debug.DebugRenderer; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.client.renderer.entity.ItemRenderer; -import net.minecraft.client.renderer.texture.TextureAtlas; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.ClientPackSource; +import net.minecraft.client.resources.DryFoliageColorReloadListener; import net.minecraft.client.resources.FoliageColorReloadListener; import net.minecraft.client.resources.GrassColorReloadListener; import net.minecraft.client.resources.MapDecorationTextureManager; @@ -158,11 +157,11 @@ import net.minecraft.client.resources.SkinManager; import net.minecraft.client.resources.SplashManager; import net.minecraft.client.resources.language.I18n; import net.minecraft.client.resources.language.LanguageManager; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.EquipmentModelSet; +import net.minecraft.client.resources.model.EquipmentAssetManager; import net.minecraft.client.resources.model.ModelManager; import net.minecraft.client.resources.server.DownloadedPackSource; import net.minecraft.client.server.IntegratedServer; +import net.minecraft.client.sounds.MusicInfo; import net.minecraft.client.sounds.MusicManager; import net.minecraft.client.sounds.SoundManager; import net.minecraft.client.telemetry.ClientTelemetryManager; @@ -172,9 +171,7 @@ import net.minecraft.client.tutorial.Tutorial; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Holder; -import net.minecraft.core.RegistryAccess; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.Connection; import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.CommonComponents; @@ -222,26 +219,28 @@ import net.minecraft.util.profiling.Profiler; import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.util.profiling.SingleTickProfiler; import net.minecraft.util.profiling.Zone; +import net.minecraft.util.profiling.Profiler.Scope; import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; import net.minecraft.util.profiling.metrics.storage.MetricsPersister; +import net.minecraft.util.random.WeightedList; import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.TickRateManager; +import net.minecraft.world.InteractionResult.Fail; +import net.minecraft.world.InteractionResult.Success; +import net.minecraft.world.InteractionResult.SwingSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.player.ChatVisiblity; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.storage.LevelStorageSource; @@ -279,6 +278,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements private final RenderBuffers renderBuffers; public final LevelRenderer levelRenderer; private final EntityRenderDispatcher entityRenderDispatcher; + private final ItemModelResolver itemModelResolver; private final ItemRenderer itemRenderer; private final MapRenderer mapRenderer; public final ParticleEngine particleEngine; @@ -308,7 +308,6 @@ public class Minecraft extends ReentrantBlockableEventLoop implements private final PackRepository resourcePackRepository; private final LanguageManager languageManager; private final BlockColors blockColors; - private final ItemColors itemColors; private final RenderTarget mainRenderTarget; @Nullable private final TracyFrameCapture tracyFrameCapture; @@ -328,7 +327,6 @@ public class Minecraft extends ReentrantBlockableEventLoop implements * The BlockRenderDispatcher instance that will be used based off gamesettings */ private final BlockRenderDispatcher blockRenderer; - private final EquipmentModelSet equipmentModels; private final PaintingTextureManager paintingTextures; private final MobEffectTextureManager mobEffectTextures; private final MapTextureManager mapTextureManager; @@ -337,7 +335,6 @@ public class Minecraft extends ReentrantBlockableEventLoop implements private final ToastManager toastManager; private final Tutorial tutorial; private final PlayerSocialManager playerSocialManager; - private final EntityModelSet entityModels; private final BlockEntityRenderDispatcher blockEntityRenderDispatcher; private final ClientTelemetryManager telemetryManager; private final ProfileKeyPairManager profileKeyPairManager; @@ -394,7 +391,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements @Nullable private TutorialToast socialInteractionsToast; private int fpsPieRenderTicks; - private final ContinuousProfiler fpsPieProfiler = new ContinuousProfiler(Util.timeSource, () -> this.fpsPieRenderTicks); + private final ContinuousProfiler fpsPieProfiler; private MetricsRecorder metricsRecorder = InactiveMetricsRecorder.INSTANCE; private final ResourceLoadStateTracker reloadStateTracker = new ResourceLoadStateTracker(); private long savedCpuDuration; @@ -453,22 +450,23 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.toastManager = new ToastManager(this); this.gameThread = Thread.currentThread(); this.options = new Options(this, this.gameDirectory); + boolean bl = this.options.startedCleanly; + this.options.startedCleanly = false; + this.options.save(); RenderSystem.setShaderGlintAlpha(this.options.glintStrength().get()); this.running = true; this.tutorial = new Tutorial(this, this.options); this.hotbarManager = new HotbarManager(path, this.fixerUpper); LOGGER.info("Backend library: {}", RenderSystem.getBackendDescription()); - DisplayData displayData; + DisplayData displayData = gameConfig.display; if (this.options.overrideHeight > 0 && this.options.overrideWidth > 0) { - displayData = new DisplayData( - this.options.overrideWidth, - this.options.overrideHeight, - gameConfig.display.fullscreenWidth, - gameConfig.display.fullscreenHeight, - gameConfig.display.isFullscreen - ); - } else { - displayData = gameConfig.display; + displayData = gameConfig.display.withSize(this.options.overrideWidth, this.options.overrideHeight); + } + + if (!bl) { + displayData = displayData.withFullscreen(false); + this.options.fullscreenVideoModeString = null; + LOGGER.warn("Detected unexpected shutdown during last game startup: resetting fullscreen mode"); } Util.timeSource = RenderSystem.initBackendSystem(); @@ -489,18 +487,23 @@ public class Minecraft extends ReentrantBlockableEventLoop implements try { this.window.setIcon(this.vanillaPackResources, SharedConstants.getCurrentVersion().isStable() ? IconSet.RELEASE : IconSet.SNAPSHOT); - } catch (IOException var13) { - LOGGER.error("Couldn't set icon", (Throwable)var13); + } catch (IOException var15) { + LOGGER.error("Couldn't set icon", (Throwable)var15); } this.mouseHandler = new MouseHandler(this); this.mouseHandler.setup(this.window.getWindow()); this.keyboardHandler = new KeyboardHandler(this); this.keyboardHandler.setup(this.window.getWindow()); - RenderSystem.initRenderer(this.options.glDebugVerbosity, false); + RenderSystem.initRenderer( + this.window.getWindow(), + this.options.glDebugVerbosity, + false, + (resourceLocation, shaderType) -> this.getShaderManager().getShader(resourceLocation, shaderType), + gameConfig.game.renderDebugLabels + ); + LOGGER.info("Using optional rendering extensions: {}", String.join(", ", RenderSystem.getDevice().getEnabledExtensions())); this.mainRenderTarget = new MainTarget(this.window.getWidth(), this.window.getHeight()); - this.mainRenderTarget.setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - this.mainRenderTarget.clear(); this.resourceManager = new ReloadableResourceManager(PackType.CLIENT_RESOURCES); this.resourcePackRepository.reload(); this.options.loadSelectedResourcePacks(this.resourcePackRepository); @@ -514,7 +517,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.resourceManager.registerReloadListener(this.textureManager); this.shaderManager = new ShaderManager(this.textureManager, this::triggerResourcePackRecovery); this.resourceManager.registerReloadListener(this.shaderManager); - this.skinManager = new SkinManager(this.textureManager, file.toPath().resolve("skins"), this.minecraftSessionService, this); + this.skinManager = new SkinManager(file.toPath().resolve("skins"), this.minecraftSessionService, this); this.levelSource = new LevelStorageSource(path.resolve("saves"), path.resolve("backups"), this.directoryValidator, this.fixerUpper); this.commandHistory = new CommandHistory(path); this.soundManager = new SoundManager(this.options); @@ -529,25 +532,17 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.updateFontOptions(); this.resourceManager.registerReloadListener(new GrassColorReloadListener()); this.resourceManager.registerReloadListener(new FoliageColorReloadListener()); + this.resourceManager.registerReloadListener(new DryFoliageColorReloadListener()); this.window.setErrorSection("Startup"); - RenderSystem.setupDefaultState(0, 0, this.window.getWidth(), this.window.getHeight()); + RenderSystem.setupDefaultState(); this.window.setErrorSection("Post startup"); this.blockColors = BlockColors.createDefault(); - this.itemColors = ItemColors.createDefault(this.blockColors); this.modelManager = new ModelManager(this.textureManager, this.blockColors, this.options.mipmapLevels().get()); this.resourceManager.registerReloadListener(this.modelManager); - this.entityModels = new EntityModelSet(); - this.resourceManager.registerReloadListener(this.entityModels); - this.equipmentModels = new EquipmentModelSet(); - this.resourceManager.registerReloadListener(this.equipmentModels); - this.blockEntityRenderDispatcher = new BlockEntityRenderDispatcher( - this.font, this.entityModels, this::getBlockRenderer, this::getItemRenderer, this::getEntityRenderDispatcher - ); - this.resourceManager.registerReloadListener(this.blockEntityRenderDispatcher); - BlockEntityWithoutLevelRenderer blockEntityWithoutLevelRenderer = new BlockEntityWithoutLevelRenderer(this.blockEntityRenderDispatcher, this.entityModels); - this.resourceManager.registerReloadListener(blockEntityWithoutLevelRenderer); - this.itemRenderer = new ItemRenderer(this.modelManager, this.itemColors, blockEntityWithoutLevelRenderer); - this.resourceManager.registerReloadListener(this.itemRenderer); + EquipmentAssetManager equipmentAssetManager = new EquipmentAssetManager(); + this.resourceManager.registerReloadListener(equipmentAssetManager); + this.itemModelResolver = new ItemModelResolver(this.modelManager); + this.itemRenderer = new ItemRenderer(this.itemModelResolver); this.mapTextureManager = new MapTextureManager(this.textureManager); this.mapDecorationTextures = new MapDecorationTextureManager(this.textureManager); this.resourceManager.registerReloadListener(this.mapDecorationTextures); @@ -557,7 +552,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements int i = Runtime.getRuntime().availableProcessors(); Tesselator.init(); this.renderBuffers = new RenderBuffers(i); - } catch (OutOfMemoryError var12) { + } catch (OutOfMemoryError var14) { TinyFileDialogs.tinyfd_messageBox( "Minecraft", "Oh no! The game was unable to allocate memory off-heap while trying to start. You may try to free some memory by closing other applications on your computer, check that your system meets the minimum requirements, and try again. If the problem persists, please visit: " @@ -566,16 +561,29 @@ public class Minecraft extends ReentrantBlockableEventLoop implements "error", true ); - throw new SilentInitException("Unable to allocate render buffers", var12); + throw new SilentInitException("Unable to allocate render buffers", var14); } this.playerSocialManager = new PlayerSocialManager(this, this.userApiService); - this.blockRenderer = new BlockRenderDispatcher(this.modelManager.getBlockModelShaper(), blockEntityWithoutLevelRenderer, this.blockColors); + this.blockRenderer = new BlockRenderDispatcher(this.modelManager.getBlockModelShaper(), this.modelManager.specialBlockModelRenderer(), this.blockColors); this.resourceManager.registerReloadListener(this.blockRenderer); this.entityRenderDispatcher = new EntityRenderDispatcher( - this, this.textureManager, this.itemRenderer, this.mapRenderer, this.blockRenderer, this.font, this.options, this.entityModels, this.equipmentModels + this, + this.textureManager, + this.itemModelResolver, + this.itemRenderer, + this.mapRenderer, + this.blockRenderer, + this.font, + this.options, + this.modelManager.entityModels(), + equipmentAssetManager ); this.resourceManager.registerReloadListener(this.entityRenderDispatcher); + this.blockEntityRenderDispatcher = new BlockEntityRenderDispatcher( + this.font, this.modelManager.entityModels(), this.blockRenderer, this.itemModelResolver, this.itemRenderer, this.entityRenderDispatcher + ); + this.resourceManager.registerReloadListener(this.blockEntityRenderDispatcher); this.particleEngine = new ParticleEngine(this.level, this.textureManager); this.resourceManager.registerReloadListener(this.particleEngine); this.paintingTextures = new PaintingTextureManager(this.textureManager); @@ -593,7 +601,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.resourceManager.registerReloadListener(this.regionalCompliancies); this.gui = new Gui(this); this.debugRenderer = new DebugRenderer(this); - RealmsClient realmsClient = RealmsClient.create(this); + RealmsClient realmsClient = RealmsClient.getOrCreate(this); this.realmsDataFetcher = new RealmsDataFetcher(realmsClient); RenderSystem.setErrorCallback(this::onFullscreenError); if (this.mainRenderTarget.width != this.window.getWidth() || this.mainRenderTarget.height != this.window.getHeight()) { @@ -604,15 +612,25 @@ public class Minecraft extends ReentrantBlockableEventLoop implements + this.window.getHeight() + ").\nPlease make sure you have up-to-date drivers (see aka.ms/mcdriver for instructions)." ); - if (GlDebug.isDebugEnabled()) { - stringBuilder.append("\n\nReported GL debug messages:\n").append(String.join("\n", GlDebug.getLastOpenGlDebugMessages())); + + try { + GpuDevice gpuDevice = RenderSystem.getDevice(); + List list = gpuDevice.getLastDebugMessages(); + if (!list.isEmpty()) { + stringBuilder.append("\n\nReported GL debug messages:\n").append(String.join("\n", list)); + } + } catch (Throwable var13) { } this.window.setWindowed(this.mainRenderTarget.width, this.mainRenderTarget.height); TinyFileDialogs.tinyfd_messageBox("Minecraft", stringBuilder.toString(), "ok", "error", false); } else if (this.options.fullscreen().get() && !this.window.isFullscreen()) { - this.window.toggleFullScreen(); - this.options.fullscreen().set(this.window.isFullscreen()); + if (bl) { + this.window.toggleFullScreen(); + this.options.fullscreen().set(this.window.isFullscreen()); + } else { + this.options.fullscreen().set(false); + } } this.window.updateVsync(this.options.enableVsync().get()); @@ -627,12 +645,13 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.chatListener = new ChatListener(this); this.chatListener.setMessageDelay(this.options.chatDelay().get()); this.reportingContext = ReportingContext.create(ReportEnvironment.local(), this.userApiService); - LoadingOverlay.registerTextures(this); + TitleScreen.registerTextures(this.textureManager); + LoadingOverlay.registerTextures(this.textureManager); this.setScreen(new GenericMessageScreen(Component.translatable("gui.loadingMinecraft"))); - List list = this.resourcePackRepository.openAllSelected(); - this.reloadStateTracker.startReload(ReloadReason.INITIAL, list); + List list2 = this.resourcePackRepository.openAllSelected(); + this.reloadStateTracker.startReload(ReloadReason.INITIAL, list2); ReloadInstance reloadInstance = this.resourceManager - .createReload(Util.backgroundExecutor().forName("resourceLoad"), this, RESOURCE_RELOAD_INITIAL_TASK, list); + .createReload(Util.backgroundExecutor().forName("resourceLoad"), this, RESOURCE_RELOAD_INITIAL_TASK, list2); GameLoadTimesEvent.INSTANCE.beginStep(TelemetryProperty.LOAD_TIME_LOADING_OVERLAY_MS); Minecraft.GameLoadCookie gameLoadCookie = new Minecraft.GameLoadCookie(realmsClient, gameConfig.quickPlay); this.setOverlay( @@ -647,6 +666,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements ); this.quickPlayLog = QuickPlayLog.of(gameConfig.quickPlay.path()); this.framerateLimitTracker = new FramerateLimitTracker(this.options, this); + this.fpsPieProfiler = new ContinuousProfiler(Util.timeSource, () -> this.fpsPieRenderTicks, this.framerateLimitTracker::isHeavilyThrottled); if (TracyClient.isAvailable() && gameConfig.game.captureTracyImages) { this.tracyFrameCapture = new TracyFrameCapture(); } else { @@ -667,6 +687,8 @@ public class Minecraft extends ReentrantBlockableEventLoop implements GameLoadTimesEvent.INSTANCE.endStep(TelemetryProperty.LOAD_TIME_TOTAL_TIME_MS); GameLoadTimesEvent.INSTANCE.send(this.telemetryManager.getOutsideSessionSender()); runnable.run(); + this.options.startedCleanly = true; + this.options.save(); } public boolean isGameLoadFinished() { @@ -786,7 +808,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.options.resourcePacks.clear(); this.options.incompatibleResourcePacks.clear(); this.options.save(); - this.reloadResourcePacks(true, gameLoadCookie).thenRun(() -> this.addResourcePackLoadFailToast(errorMessage)); + this.reloadResourcePacks(true, gameLoadCookie).thenRunAsync(() -> this.addResourcePackLoadFailToast(errorMessage), this); } private void abortResourcePackRecovery() { @@ -805,16 +827,16 @@ public class Minecraft extends ReentrantBlockableEventLoop implements SystemToast.addOrUpdate(toastManager, SystemToast.SystemToastId.PACK_LOAD_FAILURE, Component.translatable("resourcePack.load_fail"), message); } - public void triggerResourcePackRecovery(Exception exception) { + public void triggerResourcePackRecovery(Exception error) { if (!this.resourcePackRepository.isAbleToClearAnyPack()) { if (this.resourcePackRepository.getSelectedIds().size() <= 1) { - LOGGER.error(LogUtils.FATAL_MARKER, exception.getMessage(), (Throwable)exception); - this.emergencySaveAndCrash(new CrashReport(exception.getMessage(), exception)); + LOGGER.error(LogUtils.FATAL_MARKER, error.getMessage(), (Throwable)error); + this.emergencySaveAndCrash(new CrashReport(error.getMessage(), error)); } else { this.schedule(this::abortResourcePackRecovery); } } else { - this.clearResourcePacksOnError(exception, Component.translatable("resourcePack.runtime_failure"), null); + this.clearResourcePacksOnError(error, Component.translatable("resourcePack.runtime_failure"), null); } } @@ -836,7 +858,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements SingleTickProfiler singleTickProfiler = SingleTickProfiler.createTickProfiler("Renderer"); boolean bl2 = this.getDebugOverlay().showProfilerChart(); - try (Profiler.Scope scope = Profiler.use(this.constructProfiler(bl2, singleTickProfiler))) { + try (Scope scope = Profiler.use(this.constructProfiler(bl2, singleTickProfiler))) { this.metricsRecorder.startTick(); discontinuousFrame.start(); this.runTick(!bl); @@ -991,13 +1013,13 @@ public class Minecraft extends ReentrantBlockableEventLoop implements private void selfTest() { boolean bl = false; BlockModelShaper blockModelShaper = this.getBlockRenderer().getBlockModelShaper(); - BakedModel bakedModel = blockModelShaper.getModelManager().getMissingModel(); + BlockStateModel blockStateModel = blockModelShaper.getModelManager().getMissingBlockStateModel(); for (Block block : BuiltInRegistries.BLOCK) { for (BlockState blockState : block.getStateDefinition().getPossibleStates()) { if (blockState.getRenderShape() == RenderShape.MODEL) { - BakedModel bakedModel2 = blockModelShaper.getBlockModel(blockState); - if (bakedModel2 == bakedModel) { + BlockStateModel blockStateModel2 = blockModelShaper.getBlockModel(blockState); + if (blockStateModel2 == blockStateModel) { LOGGER.debug("Missing model for: {}", blockState); bl = true; } @@ -1005,7 +1027,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } } - TextureAtlasSprite textureAtlasSprite = bakedModel.getParticleIcon(); + TextureAtlasSprite textureAtlasSprite = blockStateModel.particleIcon(); for (Block block2 : BuiltInRegistries.BLOCK) { for (BlockState blockState2 : block2.getStateDefinition().getPossibleStates()) { @@ -1090,7 +1112,6 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.screen.added(); } - BufferUploader.reset(); if (guiScreen != null) { this.mouseHandler.releaseMouse(); KeyMapping.releaseAll(); @@ -1172,6 +1193,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements FreeTypeUtil.destroy(); Util.shutdownExecutors(); + RenderSystem.getDevice().close(); } catch (Throwable var5) { LOGGER.error("Shutdown failure!", var5); throw var5; @@ -1215,7 +1237,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } this.window.setErrorSection("Render"); - profilerFiller.push("sound"); + profilerFiller.push("gpuAsync"); + RenderSystem.executePendingTasks(); + profilerFiller.popPush("sound"); this.soundManager.updateSource(this.gameRenderer.getMainCamera()); profilerFiller.popPush("toasts"); this.toastManager.update(); @@ -1232,12 +1256,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } } - RenderSystem.clear(16640); - this.mainRenderTarget.bindWrite(true); + RenderTarget renderTarget = this.getMainRenderTarget(); + RenderSystem.getDevice().createCommandEncoder().clearColorAndDepthTextures(renderTarget.getColorTexture(), 0, renderTarget.getDepthTexture(), 1.0); RenderSystem.setShaderFog(FogParameters.NO_FOG); - profilerFiller.push("display"); - RenderSystem.enableCull(); - profilerFiller.popPush("mouse"); + profilerFiller.push("mouse"); this.mouseHandler.handleAccumulatedMovement(); profilerFiller.pop(); if (!this.noRender) { @@ -1247,8 +1269,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } profilerFiller.push("blit"); - this.mainRenderTarget.unbindWrite(); - this.mainRenderTarget.blitToScreen(this.window.getWidth(), this.window.getHeight()); + if (!this.window.isMinimized()) { + renderTarget.blitToScreen(); + } + this.frameTimeNs = Util.getNanos() - l; if (bl) { TimerQuery.getInstance().ifPresent(timerQuery -> this.currentFrameProfile = timerQuery.endProfile()); @@ -1257,7 +1281,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements profilerFiller.popPush("updateDisplay"); if (this.tracyFrameCapture != null) { this.tracyFrameCapture.upload(); - this.tracyFrameCapture.capture(this.mainRenderTarget); + this.tracyFrameCapture.capture(renderTarget); } this.window.updateDisplay(this.tracyFrameCapture); @@ -1419,7 +1443,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements Consumer consumer2 = path -> { Component component = Component.literal(path.toString()) .withStyle(ChatFormatting.UNDERLINE) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, path.toFile().getParent()))); + .withStyle(style -> style.withClickEvent(new ClickEvent.OpenFile(path.getParent()))); this.execute(() -> logger.accept(Component.translatable("debug.profiling.stop", component))); }; SystemReport systemReport = fillSystemReport(new SystemReport(), this, this.languageManager, this.launchedVersion, this.options); @@ -1638,8 +1662,8 @@ public class Minecraft extends ReentrantBlockableEventLoop implements interactionResult = this.gameMode.interact(this.player, entity, interactionHand); } - if (interactionResult instanceof InteractionResult.Success success) { - if (success.swingSource() == InteractionResult.SwingSource.CLIENT) { + if (interactionResult instanceof Success success) { + if (success.swingSource() == SwingSource.CLIENT) { this.player.swing(interactionHand); } @@ -1650,10 +1674,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements BlockHitResult blockHitResult = (BlockHitResult)this.hitResult; int i = itemStack.getCount(); InteractionResult interactionResult2 = this.gameMode.useItemOn(this.player, interactionHand, blockHitResult); - if (interactionResult2 instanceof InteractionResult.Success success2) { - if (success2.swingSource() == InteractionResult.SwingSource.CLIENT) { + if (interactionResult2 instanceof Success success2) { + if (success2.swingSource() == SwingSource.CLIENT) { this.player.swing(interactionHand); - if (!itemStack.isEmpty() && (itemStack.getCount() != i || this.gameMode.hasInfiniteItems())) { + if (!itemStack.isEmpty() && (itemStack.getCount() != i || this.player.hasInfiniteMaterials())) { this.gameRenderer.itemInHandRenderer.itemUsed(interactionHand); } } @@ -1661,14 +1685,14 @@ public class Minecraft extends ReentrantBlockableEventLoop implements return; } - if (interactionResult2 instanceof InteractionResult.Fail) { + if (interactionResult2 instanceof Fail) { return; } } } - if (!itemStack.isEmpty() && this.gameMode.useItem(this.player, interactionHand) instanceof InteractionResult.Success success3) { - if (success3.swingSource() == InteractionResult.SwingSource.CLIENT) { + if (!itemStack.isEmpty() && this.gameMode.useItem(this.player, interactionHand) instanceof Success success3) { + if (success3.swingSource() == SwingSource.CLIENT) { this.player.swing(interactionHand); } @@ -1782,7 +1806,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements if (!this.options.joinedFirstServer && this.isMultiplayerServer()) { Component component = Component.translatable("tutorial.socialInteractions.title"); Component component2 = Component.translatable("tutorial.socialInteractions.description", Tutorial.key("socialInteractions")); - this.socialInteractionsToast = new TutorialToast(TutorialToast.Icons.SOCIAL_INTERACTIONS, component, component2, true, 8000); + this.socialInteractionsToast = new TutorialToast(this.font, TutorialToast.Icons.SOCIAL_INTERACTIONS, component, component2, true, 8000); this.toastManager.addToast(this.socialInteractionsToast); this.options.joinedFirstServer = true; this.options.save(); @@ -1858,8 +1882,8 @@ public class Minecraft extends ReentrantBlockableEventLoop implements if (this.options.keyHotbarSlots[i].consumeClick()) { if (this.player.isSpectator()) { this.gui.getSpectatorGui().onHotbarSelected(i); - } else if (!this.player.isCreative() || this.screen != null || !bl2 && !bl) { - this.player.getInventory().selected = i; + } else if (!this.player.hasInfiniteMaterials() || this.screen != null || !bl2 && !bl) { + this.player.getInventory().setSelectedSlot(i); } else { CreativeModeInventoryScreen.handleHotbarLoadOrSave(this, i, bl2, bl); } @@ -2235,75 +2259,19 @@ public class Minecraft extends ReentrantBlockableEventLoop implements */ private void pickBlock() { if (this.hitResult != null && this.hitResult.getType() != net.minecraft.world.phys.HitResult.Type.MISS) { - boolean bl = this.player.getAbilities().instabuild; - BlockEntity blockEntity = null; - net.minecraft.world.phys.HitResult.Type type = this.hitResult.getType(); - ItemStack itemStack; - if (type == net.minecraft.world.phys.HitResult.Type.BLOCK) { - BlockPos blockPos = ((BlockHitResult)this.hitResult).getBlockPos(); - BlockState blockState = this.level.getBlockState(blockPos); - if (blockState.isAir()) { - return; - } - - Block block = blockState.getBlock(); - itemStack = block.getCloneItemStack(this.level, blockPos, blockState); - if (itemStack.isEmpty()) { - return; - } - - if (bl && Screen.hasControlDown() && blockState.hasBlockEntity()) { - blockEntity = this.level.getBlockEntity(blockPos); - } - } else { - if (type != net.minecraft.world.phys.HitResult.Type.ENTITY || !bl) { - return; - } - - Entity entity = ((EntityHitResult)this.hitResult).getEntity(); - itemStack = entity.getPickResult(); - if (itemStack == null) { - return; - } - } - - if (itemStack.isEmpty()) { - String string = ""; - if (type == net.minecraft.world.phys.HitResult.Type.BLOCK) { - string = BuiltInRegistries.BLOCK.getKey(this.level.getBlockState(((BlockHitResult)this.hitResult).getBlockPos()).getBlock()).toString(); - } else if (type == net.minecraft.world.phys.HitResult.Type.ENTITY) { - string = BuiltInRegistries.ENTITY_TYPE.getKey(((EntityHitResult)this.hitResult).getEntity().getType()).toString(); - } - - LOGGER.warn("Picking on: [{}] {} gave null item", type, string); - } else { - Inventory inventory = this.player.getInventory(); - if (blockEntity != null) { - this.addCustomNbtData(itemStack, blockEntity, this.level.registryAccess()); - } - - int i = inventory.findSlotMatchingItem(itemStack); - if (bl) { - inventory.setPickedItem(itemStack); - this.gameMode.handleCreativeModeItemAdd(this.player.getItemInHand(InteractionHand.MAIN_HAND), 36 + inventory.selected); - } else if (i != -1) { - if (Inventory.isHotbarSlot(i)) { - inventory.selected = i; - } else { - this.gameMode.handlePickItem(i); - } - } + boolean bl = Screen.hasControlDown(); + switch (this.hitResult) { + case BlockHitResult blockHitResult: + this.gameMode.handlePickItemFromBlock(blockHitResult.getBlockPos(), bl); + break; + case EntityHitResult entityHitResult: + this.gameMode.handlePickItemFromEntity(entityHitResult.getEntity(), bl); + break; + default: } } } - private void addCustomNbtData(ItemStack stack, BlockEntity blockEntity, RegistryAccess registryAccess) { - CompoundTag compoundTag = blockEntity.saveCustomAndMetadata(registryAccess); - blockEntity.removeComponentsFromTag(compoundTag); - BlockItem.setBlockEntityData(stack, blockEntity.getType(), compoundTag); - stack.applyComponents(blockEntity.collectComponents()); - } - /** * Adds core server Info (GL version, Texture pack, isModded, type), and the worldInfo to the crash report. */ @@ -2364,10 +2332,15 @@ public class Minecraft extends ReentrantBlockableEventLoop implements "Window size", (Supplier)(() -> minecraft != null ? minecraft.window.getWidth() + "x" + minecraft.window.getHeight() : "") ); report.setDetail("GFLW Platform", Window::getPlatform); - report.setDetail("GL Caps", RenderSystem::getCapsString); - report.setDetail( - "GL debug messages", (Supplier)(() -> GlDebug.isDebugEnabled() ? String.join("\n", GlDebug.getLastOpenGlDebugMessages()) : "") - ); + report.setDetail("Render Extensions", (Supplier)(() -> String.join(", ", RenderSystem.getDevice().getEnabledExtensions()))); + report.setDetail("GL debug messages", (Supplier)(() -> { + GpuDevice gpuDevice = RenderSystem.tryGetDevice(); + if (gpuDevice == null) { + return ""; + } else { + return gpuDevice.isDebuggingEnabled() ? String.join("\n", gpuDevice.getLastDebugMessages()) : ""; + } + })); report.setDetail("Is Modded", (Supplier)(() -> checkModStatus().fullDescription())); report.setDetail("Universe", (Supplier)(() -> minecraft != null ? Long.toHexString(minecraft.canary) : "404")); report.setDetail("Type", "Client (map_client.txt)"); @@ -2394,7 +2367,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements report.setDetail("Locale", String.valueOf(Locale.getDefault())); report.setDetail("System encoding", (Supplier)(() -> System.getProperty("sun.jnu.encoding", ""))); report.setDetail("File encoding", (Supplier)(() -> System.getProperty("file.encoding", ""))); - report.setDetail("CPU", GlUtil::getCpuInfo); + report.setDetail("CPU", GLX::_getCpuInfo); return report; } @@ -2509,25 +2482,35 @@ public class Minecraft extends ReentrantBlockableEventLoop implements return this.soundManager; } - public Music getSituationalMusic() { + public MusicInfo getSituationalMusic() { Music music = Optionull.map(this.screen, Screen::getBackgroundMusic); if (music != null) { - return music; + return new MusicInfo(music); } else if (this.player != null) { - if (this.player.level().dimension() == Level.END) { - return this.gui.getBossOverlay().shouldPlayMusic() ? Musics.END_BOSS : Musics.END; + Level level = this.player.level(); + if (level.dimension() == Level.END) { + return this.gui.getBossOverlay().shouldPlayMusic() ? new MusicInfo(Musics.END_BOSS) : new MusicInfo(Musics.END); } else { - Holder holder = this.player.level().getBiome(this.player.blockPosition()); + Holder holder = level.getBiome(this.player.blockPosition()); + float f = holder.value().getBackgroundMusicVolume(); if (!this.musicManager.isPlayingMusic(Musics.UNDER_WATER) && (!this.player.isUnderWater() || !holder.is(BiomeTags.PLAYS_UNDERWATER_MUSIC))) { - return this.player.level().dimension() != Level.NETHER && this.player.getAbilities().instabuild && this.player.getAbilities().mayfly - ? Musics.CREATIVE - : (Music)holder.value().getBackgroundMusic().orElse(Musics.GAME); + if (level.dimension() != Level.NETHER && this.player.getAbilities().instabuild && this.player.getAbilities().mayfly) { + return new MusicInfo(Musics.CREATIVE, f); + } else { + Optional> optional = holder.value().getBackgroundMusic(); + if (optional.isPresent()) { + Optional optional2 = ((WeightedList)optional.get()).getRandom(level.random); + return new MusicInfo((Music)optional2.orElse(null), f); + } else { + return new MusicInfo(Musics.GAME, f); + } + } } else { - return Musics.UNDER_WATER; + return new MusicInfo(Musics.UNDER_WATER, f); } } } else { - return Musics.MENU; + return new MusicInfo(Musics.MENU); } } @@ -2706,7 +2689,6 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.player.yRotO = this.player.getYRot(); this.player.xRotO = this.player.getXRot(); - renderTarget.bindWrite(true); this.gameRenderer.renderLevel(DeltaTracker.ONE); try { @@ -2719,7 +2701,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements Component component = Component.literal(gameDirectory.getName()) .withStyle(ChatFormatting.UNDERLINE) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, gameDirectory.getAbsolutePath()))); + .withStyle(style -> style.withClickEvent(new ClickEvent.OpenFile(gameDirectory.getAbsoluteFile()))); return Component.translatable("screenshot.success", component); } catch (Exception var18) { LOGGER.error("Couldn't save image", (Throwable)var18); @@ -2734,50 +2716,11 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.window.setHeight(j); renderTarget.resize(i, j); this.gameRenderer.setPanoramicMode(false); - this.getMainRenderTarget().bindWrite(true); } return var12; } - private Component grabHugeScreenshot(File gameDirectory, int columnWidth, int rowHeight, int width, int height) { - try { - ByteBuffer byteBuffer = GlUtil.allocateMemory(columnWidth * rowHeight * 3); - Screenshot screenshot = new Screenshot(gameDirectory, width, height, rowHeight); - float f = (float)width / columnWidth; - float g = (float)height / rowHeight; - float h = f > g ? f : g; - - for (int i = (height - 1) / rowHeight * rowHeight; i >= 0; i -= rowHeight) { - for (int j = 0; j < width; j += columnWidth) { - RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_BLOCKS); - float k = (width - columnWidth) / 2.0F * 2.0F - j * 2; - float l = (height - rowHeight) / 2.0F * 2.0F - i * 2; - k /= columnWidth; - l /= rowHeight; - this.gameRenderer.renderZoomed(h, k, l); - byteBuffer.clear(); - RenderSystem.pixelStore(3333, 1); - RenderSystem.pixelStore(3317, 1); - RenderSystem.readPixels(0, 0, columnWidth, rowHeight, 32992, 5121, byteBuffer); - screenshot.addRegion(byteBuffer, j, i, columnWidth, rowHeight); - } - - screenshot.saveRow(); - } - - File file = screenshot.close(); - GlUtil.freeMemory(byteBuffer); - Component component = Component.literal(file.getName()) - .withStyle(ChatFormatting.UNDERLINE) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file.getAbsolutePath()))); - return Component.translatable("screenshot.success", component); - } catch (Exception var15) { - LOGGER.warn("Couldn't save screenshot", (Throwable)var15); - return Component.translatable("screenshot.failure", var15.getMessage()); - } - } - @Nullable public StoringChunkProgressListener getProgressListener() { return (StoringChunkProgressListener)this.progressListener.get(); @@ -2817,11 +2760,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } public EntityModelSet getEntityModels() { - return this.entityModels; - } - - public EquipmentModelSet getEquipmentModels() { - return this.equipmentModels; + return (EntityModelSet)this.modelManager.entityModels().get(); } public boolean isTextFilteringEnabled() { @@ -2889,6 +2828,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements return defaultValue; } + public ItemModelResolver getItemModelResolver() { + return this.itemModelResolver; + } + @Nullable public static String getLauncherBrand() { return System.getProperty("minecraft.launcher.brand"); diff --git a/net/minecraft/client/MouseHandler.java b/net/minecraft/client/MouseHandler.java index d88fd7ba..3ec5e081 100644 --- a/net/minecraft/client/MouseHandler.java +++ b/net/minecraft/client/MouseHandler.java @@ -2,6 +2,7 @@ package net.minecraft.client; import com.mojang.blaze3d.Blaze3D; import com.mojang.blaze3d.platform.InputConstants; +import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.platform.InputConstants.Type; import com.mojang.logging.LogUtils; import java.nio.file.InvalidPathException; @@ -9,11 +10,15 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; +import net.minecraft.CrashReportDetail; import net.minecraft.ReportedException; +import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.toasts.SystemToast; import net.minecraft.client.gui.screens.Screen; import net.minecraft.util.Mth; @@ -56,7 +61,8 @@ public class MouseHandler { * @see GLFWMouseButtonCallbackI */ private void onPress(long windowPointer, int button, int action, int modifiers) { - if (windowPointer == this.minecraft.getWindow().getWindow()) { + Window window = this.minecraft.getWindow(); + if (windowPointer == window.getWindow()) { this.minecraft.getFramerateLimitTracker().onInputReceived(); if (this.minecraft.screen != null) { this.minecraft.setLastInputType(InputType.MOUSE); @@ -97,8 +103,8 @@ public class MouseHandler { this.grabMouse(); } } else { - double d = this.xpos * this.minecraft.getWindow().getGuiScaledWidth() / this.minecraft.getWindow().getScreenWidth(); - double e = this.ypos * this.minecraft.getWindow().getGuiScaledHeight() / this.minecraft.getWindow().getScreenHeight(); + double d = this.getScaledXPos(window); + double e = this.getScaledYPos(window); Screen screen = this.minecraft.screen; if (bl) { screen.afterMouseAction(); @@ -107,12 +113,11 @@ public class MouseHandler { if (screen.mouseClicked(d, e, i)) { return; } - } catch (Throwable var17) { - CrashReport crashReport = CrashReport.forThrowable(var17, "mouseClicked event handler"); + } catch (Throwable var18) { + CrashReport crashReport = CrashReport.forThrowable(var18, "mouseClicked event handler"); screen.fillCrashDetails(crashReport); CrashReportCategory crashReportCategory = crashReport.addCategory("Mouse"); - crashReportCategory.setDetail("Scaled X", d); - crashReportCategory.setDetail("Scaled Y", e); + this.fillMousePositionDetails(crashReportCategory, window); crashReportCategory.setDetail("Button", button); throw new ReportedException(crashReport); } @@ -121,12 +126,11 @@ public class MouseHandler { if (screen.mouseReleased(d, e, i)) { return; } - } catch (Throwable var16) { - CrashReport crashReport = CrashReport.forThrowable(var16, "mouseReleased event handler"); + } catch (Throwable var17) { + CrashReport crashReport = CrashReport.forThrowable(var17, "mouseReleased event handler"); screen.fillCrashDetails(crashReport); CrashReportCategory crashReportCategory = crashReport.addCategory("Mouse"); - crashReportCategory.setDetail("Scaled X", d); - crashReportCategory.setDetail("Scaled Y", e); + this.fillMousePositionDetails(crashReportCategory, window); crashReportCategory.setDetail("Button", button); throw new ReportedException(crashReport); } @@ -155,6 +159,27 @@ public class MouseHandler { } } + public void fillMousePositionDetails(CrashReportCategory category, Window window) { + category.setDetail( + "Mouse location", + (CrashReportDetail)(() -> String.format( + Locale.ROOT, "Scaled: (%f, %f). Absolute: (%f, %f)", getScaledXPos(window, this.xpos), getScaledYPos(window, this.ypos), this.xpos, this.ypos + )) + ); + category.setDetail( + "Screen size", + (CrashReportDetail)(() -> String.format( + Locale.ROOT, + "Scaled: (%d, %d). Absolute: (%d, %d). Scale factor of %f", + window.getGuiScaledWidth(), + window.getGuiScaledHeight(), + window.getWidth(), + window.getHeight(), + window.getGuiScale() + )) + ); + } + /** * Will be called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad. * @@ -169,8 +194,8 @@ public class MouseHandler { double f = (bl ? Math.signum(yOffset) : yOffset) * d; if (this.minecraft.getOverlay() == null) { if (this.minecraft.screen != null) { - double g = this.xpos * this.minecraft.getWindow().getGuiScaledWidth() / this.minecraft.getWindow().getScreenWidth(); - double h = this.ypos * this.minecraft.getWindow().getGuiScaledHeight() / this.minecraft.getWindow().getScreenHeight(); + double g = this.getScaledXPos(this.minecraft.getWindow()); + double h = this.getScaledYPos(this.minecraft.getWindow()); this.minecraft.screen.mouseScrolled(g, h, e, f); this.minecraft.screen.afterMouseAction(); } else if (this.minecraft.player != null) { @@ -189,7 +214,7 @@ public class MouseHandler { } } else { Inventory inventory = this.minecraft.player.getInventory(); - inventory.setSelectedHotbarSlot(ScrollWheelHandler.getNextScrollWheelSelection(i, inventory.selected, Inventory.getSelectionSize())); + inventory.setSelectedSlot(ScrollWheelHandler.getNextScrollWheelSelection(i, inventory.getSelectedSlot(), Inventory.getSelectionSize())); } } } @@ -273,32 +298,31 @@ public class MouseHandler { } if (screen != null && this.minecraft.getOverlay() == null && bl) { - double f = this.xpos * this.minecraft.getWindow().getGuiScaledWidth() / this.minecraft.getWindow().getScreenWidth(); - double g = this.ypos * this.minecraft.getWindow().getGuiScaledHeight() / this.minecraft.getWindow().getScreenHeight(); + Window window = this.minecraft.getWindow(); + double f = this.getScaledXPos(window); + double g = this.getScaledYPos(window); try { screen.mouseMoved(f, g); - } catch (Throwable var19) { - CrashReport crashReport = CrashReport.forThrowable(var19, "mouseMoved event handler"); + } catch (Throwable var20) { + CrashReport crashReport = CrashReport.forThrowable(var20, "mouseMoved event handler"); screen.fillCrashDetails(crashReport); CrashReportCategory crashReportCategory = crashReport.addCategory("Mouse"); - crashReportCategory.setDetail("Scaled X", f); - crashReportCategory.setDetail("Scaled Y", g); + this.fillMousePositionDetails(crashReportCategory, window); throw new ReportedException(crashReport); } if (this.activeButton != -1 && this.mousePressedTime > 0.0) { - double h = this.accumulatedDX * this.minecraft.getWindow().getGuiScaledWidth() / this.minecraft.getWindow().getScreenWidth(); - double i = this.accumulatedDY * this.minecraft.getWindow().getGuiScaledHeight() / this.minecraft.getWindow().getScreenHeight(); + double h = getScaledXPos(window, this.accumulatedDX); + double i = getScaledYPos(window, this.accumulatedDY); try { screen.mouseDragged(f, g, this.activeButton, h, i); - } catch (Throwable var18) { - CrashReport crashReport2 = CrashReport.forThrowable(var18, "mouseDragged event handler"); + } catch (Throwable var19) { + CrashReport crashReport2 = CrashReport.forThrowable(var19, "mouseDragged event handler"); screen.fillCrashDetails(crashReport2); CrashReportCategory crashReportCategory2 = crashReport2.addCategory("Mouse"); - crashReportCategory2.setDetail("Scaled X", f); - crashReportCategory2.setDetail("Scaled Y", g); + this.fillMousePositionDetails(crashReportCategory2, window); throw new ReportedException(crashReport2); } } @@ -315,6 +339,22 @@ public class MouseHandler { this.accumulatedDY = 0.0; } + public static double getScaledXPos(Window window, double xPos) { + return xPos * window.getGuiScaledWidth() / window.getScreenWidth(); + } + + public double getScaledXPos(Window window) { + return getScaledXPos(window, this.xpos); + } + + public static double getScaledYPos(Window window, double yPos) { + return yPos * window.getGuiScaledHeight() / window.getScreenHeight(); + } + + public double getScaledYPos(Window window) { + return getScaledYPos(window, this.ypos); + } + private void turnPlayer(double movementTime) { double d = this.minecraft.options.sensitivity().get() * 0.6F + 0.2F; double e = d * d * d; @@ -416,4 +456,12 @@ public class MouseHandler { public void cursorEntered() { this.ignoreFirstMove = true; } + + public void drawDebugMouseInfo(Font font, GuiGraphics guiGraphics) { + Window window = this.minecraft.getWindow(); + double d = this.getScaledXPos(window); + double e = this.getScaledYPos(window) - 8.0; + String string = String.format(Locale.ROOT, "%.0f,%.0f", d, e); + guiGraphics.drawString(font, string, (int)d, (int)e, -1); + } } diff --git a/net/minecraft/client/OptionInstance.java b/net/minecraft/client/OptionInstance.java index b8491b9f..6b746531 100644 --- a/net/minecraft/client/OptionInstance.java +++ b/net/minecraft/client/OptionInstance.java @@ -187,8 +187,8 @@ public final class OptionInstance { public record ClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive) implements OptionInstance.IntRangeBase, OptionInstance.SliderableOrCyclableValueSet { - public Optional validateValue(Integer value) { - return Optional.of(Mth.clamp(value, this.minInclusive(), this.maxInclusive())); + public Optional validateValue(Integer integer) { + return Optional.of(Mth.clamp(integer, this.minInclusive(), this.maxInclusive())); } @Override @@ -263,8 +263,8 @@ public final class OptionInstance { this(minInclusive, maxInclusive, true); } - public Optional validateValue(Integer value) { - return value.compareTo(this.minInclusive()) >= 0 && value.compareTo(this.maxInclusive()) <= 0 ? Optional.of(value) : Optional.empty(); + public Optional validateValue(Integer integer) { + return integer.compareTo(this.minInclusive()) >= 0 && integer.compareTo(this.maxInclusive()) <= 0 ? Optional.of(integer) : Optional.empty(); } @Override @@ -279,20 +279,20 @@ public final class OptionInstance { int maxInclusive(); - default double toSliderValue(Integer value) { - if (value == this.minInclusive()) { + default double toSliderValue(Integer integer) { + if (integer == this.minInclusive()) { return 0.0; } else { - return value == this.maxInclusive() ? 1.0 : Mth.map(value.intValue() + 0.5, (double)this.minInclusive(), this.maxInclusive() + 1.0, 0.0, 1.0); + return integer == this.maxInclusive() ? 1.0 : Mth.map(integer.intValue() + 0.5, (double)this.minInclusive(), this.maxInclusive() + 1.0, 0.0, 1.0); } } - default Integer fromSliderValue(double value) { - if (value >= 1.0) { - value = 0.99999F; + default Integer fromSliderValue(double d) { + if (d >= 1.0) { + d = 0.99999F; } - return Mth.floor(Mth.map(value, 0.0, 1.0, (double)this.minInclusive(), this.maxInclusive() + 1.0)); + return Mth.floor(Mth.map(d, 0.0, 1.0, (double)this.minInclusive(), this.maxInclusive() + 1.0)); } default OptionInstance.SliderableValueSet xmap(IntFunction to, ToIntFunction from) { @@ -422,16 +422,16 @@ public final class OptionInstance { public static enum UnitDouble implements OptionInstance.SliderableValueSet { INSTANCE; - public Optional validateValue(Double value) { - return value >= 0.0 && value <= 1.0 ? Optional.of(value) : Optional.empty(); + public Optional validateValue(Double double_) { + return double_ >= 0.0 && double_ <= 1.0 ? Optional.of(double_) : Optional.empty(); } - public double toSliderValue(Double value) { - return value; + public double toSliderValue(Double double_) { + return double_; } - public Double fromSliderValue(double value) { - return value; + public Double fromSliderValue(double d) { + return d; } public OptionInstance.SliderableValueSet xmap(DoubleFunction encoder, ToDoubleFunction decoder) { diff --git a/net/minecraft/client/Options.java b/net/minecraft/client/Options.java index 0300716c..278e053b 100644 --- a/net/minecraft/client/Options.java +++ b/net/minecraft/client/Options.java @@ -20,7 +20,6 @@ import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.datafixers.util.Pair; import com.mojang.logging.LogUtils; import com.mojang.serialization.Codec; -import com.mojang.serialization.DataResult; import com.mojang.serialization.JsonOps; import java.io.BufferedReader; import java.io.File; @@ -32,7 +31,6 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; -import java.util.EnumMap; import java.util.EnumSet; import java.util.Iterator; import java.util.List; @@ -49,6 +47,12 @@ import net.fabricmc.api.Environment; import net.minecraft.ChatFormatting; import net.minecraft.SharedConstants; import net.minecraft.Util; +import net.minecraft.client.OptionInstance.AltEnum; +import net.minecraft.client.OptionInstance.ClampingLazyMaxIntRange; +import net.minecraft.client.OptionInstance.Enum; +import net.minecraft.client.OptionInstance.IntRange; +import net.minecraft.client.OptionInstance.LazyEnum; +import net.minecraft.client.OptionInstance.UnitDouble; import net.minecraft.client.gui.components.ChatComponent; import net.minecraft.client.gui.components.Tooltip; import net.minecraft.client.renderer.GpuWarnlistManager; @@ -57,6 +61,8 @@ import net.minecraft.client.sounds.SoundEngine; import net.minecraft.client.sounds.SoundManager; import net.minecraft.client.tutorial.TutorialSteps; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; @@ -108,7 +114,7 @@ public class Options { } else { return double_ == 1.0 ? genericValueLabel(component, Component.translatable("options.sensitivity.max")) : percentValueLabel(component, 2.0 * double_); } - }, OptionInstance.UnitDouble.INSTANCE, 0.5, double_ -> {}); + }, UnitDouble.INSTANCE, 0.5, double_ -> {}); private final OptionInstance renderDistance; private final OptionInstance simulationDistance; private int serverRenderDistance = 0; @@ -116,7 +122,7 @@ public class Options { "options.entityDistanceScaling", OptionInstance.noTooltip(), Options::percentValueLabel, - new OptionInstance.IntRange(2, 20).xmap(i -> i / 4.0, double_ -> (int)(double_ * 4.0)), + new IntRange(2, 20).xmap(i -> i / 4.0, double_ -> (int)(double_ * 4.0)), Codec.doubleRange(0.5, 5.0), 1.0, double_ -> {} @@ -128,7 +134,7 @@ public class Options { (component, integer) -> integer == 260 ? genericValueLabel(component, Component.translatable("options.framerateLimit.max")) : genericValueLabel(component, Component.translatable("options.framerate", integer)), - new OptionInstance.IntRange(1, 26).xmap(i -> i * 10, integer -> integer / 10), + new IntRange(1, 26).xmap(i -> i * 10, integer -> integer / 10), Codec.intRange(10, 260), 120, integer -> Minecraft.getInstance().getFramerateLimitTracker().setFramerateLimit(integer) @@ -144,7 +150,7 @@ public class Options { }; }, OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(InactivityFpsLimit.values()), InactivityFpsLimit.CODEC), + new Enum<>(Arrays.asList(InactivityFpsLimit.values()), InactivityFpsLimit.CODEC), InactivityFpsLimit.AFK, inactivityFpsLimit -> {} ); @@ -152,7 +158,7 @@ public class Options { "options.renderClouds", OptionInstance.noTooltip(), OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>( + new Enum<>( Arrays.asList(CloudStatus.values()), Codec.withAlternative(CloudStatus.CODEC, Codec.BOOL, boolean_ -> boolean_ ? CloudStatus.FANCY : CloudStatus.OFF) ), CloudStatus.FANCY, @@ -176,7 +182,7 @@ public class Options { MutableComponent mutableComponent = Component.translatable(graphicsStatus.getKey()); return graphicsStatus == GraphicsStatus.FABULOUS ? mutableComponent.withStyle(ChatFormatting.ITALIC) : mutableComponent; }, - new OptionInstance.AltEnum<>( + new AltEnum<>( Arrays.asList(GraphicsStatus.values()), (List)Stream.of(GraphicsStatus.values()).filter(graphicsStatus -> graphicsStatus != GraphicsStatus.FABULOUS).collect(Collectors.toList()), () -> Minecraft.getInstance().isRunning() && Minecraft.getInstance().getGpuWarnlistManager().isSkippingFabulous(), @@ -211,7 +217,7 @@ public class Options { }; }, OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(PrioritizeChunkUpdates.values()), Codec.INT.xmap(PrioritizeChunkUpdates::byId, PrioritizeChunkUpdates::getId)), + new Enum<>(Arrays.asList(PrioritizeChunkUpdates.values()), Codec.INT.xmap(PrioritizeChunkUpdates::byId, PrioritizeChunkUpdates::getId)), PrioritizeChunkUpdates.NONE, prioritizeChunkUpdates -> {} ); @@ -221,7 +227,7 @@ public class Options { "options.chat.visibility", OptionInstance.noTooltip(), OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(ChatVisiblity.values()), Codec.INT.xmap(ChatVisiblity::byId, ChatVisiblity::getId)), + new Enum<>(Arrays.asList(ChatVisiblity.values()), Codec.INT.xmap(ChatVisiblity::byId, ChatVisiblity::getId)), ChatVisiblity.FULL, chatVisiblity -> {} ); @@ -229,12 +235,12 @@ public class Options { "options.chat.opacity", OptionInstance.noTooltip(), (component, double_) -> percentValueLabel(component, double_ * 0.9 + 0.1), - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); private final OptionInstance chatLineSpacing = new OptionInstance<>( - "options.chat.line_spacing", OptionInstance.noTooltip(), Options::percentValueLabel, OptionInstance.UnitDouble.INSTANCE, 0.0, double_ -> {} + "options.chat.line_spacing", OptionInstance.noTooltip(), Options::percentValueLabel, UnitDouble.INSTANCE, 0.0, double_ -> {} ); private static final Component MENU_BACKGROUND_BLURRINESS_TOOLTIP = Component.translatable("options.accessibility.menu_background_blurriness.tooltip"); private static final int BLURRINESS_DEFAULT_VALUE = 5; @@ -242,7 +248,7 @@ public class Options { "options.accessibility.menu_background_blurriness", OptionInstance.cachedConstantTooltip(MENU_BACKGROUND_BLURRINESS_TOOLTIP), Options::genericValueOrOffLabel, - new OptionInstance.IntRange(0, 10), + new IntRange(0, 10), 5, integer -> {} ); @@ -250,12 +256,12 @@ public class Options { "options.accessibility.text_background_opacity", OptionInstance.noTooltip(), Options::percentValueLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 0.5, double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); private final OptionInstance panoramaSpeed = new OptionInstance<>( - "options.accessibility.panorama_speed", OptionInstance.noTooltip(), Options::percentValueLabel, OptionInstance.UnitDouble.INSTANCE, 1.0, double_ -> {} + "options.accessibility.panorama_speed", OptionInstance.noTooltip(), Options::percentValueLabel, UnitDouble.INSTANCE, 1.0, double_ -> {} ); private static final Component ACCESSIBILITY_TOOLTIP_CONTRAST_MODE = Component.translatable("options.accessibility.high_contrast.tooltip"); private final OptionInstance highContrast = OptionInstance.createBoolean( @@ -294,7 +300,7 @@ public class Options { "options.mainHand", OptionInstance.noTooltip(), OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(HumanoidArm.values()), HumanoidArm.CODEC), + new Enum<>(Arrays.asList(HumanoidArm.values()), HumanoidArm.CODEC), HumanoidArm.RIGHT, humanoidArm -> {} ); @@ -304,7 +310,7 @@ public class Options { "options.chat.scale", OptionInstance.noTooltip(), (component, double_) -> (Component)(double_ == 0.0 ? CommonComponents.optionStatus(component, false) : percentValueLabel(component, double_)), - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); @@ -312,7 +318,7 @@ public class Options { "options.chat.width", OptionInstance.noTooltip(), (component, double_) -> pixelValueLabel(component, ChatComponent.getWidth(double_)), - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); @@ -320,7 +326,7 @@ public class Options { "options.chat.height.unfocused", OptionInstance.noTooltip(), (component, double_) -> pixelValueLabel(component, ChatComponent.getHeight(double_)), - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, ChatComponent.defaultUnfocusedPct(), double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); @@ -328,7 +334,7 @@ public class Options { "options.chat.height.focused", OptionInstance.noTooltip(), (component, double_) -> pixelValueLabel(component, ChatComponent.getHeight(double_)), - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> Minecraft.getInstance().gui.getChat().rescaleChat() ); @@ -338,7 +344,7 @@ public class Options { (component, double_) -> double_ <= 0.0 ? Component.translatable("options.chat.delay_none") : Component.translatable("options.chat.delay", String.format(Locale.ROOT, "%.1f", double_)), - new OptionInstance.IntRange(0, 60).xmap(i -> i / 10.0, double_ -> (int)(double_ * 10.0)), + new IntRange(0, 60).xmap(i -> i / 10.0, double_ -> (int)(double_ * 10.0)), Codec.doubleRange(0.0, 6.0), 0.0, double_ -> Minecraft.getInstance().getChatListener().setMessageDelay(double_) @@ -348,7 +354,7 @@ public class Options { "options.notifications.display_time", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_NOTIFICATION_DISPLAY_TIME), (component, double_) -> genericValueLabel(component, Component.translatable("options.multiplier", double_)), - new OptionInstance.IntRange(5, 100).xmap(i -> i / 10.0, double_ -> (int)(double_ * 10.0)), + new IntRange(5, 100).xmap(i -> i / 10.0, double_ -> (int)(double_ * 10.0)), Codec.doubleRange(0.5, 10.0), 1.0, double_ -> {} @@ -357,7 +363,7 @@ public class Options { "options.mipmapLevels", OptionInstance.noTooltip(), (component, integer) -> (Component)(integer == 0 ? CommonComponents.optionStatus(component, false) : genericValueLabel(component, integer)), - new OptionInstance.IntRange(0, 4), + new IntRange(0, 4), 4, integer -> {} ); @@ -366,7 +372,7 @@ public class Options { "options.attackIndicator", OptionInstance.noTooltip(), OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(AttackIndicatorStatus.values()), Codec.INT.xmap(AttackIndicatorStatus::byId, AttackIndicatorStatus::getId)), + new Enum<>(Arrays.asList(AttackIndicatorStatus.values()), Codec.INT.xmap(AttackIndicatorStatus::byId, AttackIndicatorStatus::getId)), AttackIndicatorStatus.CROSSHAIR, attackIndicatorStatus -> {} ); @@ -376,13 +382,13 @@ public class Options { "options.biomeBlendRadius", OptionInstance.noTooltip(), (component, integer) -> { int i = integer * 2 + 1; return genericValueLabel(component, Component.translatable("options.biomeBlendRadius." + i)); - }, new OptionInstance.IntRange(0, 7, false), 2, integer -> Minecraft.getInstance().levelRenderer.allChanged() + }, new IntRange(0, 7, false), 2, integer -> Minecraft.getInstance().levelRenderer.allChanged() ); private final OptionInstance mouseWheelSensitivity = new OptionInstance<>( "options.mouseWheelSensitivity", OptionInstance.noTooltip(), (component, double_) -> genericValueLabel(component, Component.literal(String.format(Locale.ROOT, "%.2f", double_))), - new OptionInstance.IntRange(-200, 100).xmap(Options::logMouse, Options::unlogMouse), + new IntRange(-200, 100).xmap(Options::logMouse, Options::unlogMouse), Codec.doubleRange(logMouse(-200), logMouse(100)), logMouse(0), double_ -> {} @@ -428,11 +434,9 @@ public class Options { "options.allowServerListing", OptionInstance.cachedConstantTooltip(ALLOW_SERVER_LISTING_TOOLTIP), true, boolean_ -> {} ); private final OptionInstance reducedDebugInfo = OptionInstance.createBoolean("options.reducedDebugInfo", false); - private final Map> soundSourceVolumes = Util.make(new EnumMap(SoundSource.class), enumMap -> { - for (SoundSource soundSource : SoundSource.values()) { - enumMap.put(soundSource, this.createSoundSliderOptionInstance("soundCategory." + soundSource.getName(), soundSource)); - } - }); + private final Map> soundSourceVolumes = Util.makeEnumMap( + SoundSource.class, soundSource -> this.createSoundSliderOptionInstance("soundCategory." + soundSource.getName(), soundSource) + ); private final OptionInstance showSubtitles = OptionInstance.createBoolean("options.showSubtitles", false); private static final Component DIRECTIONAL_AUDIO_TOOLTIP_ON = Component.translatable("options.directionalAudio.on.tooltip"); private static final Component DIRECTIONAL_AUDIO_TOOLTIP_OFF = Component.translatable("options.directionalAudio.off.tooltip"); @@ -575,7 +579,7 @@ public class Options { default -> genericValueLabel(component, integer); }; }, - new OptionInstance.IntRange(30, 110), + new IntRange(30, 110), Codec.DOUBLE.xmap(double_ -> (int)(double_ * 40.0 + 70.0), integer -> (integer.intValue() - 70.0) / 40.0), 70, integer -> Minecraft.getInstance().levelRenderer.needsUpdate() @@ -604,7 +608,7 @@ public class Options { "options.screenEffectScale", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_SCREEN_EFFECT), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> {} ); @@ -613,7 +617,7 @@ public class Options { "options.fovEffectScale", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_FOV_EFFECT), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE.xmap(Mth::square, Math::sqrt), + UnitDouble.INSTANCE.xmap(Mth::square, Math::sqrt), Codec.doubleRange(0.0, 1.0), 1.0, double_ -> {} @@ -623,7 +627,7 @@ public class Options { "options.darknessEffectScale", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_DARKNESS_EFFECT), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE.xmap(Mth::square, Math::sqrt), + UnitDouble.INSTANCE.xmap(Mth::square, Math::sqrt), 1.0, double_ -> {} ); @@ -632,7 +636,7 @@ public class Options { "options.glintSpeed", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_GLINT_SPEED), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 0.5, double_ -> {} ); @@ -641,7 +645,7 @@ public class Options { "options.glintStrength", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_GLINT_STRENGTH), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 0.75, RenderSystem::setShaderGlintAlpha ); @@ -650,7 +654,7 @@ public class Options { "options.damageTiltStrength", OptionInstance.cachedConstantTooltip(ACCESSIBILITY_TOOLTIP_DAMAGE_TILT_STRENGTH), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> {} ); @@ -663,14 +667,14 @@ public class Options { } else { return i == 100 ? genericValueLabel(component, Component.translatable("options.gamma.max")) : genericValueLabel(component, i); } - }, OptionInstance.UnitDouble.INSTANCE, 0.5, double_ -> {}); + }, UnitDouble.INSTANCE, 0.5, double_ -> {}); public static final int AUTO_GUI_SCALE = 0; private static final int MAX_GUI_SCALE_INCLUSIVE = 2147483646; private final OptionInstance guiScale = new OptionInstance<>( "options.guiScale", OptionInstance.noTooltip(), (component, integer) -> integer == 0 ? Component.translatable("options.guiScale.auto") : Component.literal(Integer.toString(integer)), - new OptionInstance.ClampingLazyMaxIntRange(0, () -> { + new ClampingLazyMaxIntRange(0, () -> { Minecraft minecraftx = Minecraft.getInstance(); return !minecraftx.isRunning() ? 2147483646 : minecraftx.getWindow().calculateScale(0, minecraftx.isEnforceUnicode()); }, 2147483646), @@ -681,7 +685,7 @@ public class Options { "options.particles", OptionInstance.noTooltip(), OptionInstance.forOptionEnum(), - new OptionInstance.Enum<>(Arrays.asList(ParticleStatus.values()), Codec.INT.xmap(ParticleStatus::byId, ParticleStatus::getId)), + new Enum<>(Arrays.asList(ParticleStatus.values()), Codec.INT.xmap(ParticleStatus::byId, ParticleStatus::getId)), ParticleStatus.ALL, particleStatus -> {} ); @@ -691,7 +695,7 @@ public class Options { (component, narratorStatus) -> (Component)(this.minecraft.getNarrator().isActive() ? narratorStatus.getName() : Component.translatable("options.narrator.notavailable")), - new OptionInstance.Enum<>(Arrays.asList(NarratorStatus.values()), Codec.INT.xmap(NarratorStatus::byId, NarratorStatus::getId)), + new Enum<>(Arrays.asList(NarratorStatus.values()), Codec.INT.xmap(NarratorStatus::byId, NarratorStatus::getId)), NarratorStatus.OFF, narratorStatus -> this.minecraft.getNarrator().updateNarratorStatus(narratorStatus) ); @@ -706,7 +710,7 @@ public class Options { return string.startsWith("OpenAL Soft on ") ? Component.literal(string.substring(SoundEngine.OPEN_AL_SOFT_PREFIX_LENGTH)) : Component.literal(string); } }, - new OptionInstance.LazyEnum<>( + new LazyEnum<>( () -> Stream.concat(Stream.of(""), Minecraft.getInstance().getSoundManager().getAvailableSoundDevices().stream()).toList(), string -> Minecraft.getInstance().isRunning() && string != "" && !Minecraft.getInstance().getSoundManager().getAvailableSoundDevices().contains(string) ? Optional.empty() @@ -722,6 +726,7 @@ public class Options { ); public boolean onboardAccessibility = true; public boolean syncWrites; + public boolean startedCleanly = true; public OptionInstance darkMojangStudiosBackground() { return this.darkMojangStudiosBackground; @@ -981,7 +986,7 @@ public class Options { text, OptionInstance.noTooltip(), Options::percentValueOrOffLabel, - OptionInstance.UnitDouble.INSTANCE, + UnitDouble.INSTANCE, 1.0, double_ -> Minecraft.getInstance().getSoundManager().updateSourceVolume(soundSource, double_.floatValue()) ); @@ -1096,7 +1101,7 @@ public class Options { "options.renderDistance", OptionInstance.noTooltip(), (component, integer) -> genericValueLabel(component, Component.translatable("options.chunks", integer)), - new OptionInstance.IntRange(2, bl ? 32 : 16, false), + new IntRange(2, bl ? 32 : 16, false), 12, integer -> Minecraft.getInstance().levelRenderer.needsUpdate() ); @@ -1104,7 +1109,7 @@ public class Options { "options.simulationDistance", OptionInstance.noTooltip(), (component, integer) -> genericValueLabel(component, Component.translatable("options.chunks", integer)), - new OptionInstance.IntRange(5, bl ? 32 : 16, false), + new IntRange(5, bl ? 32 : 16, false), 12, integer -> {} ); @@ -1219,6 +1224,7 @@ public class Options { accessor.process("telemetryOptInExtra", this.telemetryOptInExtra); this.onboardAccessibility = accessor.process("onboardAccessibility", this.onboardAccessibility); accessor.process("menuBackgroundBlurriness", this.menuBackgroundBlurriness); + this.startedCleanly = accessor.process("startedCleanly", this.startedCleanly); for (KeyMapping keyMapping : this.keyMappings) { String string = keyMapping.saveString(); @@ -1258,7 +1264,7 @@ public class Options { try { Iterator iterator = OPTION_SPLITTER.split(string).iterator(); compoundTag.putString((String)iterator.next(), (String)iterator.next()); - } catch (Exception var3) { + } catch (Exception var3x) { LOGGER.warn("Skipping bad option: {}", string); } }); @@ -1279,86 +1285,90 @@ public class Options { } final CompoundTag compoundTag2 = this.dataFix(compoundTag); - if (!compoundTag2.contains("graphicsMode") && compoundTag2.contains("fancyGraphics")) { - if (isTrue(compoundTag2.getString("fancyGraphics"))) { - this.graphicsMode.set(GraphicsStatus.FANCY); - } else { - this.graphicsMode.set(GraphicsStatus.FAST); - } + Optional optional = compoundTag2.getString("fancyGraphics"); + if (optional.isPresent() && !compoundTag2.contains("graphicsMode")) { + this.graphicsMode.set(isTrue((String)optional.get()) ? GraphicsStatus.FANCY : GraphicsStatus.FAST); } - this.processOptions(new Options.FieldAccess() { - @Nullable - private String getValueOrNull(String name) { - return compoundTag2.contains(name) ? compoundTag2.get(name).getAsString() : null; - } - - @Override - public void process(String name, OptionInstance value) { - String string = this.getValueOrNull(name); - if (string != null) { - JsonReader jsonReader = new JsonReader(new StringReader(string.isEmpty() ? "\"\"" : string)); - JsonElement jsonElement = JsonParser.parseReader(jsonReader); - DataResult dataResult = value.codec().parse(JsonOps.INSTANCE, jsonElement); - dataResult.error().ifPresent(error -> Options.LOGGER.error("Error parsing option value " + string + " for option " + value + ": " + error.message())); - dataResult.ifSuccess(value::set); - } - } - - @Override - public int process(String name, int value) { - String string = this.getValueOrNull(name); - if (string != null) { - try { - return Integer.parseInt(string); - } catch (NumberFormatException var5) { - Options.LOGGER.warn("Invalid integer value for option {} = {}", name, string, var5); + this.processOptions( + new Options.FieldAccess() { + @Nullable + private String getValue(String string) { + Tag tag = compoundTag2.get(string); + if (tag == null) { + return null; + } else if (tag instanceof StringTag(String var7x)) { + return var7x; + } else { + throw new IllegalStateException("Cannot read field of wrong type, expected string: " + tag); } } - return value; - } + @Override + public void process(String name, OptionInstance value) { + String string = this.getValue(name); + if (string != null) { + JsonReader jsonReader = new JsonReader(new StringReader(string.isEmpty() ? "\"\"" : string)); + JsonElement jsonElement = JsonParser.parseReader(jsonReader); + value.codec() + .parse(JsonOps.INSTANCE, jsonElement) + .ifError(error -> Options.LOGGER.error("Error parsing option value {} for option {}: {}", string, value, error.message())) + .ifSuccess(value::set); + } + } - @Override - public boolean process(String name, boolean value) { - String string = this.getValueOrNull(name); - return string != null ? Options.isTrue(string) : value; - } + @Override + public int process(String name, int value) { + String string = this.getValue(name); + if (string != null) { + try { + return Integer.parseInt(string); + } catch (NumberFormatException var5) { + Options.LOGGER.warn("Invalid integer value for option {} = {}", name, string, var5); + } + } - @Override - public String process(String name, String value) { - return MoreObjects.firstNonNull(this.getValueOrNull(name), value); - } - - @Override - public float process(String name, float value) { - String string = this.getValueOrNull(name); - if (string == null) { return value; - } else if (Options.isTrue(string)) { - return 1.0F; - } else if (Options.isFalse(string)) { - return 0.0F; - } else { - try { - return Float.parseFloat(string); - } catch (NumberFormatException var5) { - Options.LOGGER.warn("Invalid floating point value for option {} = {}", name, string, var5); + } + + @Override + public boolean process(String name, boolean value) { + String string = this.getValue(name); + return string != null ? Options.isTrue(string) : value; + } + + @Override + public String process(String name, String value) { + return MoreObjects.firstNonNull(this.getValue(name), value); + } + + @Override + public float process(String name, float value) { + String string = this.getValue(name); + if (string == null) { return value; + } else if (Options.isTrue(string)) { + return 1.0F; + } else if (Options.isFalse(string)) { + return 0.0F; + } else { + try { + return Float.parseFloat(string); + } catch (NumberFormatException var5) { + Options.LOGGER.warn("Invalid floating point value for option {} = {}", name, string, var5); + return value; + } } } - } - @Override - public T process(String name, T value, Function stringValuefier, Function valueStringifier) { - String string = this.getValueOrNull(name); - return (T)(string == null ? value : stringValuefier.apply(string)); + @Override + public T process(String name, T value, Function stringValuefier, Function valueStringifier) { + String string = this.getValue(name); + return (T)(string == null ? value : stringValuefier.apply(string)); + } } - }); - if (compoundTag2.contains("fullscreenResolution")) { - this.fullscreenVideoModeString = compoundTag2.getString("fullscreenResolution"); - } - + ); + compoundTag2.getString("fullscreenResolution").ifPresent(string -> this.fullscreenVideoModeString = string); KeyMapping.resetMapping(); } catch (Exception var7) { LOGGER.error("Failed to load options", (Throwable)var7); @@ -1377,7 +1387,7 @@ public class Options { int i = 0; try { - i = Integer.parseInt(nbt.getString("version")); + i = (Integer)nbt.getString("version").map(Integer::parseInt).orElse(0); } catch (RuntimeException var4) { } @@ -1447,8 +1457,9 @@ public class Options { } } ); - if (this.minecraft.getWindow().getPreferredFullscreenVideoMode().isPresent()) { - printWriter.println("fullscreenResolution:" + ((VideoMode)this.minecraft.getWindow().getPreferredFullscreenVideoMode().get()).write()); + String string = this.getFullscreenVideoModeString(); + if (string != null) { + printWriter.println("fullscreenResolution:" + string); } } catch (Throwable var5) { try { @@ -1468,6 +1479,16 @@ public class Options { this.broadcastOptions(); } + @Nullable + private String getFullscreenVideoModeString() { + Window window = this.minecraft.getWindow(); + if (window == null) { + return this.fullscreenVideoModeString; + } else { + return window.getPreferredFullscreenVideoMode().isPresent() ? ((VideoMode)window.getPreferredFullscreenVideoMode().get()).write() : null; + } + } + public ClientInformation buildPlayerInformation() { int i = 0; diff --git a/net/minecraft/client/PeriodicNotificationManager.java b/net/minecraft/client/PeriodicNotificationManager.java index 2635e6b1..1873d6ce 100644 --- a/net/minecraft/client/PeriodicNotificationManager.java +++ b/net/minecraft/client/PeriodicNotificationManager.java @@ -60,10 +60,7 @@ public class PeriodicNotificationManager this.selector = selector; } - /** - * Performs any reloading that can be done off-thread, such as file IO - */ - protected Map> prepare(ResourceManager resourceManager, ProfilerFiller profiler) { + protected Map> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { try { Reader reader = resourceManager.openAsReader(this.notifications); @@ -93,8 +90,8 @@ public class PeriodicNotificationManager } } - protected void apply(Map> object, ResourceManager resourceManager, ProfilerFiller profiler) { - List list = (List)object.entrySet() + protected void apply(Map> map, ResourceManager resourceManager, ProfilerFiller profilerFiller) { + List list = (List)map.entrySet() .stream() .filter(entry -> this.selector.apply((String)entry.getKey())) .map(Entry::getValue) diff --git a/net/minecraft/client/Screenshot.java b/net/minecraft/client/Screenshot.java index 1a2fcb32..4341be61 100644 --- a/net/minecraft/client/Screenshot.java +++ b/net/minecraft/client/Screenshot.java @@ -1,14 +1,15 @@ package net.minecraft.client; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.systems.CommandEncoder; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.logging.LogUtils; -import java.io.DataOutputStream; import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.ByteBuffer; import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -23,12 +24,6 @@ import org.slf4j.Logger; public class Screenshot { private static final Logger LOGGER = LogUtils.getLogger(); public static final String SCREENSHOT_DIR = "screenshots"; - private int rowHeight; - private final DataOutputStream outputStream; - private final byte[] bytes; - private final int width; - private final int height; - private File file; /** * Saves a screenshot in the game directory with a time-stamped filename. @@ -41,51 +36,82 @@ public class Screenshot { * Saves a screenshot in the game directory with the given file name (or null to generate a time-stamped name). */ public static void grab(File gameDirectory, @Nullable String screenshotName, RenderTarget buffer, Consumer messageConsumer) { - if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> _grab(gameDirectory, screenshotName, buffer, messageConsumer)); - } else { - _grab(gameDirectory, screenshotName, buffer, messageConsumer); - } - } - - private static void _grab(File gameDirectory, @Nullable String screenshotName, RenderTarget buffer, Consumer messageConsumer) { - NativeImage nativeImage = takeScreenshot(buffer); - File file = new File(gameDirectory, "screenshots"); - file.mkdir(); - File file2; - if (screenshotName == null) { - file2 = getFile(file); - } else { - file2 = new File(file, screenshotName); - } - - Util.ioPool() - .execute( - () -> { - try { - nativeImage.writeToFile(file2); - Component component = Component.literal(file2.getName()) - .withStyle(ChatFormatting.UNDERLINE) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file2.getAbsolutePath()))); - messageConsumer.accept(Component.translatable("screenshot.success", component)); - } catch (Exception var7) { - LOGGER.warn("Couldn't save screenshot", (Throwable)var7); - messageConsumer.accept(Component.translatable("screenshot.failure", var7.getMessage())); - } finally { - nativeImage.close(); - } + takeScreenshot( + buffer, + nativeImage -> { + File file2 = new File(gameDirectory, "screenshots"); + file2.mkdir(); + File file3; + if (screenshotName == null) { + file3 = getFile(file2); + } else { + file3 = new File(file2, screenshotName); } - ); + + Util.ioPool() + .execute( + () -> { + try { + NativeImage exception = nativeImage; + + try { + nativeImage.writeToFile(file3); + Component component = Component.literal(file3.getName()) + .withStyle(ChatFormatting.UNDERLINE) + .withStyle(style -> style.withClickEvent(new ClickEvent.OpenFile(file3.getAbsoluteFile()))); + messageConsumer.accept(Component.translatable("screenshot.success", component)); + } catch (Throwable var7) { + if (nativeImage != null) { + try { + exception.close(); + } catch (Throwable var6) { + var7.addSuppressed(var6); + } + } + + throw var7; + } + + if (nativeImage != null) { + nativeImage.close(); + } + } catch (Exception var8) { + LOGGER.warn("Couldn't save screenshot", (Throwable)var8); + messageConsumer.accept(Component.translatable("screenshot.failure", var8.getMessage())); + } + } + ); + } + ); } - public static NativeImage takeScreenshot(RenderTarget framebuffer) { - int i = framebuffer.width; - int j = framebuffer.height; - NativeImage nativeImage = new NativeImage(i, j, false); - RenderSystem.bindTexture(framebuffer.getColorTextureId()); - nativeImage.downloadTexture(0, true); - nativeImage.flipY(); - return nativeImage; + public static void takeScreenshot(RenderTarget renderTarget, Consumer writer) { + int i = renderTarget.width; + int j = renderTarget.height; + GpuTexture gpuTexture = renderTarget.getColorTexture(); + if (gpuTexture == null) { + throw new IllegalStateException("Tried to capture screenshot of an incomplete framebuffer"); + } else { + GpuBuffer gpuBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Screenshot buffer", BufferType.PIXEL_PACK, BufferUsage.STATIC_READ, i * j * gpuTexture.getFormat().pixelSize()); + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + RenderSystem.getDevice().createCommandEncoder().copyTextureToBuffer(gpuTexture, gpuBuffer, 0, () -> { + try (GpuBuffer.ReadView readView = commandEncoder.readBuffer(gpuBuffer)) { + NativeImage nativeImage = new NativeImage(i, j, false); + + for (int k = 0; k < j; k++) { + for (int l = 0; l < i; l++) { + int m = readView.data().getInt((l + k * i) * gpuTexture.getFormat().pixelSize()); + nativeImage.setPixelABGR(l, j - k - 1, m | 0xFF000000); + } + } + + writer.accept(nativeImage); + } + + gpuBuffer.close(); + }, 0); + } } /** @@ -104,58 +130,4 @@ public class Screenshot { i++; } } - - public Screenshot(File gameDirectory, int width, int height, int rowHeight) throws IOException { - this.width = width; - this.height = height; - this.rowHeight = rowHeight; - File file = new File(gameDirectory, "screenshots"); - file.mkdir(); - String string = "huge_" + Util.getFilenameFormattedDateTime(); - int i = 1; - - while ((this.file = new File(file, string + (i == 1 ? "" : "_" + i) + ".tga")).exists()) { - i++; - } - - byte[] bs = new byte[18]; - bs[2] = 2; - bs[12] = (byte)(width % 256); - bs[13] = (byte)(width / 256); - bs[14] = (byte)(height % 256); - bs[15] = (byte)(height / 256); - bs[16] = 24; - this.bytes = new byte[width * rowHeight * 3]; - this.outputStream = new DataOutputStream(new FileOutputStream(this.file)); - this.outputStream.write(bs); - } - - public void addRegion(ByteBuffer buffer, int width, int height, int rowWidth, int rowHeight) { - int i = rowWidth; - int j = rowHeight; - if (rowWidth > this.width - width) { - i = this.width - width; - } - - if (rowHeight > this.height - height) { - j = this.height - height; - } - - this.rowHeight = j; - - for (int k = 0; k < j; k++) { - buffer.position((rowHeight - j) * rowWidth * 3 + k * rowWidth * 3); - int l = (width + k * this.width) * 3; - buffer.get(this.bytes, l, i * 3); - } - } - - public void saveRow() throws IOException { - this.outputStream.write(this.bytes, 0, this.width * 3 * this.rowHeight); - } - - public File close() throws IOException { - this.outputStream.close(); - return this.file; - } } diff --git a/net/minecraft/client/ScrollWheelHandler.java b/net/minecraft/client/ScrollWheelHandler.java index a98cf163..ea5296dc 100644 --- a/net/minecraft/client/ScrollWheelHandler.java +++ b/net/minecraft/client/ScrollWheelHandler.java @@ -9,17 +9,17 @@ public class ScrollWheelHandler { private double accumulatedScrollX; private double accumulatedScrollY; - public Vector2i onMouseScroll(double d, double e) { - if (this.accumulatedScrollX != 0.0 && Math.signum(d) != Math.signum(this.accumulatedScrollX)) { + public Vector2i onMouseScroll(double xOffset, double yOffset) { + if (this.accumulatedScrollX != 0.0 && Math.signum(xOffset) != Math.signum(this.accumulatedScrollX)) { this.accumulatedScrollX = 0.0; } - if (this.accumulatedScrollY != 0.0 && Math.signum(e) != Math.signum(this.accumulatedScrollY)) { + if (this.accumulatedScrollY != 0.0 && Math.signum(yOffset) != Math.signum(this.accumulatedScrollY)) { this.accumulatedScrollY = 0.0; } - this.accumulatedScrollX += d; - this.accumulatedScrollY += e; + this.accumulatedScrollX += xOffset; + this.accumulatedScrollY += yOffset; int i = (int)this.accumulatedScrollX; int j = (int)this.accumulatedScrollY; if (i == 0 && j == 0) { @@ -31,19 +31,19 @@ public class ScrollWheelHandler { } } - public static int getNextScrollWheelSelection(double d, int i, int j) { - int k = (int)Math.signum(d); - i -= k; - i = Math.max(-1, i); + public static int getNextScrollWheelSelection(double yOffset, int selected, int selectionSize) { + int i = (int)Math.signum(yOffset); + selected -= i; + selected = Math.max(-1, selected); - while (i < 0) { - i += j; + while (selected < 0) { + selected += selectionSize; } - while (i >= j) { - i -= j; + while (selected >= selectionSize) { + selected -= selectionSize; } - return i; + return selected; } } diff --git a/net/minecraft/client/ToggleKeyMapping.java b/net/minecraft/client/ToggleKeyMapping.java index f2638946..7e565ee3 100644 --- a/net/minecraft/client/ToggleKeyMapping.java +++ b/net/minecraft/client/ToggleKeyMapping.java @@ -1,6 +1,6 @@ package net.minecraft.client; -import com.mojang.blaze3d.platform.InputConstants; +import com.mojang.blaze3d.platform.InputConstants.Type; import java.util.function.BooleanSupplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -10,7 +10,7 @@ public class ToggleKeyMapping extends KeyMapping { private final BooleanSupplier needsToggle; public ToggleKeyMapping(String name, int keyCode, String category, BooleanSupplier needsToggle) { - super(name, InputConstants.Type.KEYSYM, keyCode, category); + super(name, Type.KEYSYM, keyCode, category); this.needsToggle = needsToggle; } diff --git a/net/minecraft/client/animation/KeyframeAnimations.java b/net/minecraft/client/animation/KeyframeAnimations.java index 8c3669cb..955c0c29 100644 --- a/net/minecraft/client/animation/KeyframeAnimations.java +++ b/net/minecraft/client/animation/KeyframeAnimations.java @@ -12,19 +12,19 @@ import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class KeyframeAnimations { - public static void animate(Model model, AnimationDefinition animationDefinition, long l, float f, Vector3f vector3f) { - float g = getElapsedSeconds(animationDefinition, l); + public static void animate(Model model, AnimationDefinition definition, long accumulatedTime, float scale, Vector3f vector) { + float f = getElapsedSeconds(definition, accumulatedTime); - for (Entry> entry : animationDefinition.boneAnimations().entrySet()) { + for (Entry> entry : definition.boneAnimations().entrySet()) { Optional optional = model.getAnyDescendantWithName((String)entry.getKey()); List list = (List)entry.getValue(); optional.ifPresent(modelPart -> list.forEach(animationChannel -> { Keyframe[] keyframes = animationChannel.keyframes(); - int i = Math.max(0, Mth.binarySearch(0, keyframes.length, ix -> g <= keyframes[ix].timestamp()) - 1); + int i = Math.max(0, Mth.binarySearch(0, keyframes.length, ix -> f <= keyframes[ix].timestamp()) - 1); int j = Math.min(keyframes.length - 1, i + 1); Keyframe keyframe = keyframes[i]; Keyframe keyframe2 = keyframes[j]; - float h = g - keyframe.timestamp(); + float h = f - keyframe.timestamp(); float k; if (j != i) { k = Mth.clamp(h / (keyframe2.timestamp() - keyframe.timestamp()), 0.0F, 1.0F); @@ -32,8 +32,8 @@ public class KeyframeAnimations { k = 0.0F; } - keyframe2.interpolation().apply(vector3f, k, keyframes, i, j, f); - animationChannel.target().apply(modelPart, vector3f); + keyframe2.interpolation().apply(vector, k, keyframes, i, j, scale); + animationChannel.target().apply(modelPart, vector); })); } } diff --git a/net/minecraft/client/animation/definitions/CreakingAnimation.java b/net/minecraft/client/animation/definitions/CreakingAnimation.java index c54feda7..99ed5e10 100644 --- a/net/minecraft/client/animation/definitions/CreakingAnimation.java +++ b/net/minecraft/client/animation/definitions/CreakingAnimation.java @@ -12,169 +12,262 @@ import net.minecraft.client.animation.AnimationDefinition.Builder; @Environment(EnvType.CLIENT) public class CreakingAnimation { - public static final AnimationDefinition CREAKING_WALK = Builder.withLength(1.5F) + public static final AnimationDefinition CREAKING_WALK = Builder.withLength(1.125F) .looping() - .addAnimation("head", new AnimationChannel(Targets.POSITION, new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR))) - .addAnimation("body", new AnimationChannel(Targets.POSITION, new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, -1.0F), Interpolations.LINEAR))) .addAnimation( - "right_arm", + "upper_body", new AnimationChannel( Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(-7.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.4167F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.9167F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0833F, KeyframeAnimations.degreeVec(-22.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR) + new Keyframe(0.0F, KeyframeAnimations.degreeVec(26.8802F, -23.399F, -9.0616F), Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.degreeVec(-2.2093F, 5.9119F, 0.0675F), Interpolations.LINEAR), + new Keyframe(0.5417F, KeyframeAnimations.degreeVec(23.0778F, 14.2906F, 4.6066F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.875F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(26.8802F, -23.399F, -9.0616F), Interpolations.LINEAR) ) ) .addAnimation( - "right_arm", - new AnimationChannel( - Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "left_arm", + "head", new AnimationChannel( Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(-22.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(17.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.4167F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.9167F, KeyframeAnimations.degreeVec(17.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0833F, KeyframeAnimations.degreeVec(30.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.degreeVec(-30.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.degreeVec(-22.5F, 0.0F, 0.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "left_arm", - new AnimationChannel( - Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "left_leg", - new AnimationChannel( - Targets.ROTATION, - new Keyframe(0.3333F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(40.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.degreeVec(60.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.8333F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(-50.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.1667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "left_leg", - new AnimationChannel( - Targets.POSITION, - new Keyframe(0.3333F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.5F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.posVec(0.0F, 0.0F, -1.0F), Interpolations.LINEAR), - new Keyframe(0.8333F, KeyframeAnimations.posVec(0.0F, 2.0F, -3.5F), Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "right_leg", - new AnimationChannel( - Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.1667F, KeyframeAnimations.degreeVec(-50.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.3333F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0417F, KeyframeAnimations.degreeVec(-17.5F, -62.5F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.4167F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.4583F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), Interpolations.LINEAR), new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.1667F, KeyframeAnimations.degreeVec(40.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.degreeVec(60.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), Interpolations.LINEAR) + new Keyframe(1.0417F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0833F, KeyframeAnimations.degreeVec(-37.1532F, 81.1131F, -28.3621F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_arm", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(12.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(-32.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.875F, KeyframeAnimations.degreeVec(12.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(-15.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_arm", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(-15.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5417F, KeyframeAnimations.degreeVec(-25.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(-9.0923F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7917F, KeyframeAnimations.degreeVec(-15.137F, -66.7758F, 13.9603F), Interpolations.LINEAR), + new Keyframe(0.8333F, KeyframeAnimations.degreeVec(-9.0923F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(-15.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_leg", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(30.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(49.8924F, -3.8282F, 3.2187F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(17.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(-56.5613F, -12.2403F, -8.7374F), Interpolations.LINEAR), + new Keyframe(0.9167F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_leg", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.1846F, 0.5979F), Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.posVec(0.0F, -0.0665F, -2.2177F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 1.3563F, -4.3474F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.posVec(0.0F, 0.1047F, -1.6556F), Interpolations.LINEAR), + new Keyframe(0.9167F, KeyframeAnimations.posVec(0.0F, 0.0F, -1.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_leg", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(25.5305F, 11.3125F, 5.3525F), Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.degreeVec(-49.5628F, 7.3556F, 6.7933F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.4583F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.9167F, KeyframeAnimations.degreeVec(30.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0417F, KeyframeAnimations.degreeVec(55.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(25.5305F, 11.3125F, 5.3525F), Interpolations.LINEAR) ) ) .addAnimation( "right_leg", new AnimationChannel( Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 2.0F, -3.5F), Interpolations.LINEAR), - new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.3333F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 2.0F), Interpolations.LINEAR), - new Keyframe(1.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.5F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.posVec(0.0F, 0.0F, -1.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.posVec(0.0F, 2.0F, -3.5F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "upper_body", - new AnimationChannel( - Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(-7.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.8333F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0833F, KeyframeAnimations.degreeVec(-7.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), Interpolations.LINEAR) - ) - ) - .addAnimation( - "upper_body", - new AnimationChannel( - Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), Interpolations.LINEAR), - new Keyframe(0.6667F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), Interpolations.LINEAR), - new Keyframe(0.8333F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(1.0833F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), Interpolations.LINEAR), - new Keyframe(1.3333F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), Interpolations.LINEAR), - new Keyframe(1.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.9674F, -3.6578F), Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.posVec(0.0F, -0.2979F, -0.9411F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, -0.3F, -0.94F), Interpolations.LINEAR), + new Keyframe(0.4583F, KeyframeAnimations.posVec(0.0F, -0.3F, 1.06F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.posVec(0.0F, 0.9674F, -3.6578F), Interpolations.LINEAR) ) ) .build(); - public static final AnimationDefinition CREAKING_ATTACK = Builder.withLength(0.375F) + public static final AnimationDefinition CREAKING_ATTACK = Builder.withLength(0.7083F) + .looping() + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(0.0F, 45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(-115.0F, 67.5F, -90.0F), Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(67.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5417F, KeyframeAnimations.degreeVec(0.0F, 45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.posVec(0.0F, -2.7716F, -1.1481F), Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5417F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.SCALE, + new Keyframe(0.0F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR) + ) + ) + .addAnimation( + "head", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(-11.25F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.degreeVec(-117.3939F, 76.6331F, -130.1483F), Interpolations.LINEAR), + new Keyframe(0.4167F, KeyframeAnimations.degreeVec(-45.0F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(60.0F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5833F, KeyframeAnimations.degreeVec(60.0F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, -45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "head", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.4167F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.posVec(0.3827F, 0.5133F, -0.7682F), Interpolations.LINEAR), + new Keyframe(0.5833F, KeyframeAnimations.posVec(0.3827F, 0.5133F, -0.7682F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "head", + new AnimationChannel( + Targets.SCALE, + new Keyframe(0.1667F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR), + new Keyframe(0.4167F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.scaleVec(1.0, 1.3F, 1.0), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR) + ) + ) .addAnimation( "right_arm", new AnimationChannel( Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(21.1693F, 37.7555F, 122.3122F), Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(-60.349F, -31.3213F, -16.4846F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(-54.3924F, -22.7992F, -27.3049F), Interpolations.LINEAR), - new Keyframe(0.2917F, KeyframeAnimations.degreeVec(-53.0231F, -26.8304F, -30.5649F), Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.4583F, KeyframeAnimations.degreeVec(55.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_arm", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_leg", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_leg", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_leg", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, 45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, 45.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_leg", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.7071F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.posVec(0.7071F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) ) ) .addAnimation( "left_arm", new AnimationChannel( Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(15.0F, 0.0F, -10.0F), Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(22.4229F, 1.9113F, -14.6211F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(38.9206F, -9.562F, -4.6084F), Interpolations.LINEAR), - new Keyframe(0.2917F, KeyframeAnimations.degreeVec(51.4206F, -9.562F, -4.6084F), Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(10.3453F, 14.7669F, 2.664F), Interpolations.LINEAR), + new Keyframe(0.4583F, KeyframeAnimations.degreeVec(57.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) ) ) .addAnimation( - "upper_body", + "left_arm", new AnimationChannel( - Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(-12.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(11.1575F, 0.2125F, -2.2036F), Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.2917F, KeyframeAnimations.degreeVec(25.0F, 0.0F, 0.0F), Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) ) ) .build(); @@ -235,4 +328,112 @@ public class CreakingAnimation { ) ) .build(); + public static final AnimationDefinition CREAKING_DEATH = Builder.withLength(2.25F) + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(-40.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(-5.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5833F, KeyframeAnimations.degreeVec(16.25F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.6667F, KeyframeAnimations.degreeVec(29.0814F, 62.5516F, 26.5771F), Interpolations.LINEAR), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(12.2115F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(10.25F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0417F, KeyframeAnimations.degreeVec(-47.64F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.125F, KeyframeAnimations.degreeVec(21.96F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.25F, KeyframeAnimations.degreeVec(12.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(2.25F, KeyframeAnimations.degreeVec(17.3266F, 7.9022F, -0.1381F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.posVec(0.0F, 0.557F, 1.2659F), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, -2.0889F, -0.3493F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "upper_body", + new AnimationChannel( + Targets.SCALE, + new Keyframe(0.0F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.scaleVec(1.0, 1.1F, 1.0), Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.scaleVec(1.0, 0.9F, 1.0), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.scaleVec(1.0, 1.0, 1.0), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_arm", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.25F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.5417F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.5833F, KeyframeAnimations.degreeVec(-12.1479F, -34.3927F, 6.9326F), Interpolations.LINEAR), + new Keyframe(1.6667F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "right_arm", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_arm", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.8333F, KeyframeAnimations.degreeVec(-4.4444F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.875F, KeyframeAnimations.degreeVec(-26.7402F, -78.831F, 26.3025F), Interpolations.LINEAR), + new Keyframe(0.9583F, KeyframeAnimations.degreeVec(-5.5556F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.25F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "left_arm", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "head", + new AnimationChannel( + Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(-5.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(2.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5417F, KeyframeAnimations.degreeVec(5.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.5833F, KeyframeAnimations.degreeVec(-67.4168F, -12.9552F, -8.0231F), Interpolations.LINEAR), + new Keyframe(0.6667F, KeyframeAnimations.degreeVec(8.5F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(10.773F, -29.5608F, -5.3627F), Interpolations.LINEAR), + new Keyframe(1.25F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.7917F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(1.8333F, KeyframeAnimations.degreeVec(12.9625F, 39.2735F, 8.2901F), Interpolations.LINEAR), + new Keyframe(1.9167F, KeyframeAnimations.degreeVec(10.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .addAnimation( + "head", + new AnimationChannel( + Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR), + new Keyframe(0.2917F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), Interpolations.LINEAR) + ) + ) + .build(); } diff --git a/net/minecraft/client/color/block/BlockColors.java b/net/minecraft/client/color/block/BlockColors.java index 9c9ed41b..5784a3eb 100644 --- a/net/minecraft/client/color/block/BlockColors.java +++ b/net/minecraft/client/color/block/BlockColors.java @@ -12,7 +12,6 @@ import net.minecraft.core.IdMapper; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.util.ARGB; import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.FoliageColor; import net.minecraft.world.level.GrassColor; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; @@ -29,6 +28,8 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class BlockColors { private static final int DEFAULT = -1; + public static final int LILY_PAD_IN_WORLD = -14647248; + public static final int LILY_PAD_DEFAULT = -9321636; private final IdMapper blockColors = new IdMapper<>(32); private final Map>> coloringStates = Maps.>>newHashMap(); @@ -49,7 +50,8 @@ public class BlockColors { Blocks.GRASS_BLOCK, Blocks.FERN, Blocks.SHORT_GRASS, - Blocks.POTTED_FERN + Blocks.POTTED_FERN, + Blocks.BUSH ); blockColors.register((blockState, blockAndTintGetter, blockPos, i) -> { if (i != 0) { @@ -57,13 +59,13 @@ public class BlockColors { } else { return -1; } - }, Blocks.PINK_PETALS); - blockColors.register((blockState, blockAndTintGetter, blockPos, i) -> FoliageColor.getEvergreenColor(), Blocks.SPRUCE_LEAVES); - blockColors.register((blockState, blockAndTintGetter, blockPos, i) -> FoliageColor.getBirchColor(), Blocks.BIRCH_LEAVES); + }, Blocks.PINK_PETALS, Blocks.WILDFLOWERS); + blockColors.register((blockState, blockAndTintGetter, blockPos, i) -> -10380959, Blocks.SPRUCE_LEAVES); + blockColors.register((blockState, blockAndTintGetter, blockPos, i) -> -8345771, Blocks.BIRCH_LEAVES); blockColors.register( (blockState, blockAndTintGetter, blockPos, i) -> blockAndTintGetter != null && blockPos != null ? BiomeColors.getAverageFoliageColor(blockAndTintGetter, blockPos) - : FoliageColor.getDefaultColor(), + : -12012264, Blocks.OAK_LEAVES, Blocks.JUNGLE_LEAVES, Blocks.ACACIA_LEAVES, @@ -71,6 +73,12 @@ public class BlockColors { Blocks.VINE, Blocks.MANGROVE_LEAVES ); + blockColors.register( + (blockState, blockAndTintGetter, blockPos, i) -> blockAndTintGetter != null && blockPos != null + ? BiomeColors.getAverageDryFoliageColor(blockAndTintGetter, blockPos) + : -10732494, + Blocks.LEAF_LITTER + ); blockColors.register( (blockState, blockAndTintGetter, blockPos, i) -> blockAndTintGetter != null && blockPos != null ? BiomeColors.getAverageWaterColor(blockAndTintGetter, blockPos) diff --git a/net/minecraft/client/color/item/Constant.java b/net/minecraft/client/color/item/Constant.java new file mode 100644 index 00000000..17f79d80 --- /dev/null +++ b/net/minecraft/client/color/item/Constant.java @@ -0,0 +1,34 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Constant(int value) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("value").forGetter(Constant::value)).apply(instance, Constant::new) + ); + + public Constant(int value) { + value = ARGB.opaque(value); + this.value = value; + } + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + return this.value; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/CustomModelDataSource.java b/net/minecraft/client/color/item/CustomModelDataSource.java new file mode 100644 index 00000000..a68a01a5 --- /dev/null +++ b/net/minecraft/client/color/item/CustomModelDataSource.java @@ -0,0 +1,43 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.CustomModelData; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record CustomModelDataSource(int index, int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ExtraCodecs.NON_NEGATIVE_INT.optionalFieldOf("index", 0).forGetter(CustomModelDataSource::index), + ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(CustomModelDataSource::defaultColor) + ) + .apply(instance, CustomModelDataSource::new) + ); + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + CustomModelData customModelData = stack.get(DataComponents.CUSTOM_MODEL_DATA); + if (customModelData != null) { + Integer integer = customModelData.getColor(this.index); + if (integer != null) { + return ARGB.opaque(integer); + } + } + + return ARGB.opaque(this.defaultColor); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/Dye.java b/net/minecraft/client/color/item/Dye.java new file mode 100644 index 00000000..ed5ef548 --- /dev/null +++ b/net/minecraft/client/color/item/Dye.java @@ -0,0 +1,29 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.DyedItemColor; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Dye(int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(Dye::defaultColor)).apply(instance, Dye::new) + ); + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + return DyedItemColor.getOrDefault(stack, this.defaultColor); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/Firework.java b/net/minecraft/client/color/item/Firework.java new file mode 100644 index 00000000..585b02b8 --- /dev/null +++ b/net/minecraft/client/color/item/Firework.java @@ -0,0 +1,56 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import it.unimi.dsi.fastutil.ints.IntList; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.FireworkExplosion; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Firework(int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(Firework::defaultColor)).apply(instance, Firework::new) + ); + + public Firework() { + this(-7697782); + } + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + FireworkExplosion fireworkExplosion = stack.get(DataComponents.FIREWORK_EXPLOSION); + IntList intList = fireworkExplosion != null ? fireworkExplosion.colors() : IntList.of(); + int i = intList.size(); + if (i == 0) { + return this.defaultColor; + } else if (i == 1) { + return ARGB.opaque(intList.getInt(0)); + } else { + int j = 0; + int k = 0; + int l = 0; + + for (int m = 0; m < i; m++) { + int n = intList.getInt(m); + j += ARGB.red(n); + k += ARGB.green(n); + l += ARGB.blue(n); + } + + return ARGB.color(j / i, k / i, l / i); + } + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/GrassColorSource.java b/net/minecraft/client/color/item/GrassColorSource.java new file mode 100644 index 00000000..c1645093 --- /dev/null +++ b/net/minecraft/client/color/item/GrassColorSource.java @@ -0,0 +1,37 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.GrassColor; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record GrassColorSource(float temperature, float downfall) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ExtraCodecs.floatRange(0.0F, 1.0F).fieldOf("temperature").forGetter(GrassColorSource::temperature), + ExtraCodecs.floatRange(0.0F, 1.0F).fieldOf("downfall").forGetter(GrassColorSource::downfall) + ) + .apply(instance, GrassColorSource::new) + ); + + public GrassColorSource() { + this(0.5F, 1.0F); + } + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + return GrassColor.get(this.temperature, this.downfall); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/ItemColor.java b/net/minecraft/client/color/item/ItemColor.java deleted file mode 100644 index e31a8476..00000000 --- a/net/minecraft/client/color/item/ItemColor.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.minecraft.client.color.item; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.world.item.ItemStack; - -@Environment(EnvType.CLIENT) -public interface ItemColor { - int getColor(ItemStack itemStack, int i); -} diff --git a/net/minecraft/client/color/item/ItemColors.java b/net/minecraft/client/color/item/ItemColors.java deleted file mode 100644 index 0872701f..00000000 --- a/net/minecraft/client/color/item/ItemColors.java +++ /dev/null @@ -1,116 +0,0 @@ -package net.minecraft.client.color.item; - -import it.unimi.dsi.fastutil.ints.IntList; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.color.block.BlockColors; -import net.minecraft.core.IdMapper; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.util.ARGB; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.SpawnEggItem; -import net.minecraft.world.item.alchemy.PotionContents; -import net.minecraft.world.item.component.DyedItemColor; -import net.minecraft.world.item.component.FireworkExplosion; -import net.minecraft.world.item.component.MapItemColor; -import net.minecraft.world.level.FoliageColor; -import net.minecraft.world.level.GrassColor; -import net.minecraft.world.level.ItemLike; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.state.BlockState; - -@Environment(EnvType.CLIENT) -public class ItemColors { - private static final int DEFAULT = -1; - private final IdMapper itemColors = new IdMapper<>(32); - - public static ItemColors createDefault(BlockColors colors) { - ItemColors itemColors = new ItemColors(); - itemColors.register( - (itemStack, i) -> i > 0 ? -1 : DyedItemColor.getOrDefault(itemStack, -6265536), - Items.LEATHER_HELMET, - Items.LEATHER_CHESTPLATE, - Items.LEATHER_LEGGINGS, - Items.LEATHER_BOOTS, - Items.LEATHER_HORSE_ARMOR - ); - itemColors.register((itemStack, i) -> i != 1 ? -1 : DyedItemColor.getOrDefault(itemStack, 0), Items.WOLF_ARMOR); - itemColors.register((itemStack, i) -> GrassColor.get(0.5, 1.0), Blocks.TALL_GRASS, Blocks.LARGE_FERN); - itemColors.register((itemStack, i) -> { - if (i != 1) { - return -1; - } else { - FireworkExplosion fireworkExplosion = itemStack.get(DataComponents.FIREWORK_EXPLOSION); - IntList intList = fireworkExplosion != null ? fireworkExplosion.colors() : IntList.of(); - int j = intList.size(); - if (j == 0) { - return -7697782; - } else if (j == 1) { - return ARGB.opaque(intList.getInt(0)); - } else { - int k = 0; - int l = 0; - int m = 0; - - for (int n = 0; n < j; n++) { - int o = intList.getInt(n); - k += ARGB.red(o); - l += ARGB.green(o); - m += ARGB.blue(o); - } - - return ARGB.color(k / j, l / j, m / j); - } - } - }, Items.FIREWORK_STAR); - itemColors.register( - (itemStack, i) -> i > 0 ? -1 : ARGB.opaque(itemStack.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).getColor()), - Items.POTION, - Items.SPLASH_POTION, - Items.LINGERING_POTION, - Items.TIPPED_ARROW - ); - - for (SpawnEggItem spawnEggItem : SpawnEggItem.eggs()) { - itemColors.register((itemStack, i) -> ARGB.opaque(spawnEggItem.getColor(i)), spawnEggItem); - } - - itemColors.register( - (itemStack, i) -> { - BlockState blockState = ((BlockItem)itemStack.getItem()).getBlock().defaultBlockState(); - return colors.getColor(blockState, null, null, i); - }, - Blocks.GRASS_BLOCK, - Blocks.SHORT_GRASS, - Blocks.FERN, - Blocks.VINE, - Blocks.OAK_LEAVES, - Blocks.SPRUCE_LEAVES, - Blocks.BIRCH_LEAVES, - Blocks.JUNGLE_LEAVES, - Blocks.ACACIA_LEAVES, - Blocks.DARK_OAK_LEAVES, - Blocks.LILY_PAD - ); - itemColors.register((itemStack, i) -> FoliageColor.getMangroveColor(), Blocks.MANGROVE_LEAVES); - itemColors.register( - (itemStack, i) -> i == 0 ? -1 : ARGB.opaque(itemStack.getOrDefault(DataComponents.MAP_COLOR, MapItemColor.DEFAULT).rgb()), Items.FILLED_MAP - ); - return itemColors; - } - - public int getColor(ItemStack stack, int tintIndex) { - ItemColor itemColor = this.itemColors.byId(BuiltInRegistries.ITEM.getId(stack.getItem())); - return itemColor == null ? -1 : itemColor.getColor(stack, tintIndex); - } - - public void register(ItemColor itemColor, ItemLike... items) { - for (ItemLike itemLike : items) { - this.itemColors.addMapping(itemColor, Item.getId(itemLike.asItem())); - } - } -} diff --git a/net/minecraft/client/color/item/ItemTintSource.java b/net/minecraft/client/color/item/ItemTintSource.java new file mode 100644 index 00000000..c9b8a72f --- /dev/null +++ b/net/minecraft/client/color/item/ItemTintSource.java @@ -0,0 +1,16 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface ItemTintSource { + int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity); + + MapCodec type(); +} diff --git a/net/minecraft/client/color/item/ItemTintSources.java b/net/minecraft/client/color/item/ItemTintSources.java new file mode 100644 index 00000000..8bc3c455 --- /dev/null +++ b/net/minecraft/client/color/item/ItemTintSources.java @@ -0,0 +1,25 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; + +@Environment(EnvType.CLIENT) +public class ItemTintSources { + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final Codec CODEC = ID_MAPPER.codec(ResourceLocation.CODEC).dispatch(ItemTintSource::type, mapCodec -> mapCodec); + + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("custom_model_data"), CustomModelDataSource.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("constant"), Constant.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("dye"), Dye.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("grass"), GrassColorSource.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("firework"), Firework.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("potion"), Potion.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("map_color"), MapColor.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("team"), TeamColor.MAP_CODEC); + } +} diff --git a/net/minecraft/client/color/item/MapColor.java b/net/minecraft/client/color/item/MapColor.java new file mode 100644 index 00000000..338c2410 --- /dev/null +++ b/net/minecraft/client/color/item/MapColor.java @@ -0,0 +1,36 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.MapItemColor; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record MapColor(int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(MapColor::defaultColor)).apply(instance, MapColor::new) + ); + + public MapColor() { + this(MapItemColor.DEFAULT.rgb()); + } + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + MapItemColor mapItemColor = stack.get(DataComponents.MAP_COLOR); + return mapItemColor != null ? ARGB.opaque(mapItemColor.rgb()) : ARGB.opaque(this.defaultColor); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/Potion.java b/net/minecraft/client/color/item/Potion.java new file mode 100644 index 00000000..061453e0 --- /dev/null +++ b/net/minecraft/client/color/item/Potion.java @@ -0,0 +1,36 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.alchemy.PotionContents; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Potion(int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(Potion::defaultColor)).apply(instance, Potion::new) + ); + + public Potion() { + this(-13083194); + } + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + PotionContents potionContents = stack.get(DataComponents.POTION_CONTENTS); + return potionContents != null ? ARGB.opaque(potionContents.getColorOr(this.defaultColor)) : ARGB.opaque(this.defaultColor); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/color/item/TeamColor.java b/net/minecraft/client/color/item/TeamColor.java new file mode 100644 index 00000000..7354a86f --- /dev/null +++ b/net/minecraft/client/color/item/TeamColor.java @@ -0,0 +1,41 @@ +package net.minecraft.client.color.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.ARGB; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.scores.Team; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record TeamColor(int defaultColor) implements ItemTintSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.fieldOf("default").forGetter(TeamColor::defaultColor)).apply(instance, TeamColor::new) + ); + + @Override + public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { + if (entity != null) { + Team team = entity.getTeam(); + if (team != null) { + ChatFormatting chatFormatting = team.getColor(); + if (chatFormatting.getColor() != null) { + return ARGB.opaque(chatFormatting.getColor()); + } + } + } + + return ARGB.opaque(this.defaultColor); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/data/AtlasProvider.java b/net/minecraft/client/data/AtlasProvider.java new file mode 100644 index 00000000..5ebf7754 --- /dev/null +++ b/net/minecraft/client/data/AtlasProvider.java @@ -0,0 +1,174 @@ +package net.minecraft.client.data; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.data.models.ItemModelGenerators; +import net.minecraft.client.renderer.MaterialMapper; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.BellRenderer; +import net.minecraft.client.renderer.blockentity.ConduitRenderer; +import net.minecraft.client.renderer.blockentity.EnchantTableRenderer; +import net.minecraft.client.renderer.texture.atlas.SpriteSource; +import net.minecraft.client.renderer.texture.atlas.SpriteSources; +import net.minecraft.client.renderer.texture.atlas.sources.DirectoryLister; +import net.minecraft.client.renderer.texture.atlas.sources.PalettedPermutations; +import net.minecraft.client.renderer.texture.atlas.sources.SingleFile; +import net.minecraft.client.resources.model.AtlasIds; +import net.minecraft.client.resources.model.EquipmentClientInfo; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.DataProvider; +import net.minecraft.data.PackOutput; +import net.minecraft.data.PackOutput.PathProvider; +import net.minecraft.data.PackOutput.Target; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.equipment.trim.MaterialAssetGroup; +import net.minecraft.world.item.equipment.trim.TrimPattern; +import net.minecraft.world.item.equipment.trim.TrimPatterns; + +@Environment(EnvType.CLIENT) +public class AtlasProvider implements DataProvider { + private static final ResourceLocation TRIM_PALETTE_KEY = ResourceLocation.withDefaultNamespace("trims/color_palettes/trim_palette"); + private static final Map TRIM_PALETTE_VALUES = (Map)extractAllMaterialAssets() + .collect( + Collectors.toMap(MaterialAssetGroup.AssetInfo::suffix, assetInfo -> ResourceLocation.withDefaultNamespace("trims/color_palettes/" + assetInfo.suffix())) + ); + private static final List> VANILLA_PATTERNS = List.of( + TrimPatterns.SENTRY, + TrimPatterns.DUNE, + TrimPatterns.COAST, + TrimPatterns.WILD, + TrimPatterns.WARD, + TrimPatterns.EYE, + TrimPatterns.VEX, + TrimPatterns.TIDE, + TrimPatterns.SNOUT, + TrimPatterns.RIB, + TrimPatterns.SPIRE, + TrimPatterns.WAYFINDER, + TrimPatterns.SHAPER, + TrimPatterns.SILENCE, + TrimPatterns.RAISER, + TrimPatterns.HOST, + TrimPatterns.FLOW, + TrimPatterns.BOLT + ); + private static final List HUMANOID_LAYERS = List.of( + EquipmentClientInfo.LayerType.HUMANOID, EquipmentClientInfo.LayerType.HUMANOID_LEGGINGS + ); + private final PathProvider pathProvider; + + public AtlasProvider(PackOutput output) { + this.pathProvider = output.createPathProvider(Target.RESOURCE_PACK, "atlases"); + } + + private static List patternTextures() { + List list = new ArrayList(VANILLA_PATTERNS.size() * HUMANOID_LAYERS.size()); + + for (ResourceKey resourceKey : VANILLA_PATTERNS) { + ResourceLocation resourceLocation = TrimPatterns.defaultAssetId(resourceKey); + + for (EquipmentClientInfo.LayerType layerType : HUMANOID_LAYERS) { + list.add(resourceLocation.withPath((UnaryOperator)(string -> layerType.trimAssetPrefix() + "/" + string))); + } + } + + return list; + } + + private static SpriteSource forMaterial(Material material) { + return new SingleFile(material.texture()); + } + + private static SpriteSource forMapper(MaterialMapper mapper) { + return new DirectoryLister(mapper.prefix(), mapper.prefix() + "/"); + } + + private static List simpleMapper(MaterialMapper mapper) { + return List.of(forMapper(mapper)); + } + + private static List noPrefixMapper(String path) { + return List.of(new DirectoryLister(path, "")); + } + + private static Stream extractAllMaterialAssets() { + return ItemModelGenerators.TRIM_MATERIAL_MODELS + .stream() + .map(ItemModelGenerators.TrimMaterialData::assets) + .flatMap(materialAssetGroup -> Stream.concat(Stream.of(materialAssetGroup.base()), materialAssetGroup.overrides().values().stream())) + .sorted(Comparator.comparing(MaterialAssetGroup.AssetInfo::suffix)); + } + + private static List armorTrims() { + return List.of(new PalettedPermutations(patternTextures(), TRIM_PALETTE_KEY, TRIM_PALETTE_VALUES)); + } + + private static List blocksList() { + return List.of( + forMapper(Sheets.BLOCKS_MAPPER), + forMapper(Sheets.ITEMS_MAPPER), + forMapper(ConduitRenderer.MAPPER), + forMaterial(BellRenderer.BELL_RESOURCE_LOCATION), + forMaterial(Sheets.DECORATED_POT_SIDE), + forMaterial(EnchantTableRenderer.BOOK_LOCATION), + new PalettedPermutations( + List.of( + ItemModelGenerators.TRIM_PREFIX_HELMET, + ItemModelGenerators.TRIM_PREFIX_CHESTPLATE, + ItemModelGenerators.TRIM_PREFIX_LEGGINGS, + ItemModelGenerators.TRIM_PREFIX_BOOTS + ), + TRIM_PALETTE_KEY, + TRIM_PALETTE_VALUES + ) + ); + } + + private static List bannerPatterns() { + return List.of(forMaterial(ModelBakery.BANNER_BASE), forMapper(Sheets.BANNER_MAPPER)); + } + + private static List shieldPatterns() { + return List.of(forMaterial(ModelBakery.SHIELD_BASE), forMaterial(ModelBakery.NO_PATTERN_SHIELD), forMapper(Sheets.SHIELD_MAPPER)); + } + + @Override + public CompletableFuture run(CachedOutput output) { + return CompletableFuture.allOf( + this.storeAtlas(output, AtlasIds.ARMOR_TRIMS, armorTrims()), + this.storeAtlas(output, AtlasIds.BANNER_PATTERNS, bannerPatterns()), + this.storeAtlas(output, AtlasIds.BEDS, simpleMapper(Sheets.BED_MAPPER)), + this.storeAtlas(output, AtlasIds.BLOCKS, blocksList()), + this.storeAtlas(output, AtlasIds.CHESTS, simpleMapper(Sheets.CHEST_MAPPER)), + this.storeAtlas(output, AtlasIds.DECORATED_POT, simpleMapper(Sheets.DECORATED_POT_MAPPER)), + this.storeAtlas(output, AtlasIds.GUI, noPrefixMapper("gui/sprites")), + this.storeAtlas(output, AtlasIds.MAP_DECORATIONS, noPrefixMapper("map/decorations")), + this.storeAtlas(output, AtlasIds.MOB_EFFECTS, noPrefixMapper("mob_effect")), + this.storeAtlas(output, AtlasIds.PAINTINGS, noPrefixMapper("painting")), + this.storeAtlas(output, AtlasIds.PARTICLES, noPrefixMapper("particle")), + this.storeAtlas(output, AtlasIds.SHIELD_PATTERNS, shieldPatterns()), + this.storeAtlas(output, AtlasIds.SHULKER_BOXES, simpleMapper(Sheets.SHULKER_MAPPER)), + this.storeAtlas(output, AtlasIds.SIGNS, simpleMapper(Sheets.SIGN_MAPPER)) + ); + } + + private CompletableFuture storeAtlas(CachedOutput output, ResourceLocation atlasId, List sources) { + return DataProvider.saveStable(output, SpriteSources.FILE_CODEC, sources, this.pathProvider.json(atlasId)); + } + + @Override + public String getName() { + return "Atlas Definitions"; + } +} diff --git a/net/minecraft/client/data/Main.java b/net/minecraft/client/data/Main.java new file mode 100644 index 00000000..7ef7ed80 --- /dev/null +++ b/net/minecraft/client/data/Main.java @@ -0,0 +1,55 @@ +package net.minecraft.client.data; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import joptsimple.OptionParser; +import joptsimple.OptionSet; +import joptsimple.OptionSpec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.SharedConstants; +import net.minecraft.SuppressForbidden; +import net.minecraft.client.ClientBootstrap; +import net.minecraft.client.data.models.EquipmentAssetProvider; +import net.minecraft.client.data.models.ModelProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.DataGenerator.PackGenerator; +import net.minecraft.obfuscate.DontObfuscate; +import net.minecraft.server.Bootstrap; + +@Environment(EnvType.CLIENT) +public class Main { + @DontObfuscate + @SuppressForbidden( + reason = "System.out needed before bootstrap" + ) + public static void main(String[] strings) throws IOException { + SharedConstants.tryDetectVersion(); + OptionParser optionParser = new OptionParser(); + OptionSpec optionSpec = optionParser.accepts("help", "Show the help menu").forHelp(); + OptionSpec optionSpec2 = optionParser.accepts("client", "Include client generators"); + OptionSpec optionSpec3 = optionParser.accepts("all", "Include all generators"); + OptionSpec optionSpec4 = optionParser.accepts("output", "Output folder").withRequiredArg().defaultsTo("generated"); + OptionSet optionSet = optionParser.parse(strings); + if (!optionSet.has(optionSpec) && optionSet.hasOptions()) { + Path path = Paths.get(optionSpec4.value(optionSet)); + boolean bl = optionSet.has(optionSpec3); + boolean bl2 = bl || optionSet.has(optionSpec2); + Bootstrap.bootStrap(); + ClientBootstrap.bootstrap(); + DataGenerator dataGenerator = new DataGenerator(path, SharedConstants.getCurrentVersion(), true); + addClientProviders(dataGenerator, bl2); + dataGenerator.run(); + } else { + optionParser.printHelpOn(System.out); + } + } + + public static void addClientProviders(DataGenerator dataGenerator, boolean toRun) { + PackGenerator packGenerator = dataGenerator.getVanillaPack(toRun); + packGenerator.addProvider(ModelProvider::new); + packGenerator.addProvider(EquipmentAssetProvider::new); + packGenerator.addProvider(AtlasProvider::new); + } +} diff --git a/net/minecraft/client/data/models/BlockModelGenerators.java b/net/minecraft/client/data/models/BlockModelGenerators.java new file mode 100644 index 00000000..ae315175 --- /dev/null +++ b/net/minecraft/client/data/models/BlockModelGenerators.java @@ -0,0 +1,4229 @@ +package net.minecraft.client.data.models; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; +import com.mojang.datafixers.util.Pair; +import com.mojang.math.Quadrant; +import it.unimi.dsi.fastutil.ints.Int2ObjectFunction; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.item.GrassColorSource; +import net.minecraft.client.color.item.ItemTintSource; +import net.minecraft.client.data.models.blockstates.BlockModelDefinitionGenerator; +import net.minecraft.client.data.models.blockstates.ConditionBuilder; +import net.minecraft.client.data.models.blockstates.MultiPartGenerator; +import net.minecraft.client.data.models.blockstates.MultiVariantGenerator; +import net.minecraft.client.data.models.blockstates.PropertyDispatch; +import net.minecraft.client.data.models.model.ItemModelUtils; +import net.minecraft.client.data.models.model.ModelInstance; +import net.minecraft.client.data.models.model.ModelLocationUtils; +import net.minecraft.client.data.models.model.ModelTemplate; +import net.minecraft.client.data.models.model.ModelTemplates; +import net.minecraft.client.data.models.model.TextureMapping; +import net.minecraft.client.data.models.model.TextureSlot; +import net.minecraft.client.data.models.model.TexturedModel; +import net.minecraft.client.renderer.block.model.VariantMutator; +import net.minecraft.client.renderer.block.model.multipart.CombinedCondition; +import net.minecraft.client.renderer.block.model.multipart.Condition; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.client.renderer.special.BedSpecialRenderer; +import net.minecraft.client.renderer.special.ChestSpecialRenderer; +import net.minecraft.client.renderer.special.ShulkerBoxSpecialRenderer; +import net.minecraft.client.renderer.special.SkullSpecialRenderer.Unbaked; +import net.minecraft.core.Direction; +import net.minecraft.core.FrontAndTop; +import net.minecraft.data.BlockFamilies; +import net.minecraft.data.BlockFamily; +import net.minecraft.data.BlockFamily.Variant; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.random.Weighted; +import net.minecraft.util.random.WeightedList; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.BeehiveBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.CrafterBlock; +import net.minecraft.world.level.block.CreakingHeartBlock; +import net.minecraft.world.level.block.HangingMossBlock; +import net.minecraft.world.level.block.LayeredCauldronBlock; +import net.minecraft.world.level.block.LightBlock; +import net.minecraft.world.level.block.MangrovePropaguleBlock; +import net.minecraft.world.level.block.MossyCarpetBlock; +import net.minecraft.world.level.block.MultifaceBlock; +import net.minecraft.world.level.block.PitcherCropBlock; +import net.minecraft.world.level.block.SkullBlock; +import net.minecraft.world.level.block.SnifferEggBlock; +import net.minecraft.world.level.block.TestBlock; +import net.minecraft.world.level.block.VaultBlock; +import net.minecraft.world.level.block.state.StateHolder; +import net.minecraft.world.level.block.state.properties.AttachFace; +import net.minecraft.world.level.block.state.properties.BambooLeaves; +import net.minecraft.world.level.block.state.properties.BellAttachType; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.ComparatorMode; +import net.minecraft.world.level.block.state.properties.CreakingHeartState; +import net.minecraft.world.level.block.state.properties.DoorHingeSide; +import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; +import net.minecraft.world.level.block.state.properties.DripstoneThickness; +import net.minecraft.world.level.block.state.properties.Half; +import net.minecraft.world.level.block.state.properties.PistonType; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.level.block.state.properties.RailShape; +import net.minecraft.world.level.block.state.properties.RedstoneSide; +import net.minecraft.world.level.block.state.properties.SculkSensorPhase; +import net.minecraft.world.level.block.state.properties.SlabType; +import net.minecraft.world.level.block.state.properties.StairsShape; +import net.minecraft.world.level.block.state.properties.TestBlockMode; +import net.minecraft.world.level.block.state.properties.Tilt; +import net.minecraft.world.level.block.state.properties.WallSide; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class BlockModelGenerators { + final Consumer blockStateOutput; + final ItemModelOutput itemModelOutput; + final BiConsumer modelOutput; + static final List NON_ORIENTABLE_TRAPDOOR = List.of(Blocks.OAK_TRAPDOOR, Blocks.DARK_OAK_TRAPDOOR, Blocks.IRON_TRAPDOOR); + public static final VariantMutator NOP = variant -> variant; + public static final VariantMutator UV_LOCK = VariantMutator.UV_LOCK.withValue(true); + public static final VariantMutator X_ROT_90 = VariantMutator.X_ROT.withValue(Quadrant.R90); + public static final VariantMutator X_ROT_180 = VariantMutator.X_ROT.withValue(Quadrant.R180); + public static final VariantMutator X_ROT_270 = VariantMutator.X_ROT.withValue(Quadrant.R270); + public static final VariantMutator Y_ROT_90 = VariantMutator.Y_ROT.withValue(Quadrant.R90); + public static final VariantMutator Y_ROT_180 = VariantMutator.Y_ROT.withValue(Quadrant.R180); + public static final VariantMutator Y_ROT_270 = VariantMutator.Y_ROT.withValue(Quadrant.R270); + private static final Function FLOWER_BED_MODEL_1_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder; + private static final Function FLOWER_BED_MODEL_2_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.FLOWER_AMOUNT, 2, 3, 4 + ); + private static final Function FLOWER_BED_MODEL_3_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.FLOWER_AMOUNT, 3, 4 + ); + private static final Function FLOWER_BED_MODEL_4_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.FLOWER_AMOUNT, 4 + ); + private static final Function LEAF_LITTER_MODEL_1_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.SEGMENT_AMOUNT, 1 + ); + private static final Function LEAF_LITTER_MODEL_2_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.SEGMENT_AMOUNT, 2, 3 + ); + private static final Function LEAF_LITTER_MODEL_3_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.SEGMENT_AMOUNT, 3 + ); + private static final Function LEAF_LITTER_MODEL_4_SEGMENT_CONDITION = conditionBuilder -> conditionBuilder.term( + BlockStateProperties.SEGMENT_AMOUNT, 4 + ); + static final Map FULL_BLOCK_MODEL_CUSTOM_GENERATORS = Map.of( + Blocks.STONE, + BlockModelGenerators::createMirroredCubeGenerator, + Blocks.DEEPSLATE, + BlockModelGenerators::createMirroredColumnGenerator, + Blocks.MUD_BRICKS, + BlockModelGenerators::createNorthWestMirroredCubeGenerator + ); + private static final PropertyDispatch ROTATION_FACING = PropertyDispatch.modify(BlockStateProperties.FACING) + .select(Direction.DOWN, X_ROT_90) + .select(Direction.UP, X_ROT_270) + .select(Direction.NORTH, NOP) + .select(Direction.SOUTH, Y_ROT_180) + .select(Direction.WEST, Y_ROT_270) + .select(Direction.EAST, Y_ROT_90); + private static final PropertyDispatch ROTATIONS_COLUMN_WITH_FACING = PropertyDispatch.modify(BlockStateProperties.FACING) + .select(Direction.DOWN, X_ROT_180) + .select(Direction.UP, NOP) + .select(Direction.NORTH, X_ROT_90) + .select(Direction.SOUTH, X_ROT_90.then(Y_ROT_180)) + .select(Direction.WEST, X_ROT_90.then(Y_ROT_270)) + .select(Direction.EAST, X_ROT_90.then(Y_ROT_90)); + private static final PropertyDispatch ROTATION_TORCH = PropertyDispatch.modify(BlockStateProperties.HORIZONTAL_FACING) + .select(Direction.EAST, NOP) + .select(Direction.SOUTH, Y_ROT_90) + .select(Direction.WEST, Y_ROT_180) + .select(Direction.NORTH, Y_ROT_270); + private static final PropertyDispatch ROTATION_HORIZONTAL_FACING_ALT = PropertyDispatch.modify(BlockStateProperties.HORIZONTAL_FACING) + .select(Direction.SOUTH, NOP) + .select(Direction.WEST, Y_ROT_90) + .select(Direction.NORTH, Y_ROT_180) + .select(Direction.EAST, Y_ROT_270); + private static final PropertyDispatch ROTATION_HORIZONTAL_FACING = PropertyDispatch.modify(BlockStateProperties.HORIZONTAL_FACING) + .select(Direction.EAST, Y_ROT_90) + .select(Direction.SOUTH, Y_ROT_180) + .select(Direction.WEST, Y_ROT_270) + .select(Direction.NORTH, NOP); + static final Map TEXTURED_MODELS = ImmutableMap.builder() + .put(Blocks.SANDSTONE, TexturedModel.TOP_BOTTOM_WITH_WALL.get(Blocks.SANDSTONE)) + .put(Blocks.RED_SANDSTONE, TexturedModel.TOP_BOTTOM_WITH_WALL.get(Blocks.RED_SANDSTONE)) + .put(Blocks.SMOOTH_SANDSTONE, TexturedModel.createAllSame(TextureMapping.getBlockTexture(Blocks.SANDSTONE, "_top"))) + .put(Blocks.SMOOTH_RED_SANDSTONE, TexturedModel.createAllSame(TextureMapping.getBlockTexture(Blocks.RED_SANDSTONE, "_top"))) + .put( + Blocks.CUT_SANDSTONE, + TexturedModel.COLUMN + .get(Blocks.SANDSTONE) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.CUT_SANDSTONE))) + ) + .put( + Blocks.CUT_RED_SANDSTONE, + TexturedModel.COLUMN + .get(Blocks.RED_SANDSTONE) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.CUT_RED_SANDSTONE))) + ) + .put(Blocks.QUARTZ_BLOCK, TexturedModel.COLUMN.get(Blocks.QUARTZ_BLOCK)) + .put(Blocks.SMOOTH_QUARTZ, TexturedModel.createAllSame(TextureMapping.getBlockTexture(Blocks.QUARTZ_BLOCK, "_bottom"))) + .put(Blocks.BLACKSTONE, TexturedModel.COLUMN_WITH_WALL.get(Blocks.BLACKSTONE)) + .put(Blocks.DEEPSLATE, TexturedModel.COLUMN_WITH_WALL.get(Blocks.DEEPSLATE)) + .put( + Blocks.CHISELED_QUARTZ_BLOCK, + TexturedModel.COLUMN + .get(Blocks.CHISELED_QUARTZ_BLOCK) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.CHISELED_QUARTZ_BLOCK))) + ) + .put(Blocks.CHISELED_SANDSTONE, TexturedModel.COLUMN.get(Blocks.CHISELED_SANDSTONE).updateTextures(textureMapping -> { + textureMapping.put(TextureSlot.END, TextureMapping.getBlockTexture(Blocks.SANDSTONE, "_top")); + textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.CHISELED_SANDSTONE)); + })) + .put(Blocks.CHISELED_RED_SANDSTONE, TexturedModel.COLUMN.get(Blocks.CHISELED_RED_SANDSTONE).updateTextures(textureMapping -> { + textureMapping.put(TextureSlot.END, TextureMapping.getBlockTexture(Blocks.RED_SANDSTONE, "_top")); + textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.CHISELED_RED_SANDSTONE)); + })) + .put(Blocks.CHISELED_TUFF_BRICKS, TexturedModel.COLUMN_WITH_WALL.get(Blocks.CHISELED_TUFF_BRICKS)) + .put(Blocks.CHISELED_TUFF, TexturedModel.COLUMN_WITH_WALL.get(Blocks.CHISELED_TUFF)) + .build(); + static final Map> SHAPE_CONSUMERS = ImmutableMap.>builder() + .put(Variant.BUTTON, BlockModelGenerators.BlockFamilyProvider::button) + .put(Variant.DOOR, BlockModelGenerators.BlockFamilyProvider::door) + .put(Variant.CHISELED, BlockModelGenerators.BlockFamilyProvider::fullBlockVariant) + .put(Variant.CRACKED, BlockModelGenerators.BlockFamilyProvider::fullBlockVariant) + .put(Variant.CUSTOM_FENCE, BlockModelGenerators.BlockFamilyProvider::customFence) + .put(Variant.FENCE, BlockModelGenerators.BlockFamilyProvider::fence) + .put(Variant.CUSTOM_FENCE_GATE, BlockModelGenerators.BlockFamilyProvider::customFenceGate) + .put(Variant.FENCE_GATE, BlockModelGenerators.BlockFamilyProvider::fenceGate) + .put(Variant.SIGN, BlockModelGenerators.BlockFamilyProvider::sign) + .put(Variant.SLAB, BlockModelGenerators.BlockFamilyProvider::slab) + .put(Variant.STAIRS, BlockModelGenerators.BlockFamilyProvider::stairs) + .put(Variant.PRESSURE_PLATE, BlockModelGenerators.BlockFamilyProvider::pressurePlate) + .put(Variant.TRAPDOOR, BlockModelGenerators.BlockFamilyProvider::trapdoor) + .put(Variant.WALL, BlockModelGenerators.BlockFamilyProvider::wall) + .build(); + private static final Map MULTIFACE_GENERATOR = ImmutableMap.of( + Direction.NORTH, + NOP, + Direction.EAST, + Y_ROT_90.then(UV_LOCK), + Direction.SOUTH, + Y_ROT_180.then(UV_LOCK), + Direction.WEST, + Y_ROT_270.then(UV_LOCK), + Direction.UP, + X_ROT_270.then(UV_LOCK), + Direction.DOWN, + X_ROT_90.then(UV_LOCK) + ); + private static final Map CHISELED_BOOKSHELF_SLOT_MODEL_CACHE = new HashMap(); + + static net.minecraft.client.renderer.block.model.Variant plainModel(ResourceLocation modelLocation) { + return new net.minecraft.client.renderer.block.model.Variant(modelLocation); + } + + static MultiVariant variant(net.minecraft.client.renderer.block.model.Variant variant) { + return new MultiVariant(WeightedList.of(variant)); + } + + private static MultiVariant variants(net.minecraft.client.renderer.block.model.Variant... variants) { + return new MultiVariant(WeightedList.of(Arrays.stream(variants).map(variant -> new Weighted<>(variant, 1)).toList())); + } + + static MultiVariant plainVariant(ResourceLocation id) { + return variant(plainModel(id)); + } + + private static ConditionBuilder condition() { + return new ConditionBuilder(); + } + + private static Condition or(ConditionBuilder... condition) { + return new CombinedCondition(CombinedCondition.Operation.OR, Stream.of(condition).map(ConditionBuilder::build).toList()); + } + + private static BlockModelDefinitionGenerator createMirroredCubeGenerator( + Block block, + net.minecraft.client.renderer.block.model.Variant variant, + TextureMapping textureMapping, + BiConsumer modelOutput + ) { + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(ModelTemplates.CUBE_MIRRORED_ALL.create(block, textureMapping, modelOutput)); + return MultiVariantGenerator.dispatch(block, createRotatedVariants(variant, variant2)); + } + + private static BlockModelDefinitionGenerator createNorthWestMirroredCubeGenerator( + Block block, + net.minecraft.client.renderer.block.model.Variant variant, + TextureMapping textureMapping, + BiConsumer modelOutput + ) { + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_NORTH_WEST_MIRRORED_ALL.create(block, textureMapping, modelOutput)); + return createSimpleBlock(block, multiVariant); + } + + private static BlockModelDefinitionGenerator createMirroredColumnGenerator( + Block block, + net.minecraft.client.renderer.block.model.Variant variant, + TextureMapping textureMapping, + BiConsumer modelOutput + ) { + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(ModelTemplates.CUBE_COLUMN_MIRRORED.create(block, textureMapping, modelOutput)); + return MultiVariantGenerator.dispatch(block, createRotatedVariants(variant, variant2)).with(createRotatedPillar()); + } + + public BlockModelGenerators( + Consumer blockStateOutput, ItemModelOutput itemModelOutput, BiConsumer modelOutput + ) { + this.blockStateOutput = blockStateOutput; + this.itemModelOutput = itemModelOutput; + this.modelOutput = modelOutput; + } + + private void registerSimpleItemModel(Item item, ResourceLocation model) { + this.itemModelOutput.accept(item, ItemModelUtils.plainModel(model)); + } + + void registerSimpleItemModel(Block block, ResourceLocation model) { + this.itemModelOutput.accept(block.asItem(), ItemModelUtils.plainModel(model)); + } + + private void registerSimpleTintedItemModel(Block block, ResourceLocation model, ItemTintSource tintSource) { + this.itemModelOutput.accept(block.asItem(), ItemModelUtils.tintedModel(model, tintSource)); + } + + private ResourceLocation createFlatItemModel(Item item) { + return ModelTemplates.FLAT_ITEM.create(ModelLocationUtils.getModelLocation(item), TextureMapping.layer0(item), this.modelOutput); + } + + ResourceLocation createFlatItemModelWithBlockTexture(Item item, Block block) { + return ModelTemplates.FLAT_ITEM.create(ModelLocationUtils.getModelLocation(item), TextureMapping.layer0(block), this.modelOutput); + } + + private ResourceLocation createFlatItemModelWithBlockTexture(Item item, Block block, String suffix) { + return ModelTemplates.FLAT_ITEM + .create(ModelLocationUtils.getModelLocation(item), TextureMapping.layer0(TextureMapping.getBlockTexture(block, suffix)), this.modelOutput); + } + + ResourceLocation createFlatItemModelWithBlockTextureAndOverlay(Item item, Block block, String suffix) { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(block); + ResourceLocation resourceLocation2 = TextureMapping.getBlockTexture(block, suffix); + return ModelTemplates.TWO_LAYERED_ITEM + .create(ModelLocationUtils.getModelLocation(item), TextureMapping.layered(resourceLocation, resourceLocation2), this.modelOutput); + } + + void registerSimpleFlatItemModel(Item item) { + this.registerSimpleItemModel(item, this.createFlatItemModel(item)); + } + + private void registerSimpleFlatItemModel(Block block) { + Item item = block.asItem(); + if (item != Items.AIR) { + this.registerSimpleItemModel(item, this.createFlatItemModelWithBlockTexture(item, block)); + } + } + + private void registerSimpleFlatItemModel(Block block, String suffix) { + Item item = block.asItem(); + if (item != Items.AIR) { + this.registerSimpleItemModel(item, this.createFlatItemModelWithBlockTexture(item, block, suffix)); + } + } + + private void registerTwoLayerFlatItemModel(Block block, String suffix) { + Item item = block.asItem(); + if (item != Items.AIR) { + ResourceLocation resourceLocation = this.createFlatItemModelWithBlockTextureAndOverlay(item, block, suffix); + this.registerSimpleItemModel(item, resourceLocation); + } + } + + private static MultiVariant createRotatedVariants(net.minecraft.client.renderer.block.model.Variant variant) { + return variants(variant, variant.with(Y_ROT_90), variant.with(Y_ROT_180), variant.with(Y_ROT_270)); + } + + private static MultiVariant createRotatedVariants( + net.minecraft.client.renderer.block.model.Variant variant, net.minecraft.client.renderer.block.model.Variant mirroredVariant + ) { + return variants(variant, mirroredVariant, variant.with(Y_ROT_180), mirroredVariant.with(Y_ROT_180)); + } + + private static PropertyDispatch createBooleanModelDispatch(BooleanProperty property, MultiVariant onTrue, MultiVariant onFalse) { + return PropertyDispatch.initial(property).select(true, onTrue).select(false, onFalse); + } + + private void createRotatedMirroredVariantBlock(Block block) { + net.minecraft.client.renderer.block.model.Variant variant = plainModel(TexturedModel.CUBE.create(block, this.modelOutput)); + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(TexturedModel.CUBE_MIRRORED.create(block, this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block, createRotatedVariants(variant, variant2))); + } + + private void createRotatedVariantBlock(Block block) { + net.minecraft.client.renderer.block.model.Variant variant = plainModel(TexturedModel.CUBE.create(block, this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block, createRotatedVariants(variant))); + } + + private void createBrushableBlock(Block block) { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.DUSTED) + .generate( + integer -> { + String string = "_" + integer; + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(block, string); + ResourceLocation resourceLocation2 = ModelTemplates.CUBE_ALL + .createWithSuffix(block, string, new TextureMapping().put(TextureSlot.ALL, resourceLocation), this.modelOutput); + return plainVariant(resourceLocation2); + } + ) + ) + ); + this.registerSimpleItemModel(block, ModelLocationUtils.getModelLocation(block, "_0")); + } + + static BlockModelDefinitionGenerator createButton(Block block, MultiVariant unpowered, MultiVariant powered) { + return MultiVariantGenerator.dispatch(block) + .with(PropertyDispatch.initial(BlockStateProperties.POWERED).select(false, unpowered).select(true, powered)) + .with( + PropertyDispatch.modify(BlockStateProperties.ATTACH_FACE, BlockStateProperties.HORIZONTAL_FACING) + .select(AttachFace.FLOOR, Direction.EAST, Y_ROT_90) + .select(AttachFace.FLOOR, Direction.WEST, Y_ROT_270) + .select(AttachFace.FLOOR, Direction.SOUTH, Y_ROT_180) + .select(AttachFace.FLOOR, Direction.NORTH, NOP) + .select(AttachFace.WALL, Direction.EAST, Y_ROT_90.then(X_ROT_90).then(UV_LOCK)) + .select(AttachFace.WALL, Direction.WEST, Y_ROT_270.then(X_ROT_90).then(UV_LOCK)) + .select(AttachFace.WALL, Direction.SOUTH, Y_ROT_180.then(X_ROT_90).then(UV_LOCK)) + .select(AttachFace.WALL, Direction.NORTH, X_ROT_90.then(UV_LOCK)) + .select(AttachFace.CEILING, Direction.EAST, Y_ROT_270.then(X_ROT_180)) + .select(AttachFace.CEILING, Direction.WEST, Y_ROT_90.then(X_ROT_180)) + .select(AttachFace.CEILING, Direction.SOUTH, X_ROT_180) + .select(AttachFace.CEILING, Direction.NORTH, Y_ROT_180.then(X_ROT_180)) + ); + } + + private static BlockModelDefinitionGenerator createDoor( + Block block, + MultiVariant topLeft, + MultiVariant topLeftOpen, + MultiVariant topRight, + MultiVariant topRightOpen, + MultiVariant bottomLeft, + MultiVariant bottomLeftOpen, + MultiVariant bottomRight, + MultiVariant bottomRightOpen + ) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial( + BlockStateProperties.HORIZONTAL_FACING, BlockStateProperties.DOUBLE_BLOCK_HALF, BlockStateProperties.DOOR_HINGE, BlockStateProperties.OPEN + ) + .select(Direction.EAST, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, false, topLeft) + .select(Direction.SOUTH, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, false, topLeft.with(Y_ROT_90)) + .select(Direction.WEST, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, false, topLeft.with(Y_ROT_180)) + .select(Direction.NORTH, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, false, topLeft.with(Y_ROT_270)) + .select(Direction.EAST, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, false, topRight) + .select(Direction.SOUTH, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, false, topRight.with(Y_ROT_90)) + .select(Direction.WEST, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, false, topRight.with(Y_ROT_180)) + .select(Direction.NORTH, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, false, topRight.with(Y_ROT_270)) + .select(Direction.EAST, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, true, topLeftOpen.with(Y_ROT_90)) + .select(Direction.SOUTH, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, true, topLeftOpen.with(Y_ROT_180)) + .select(Direction.WEST, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, true, topLeftOpen.with(Y_ROT_270)) + .select(Direction.NORTH, DoubleBlockHalf.LOWER, DoorHingeSide.LEFT, true, topLeftOpen) + .select(Direction.EAST, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, true, topRightOpen.with(Y_ROT_270)) + .select(Direction.SOUTH, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, true, topRightOpen) + .select(Direction.WEST, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, true, topRightOpen.with(Y_ROT_90)) + .select(Direction.NORTH, DoubleBlockHalf.LOWER, DoorHingeSide.RIGHT, true, topRightOpen.with(Y_ROT_180)) + .select(Direction.EAST, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, false, bottomLeft) + .select(Direction.SOUTH, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, false, bottomLeft.with(Y_ROT_90)) + .select(Direction.WEST, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, false, bottomLeft.with(Y_ROT_180)) + .select(Direction.NORTH, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, false, bottomLeft.with(Y_ROT_270)) + .select(Direction.EAST, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, false, bottomRight) + .select(Direction.SOUTH, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, false, bottomRight.with(Y_ROT_90)) + .select(Direction.WEST, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, false, bottomRight.with(Y_ROT_180)) + .select(Direction.NORTH, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, false, bottomRight.with(Y_ROT_270)) + .select(Direction.EAST, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, true, bottomLeftOpen.with(Y_ROT_90)) + .select(Direction.SOUTH, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, true, bottomLeftOpen.with(Y_ROT_180)) + .select(Direction.WEST, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, true, bottomLeftOpen.with(Y_ROT_270)) + .select(Direction.NORTH, DoubleBlockHalf.UPPER, DoorHingeSide.LEFT, true, bottomLeftOpen) + .select(Direction.EAST, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, true, bottomRightOpen.with(Y_ROT_270)) + .select(Direction.SOUTH, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, true, bottomRightOpen) + .select(Direction.WEST, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, true, bottomRightOpen.with(Y_ROT_90)) + .select(Direction.NORTH, DoubleBlockHalf.UPPER, DoorHingeSide.RIGHT, true, bottomRightOpen.with(Y_ROT_180)) + ); + } + + static BlockModelDefinitionGenerator createCustomFence( + Block block, MultiVariant post, MultiVariant north, MultiVariant east, MultiVariant south, MultiVariant west + ) { + return MultiPartGenerator.multiPart(block) + .with(post) + .with(condition().term(BlockStateProperties.NORTH, true), north) + .with(condition().term(BlockStateProperties.EAST, true), east) + .with(condition().term(BlockStateProperties.SOUTH, true), south) + .with(condition().term(BlockStateProperties.WEST, true), west); + } + + static BlockModelDefinitionGenerator createFence(Block block, MultiVariant post, MultiVariant side) { + return MultiPartGenerator.multiPart(block) + .with(post) + .with(condition().term(BlockStateProperties.NORTH, true), side.with(UV_LOCK)) + .with(condition().term(BlockStateProperties.EAST, true), side.with(Y_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.SOUTH, true), side.with(Y_ROT_180).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.WEST, true), side.with(Y_ROT_270).with(UV_LOCK)); + } + + static BlockModelDefinitionGenerator createWall(Block block, MultiVariant post, MultiVariant lowSide, MultiVariant tallSide) { + return MultiPartGenerator.multiPart(block) + .with(condition().term(BlockStateProperties.UP, true), post) + .with(condition().term(BlockStateProperties.NORTH_WALL, WallSide.LOW), lowSide.with(UV_LOCK)) + .with(condition().term(BlockStateProperties.EAST_WALL, WallSide.LOW), lowSide.with(Y_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.SOUTH_WALL, WallSide.LOW), lowSide.with(Y_ROT_180).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.WEST_WALL, WallSide.LOW), lowSide.with(Y_ROT_270).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.NORTH_WALL, WallSide.TALL), tallSide.with(UV_LOCK)) + .with(condition().term(BlockStateProperties.EAST_WALL, WallSide.TALL), tallSide.with(Y_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.SOUTH_WALL, WallSide.TALL), tallSide.with(Y_ROT_180).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.WEST_WALL, WallSide.TALL), tallSide.with(Y_ROT_270).with(UV_LOCK)); + } + + static BlockModelDefinitionGenerator createFenceGate( + Block block, MultiVariant open, MultiVariant closed, MultiVariant wallOpen, MultiVariant wallClosed, boolean uvLock + ) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.IN_WALL, BlockStateProperties.OPEN) + .select(false, false, closed) + .select(true, false, wallClosed) + .select(false, true, open) + .select(true, true, wallOpen) + ) + .with(uvLock ? UV_LOCK : NOP) + .with(ROTATION_HORIZONTAL_FACING_ALT); + } + + static BlockModelDefinitionGenerator createStairs(Block block, MultiVariant inner, MultiVariant straight, MultiVariant outer) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.HORIZONTAL_FACING, BlockStateProperties.HALF, BlockStateProperties.STAIRS_SHAPE) + .select(Direction.EAST, Half.BOTTOM, StairsShape.STRAIGHT, straight) + .select(Direction.WEST, Half.BOTTOM, StairsShape.STRAIGHT, straight.with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.BOTTOM, StairsShape.STRAIGHT, straight.with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.BOTTOM, StairsShape.STRAIGHT, straight.with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.EAST, Half.BOTTOM, StairsShape.OUTER_RIGHT, outer) + .select(Direction.WEST, Half.BOTTOM, StairsShape.OUTER_RIGHT, outer.with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.BOTTOM, StairsShape.OUTER_RIGHT, outer.with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.BOTTOM, StairsShape.OUTER_RIGHT, outer.with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.EAST, Half.BOTTOM, StairsShape.OUTER_LEFT, outer.with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.WEST, Half.BOTTOM, StairsShape.OUTER_LEFT, outer.with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.SOUTH, Half.BOTTOM, StairsShape.OUTER_LEFT, outer) + .select(Direction.NORTH, Half.BOTTOM, StairsShape.OUTER_LEFT, outer.with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.EAST, Half.BOTTOM, StairsShape.INNER_RIGHT, inner) + .select(Direction.WEST, Half.BOTTOM, StairsShape.INNER_RIGHT, inner.with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.BOTTOM, StairsShape.INNER_RIGHT, inner.with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.BOTTOM, StairsShape.INNER_RIGHT, inner.with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.EAST, Half.BOTTOM, StairsShape.INNER_LEFT, inner.with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.WEST, Half.BOTTOM, StairsShape.INNER_LEFT, inner.with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.SOUTH, Half.BOTTOM, StairsShape.INNER_LEFT, inner) + .select(Direction.NORTH, Half.BOTTOM, StairsShape.INNER_LEFT, inner.with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.EAST, Half.TOP, StairsShape.STRAIGHT, straight.with(X_ROT_180).with(UV_LOCK)) + .select(Direction.WEST, Half.TOP, StairsShape.STRAIGHT, straight.with(X_ROT_180).with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.TOP, StairsShape.STRAIGHT, straight.with(X_ROT_180).with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.TOP, StairsShape.STRAIGHT, straight.with(X_ROT_180).with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.EAST, Half.TOP, StairsShape.OUTER_RIGHT, outer.with(X_ROT_180).with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.WEST, Half.TOP, StairsShape.OUTER_RIGHT, outer.with(X_ROT_180).with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.SOUTH, Half.TOP, StairsShape.OUTER_RIGHT, outer.with(X_ROT_180).with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.NORTH, Half.TOP, StairsShape.OUTER_RIGHT, outer.with(X_ROT_180).with(UV_LOCK)) + .select(Direction.EAST, Half.TOP, StairsShape.OUTER_LEFT, outer.with(X_ROT_180).with(UV_LOCK)) + .select(Direction.WEST, Half.TOP, StairsShape.OUTER_LEFT, outer.with(X_ROT_180).with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.TOP, StairsShape.OUTER_LEFT, outer.with(X_ROT_180).with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.TOP, StairsShape.OUTER_LEFT, outer.with(X_ROT_180).with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.EAST, Half.TOP, StairsShape.INNER_RIGHT, inner.with(X_ROT_180).with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.WEST, Half.TOP, StairsShape.INNER_RIGHT, inner.with(X_ROT_180).with(Y_ROT_270).with(UV_LOCK)) + .select(Direction.SOUTH, Half.TOP, StairsShape.INNER_RIGHT, inner.with(X_ROT_180).with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.NORTH, Half.TOP, StairsShape.INNER_RIGHT, inner.with(X_ROT_180).with(UV_LOCK)) + .select(Direction.EAST, Half.TOP, StairsShape.INNER_LEFT, inner.with(X_ROT_180).with(UV_LOCK)) + .select(Direction.WEST, Half.TOP, StairsShape.INNER_LEFT, inner.with(X_ROT_180).with(Y_ROT_180).with(UV_LOCK)) + .select(Direction.SOUTH, Half.TOP, StairsShape.INNER_LEFT, inner.with(X_ROT_180).with(Y_ROT_90).with(UV_LOCK)) + .select(Direction.NORTH, Half.TOP, StairsShape.INNER_LEFT, inner.with(X_ROT_180).with(Y_ROT_270).with(UV_LOCK)) + ); + } + + private static BlockModelDefinitionGenerator createOrientableTrapdoor(Block block, MultiVariant top, MultiVariant bottom, MultiVariant open) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.HORIZONTAL_FACING, BlockStateProperties.HALF, BlockStateProperties.OPEN) + .select(Direction.NORTH, Half.BOTTOM, false, bottom) + .select(Direction.SOUTH, Half.BOTTOM, false, bottom.with(Y_ROT_180)) + .select(Direction.EAST, Half.BOTTOM, false, bottom.with(Y_ROT_90)) + .select(Direction.WEST, Half.BOTTOM, false, bottom.with(Y_ROT_270)) + .select(Direction.NORTH, Half.TOP, false, top) + .select(Direction.SOUTH, Half.TOP, false, top.with(Y_ROT_180)) + .select(Direction.EAST, Half.TOP, false, top.with(Y_ROT_90)) + .select(Direction.WEST, Half.TOP, false, top.with(Y_ROT_270)) + .select(Direction.NORTH, Half.BOTTOM, true, open) + .select(Direction.SOUTH, Half.BOTTOM, true, open.with(Y_ROT_180)) + .select(Direction.EAST, Half.BOTTOM, true, open.with(Y_ROT_90)) + .select(Direction.WEST, Half.BOTTOM, true, open.with(Y_ROT_270)) + .select(Direction.NORTH, Half.TOP, true, open.with(X_ROT_180).with(Y_ROT_180)) + .select(Direction.SOUTH, Half.TOP, true, open.with(X_ROT_180)) + .select(Direction.EAST, Half.TOP, true, open.with(X_ROT_180).with(Y_ROT_270)) + .select(Direction.WEST, Half.TOP, true, open.with(X_ROT_180).with(Y_ROT_90)) + ); + } + + private static BlockModelDefinitionGenerator createTrapdoor(Block block, MultiVariant top, MultiVariant bottom, MultiVariant open) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.HORIZONTAL_FACING, BlockStateProperties.HALF, BlockStateProperties.OPEN) + .select(Direction.NORTH, Half.BOTTOM, false, bottom) + .select(Direction.SOUTH, Half.BOTTOM, false, bottom) + .select(Direction.EAST, Half.BOTTOM, false, bottom) + .select(Direction.WEST, Half.BOTTOM, false, bottom) + .select(Direction.NORTH, Half.TOP, false, top) + .select(Direction.SOUTH, Half.TOP, false, top) + .select(Direction.EAST, Half.TOP, false, top) + .select(Direction.WEST, Half.TOP, false, top) + .select(Direction.NORTH, Half.BOTTOM, true, open) + .select(Direction.SOUTH, Half.BOTTOM, true, open.with(Y_ROT_180)) + .select(Direction.EAST, Half.BOTTOM, true, open.with(Y_ROT_90)) + .select(Direction.WEST, Half.BOTTOM, true, open.with(Y_ROT_270)) + .select(Direction.NORTH, Half.TOP, true, open) + .select(Direction.SOUTH, Half.TOP, true, open.with(Y_ROT_180)) + .select(Direction.EAST, Half.TOP, true, open.with(Y_ROT_90)) + .select(Direction.WEST, Half.TOP, true, open.with(Y_ROT_270)) + ); + } + + static MultiVariantGenerator createSimpleBlock(Block block, MultiVariant variants) { + return MultiVariantGenerator.dispatch(block, variants); + } + + private static PropertyDispatch createRotatedPillar() { + return PropertyDispatch.modify(BlockStateProperties.AXIS) + .select(Direction.Axis.Y, NOP) + .select(Direction.Axis.Z, X_ROT_90) + .select(Direction.Axis.X, X_ROT_90.then(Y_ROT_90)); + } + + static BlockModelDefinitionGenerator createPillarBlockUVLocked( + Block block, TextureMapping textureMapping, BiConsumer modelOutput + ) { + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_COLUMN_UV_LOCKED_X.create(block, textureMapping, modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CUBE_COLUMN_UV_LOCKED_Y.create(block, textureMapping, modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.CUBE_COLUMN_UV_LOCKED_Z.create(block, textureMapping, modelOutput)); + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.AXIS) + .select(Direction.Axis.X, multiVariant) + .select(Direction.Axis.Y, multiVariant2) + .select(Direction.Axis.Z, multiVariant3) + ); + } + + static BlockModelDefinitionGenerator createAxisAlignedPillarBlock(Block block, MultiVariant variants) { + return MultiVariantGenerator.dispatch(block, variants).with(createRotatedPillar()); + } + + private void createAxisAlignedPillarBlockCustomModel(Block block, MultiVariant variants) { + this.blockStateOutput.accept(createAxisAlignedPillarBlock(block, variants)); + } + + public void createAxisAlignedPillarBlock(Block axisAlignedPillarBlock, TexturedModel.Provider provider) { + MultiVariant multiVariant = plainVariant(provider.create(axisAlignedPillarBlock, this.modelOutput)); + this.blockStateOutput.accept(createAxisAlignedPillarBlock(axisAlignedPillarBlock, multiVariant)); + } + + private void createHorizontallyRotatedBlock(Block horizontallyRotatedBlock, TexturedModel.Provider provider) { + MultiVariant multiVariant = plainVariant(provider.create(horizontallyRotatedBlock, this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(horizontallyRotatedBlock, multiVariant).with(ROTATION_HORIZONTAL_FACING)); + } + + static BlockModelDefinitionGenerator createRotatedPillarWithHorizontalVariant(Block block, MultiVariant variants, MultiVariant horizontalVariants) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.AXIS) + .select(Direction.Axis.Y, variants) + .select(Direction.Axis.Z, horizontalVariants.with(X_ROT_90)) + .select(Direction.Axis.X, horizontalVariants.with(X_ROT_90).with(Y_ROT_90)) + ); + } + + private void createRotatedPillarWithHorizontalVariant( + Block rotatedPillarBlock, TexturedModel.Provider modelProvider, TexturedModel.Provider horizontalModelProvider + ) { + MultiVariant multiVariant = plainVariant(modelProvider.create(rotatedPillarBlock, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(horizontalModelProvider.create(rotatedPillarBlock, this.modelOutput)); + this.blockStateOutput.accept(createRotatedPillarWithHorizontalVariant(rotatedPillarBlock, multiVariant, multiVariant2)); + } + + private void createCreakingHeart(Block block) { + MultiVariant multiVariant = plainVariant(TexturedModel.COLUMN_ALT.create(block, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(TexturedModel.COLUMN_HORIZONTAL_ALT.create(block, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(this.createCreakingHeartModel(TexturedModel.COLUMN_ALT, block, "_awake")); + MultiVariant multiVariant4 = plainVariant(this.createCreakingHeartModel(TexturedModel.COLUMN_HORIZONTAL_ALT, block, "_awake")); + MultiVariant multiVariant5 = plainVariant(this.createCreakingHeartModel(TexturedModel.COLUMN_ALT, block, "_dormant")); + MultiVariant multiVariant6 = plainVariant(this.createCreakingHeartModel(TexturedModel.COLUMN_HORIZONTAL_ALT, block, "_dormant")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.AXIS, CreakingHeartBlock.STATE) + .select(Direction.Axis.Y, CreakingHeartState.UPROOTED, multiVariant) + .select(Direction.Axis.Z, CreakingHeartState.UPROOTED, multiVariant2.with(X_ROT_90)) + .select(Direction.Axis.X, CreakingHeartState.UPROOTED, multiVariant2.with(X_ROT_90).with(Y_ROT_90)) + .select(Direction.Axis.Y, CreakingHeartState.DORMANT, multiVariant5) + .select(Direction.Axis.Z, CreakingHeartState.DORMANT, multiVariant6.with(X_ROT_90)) + .select(Direction.Axis.X, CreakingHeartState.DORMANT, multiVariant6.with(X_ROT_90).with(Y_ROT_90)) + .select(Direction.Axis.Y, CreakingHeartState.AWAKE, multiVariant3) + .select(Direction.Axis.Z, CreakingHeartState.AWAKE, multiVariant4.with(X_ROT_90)) + .select(Direction.Axis.X, CreakingHeartState.AWAKE, multiVariant4.with(X_ROT_90).with(Y_ROT_90)) + ) + ); + } + + private ResourceLocation createCreakingHeartModel(TexturedModel.Provider modelProvider, Block block, String suffix) { + return modelProvider.updateTexture( + textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(block, suffix)) + .put(TextureSlot.END, TextureMapping.getBlockTexture(block, "_top" + suffix)) + ) + .createWithSuffix(block, suffix, this.modelOutput); + } + + private ResourceLocation createSuffixedVariant( + Block block, String suffix, ModelTemplate modelTemplate, Function textureMappingGetter + ) { + return modelTemplate.createWithSuffix( + block, suffix, (TextureMapping)textureMappingGetter.apply(TextureMapping.getBlockTexture(block, suffix)), this.modelOutput + ); + } + + static BlockModelDefinitionGenerator createPressurePlate(Block block, MultiVariant unpowered, MultiVariant powered) { + return MultiVariantGenerator.dispatch(block).with(createBooleanModelDispatch(BlockStateProperties.POWERED, powered, unpowered)); + } + + static BlockModelDefinitionGenerator createSlab(Block block, MultiVariant bottom, MultiVariant top, MultiVariant doubleVariants) { + return MultiVariantGenerator.dispatch(block) + .with( + PropertyDispatch.initial(BlockStateProperties.SLAB_TYPE).select(SlabType.BOTTOM, bottom).select(SlabType.TOP, top).select(SlabType.DOUBLE, doubleVariants) + ); + } + + public void createTrivialCube(Block block) { + this.createTrivialBlock(block, TexturedModel.CUBE); + } + + public void createTrivialBlock(Block block, TexturedModel.Provider provider) { + this.blockStateOutput.accept(createSimpleBlock(block, plainVariant(provider.create(block, this.modelOutput)))); + } + + public void createTintedLeaves(Block block, TexturedModel.Provider provider, int tint) { + ResourceLocation resourceLocation = provider.create(block, this.modelOutput); + this.blockStateOutput.accept(createSimpleBlock(block, plainVariant(resourceLocation))); + this.registerSimpleTintedItemModel(block, resourceLocation, ItemModelUtils.constantTint(tint)); + } + + private void createVine() { + this.createMultifaceBlockStates(Blocks.VINE); + ResourceLocation resourceLocation = this.createFlatItemModelWithBlockTexture(Items.VINE, Blocks.VINE); + this.registerSimpleTintedItemModel(Blocks.VINE, resourceLocation, ItemModelUtils.constantTint(-12012264)); + } + + private void createItemWithGrassTint(Block block) { + ResourceLocation resourceLocation = this.createFlatItemModelWithBlockTexture(block.asItem(), block); + this.registerSimpleTintedItemModel(block, resourceLocation, new GrassColorSource()); + } + + private BlockModelGenerators.BlockFamilyProvider family(Block block) { + TexturedModel texturedModel = (TexturedModel)TEXTURED_MODELS.getOrDefault(block, TexturedModel.CUBE.get(block)); + return new BlockModelGenerators.BlockFamilyProvider(texturedModel.getMapping()).fullBlock(block, texturedModel.getTemplate()); + } + + public void createHangingSign(Block particleBlock, Block hangingSignBlock, Block wallHangingSignBlock) { + MultiVariant multiVariant = this.createParticleOnlyBlockModel(hangingSignBlock, particleBlock); + this.blockStateOutput.accept(createSimpleBlock(hangingSignBlock, multiVariant)); + this.blockStateOutput.accept(createSimpleBlock(wallHangingSignBlock, multiVariant)); + this.registerSimpleFlatItemModel(hangingSignBlock.asItem()); + } + + void createDoor(Block doorBlock) { + TextureMapping textureMapping = TextureMapping.door(doorBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.DOOR_BOTTOM_LEFT.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.DOOR_BOTTOM_LEFT_OPEN.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.DOOR_BOTTOM_RIGHT.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.DOOR_BOTTOM_RIGHT_OPEN.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant5 = plainVariant(ModelTemplates.DOOR_TOP_LEFT.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant6 = plainVariant(ModelTemplates.DOOR_TOP_LEFT_OPEN.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant7 = plainVariant(ModelTemplates.DOOR_TOP_RIGHT.create(doorBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant8 = plainVariant(ModelTemplates.DOOR_TOP_RIGHT_OPEN.create(doorBlock, textureMapping, this.modelOutput)); + this.registerSimpleFlatItemModel(doorBlock.asItem()); + this.blockStateOutput + .accept(createDoor(doorBlock, multiVariant, multiVariant2, multiVariant3, multiVariant4, multiVariant5, multiVariant6, multiVariant7, multiVariant8)); + } + + private void copyDoorModel(Block doorBlock, Block sourceBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.DOOR_BOTTOM_LEFT.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.DOOR_BOTTOM_LEFT_OPEN.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.DOOR_BOTTOM_RIGHT.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.DOOR_BOTTOM_RIGHT_OPEN.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant5 = plainVariant(ModelTemplates.DOOR_TOP_LEFT.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant6 = plainVariant(ModelTemplates.DOOR_TOP_LEFT_OPEN.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant7 = plainVariant(ModelTemplates.DOOR_TOP_RIGHT.getDefaultModelLocation(doorBlock)); + MultiVariant multiVariant8 = plainVariant(ModelTemplates.DOOR_TOP_RIGHT_OPEN.getDefaultModelLocation(doorBlock)); + this.itemModelOutput.copy(doorBlock.asItem(), sourceBlock.asItem()); + this.blockStateOutput + .accept(createDoor(sourceBlock, multiVariant, multiVariant2, multiVariant3, multiVariant4, multiVariant5, multiVariant6, multiVariant7, multiVariant8)); + } + + void createOrientableTrapdoor(Block orientableTrapdoorBlock) { + TextureMapping textureMapping = TextureMapping.defaultTexture(orientableTrapdoorBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.ORIENTABLE_TRAPDOOR_TOP.create(orientableTrapdoorBlock, textureMapping, this.modelOutput)); + ResourceLocation resourceLocation = ModelTemplates.ORIENTABLE_TRAPDOOR_BOTTOM.create(orientableTrapdoorBlock, textureMapping, this.modelOutput); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.ORIENTABLE_TRAPDOOR_OPEN.create(orientableTrapdoorBlock, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createOrientableTrapdoor(orientableTrapdoorBlock, multiVariant, plainVariant(resourceLocation), multiVariant2)); + this.registerSimpleItemModel(orientableTrapdoorBlock, resourceLocation); + } + + void createTrapdoor(Block trapdoorBlock) { + TextureMapping textureMapping = TextureMapping.defaultTexture(trapdoorBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.TRAPDOOR_TOP.create(trapdoorBlock, textureMapping, this.modelOutput)); + ResourceLocation resourceLocation = ModelTemplates.TRAPDOOR_BOTTOM.create(trapdoorBlock, textureMapping, this.modelOutput); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.TRAPDOOR_OPEN.create(trapdoorBlock, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createTrapdoor(trapdoorBlock, multiVariant, plainVariant(resourceLocation), multiVariant2)); + this.registerSimpleItemModel(trapdoorBlock, resourceLocation); + } + + private void copyTrapdoorModel(Block trapdoorBlock, Block sourceBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.TRAPDOOR_TOP.getDefaultModelLocation(trapdoorBlock)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.TRAPDOOR_BOTTOM.getDefaultModelLocation(trapdoorBlock)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.TRAPDOOR_OPEN.getDefaultModelLocation(trapdoorBlock)); + this.itemModelOutput.copy(trapdoorBlock.asItem(), sourceBlock.asItem()); + this.blockStateOutput.accept(createTrapdoor(sourceBlock, multiVariant, multiVariant2, multiVariant3)); + } + + private void createBigDripLeafBlock() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BIG_DRIPLEAF)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BIG_DRIPLEAF, "_partial_tilt")); + MultiVariant multiVariant3 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BIG_DRIPLEAF, "_full_tilt")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.BIG_DRIPLEAF) + .with( + PropertyDispatch.initial(BlockStateProperties.TILT) + .select(Tilt.NONE, multiVariant) + .select(Tilt.UNSTABLE, multiVariant) + .select(Tilt.PARTIAL, multiVariant2) + .select(Tilt.FULL, multiVariant3) + ) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private BlockModelGenerators.WoodProvider woodProvider(Block logBlock) { + return new BlockModelGenerators.WoodProvider(TextureMapping.logColumn(logBlock)); + } + + private void createNonTemplateModelBlock(Block block) { + this.createNonTemplateModelBlock(block, block); + } + + private void createNonTemplateModelBlock(Block block, Block modelBlock) { + this.blockStateOutput.accept(createSimpleBlock(block, plainVariant(ModelLocationUtils.getModelLocation(modelBlock)))); + } + + private void createCrossBlockWithDefaultItem(Block block, BlockModelGenerators.PlantType plantType) { + this.registerSimpleItemModel(block.asItem(), plantType.createItemModel(this, block)); + this.createCrossBlock(block, plantType); + } + + private void createCrossBlockWithDefaultItem(Block block, BlockModelGenerators.PlantType plantType, TextureMapping textureMapping) { + this.registerSimpleFlatItemModel(block); + this.createCrossBlock(block, plantType, textureMapping); + } + + private void createCrossBlock(Block block, BlockModelGenerators.PlantType plantType) { + TextureMapping textureMapping = plantType.getTextureMapping(block); + this.createCrossBlock(block, plantType, textureMapping); + } + + private void createCrossBlock(Block block, BlockModelGenerators.PlantType plantType, TextureMapping textureMapping) { + MultiVariant multiVariant = plainVariant(plantType.getCross().create(block, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(block, multiVariant)); + } + + private void createCrossBlock(Block block, BlockModelGenerators.PlantType plantType, Property ageProperty, int... possibleValues) { + if (ageProperty.getPossibleValues().size() != possibleValues.length) { + throw new IllegalArgumentException("missing values for property: " + ageProperty); + } else { + this.registerSimpleFlatItemModel(block.asItem()); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block).with(PropertyDispatch.initial(ageProperty).generate(integer -> { + String string = "_stage" + possibleValues[integer]; + TextureMapping textureMapping = TextureMapping.cross(TextureMapping.getBlockTexture(block, string)); + return plainVariant(plantType.getCross().createWithSuffix(block, string, textureMapping, this.modelOutput)); + }))); + } + } + + private void createPlantWithDefaultItem(Block block, Block pottedBlock, BlockModelGenerators.PlantType plantType) { + this.registerSimpleItemModel(block.asItem(), plantType.createItemModel(this, block)); + this.createPlant(block, pottedBlock, plantType); + } + + private void createPlant(Block block, Block pottedBlock, BlockModelGenerators.PlantType plantType) { + this.createCrossBlock(block, plantType); + TextureMapping textureMapping = plantType.getPlantTextureMapping(block); + MultiVariant multiVariant = plainVariant(plantType.getCrossPot().create(pottedBlock, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(pottedBlock, multiVariant)); + } + + private void createCoralFans(Block coralFanBlock, Block coralWallFanBlock) { + TexturedModel texturedModel = TexturedModel.CORAL_FAN.get(coralFanBlock); + MultiVariant multiVariant = plainVariant(texturedModel.create(coralFanBlock, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(coralFanBlock, multiVariant)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CORAL_WALL_FAN.create(coralWallFanBlock, texturedModel.getMapping(), this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(coralWallFanBlock, multiVariant2).with(ROTATION_HORIZONTAL_FACING)); + this.registerSimpleFlatItemModel(coralFanBlock); + } + + private void createStems(Block unattachedStemBlock, Block attachedStemBlock) { + this.registerSimpleFlatItemModel(unattachedStemBlock.asItem()); + TextureMapping textureMapping = TextureMapping.stem(unattachedStemBlock); + TextureMapping textureMapping2 = TextureMapping.attachedStem(unattachedStemBlock, attachedStemBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.ATTACHED_STEM.create(attachedStemBlock, textureMapping2, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(attachedStemBlock, multiVariant) + .with( + PropertyDispatch.modify(BlockStateProperties.HORIZONTAL_FACING) + .select(Direction.WEST, NOP) + .select(Direction.SOUTH, Y_ROT_270) + .select(Direction.NORTH, Y_ROT_90) + .select(Direction.EAST, Y_ROT_180) + ) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(unattachedStemBlock) + .with( + PropertyDispatch.initial(BlockStateProperties.AGE_7) + .generate(integer -> plainVariant(ModelTemplates.STEMS[integer].create(unattachedStemBlock, textureMapping, this.modelOutput))) + ) + ); + } + + private void createPitcherPlant() { + Block block = Blocks.PITCHER_PLANT; + this.registerSimpleFlatItemModel(block.asItem()); + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block, "_top")); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(block, "_bottom")); + this.createDoubleBlock(block, multiVariant, multiVariant2); + } + + private void createPitcherCrop() { + Block block = Blocks.PITCHER_CROP; + this.registerSimpleFlatItemModel(block.asItem()); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with(PropertyDispatch.initial(PitcherCropBlock.AGE, BlockStateProperties.DOUBLE_BLOCK_HALF).generate((integer, doubleBlockHalf) -> { + return switch (doubleBlockHalf) { + case UPPER -> plainVariant(ModelLocationUtils.getModelLocation(block, "_top_stage_" + integer)); + case LOWER -> plainVariant(ModelLocationUtils.getModelLocation(block, "_bottom_stage_" + integer)); + }; + })) + ); + } + + private void createCoral( + Block coralBlock, + Block deadCoralBlock, + Block coralFullBlock, + Block deadCoralFullBlock, + Block coralFanBlock, + Block deadCoralFanBlock, + Block coralWallFanBlock, + Block deadCoralWallFanBlock + ) { + this.createCrossBlockWithDefaultItem(coralBlock, BlockModelGenerators.PlantType.NOT_TINTED); + this.createCrossBlockWithDefaultItem(deadCoralBlock, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTrivialCube(coralFullBlock); + this.createTrivialCube(deadCoralFullBlock); + this.createCoralFans(coralFanBlock, coralWallFanBlock); + this.createCoralFans(deadCoralFanBlock, deadCoralWallFanBlock); + } + + private void createDoublePlant(Block block, BlockModelGenerators.PlantType plantType) { + MultiVariant multiVariant = plainVariant(this.createSuffixedVariant(block, "_top", plantType.getCross(), TextureMapping::cross)); + MultiVariant multiVariant2 = plainVariant(this.createSuffixedVariant(block, "_bottom", plantType.getCross(), TextureMapping::cross)); + this.createDoubleBlock(block, multiVariant, multiVariant2); + } + + private void createDoublePlantWithDefaultItem(Block block, BlockModelGenerators.PlantType plantType) { + this.registerSimpleFlatItemModel(block, "_top"); + this.createDoublePlant(block, plantType); + } + + private void createTintedDoublePlant(Block block) { + ResourceLocation resourceLocation = this.createFlatItemModelWithBlockTexture(block.asItem(), block, "_top"); + this.registerSimpleTintedItemModel(block, resourceLocation, new GrassColorSource()); + this.createDoublePlant(block, BlockModelGenerators.PlantType.TINTED); + } + + private void createSunflower() { + this.registerSimpleFlatItemModel(Blocks.SUNFLOWER, "_front"); + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.SUNFLOWER, "_top")); + MultiVariant multiVariant2 = plainVariant( + this.createSuffixedVariant(Blocks.SUNFLOWER, "_bottom", BlockModelGenerators.PlantType.NOT_TINTED.getCross(), TextureMapping::cross) + ); + this.createDoubleBlock(Blocks.SUNFLOWER, multiVariant, multiVariant2); + } + + private void createTallSeagrass() { + MultiVariant multiVariant = plainVariant(this.createSuffixedVariant(Blocks.TALL_SEAGRASS, "_top", ModelTemplates.SEAGRASS, TextureMapping::defaultTexture)); + MultiVariant multiVariant2 = plainVariant( + this.createSuffixedVariant(Blocks.TALL_SEAGRASS, "_bottom", ModelTemplates.SEAGRASS, TextureMapping::defaultTexture) + ); + this.createDoubleBlock(Blocks.TALL_SEAGRASS, multiVariant, multiVariant2); + } + + private void createSmallDripleaf() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.SMALL_DRIPLEAF, "_top")); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.SMALL_DRIPLEAF, "_bottom")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SMALL_DRIPLEAF) + .with( + PropertyDispatch.initial(BlockStateProperties.DOUBLE_BLOCK_HALF).select(DoubleBlockHalf.LOWER, multiVariant2).select(DoubleBlockHalf.UPPER, multiVariant) + ) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private void createDoubleBlock(Block block, MultiVariant lower, MultiVariant upper) { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with(PropertyDispatch.initial(BlockStateProperties.DOUBLE_BLOCK_HALF).select(DoubleBlockHalf.LOWER, upper).select(DoubleBlockHalf.UPPER, lower)) + ); + } + + private void createPassiveRail(Block railBlock) { + TextureMapping textureMapping = TextureMapping.rail(railBlock); + TextureMapping textureMapping2 = TextureMapping.rail(TextureMapping.getBlockTexture(railBlock, "_corner")); + MultiVariant multiVariant = plainVariant(ModelTemplates.RAIL_FLAT.create(railBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.RAIL_CURVED.create(railBlock, textureMapping2, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.RAIL_RAISED_NE.create(railBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.RAIL_RAISED_SW.create(railBlock, textureMapping, this.modelOutput)); + this.registerSimpleFlatItemModel(railBlock); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(railBlock) + .with( + PropertyDispatch.initial(BlockStateProperties.RAIL_SHAPE) + .select(RailShape.NORTH_SOUTH, multiVariant) + .select(RailShape.EAST_WEST, multiVariant.with(Y_ROT_90)) + .select(RailShape.ASCENDING_EAST, multiVariant3.with(Y_ROT_90)) + .select(RailShape.ASCENDING_WEST, multiVariant4.with(Y_ROT_90)) + .select(RailShape.ASCENDING_NORTH, multiVariant3) + .select(RailShape.ASCENDING_SOUTH, multiVariant4) + .select(RailShape.SOUTH_EAST, multiVariant2) + .select(RailShape.SOUTH_WEST, multiVariant2.with(Y_ROT_90)) + .select(RailShape.NORTH_WEST, multiVariant2.with(Y_ROT_180)) + .select(RailShape.NORTH_EAST, multiVariant2.with(Y_ROT_270)) + ) + ); + } + + private void createActiveRail(Block railBlock) { + MultiVariant multiVariant = plainVariant(this.createSuffixedVariant(railBlock, "", ModelTemplates.RAIL_FLAT, TextureMapping::rail)); + MultiVariant multiVariant2 = plainVariant(this.createSuffixedVariant(railBlock, "", ModelTemplates.RAIL_RAISED_NE, TextureMapping::rail)); + MultiVariant multiVariant3 = plainVariant(this.createSuffixedVariant(railBlock, "", ModelTemplates.RAIL_RAISED_SW, TextureMapping::rail)); + MultiVariant multiVariant4 = plainVariant(this.createSuffixedVariant(railBlock, "_on", ModelTemplates.RAIL_FLAT, TextureMapping::rail)); + MultiVariant multiVariant5 = plainVariant(this.createSuffixedVariant(railBlock, "_on", ModelTemplates.RAIL_RAISED_NE, TextureMapping::rail)); + MultiVariant multiVariant6 = plainVariant(this.createSuffixedVariant(railBlock, "_on", ModelTemplates.RAIL_RAISED_SW, TextureMapping::rail)); + this.registerSimpleFlatItemModel(railBlock); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(railBlock) + .with(PropertyDispatch.initial(BlockStateProperties.POWERED, BlockStateProperties.RAIL_SHAPE_STRAIGHT).generate((boolean_, railShape) -> { + return switch (railShape) { + case NORTH_SOUTH -> boolean_ ? multiVariant4 : multiVariant; + case EAST_WEST -> (boolean_ ? multiVariant4 : multiVariant).with(Y_ROT_90); + case ASCENDING_EAST -> (boolean_ ? multiVariant5 : multiVariant2).with(Y_ROT_90); + case ASCENDING_WEST -> (boolean_ ? multiVariant6 : multiVariant3).with(Y_ROT_90); + case ASCENDING_NORTH -> boolean_ ? multiVariant5 : multiVariant2; + case ASCENDING_SOUTH -> boolean_ ? multiVariant6 : multiVariant3; + default -> throw new UnsupportedOperationException("Fix you generator!"); + }; + })) + ); + } + + private void createAirLikeBlock(Block airLikeBlock, Item particleItem) { + MultiVariant multiVariant = plainVariant(ModelTemplates.PARTICLE_ONLY.create(airLikeBlock, TextureMapping.particleFromItem(particleItem), this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(airLikeBlock, multiVariant)); + } + + private void createAirLikeBlock(Block airLikeBlock, ResourceLocation particleTexture) { + MultiVariant multiVariant = plainVariant(ModelTemplates.PARTICLE_ONLY.create(airLikeBlock, TextureMapping.particle(particleTexture), this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(airLikeBlock, multiVariant)); + } + + private MultiVariant createParticleOnlyBlockModel(Block block, Block particleBlock) { + return plainVariant(ModelTemplates.PARTICLE_ONLY.create(block, TextureMapping.particle(particleBlock), this.modelOutput)); + } + + public void createParticleOnlyBlock(Block block, Block particleBlock) { + this.blockStateOutput.accept(createSimpleBlock(block, this.createParticleOnlyBlockModel(block, particleBlock))); + } + + private void createParticleOnlyBlock(Block block) { + this.createParticleOnlyBlock(block, block); + } + + private void createFullAndCarpetBlocks(Block fullBlock, Block carpetBlock) { + this.createTrivialCube(fullBlock); + MultiVariant multiVariant = plainVariant(TexturedModel.CARPET.get(fullBlock).create(carpetBlock, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(carpetBlock, multiVariant)); + } + + private void createLeafLitter(Block block) { + MultiVariant multiVariant = plainVariant(TexturedModel.LEAF_LITTER_1.create(block, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(TexturedModel.LEAF_LITTER_2.create(block, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(TexturedModel.LEAF_LITTER_3.create(block, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(TexturedModel.LEAF_LITTER_4.create(block, this.modelOutput)); + this.registerSimpleFlatItemModel(block.asItem()); + this.createSegmentedBlock( + block, + multiVariant, + LEAF_LITTER_MODEL_1_SEGMENT_CONDITION, + multiVariant2, + LEAF_LITTER_MODEL_2_SEGMENT_CONDITION, + multiVariant3, + LEAF_LITTER_MODEL_3_SEGMENT_CONDITION, + multiVariant4, + LEAF_LITTER_MODEL_4_SEGMENT_CONDITION + ); + } + + private void createFlowerBed(Block flowerBedBlock) { + MultiVariant multiVariant = plainVariant(TexturedModel.FLOWERBED_1.create(flowerBedBlock, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(TexturedModel.FLOWERBED_2.create(flowerBedBlock, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(TexturedModel.FLOWERBED_3.create(flowerBedBlock, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(TexturedModel.FLOWERBED_4.create(flowerBedBlock, this.modelOutput)); + this.registerSimpleFlatItemModel(flowerBedBlock.asItem()); + this.createSegmentedBlock( + flowerBedBlock, + multiVariant, + FLOWER_BED_MODEL_1_SEGMENT_CONDITION, + multiVariant2, + FLOWER_BED_MODEL_2_SEGMENT_CONDITION, + multiVariant3, + FLOWER_BED_MODEL_3_SEGMENT_CONDITION, + multiVariant4, + FLOWER_BED_MODEL_4_SEGMENT_CONDITION + ); + } + + private void createSegmentedBlock( + Block block, + MultiVariant segment1Variant, + Function segment1Condition, + MultiVariant segment2Variant, + Function segment2Condition, + MultiVariant segment3Variant, + Function segment3Condition, + MultiVariant segment4Variant, + Function segment4Condition + ) { + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(block) + .with((ConditionBuilder)segment1Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH)), segment1Variant) + .with((ConditionBuilder)segment1Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.EAST)), segment1Variant.with(Y_ROT_90)) + .with( + (ConditionBuilder)segment1Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.SOUTH)), segment1Variant.with(Y_ROT_180) + ) + .with((ConditionBuilder)segment1Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.WEST)), segment1Variant.with(Y_ROT_270)) + .with((ConditionBuilder)segment2Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH)), segment2Variant) + .with((ConditionBuilder)segment2Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.EAST)), segment2Variant.with(Y_ROT_90)) + .with( + (ConditionBuilder)segment2Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.SOUTH)), segment2Variant.with(Y_ROT_180) + ) + .with((ConditionBuilder)segment2Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.WEST)), segment2Variant.with(Y_ROT_270)) + .with((ConditionBuilder)segment3Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH)), segment3Variant) + .with((ConditionBuilder)segment3Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.EAST)), segment3Variant.with(Y_ROT_90)) + .with( + (ConditionBuilder)segment3Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.SOUTH)), segment3Variant.with(Y_ROT_180) + ) + .with((ConditionBuilder)segment3Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.WEST)), segment3Variant.with(Y_ROT_270)) + .with((ConditionBuilder)segment4Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH)), segment4Variant) + .with((ConditionBuilder)segment4Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.EAST)), segment4Variant.with(Y_ROT_90)) + .with( + (ConditionBuilder)segment4Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.SOUTH)), segment4Variant.with(Y_ROT_180) + ) + .with((ConditionBuilder)segment4Condition.apply(condition().term(BlockStateProperties.HORIZONTAL_FACING, Direction.WEST)), segment4Variant.with(Y_ROT_270)) + ); + } + + private void createColoredBlockWithRandomRotations(TexturedModel.Provider modelProvider, Block... coloredBlocks) { + for (Block block : coloredBlocks) { + net.minecraft.client.renderer.block.model.Variant variant = plainModel(modelProvider.create(block, this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block, createRotatedVariants(variant))); + } + } + + private void createColoredBlockWithStateRotations(TexturedModel.Provider modelProvider, Block... coloredBlocks) { + for (Block block : coloredBlocks) { + MultiVariant multiVariant = plainVariant(modelProvider.create(block, this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block, multiVariant).with(ROTATION_HORIZONTAL_FACING_ALT)); + } + } + + private void createGlassBlocks(Block glassBlock, Block paneBlock) { + this.createTrivialCube(glassBlock); + TextureMapping textureMapping = TextureMapping.pane(glassBlock, paneBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.STAINED_GLASS_PANE_POST.create(paneBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.STAINED_GLASS_PANE_SIDE.create(paneBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.STAINED_GLASS_PANE_SIDE_ALT.create(paneBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.STAINED_GLASS_PANE_NOSIDE.create(paneBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant5 = plainVariant(ModelTemplates.STAINED_GLASS_PANE_NOSIDE_ALT.create(paneBlock, textureMapping, this.modelOutput)); + Item item = paneBlock.asItem(); + this.registerSimpleItemModel(item, this.createFlatItemModelWithBlockTexture(item, glassBlock)); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(paneBlock) + .with(multiVariant) + .with(condition().term(BlockStateProperties.NORTH, true), multiVariant2) + .with(condition().term(BlockStateProperties.EAST, true), multiVariant2.with(Y_ROT_90)) + .with(condition().term(BlockStateProperties.SOUTH, true), multiVariant3) + .with(condition().term(BlockStateProperties.WEST, true), multiVariant3.with(Y_ROT_90)) + .with(condition().term(BlockStateProperties.NORTH, false), multiVariant4) + .with(condition().term(BlockStateProperties.EAST, false), multiVariant5) + .with(condition().term(BlockStateProperties.SOUTH, false), multiVariant5.with(Y_ROT_90)) + .with(condition().term(BlockStateProperties.WEST, false), multiVariant4.with(Y_ROT_270)) + ); + } + + private void createCommandBlock(Block commandBlock) { + TextureMapping textureMapping = TextureMapping.commandBlock(commandBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.COMMAND_BLOCK.create(commandBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant( + this.createSuffixedVariant( + commandBlock, "_conditional", ModelTemplates.COMMAND_BLOCK, resourceLocation -> textureMapping.copyAndUpdate(TextureSlot.SIDE, resourceLocation) + ) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(commandBlock) + .with(createBooleanModelDispatch(BlockStateProperties.CONDITIONAL, multiVariant2, multiVariant)) + .with(ROTATION_FACING) + ); + } + + private void createAnvil(Block anvilBlock) { + MultiVariant multiVariant = plainVariant(TexturedModel.ANVIL.create(anvilBlock, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(anvilBlock, multiVariant).with(ROTATION_HORIZONTAL_FACING_ALT)); + } + + private static MultiVariant createBambooModels(int age) { + String string = "_age" + age; + return new MultiVariant( + WeightedList.of( + (List>)IntStream.range(1, 5) + .mapToObj(i -> new Weighted<>(plainModel(ModelLocationUtils.getModelLocation(Blocks.BAMBOO, i + string)), 1)) + .collect(Collectors.toList()) + ) + ); + } + + private void createBamboo() { + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.BAMBOO) + .with(condition().term(BlockStateProperties.AGE_1, 0), createBambooModels(0)) + .with(condition().term(BlockStateProperties.AGE_1, 1), createBambooModels(1)) + .with( + condition().term(BlockStateProperties.BAMBOO_LEAVES, BambooLeaves.SMALL), + plainVariant(ModelLocationUtils.getModelLocation(Blocks.BAMBOO, "_small_leaves")) + ) + .with( + condition().term(BlockStateProperties.BAMBOO_LEAVES, BambooLeaves.LARGE), + plainVariant(ModelLocationUtils.getModelLocation(Blocks.BAMBOO, "_large_leaves")) + ) + ); + } + + private void createBarrel() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.BARREL, "_top_open"); + MultiVariant multiVariant = plainVariant(TexturedModel.CUBE_TOP_BOTTOM.create(Blocks.BARREL, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant( + TexturedModel.CUBE_TOP_BOTTOM + .get(Blocks.BARREL) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.TOP, resourceLocation)) + .createWithSuffix(Blocks.BARREL, "_open", this.modelOutput) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.BARREL) + .with(PropertyDispatch.initial(BlockStateProperties.OPEN).select(false, multiVariant).select(true, multiVariant2)) + .with(ROTATIONS_COLUMN_WITH_FACING) + ); + } + + private static > PropertyDispatch createEmptyOrFullDispatch( + Property property, T threshold, MultiVariant full, MultiVariant empty + ) { + return PropertyDispatch.initial(property).generate(comparable2 -> { + boolean bl = comparable2.compareTo(threshold) >= 0; + return bl ? full : empty; + }); + } + + private void createBeeNest(Block beeNestBlock, Function textureMappingGetter) { + TextureMapping textureMapping = ((TextureMapping)textureMappingGetter.apply(beeNestBlock)).copyForced(TextureSlot.SIDE, TextureSlot.PARTICLE); + TextureMapping textureMapping2 = textureMapping.copyAndUpdate(TextureSlot.FRONT, TextureMapping.getBlockTexture(beeNestBlock, "_front_honey")); + ResourceLocation resourceLocation = ModelTemplates.CUBE_ORIENTABLE_TOP_BOTTOM.createWithSuffix(beeNestBlock, "_empty", textureMapping, this.modelOutput); + ResourceLocation resourceLocation2 = ModelTemplates.CUBE_ORIENTABLE_TOP_BOTTOM.createWithSuffix(beeNestBlock, "_honey", textureMapping2, this.modelOutput); + this.itemModelOutput + .accept( + beeNestBlock.asItem(), + ItemModelUtils.selectBlockItemProperty( + BeehiveBlock.HONEY_LEVEL, ItemModelUtils.plainModel(resourceLocation), Map.of(5, ItemModelUtils.plainModel(resourceLocation2)) + ) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(beeNestBlock) + .with(createEmptyOrFullDispatch(BeehiveBlock.HONEY_LEVEL, 5, plainVariant(resourceLocation2), plainVariant(resourceLocation))) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private void createCropBlock(Block cropBlock, Property ageProperty, int... ageToVisualStageMapping) { + this.registerSimpleFlatItemModel(cropBlock.asItem()); + if (ageProperty.getPossibleValues().size() != ageToVisualStageMapping.length) { + throw new IllegalArgumentException(); + } else { + Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(cropBlock) + .with( + PropertyDispatch.initial(ageProperty) + .generate( + integer -> { + int i = ageToVisualStageMapping[integer]; + return plainVariant( + int2ObjectMap.computeIfAbsent( + i, + (Int2ObjectFunction)(ix -> this.createSuffixedVariant( + cropBlock, "_stage" + ix, ModelTemplates.CROP, TextureMapping::crop + )) + ) + ); + } + ) + ) + ); + } + } + + private void createBell() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BELL, "_floor")); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BELL, "_ceiling")); + MultiVariant multiVariant3 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BELL, "_wall")); + MultiVariant multiVariant4 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.BELL, "_between_walls")); + this.registerSimpleFlatItemModel(Items.BELL); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.BELL) + .with( + PropertyDispatch.initial(BlockStateProperties.HORIZONTAL_FACING, BlockStateProperties.BELL_ATTACHMENT) + .select(Direction.NORTH, BellAttachType.FLOOR, multiVariant) + .select(Direction.SOUTH, BellAttachType.FLOOR, multiVariant.with(Y_ROT_180)) + .select(Direction.EAST, BellAttachType.FLOOR, multiVariant.with(Y_ROT_90)) + .select(Direction.WEST, BellAttachType.FLOOR, multiVariant.with(Y_ROT_270)) + .select(Direction.NORTH, BellAttachType.CEILING, multiVariant2) + .select(Direction.SOUTH, BellAttachType.CEILING, multiVariant2.with(Y_ROT_180)) + .select(Direction.EAST, BellAttachType.CEILING, multiVariant2.with(Y_ROT_90)) + .select(Direction.WEST, BellAttachType.CEILING, multiVariant2.with(Y_ROT_270)) + .select(Direction.NORTH, BellAttachType.SINGLE_WALL, multiVariant3.with(Y_ROT_270)) + .select(Direction.SOUTH, BellAttachType.SINGLE_WALL, multiVariant3.with(Y_ROT_90)) + .select(Direction.EAST, BellAttachType.SINGLE_WALL, multiVariant3) + .select(Direction.WEST, BellAttachType.SINGLE_WALL, multiVariant3.with(Y_ROT_180)) + .select(Direction.SOUTH, BellAttachType.DOUBLE_WALL, multiVariant4.with(Y_ROT_90)) + .select(Direction.NORTH, BellAttachType.DOUBLE_WALL, multiVariant4.with(Y_ROT_270)) + .select(Direction.EAST, BellAttachType.DOUBLE_WALL, multiVariant4) + .select(Direction.WEST, BellAttachType.DOUBLE_WALL, multiVariant4.with(Y_ROT_180)) + ) + ); + } + + private void createGrindstone() { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.GRINDSTONE, plainVariant(ModelLocationUtils.getModelLocation(Blocks.GRINDSTONE))) + .with( + PropertyDispatch.modify(BlockStateProperties.ATTACH_FACE, BlockStateProperties.HORIZONTAL_FACING) + .select(AttachFace.FLOOR, Direction.NORTH, NOP) + .select(AttachFace.FLOOR, Direction.EAST, Y_ROT_90) + .select(AttachFace.FLOOR, Direction.SOUTH, Y_ROT_180) + .select(AttachFace.FLOOR, Direction.WEST, Y_ROT_270) + .select(AttachFace.WALL, Direction.NORTH, X_ROT_90) + .select(AttachFace.WALL, Direction.EAST, X_ROT_90.then(Y_ROT_90)) + .select(AttachFace.WALL, Direction.SOUTH, X_ROT_90.then(Y_ROT_180)) + .select(AttachFace.WALL, Direction.WEST, X_ROT_90.then(Y_ROT_270)) + .select(AttachFace.CEILING, Direction.SOUTH, X_ROT_180) + .select(AttachFace.CEILING, Direction.WEST, X_ROT_180.then(Y_ROT_90)) + .select(AttachFace.CEILING, Direction.NORTH, X_ROT_180.then(Y_ROT_180)) + .select(AttachFace.CEILING, Direction.EAST, X_ROT_180.then(Y_ROT_270)) + ) + ); + } + + private void createFurnace(Block furnaceBlock, TexturedModel.Provider modelProvider) { + MultiVariant multiVariant = plainVariant(modelProvider.create(furnaceBlock, this.modelOutput)); + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(furnaceBlock, "_front_on"); + MultiVariant multiVariant2 = plainVariant( + modelProvider.get(furnaceBlock) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.FRONT, resourceLocation)) + .createWithSuffix(furnaceBlock, "_on", this.modelOutput) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(furnaceBlock) + .with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant2, multiVariant)) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private void createCampfires(Block... campfireBlocks) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.decorateBlockModelLocation("campfire_off")); + + for (Block block : campfireBlocks) { + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CAMPFIRE.create(block, TextureMapping.campfire(block), this.modelOutput)); + this.registerSimpleFlatItemModel(block.asItem()); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant2, multiVariant)) + .with(ROTATION_HORIZONTAL_FACING_ALT) + ); + } + } + + private void createAzalea(Block azaleaBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.AZALEA.create(azaleaBlock, TextureMapping.cubeTop(azaleaBlock), this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(azaleaBlock, multiVariant)); + } + + private void createPottedAzalea(Block pottedAzaleaBlock) { + MultiVariant multiVariant; + if (pottedAzaleaBlock == Blocks.POTTED_FLOWERING_AZALEA) { + multiVariant = plainVariant( + ModelTemplates.POTTED_FLOWERING_AZALEA.create(pottedAzaleaBlock, TextureMapping.pottedAzalea(pottedAzaleaBlock), this.modelOutput) + ); + } else { + multiVariant = plainVariant(ModelTemplates.POTTED_AZALEA.create(pottedAzaleaBlock, TextureMapping.pottedAzalea(pottedAzaleaBlock), this.modelOutput)); + } + + this.blockStateOutput.accept(createSimpleBlock(pottedAzaleaBlock, multiVariant)); + } + + private void createBookshelf() { + TextureMapping textureMapping = TextureMapping.column(TextureMapping.getBlockTexture(Blocks.BOOKSHELF), TextureMapping.getBlockTexture(Blocks.OAK_PLANKS)); + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_COLUMN.create(Blocks.BOOKSHELF, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(Blocks.BOOKSHELF, multiVariant)); + } + + private void createRedstoneWire() { + this.registerSimpleFlatItemModel(Items.REDSTONE); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.REDSTONE_WIRE) + .with( + or( + condition() + .term(BlockStateProperties.NORTH_REDSTONE, RedstoneSide.NONE) + .term(BlockStateProperties.EAST_REDSTONE, RedstoneSide.NONE) + .term(BlockStateProperties.SOUTH_REDSTONE, RedstoneSide.NONE) + .term(BlockStateProperties.WEST_REDSTONE, RedstoneSide.NONE), + condition() + .term(BlockStateProperties.NORTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP) + .term(BlockStateProperties.EAST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + condition() + .term(BlockStateProperties.EAST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP) + .term(BlockStateProperties.SOUTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + condition() + .term(BlockStateProperties.SOUTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP) + .term(BlockStateProperties.WEST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + condition() + .term(BlockStateProperties.WEST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP) + .term(BlockStateProperties.NORTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP) + ), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_dot")) + ) + .with( + condition().term(BlockStateProperties.NORTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_side0")) + ) + .with( + condition().term(BlockStateProperties.SOUTH_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_side_alt0")) + ) + .with( + condition().term(BlockStateProperties.EAST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_side_alt1")).with(Y_ROT_270) + ) + .with( + condition().term(BlockStateProperties.WEST_REDSTONE, RedstoneSide.SIDE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_side1")).with(Y_ROT_270) + ) + .with( + condition().term(BlockStateProperties.NORTH_REDSTONE, RedstoneSide.UP), plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_up")) + ) + .with( + condition().term(BlockStateProperties.EAST_REDSTONE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_up")).with(Y_ROT_90) + ) + .with( + condition().term(BlockStateProperties.SOUTH_REDSTONE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_up")).with(Y_ROT_180) + ) + .with( + condition().term(BlockStateProperties.WEST_REDSTONE, RedstoneSide.UP), + plainVariant(ModelLocationUtils.decorateBlockModelLocation("redstone_dust_up")).with(Y_ROT_270) + ) + ); + } + + private void createComparator() { + this.registerSimpleFlatItemModel(Items.COMPARATOR); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.COMPARATOR) + .with( + PropertyDispatch.initial(BlockStateProperties.MODE_COMPARATOR, BlockStateProperties.POWERED) + .select(ComparatorMode.COMPARE, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COMPARATOR))) + .select(ComparatorMode.COMPARE, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COMPARATOR, "_on"))) + .select(ComparatorMode.SUBTRACT, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COMPARATOR, "_subtract"))) + .select(ComparatorMode.SUBTRACT, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COMPARATOR, "_on_subtract"))) + ) + .with(ROTATION_HORIZONTAL_FACING_ALT) + ); + } + + private void createSmoothStoneSlab() { + TextureMapping textureMapping = TextureMapping.cube(Blocks.SMOOTH_STONE); + TextureMapping textureMapping2 = TextureMapping.column(TextureMapping.getBlockTexture(Blocks.SMOOTH_STONE_SLAB, "_side"), textureMapping.get(TextureSlot.TOP)); + MultiVariant multiVariant = plainVariant(ModelTemplates.SLAB_BOTTOM.create(Blocks.SMOOTH_STONE_SLAB, textureMapping2, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.SLAB_TOP.create(Blocks.SMOOTH_STONE_SLAB, textureMapping2, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant( + ModelTemplates.CUBE_COLUMN.createWithOverride(Blocks.SMOOTH_STONE_SLAB, "_double", textureMapping2, this.modelOutput) + ); + this.blockStateOutput.accept(createSlab(Blocks.SMOOTH_STONE_SLAB, multiVariant, multiVariant2, multiVariant3)); + this.blockStateOutput + .accept(createSimpleBlock(Blocks.SMOOTH_STONE, plainVariant(ModelTemplates.CUBE_ALL.create(Blocks.SMOOTH_STONE, textureMapping, this.modelOutput)))); + } + + private void createBrewingStand() { + this.registerSimpleFlatItemModel(Items.BREWING_STAND); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.BREWING_STAND) + .with(plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_0, true), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_bottle0"))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_1, true), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_bottle1"))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_2, true), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_bottle2"))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_0, false), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_empty0"))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_1, false), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_empty1"))) + .with(condition().term(BlockStateProperties.HAS_BOTTLE_2, false), plainVariant(TextureMapping.getBlockTexture(Blocks.BREWING_STAND, "_empty2"))) + ); + } + + private void createMushroomBlock(Block mushroomBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.SINGLE_FACE.create(mushroomBlock, TextureMapping.defaultTexture(mushroomBlock), this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.decorateBlockModelLocation("mushroom_block_inside")); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(mushroomBlock) + .with(condition().term(BlockStateProperties.NORTH, true), multiVariant) + .with(condition().term(BlockStateProperties.EAST, true), multiVariant.with(Y_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.SOUTH, true), multiVariant.with(Y_ROT_180).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.WEST, true), multiVariant.with(Y_ROT_270).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.UP, true), multiVariant.with(X_ROT_270).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.DOWN, true), multiVariant.with(X_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.NORTH, false), multiVariant2) + .with(condition().term(BlockStateProperties.EAST, false), multiVariant2.with(Y_ROT_90)) + .with(condition().term(BlockStateProperties.SOUTH, false), multiVariant2.with(Y_ROT_180)) + .with(condition().term(BlockStateProperties.WEST, false), multiVariant2.with(Y_ROT_270)) + .with(condition().term(BlockStateProperties.UP, false), multiVariant2.with(X_ROT_270)) + .with(condition().term(BlockStateProperties.DOWN, false), multiVariant2.with(X_ROT_90)) + ); + this.registerSimpleItemModel(mushroomBlock, TexturedModel.CUBE.createWithSuffix(mushroomBlock, "_inventory", this.modelOutput)); + } + + private void createCakeBlock() { + this.registerSimpleFlatItemModel(Items.CAKE); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.CAKE) + .with( + PropertyDispatch.initial(BlockStateProperties.BITES) + .select(0, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE))) + .select(1, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice1"))) + .select(2, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice2"))) + .select(3, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice3"))) + .select(4, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice4"))) + .select(5, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice5"))) + .select(6, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CAKE, "_slice6"))) + ) + ); + } + + private void createCartographyTable() { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.PARTICLE, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_side3")) + .put(TextureSlot.DOWN, TextureMapping.getBlockTexture(Blocks.DARK_OAK_PLANKS)) + .put(TextureSlot.UP, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_top")) + .put(TextureSlot.NORTH, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_side3")) + .put(TextureSlot.EAST, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_side3")) + .put(TextureSlot.SOUTH, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_side1")) + .put(TextureSlot.WEST, TextureMapping.getBlockTexture(Blocks.CARTOGRAPHY_TABLE, "_side2")); + this.blockStateOutput + .accept(createSimpleBlock(Blocks.CARTOGRAPHY_TABLE, plainVariant(ModelTemplates.CUBE.create(Blocks.CARTOGRAPHY_TABLE, textureMapping, this.modelOutput)))); + } + + private void createSmithingTable() { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.PARTICLE, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_front")) + .put(TextureSlot.DOWN, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_bottom")) + .put(TextureSlot.UP, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_top")) + .put(TextureSlot.NORTH, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_front")) + .put(TextureSlot.SOUTH, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_front")) + .put(TextureSlot.EAST, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_side")) + .put(TextureSlot.WEST, TextureMapping.getBlockTexture(Blocks.SMITHING_TABLE, "_side")); + this.blockStateOutput + .accept(createSimpleBlock(Blocks.SMITHING_TABLE, plainVariant(ModelTemplates.CUBE.create(Blocks.SMITHING_TABLE, textureMapping, this.modelOutput)))); + } + + private void createCraftingTableLike(Block craftingTableBlock, Block craftingTableMaterialBlock, BiFunction textureMappingGetter) { + TextureMapping textureMapping = (TextureMapping)textureMappingGetter.apply(craftingTableBlock, craftingTableMaterialBlock); + this.blockStateOutput + .accept(createSimpleBlock(craftingTableBlock, plainVariant(ModelTemplates.CUBE.create(craftingTableBlock, textureMapping, this.modelOutput)))); + } + + public void createGenericCube(Block block) { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.PARTICLE, TextureMapping.getBlockTexture(block, "_particle")) + .put(TextureSlot.DOWN, TextureMapping.getBlockTexture(block, "_down")) + .put(TextureSlot.UP, TextureMapping.getBlockTexture(block, "_up")) + .put(TextureSlot.NORTH, TextureMapping.getBlockTexture(block, "_north")) + .put(TextureSlot.SOUTH, TextureMapping.getBlockTexture(block, "_south")) + .put(TextureSlot.EAST, TextureMapping.getBlockTexture(block, "_east")) + .put(TextureSlot.WEST, TextureMapping.getBlockTexture(block, "_west")); + this.blockStateOutput.accept(createSimpleBlock(block, plainVariant(ModelTemplates.CUBE.create(block, textureMapping, this.modelOutput)))); + } + + private void createPumpkins() { + TextureMapping textureMapping = TextureMapping.column(Blocks.PUMPKIN); + this.blockStateOutput.accept(createSimpleBlock(Blocks.PUMPKIN, plainVariant(ModelLocationUtils.getModelLocation(Blocks.PUMPKIN)))); + this.createPumpkinVariant(Blocks.CARVED_PUMPKIN, textureMapping); + this.createPumpkinVariant(Blocks.JACK_O_LANTERN, textureMapping); + } + + private void createPumpkinVariant(Block pumpkinBlock, TextureMapping columnTextureMapping) { + MultiVariant multiVariant = plainVariant( + ModelTemplates.CUBE_ORIENTABLE + .create(pumpkinBlock, columnTextureMapping.copyAndUpdate(TextureSlot.FRONT, TextureMapping.getBlockTexture(pumpkinBlock)), this.modelOutput) + ); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(pumpkinBlock, multiVariant).with(ROTATION_HORIZONTAL_FACING)); + } + + private void createCauldrons() { + this.registerSimpleFlatItemModel(Items.CAULDRON); + this.createNonTemplateModelBlock(Blocks.CAULDRON); + this.blockStateOutput + .accept( + createSimpleBlock( + Blocks.LAVA_CAULDRON, + plainVariant( + ModelTemplates.CAULDRON_FULL + .create(Blocks.LAVA_CAULDRON, TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.LAVA, "_still")), this.modelOutput) + ) + ) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.WATER_CAULDRON) + .with( + PropertyDispatch.initial(LayeredCauldronBlock.LEVEL) + .select( + 1, + plainVariant( + ModelTemplates.CAULDRON_LEVEL1 + .createWithSuffix(Blocks.WATER_CAULDRON, "_level1", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.WATER, "_still")), this.modelOutput) + ) + ) + .select( + 2, + plainVariant( + ModelTemplates.CAULDRON_LEVEL2 + .createWithSuffix(Blocks.WATER_CAULDRON, "_level2", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.WATER, "_still")), this.modelOutput) + ) + ) + .select( + 3, + plainVariant( + ModelTemplates.CAULDRON_FULL + .createWithSuffix(Blocks.WATER_CAULDRON, "_full", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.WATER, "_still")), this.modelOutput) + ) + ) + ) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.POWDER_SNOW_CAULDRON) + .with( + PropertyDispatch.initial(LayeredCauldronBlock.LEVEL) + .select( + 1, + plainVariant( + ModelTemplates.CAULDRON_LEVEL1 + .createWithSuffix( + Blocks.POWDER_SNOW_CAULDRON, "_level1", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.POWDER_SNOW)), this.modelOutput + ) + ) + ) + .select( + 2, + plainVariant( + ModelTemplates.CAULDRON_LEVEL2 + .createWithSuffix( + Blocks.POWDER_SNOW_CAULDRON, "_level2", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.POWDER_SNOW)), this.modelOutput + ) + ) + ) + .select( + 3, + plainVariant( + ModelTemplates.CAULDRON_FULL + .createWithSuffix(Blocks.POWDER_SNOW_CAULDRON, "_full", TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.POWDER_SNOW)), this.modelOutput) + ) + ) + ) + ); + } + + private void createChorusFlower() { + TextureMapping textureMapping = TextureMapping.defaultTexture(Blocks.CHORUS_FLOWER); + MultiVariant multiVariant = plainVariant(ModelTemplates.CHORUS_FLOWER.create(Blocks.CHORUS_FLOWER, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant( + this.createSuffixedVariant( + Blocks.CHORUS_FLOWER, "_dead", ModelTemplates.CHORUS_FLOWER, resourceLocation -> textureMapping.copyAndUpdate(TextureSlot.TEXTURE, resourceLocation) + ) + ); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.CHORUS_FLOWER).with(createEmptyOrFullDispatch(BlockStateProperties.AGE_5, 5, multiVariant2, multiVariant))); + } + + private void createCrafterBlock() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CRAFTER)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CRAFTER, "_triggered")); + MultiVariant multiVariant3 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CRAFTER, "_crafting")); + MultiVariant multiVariant4 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CRAFTER, "_crafting_triggered")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.CRAFTER) + .with( + PropertyDispatch.initial(BlockStateProperties.TRIGGERED, CrafterBlock.CRAFTING) + .select(false, false, multiVariant) + .select(true, true, multiVariant4) + .select(true, false, multiVariant2) + .select(false, true, multiVariant3) + ) + .with(PropertyDispatch.modify(BlockStateProperties.ORIENTATION).generate(BlockModelGenerators::applyRotation)) + ); + } + + private void createDispenserBlock(Block dispenserBlock) { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.FURNACE, "_top")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.FURNACE, "_side")) + .put(TextureSlot.FRONT, TextureMapping.getBlockTexture(dispenserBlock, "_front")); + TextureMapping textureMapping2 = new TextureMapping() + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.FURNACE, "_top")) + .put(TextureSlot.FRONT, TextureMapping.getBlockTexture(dispenserBlock, "_front_vertical")); + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_ORIENTABLE.create(dispenserBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CUBE_ORIENTABLE_VERTICAL.create(dispenserBlock, textureMapping2, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(dispenserBlock) + .with( + PropertyDispatch.initial(BlockStateProperties.FACING) + .select(Direction.DOWN, multiVariant2.with(X_ROT_180)) + .select(Direction.UP, multiVariant2) + .select(Direction.NORTH, multiVariant) + .select(Direction.EAST, multiVariant.with(Y_ROT_90)) + .select(Direction.SOUTH, multiVariant.with(Y_ROT_180)) + .select(Direction.WEST, multiVariant.with(Y_ROT_270)) + ) + ); + } + + private void createEndPortalFrame() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.END_PORTAL_FRAME)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.END_PORTAL_FRAME, "_filled")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.END_PORTAL_FRAME) + .with(PropertyDispatch.initial(BlockStateProperties.EYE).select(false, multiVariant).select(true, multiVariant2)) + .with(ROTATION_HORIZONTAL_FACING_ALT) + ); + } + + private void createChorusPlant() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CHORUS_PLANT, "_side")); + net.minecraft.client.renderer.block.model.Variant variant = plainModel(ModelLocationUtils.getModelLocation(Blocks.CHORUS_PLANT, "_noside")); + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(ModelLocationUtils.getModelLocation(Blocks.CHORUS_PLANT, "_noside1")); + net.minecraft.client.renderer.block.model.Variant variant3 = plainModel(ModelLocationUtils.getModelLocation(Blocks.CHORUS_PLANT, "_noside2")); + net.minecraft.client.renderer.block.model.Variant variant4 = plainModel(ModelLocationUtils.getModelLocation(Blocks.CHORUS_PLANT, "_noside3")); + net.minecraft.client.renderer.block.model.Variant variant5 = variant.with(UV_LOCK); + net.minecraft.client.renderer.block.model.Variant variant6 = variant2.with(UV_LOCK); + net.minecraft.client.renderer.block.model.Variant variant7 = variant3.with(UV_LOCK); + net.minecraft.client.renderer.block.model.Variant variant8 = variant4.with(UV_LOCK); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.CHORUS_PLANT) + .with(condition().term(BlockStateProperties.NORTH, true), multiVariant) + .with(condition().term(BlockStateProperties.EAST, true), multiVariant.with(Y_ROT_90).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.SOUTH, true), multiVariant.with(Y_ROT_180).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.WEST, true), multiVariant.with(Y_ROT_270).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.UP, true), multiVariant.with(X_ROT_270).with(UV_LOCK)) + .with(condition().term(BlockStateProperties.DOWN, true), multiVariant.with(X_ROT_90).with(UV_LOCK)) + .with( + condition().term(BlockStateProperties.NORTH, false), + new MultiVariant(WeightedList.of(new Weighted<>(variant, 2), new Weighted<>(variant2, 1), new Weighted<>(variant3, 1), new Weighted<>(variant4, 1))) + ) + .with( + condition().term(BlockStateProperties.EAST, false), + new MultiVariant( + WeightedList.of( + new Weighted<>(variant6.with(Y_ROT_90), 1), + new Weighted<>(variant7.with(Y_ROT_90), 1), + new Weighted<>(variant8.with(Y_ROT_90), 1), + new Weighted<>(variant5.with(Y_ROT_90), 2) + ) + ) + ) + .with( + condition().term(BlockStateProperties.SOUTH, false), + new MultiVariant( + WeightedList.of( + new Weighted<>(variant7.with(Y_ROT_180), 1), + new Weighted<>(variant8.with(Y_ROT_180), 1), + new Weighted<>(variant5.with(Y_ROT_180), 2), + new Weighted<>(variant6.with(Y_ROT_180), 1) + ) + ) + ) + .with( + condition().term(BlockStateProperties.WEST, false), + new MultiVariant( + WeightedList.of( + new Weighted<>(variant8.with(Y_ROT_270), 1), + new Weighted<>(variant5.with(Y_ROT_270), 2), + new Weighted<>(variant6.with(Y_ROT_270), 1), + new Weighted<>(variant7.with(Y_ROT_270), 1) + ) + ) + ) + .with( + condition().term(BlockStateProperties.UP, false), + new MultiVariant( + WeightedList.of( + new Weighted<>(variant5.with(X_ROT_270), 2), + new Weighted<>(variant8.with(X_ROT_270), 1), + new Weighted<>(variant6.with(X_ROT_270), 1), + new Weighted<>(variant7.with(X_ROT_270), 1) + ) + ) + ) + .with( + condition().term(BlockStateProperties.DOWN, false), + new MultiVariant( + WeightedList.of( + new Weighted<>(variant8.with(X_ROT_90), 1), + new Weighted<>(variant7.with(X_ROT_90), 1), + new Weighted<>(variant6.with(X_ROT_90), 1), + new Weighted<>(variant5.with(X_ROT_90), 2) + ) + ) + ) + ); + } + + private void createComposter() { + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.COMPOSTER) + .with(plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 1), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents1"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 2), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents2"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 3), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents3"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 4), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents4"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 5), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents5"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 6), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents6"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 7), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents7"))) + .with(condition().term(BlockStateProperties.LEVEL_COMPOSTER, 8), plainVariant(TextureMapping.getBlockTexture(Blocks.COMPOSTER, "_contents_ready"))) + ); + } + + private void createCopperBulb(Block bulbBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_ALL.create(bulbBlock, TextureMapping.cube(bulbBlock), this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(this.createSuffixedVariant(bulbBlock, "_powered", ModelTemplates.CUBE_ALL, TextureMapping::cube)); + MultiVariant multiVariant3 = plainVariant(this.createSuffixedVariant(bulbBlock, "_lit", ModelTemplates.CUBE_ALL, TextureMapping::cube)); + MultiVariant multiVariant4 = plainVariant(this.createSuffixedVariant(bulbBlock, "_lit_powered", ModelTemplates.CUBE_ALL, TextureMapping::cube)); + this.blockStateOutput.accept(createCopperBulb(bulbBlock, multiVariant, multiVariant3, multiVariant2, multiVariant4)); + } + + private static BlockModelDefinitionGenerator createCopperBulb( + Block block, MultiVariant unlit, MultiVariant unlitPowered, MultiVariant lit, MultiVariant litPowered + ) { + return MultiVariantGenerator.dispatch(block) + .with(PropertyDispatch.initial(BlockStateProperties.LIT, BlockStateProperties.POWERED).generate((boolean_, boolean2) -> { + if (boolean_) { + return boolean2 ? litPowered : unlitPowered; + } else { + return boolean2 ? lit : unlit; + } + })); + } + + private void copyCopperBulbModel(Block bulbBlock, Block sourceBlock) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(bulbBlock)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(bulbBlock, "_powered")); + MultiVariant multiVariant3 = plainVariant(ModelLocationUtils.getModelLocation(bulbBlock, "_lit")); + MultiVariant multiVariant4 = plainVariant(ModelLocationUtils.getModelLocation(bulbBlock, "_lit_powered")); + this.itemModelOutput.copy(bulbBlock.asItem(), sourceBlock.asItem()); + this.blockStateOutput.accept(createCopperBulb(sourceBlock, multiVariant, multiVariant3, multiVariant2, multiVariant4)); + } + + private void createAmethystCluster(Block amethystBlock) { + MultiVariant multiVariant = plainVariant(ModelTemplates.CROSS.create(amethystBlock, TextureMapping.cross(amethystBlock), this.modelOutput)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(amethystBlock, multiVariant).with(ROTATIONS_COLUMN_WITH_FACING)); + } + + private void createAmethystClusters() { + this.createAmethystCluster(Blocks.SMALL_AMETHYST_BUD); + this.createAmethystCluster(Blocks.MEDIUM_AMETHYST_BUD); + this.createAmethystCluster(Blocks.LARGE_AMETHYST_BUD); + this.createAmethystCluster(Blocks.AMETHYST_CLUSTER); + } + + private void createPointedDripstone() { + PropertyDispatch.C2 c2 = PropertyDispatch.initial( + BlockStateProperties.VERTICAL_DIRECTION, BlockStateProperties.DRIPSTONE_THICKNESS + ); + + for (DripstoneThickness dripstoneThickness : DripstoneThickness.values()) { + c2.select(Direction.UP, dripstoneThickness, this.createPointedDripstoneVariant(Direction.UP, dripstoneThickness)); + } + + for (DripstoneThickness dripstoneThickness : DripstoneThickness.values()) { + c2.select(Direction.DOWN, dripstoneThickness, this.createPointedDripstoneVariant(Direction.DOWN, dripstoneThickness)); + } + + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.POINTED_DRIPSTONE).with(c2)); + } + + private MultiVariant createPointedDripstoneVariant(Direction direction, DripstoneThickness thickness) { + String string = "_" + direction.getSerializedName() + "_" + thickness.getSerializedName(); + TextureMapping textureMapping = TextureMapping.cross(TextureMapping.getBlockTexture(Blocks.POINTED_DRIPSTONE, string)); + return plainVariant(ModelTemplates.POINTED_DRIPSTONE.createWithSuffix(Blocks.POINTED_DRIPSTONE, string, textureMapping, this.modelOutput)); + } + + private void createNyliumBlock(Block nyliumBlock) { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.BOTTOM, TextureMapping.getBlockTexture(Blocks.NETHERRACK)) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(nyliumBlock)) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(nyliumBlock, "_side")); + this.blockStateOutput + .accept(createSimpleBlock(nyliumBlock, plainVariant(ModelTemplates.CUBE_BOTTOM_TOP.create(nyliumBlock, textureMapping, this.modelOutput)))); + } + + private void createDaylightDetector() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.DAYLIGHT_DETECTOR, "_side"); + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.DAYLIGHT_DETECTOR, "_top")) + .put(TextureSlot.SIDE, resourceLocation); + TextureMapping textureMapping2 = new TextureMapping() + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.DAYLIGHT_DETECTOR, "_inverted_top")) + .put(TextureSlot.SIDE, resourceLocation); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.DAYLIGHT_DETECTOR) + .with( + PropertyDispatch.initial(BlockStateProperties.INVERTED) + .select(false, plainVariant(ModelTemplates.DAYLIGHT_DETECTOR.create(Blocks.DAYLIGHT_DETECTOR, textureMapping, this.modelOutput))) + .select( + true, + plainVariant( + ModelTemplates.DAYLIGHT_DETECTOR.create(ModelLocationUtils.getModelLocation(Blocks.DAYLIGHT_DETECTOR, "_inverted"), textureMapping2, this.modelOutput) + ) + ) + ) + ); + } + + private void createRotatableColumn(Block rotatableColumnBlock) { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(rotatableColumnBlock, plainVariant(ModelLocationUtils.getModelLocation(rotatableColumnBlock))) + .with(ROTATIONS_COLUMN_WITH_FACING) + ); + } + + private void createLightningRod() { + Block block = Blocks.LIGHTNING_ROD; + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block, "_on")); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(block)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with(createBooleanModelDispatch(BlockStateProperties.POWERED, multiVariant, multiVariant2)) + .with(ROTATIONS_COLUMN_WITH_FACING) + ); + } + + private void createFarmland() { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.DIRT, TextureMapping.getBlockTexture(Blocks.DIRT)) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.FARMLAND)); + TextureMapping textureMapping2 = new TextureMapping() + .put(TextureSlot.DIRT, TextureMapping.getBlockTexture(Blocks.DIRT)) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.FARMLAND, "_moist")); + MultiVariant multiVariant = plainVariant(ModelTemplates.FARMLAND.create(Blocks.FARMLAND, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant( + ModelTemplates.FARMLAND.create(TextureMapping.getBlockTexture(Blocks.FARMLAND, "_moist"), textureMapping2, this.modelOutput) + ); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.FARMLAND).with(createEmptyOrFullDispatch(BlockStateProperties.MOISTURE, 7, multiVariant2, multiVariant))); + } + + private MultiVariant createFloorFireModels(Block block) { + return variants( + plainModel(ModelTemplates.FIRE_FLOOR.create(ModelLocationUtils.getModelLocation(block, "_floor0"), TextureMapping.fire0(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_FLOOR.create(ModelLocationUtils.getModelLocation(block, "_floor1"), TextureMapping.fire1(block), this.modelOutput)) + ); + } + + private MultiVariant createSideFireModels(Block block) { + return variants( + plainModel(ModelTemplates.FIRE_SIDE.create(ModelLocationUtils.getModelLocation(block, "_side0"), TextureMapping.fire0(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_SIDE.create(ModelLocationUtils.getModelLocation(block, "_side1"), TextureMapping.fire1(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_SIDE_ALT.create(ModelLocationUtils.getModelLocation(block, "_side_alt0"), TextureMapping.fire0(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_SIDE_ALT.create(ModelLocationUtils.getModelLocation(block, "_side_alt1"), TextureMapping.fire1(block), this.modelOutput)) + ); + } + + private MultiVariant createTopFireModels(Block block) { + return variants( + plainModel(ModelTemplates.FIRE_UP.create(ModelLocationUtils.getModelLocation(block, "_up0"), TextureMapping.fire0(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_UP.create(ModelLocationUtils.getModelLocation(block, "_up1"), TextureMapping.fire1(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_UP_ALT.create(ModelLocationUtils.getModelLocation(block, "_up_alt0"), TextureMapping.fire0(block), this.modelOutput)), + plainModel(ModelTemplates.FIRE_UP_ALT.create(ModelLocationUtils.getModelLocation(block, "_up_alt1"), TextureMapping.fire1(block), this.modelOutput)) + ); + } + + private void createFire() { + ConditionBuilder conditionBuilder = condition() + .term(BlockStateProperties.NORTH, false) + .term(BlockStateProperties.EAST, false) + .term(BlockStateProperties.SOUTH, false) + .term(BlockStateProperties.WEST, false) + .term(BlockStateProperties.UP, false); + MultiVariant multiVariant = this.createFloorFireModels(Blocks.FIRE); + MultiVariant multiVariant2 = this.createSideFireModels(Blocks.FIRE); + MultiVariant multiVariant3 = this.createTopFireModels(Blocks.FIRE); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.FIRE) + .with(conditionBuilder, multiVariant) + .with(or(condition().term(BlockStateProperties.NORTH, true), conditionBuilder), multiVariant2) + .with(or(condition().term(BlockStateProperties.EAST, true), conditionBuilder), multiVariant2.with(Y_ROT_90)) + .with(or(condition().term(BlockStateProperties.SOUTH, true), conditionBuilder), multiVariant2.with(Y_ROT_180)) + .with(or(condition().term(BlockStateProperties.WEST, true), conditionBuilder), multiVariant2.with(Y_ROT_270)) + .with(condition().term(BlockStateProperties.UP, true), multiVariant3) + ); + } + + private void createSoulFire() { + MultiVariant multiVariant = this.createFloorFireModels(Blocks.SOUL_FIRE); + MultiVariant multiVariant2 = this.createSideFireModels(Blocks.SOUL_FIRE); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.SOUL_FIRE) + .with(multiVariant) + .with(multiVariant2) + .with(multiVariant2.with(Y_ROT_90)) + .with(multiVariant2.with(Y_ROT_180)) + .with(multiVariant2.with(Y_ROT_270)) + ); + } + + private void createLantern(Block lanternBlock) { + MultiVariant multiVariant = plainVariant(TexturedModel.LANTERN.create(lanternBlock, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(TexturedModel.HANGING_LANTERN.create(lanternBlock, this.modelOutput)); + this.registerSimpleFlatItemModel(lanternBlock.asItem()); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(lanternBlock).with(createBooleanModelDispatch(BlockStateProperties.HANGING, multiVariant2, multiVariant))); + } + + private void createMuddyMangroveRoots() { + TextureMapping textureMapping = TextureMapping.column( + TextureMapping.getBlockTexture(Blocks.MUDDY_MANGROVE_ROOTS, "_side"), TextureMapping.getBlockTexture(Blocks.MUDDY_MANGROVE_ROOTS, "_top") + ); + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_COLUMN.create(Blocks.MUDDY_MANGROVE_ROOTS, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createAxisAlignedPillarBlock(Blocks.MUDDY_MANGROVE_ROOTS, multiVariant)); + } + + private void createMangrovePropagule() { + this.registerSimpleFlatItemModel(Items.MANGROVE_PROPAGULE); + Block block = Blocks.MANGROVE_PROPAGULE; + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.MANGROVE_PROPAGULE) + .with( + PropertyDispatch.initial(MangrovePropaguleBlock.HANGING, MangrovePropaguleBlock.AGE) + .generate((boolean_, integer) -> boolean_ ? plainVariant(ModelLocationUtils.getModelLocation(block, "_hanging_" + integer)) : multiVariant) + ) + ); + } + + private void createFrostedIce() { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.FROSTED_ICE) + .with( + PropertyDispatch.initial(BlockStateProperties.AGE_3) + .select(0, plainVariant(this.createSuffixedVariant(Blocks.FROSTED_ICE, "_0", ModelTemplates.CUBE_ALL, TextureMapping::cube))) + .select(1, plainVariant(this.createSuffixedVariant(Blocks.FROSTED_ICE, "_1", ModelTemplates.CUBE_ALL, TextureMapping::cube))) + .select(2, plainVariant(this.createSuffixedVariant(Blocks.FROSTED_ICE, "_2", ModelTemplates.CUBE_ALL, TextureMapping::cube))) + .select(3, plainVariant(this.createSuffixedVariant(Blocks.FROSTED_ICE, "_3", ModelTemplates.CUBE_ALL, TextureMapping::cube))) + ) + ); + } + + private void createGrassBlocks() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.DIRT); + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.BOTTOM, resourceLocation) + .copyForced(TextureSlot.BOTTOM, TextureSlot.PARTICLE) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.GRASS_BLOCK, "_top")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.GRASS_BLOCK, "_snow")); + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_BOTTOM_TOP.createWithSuffix(Blocks.GRASS_BLOCK, "_snow", textureMapping, this.modelOutput)); + ResourceLocation resourceLocation2 = ModelLocationUtils.getModelLocation(Blocks.GRASS_BLOCK); + this.createGrassLikeBlock(Blocks.GRASS_BLOCK, createRotatedVariants(plainModel(resourceLocation2)), multiVariant); + this.registerSimpleTintedItemModel(Blocks.GRASS_BLOCK, resourceLocation2, new GrassColorSource()); + MultiVariant multiVariant2 = createRotatedVariants( + plainModel( + TexturedModel.CUBE_TOP_BOTTOM + .get(Blocks.MYCELIUM) + .updateTextures(textureMappingx -> textureMappingx.put(TextureSlot.BOTTOM, resourceLocation)) + .create(Blocks.MYCELIUM, this.modelOutput) + ) + ); + this.createGrassLikeBlock(Blocks.MYCELIUM, multiVariant2, multiVariant); + MultiVariant multiVariant3 = createRotatedVariants( + plainModel( + TexturedModel.CUBE_TOP_BOTTOM + .get(Blocks.PODZOL) + .updateTextures(textureMappingx -> textureMappingx.put(TextureSlot.BOTTOM, resourceLocation)) + .create(Blocks.PODZOL, this.modelOutput) + ) + ); + this.createGrassLikeBlock(Blocks.PODZOL, multiVariant3, multiVariant); + } + + private void createGrassLikeBlock(Block block, MultiVariant variants, MultiVariant snowyVariants) { + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(block).with(PropertyDispatch.initial(BlockStateProperties.SNOWY).select(true, snowyVariants).select(false, variants))); + } + + private void createCocoa() { + this.registerSimpleFlatItemModel(Items.COCOA_BEANS); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.COCOA) + .with( + PropertyDispatch.initial(BlockStateProperties.AGE_2) + .select(0, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COCOA, "_stage0"))) + .select(1, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COCOA, "_stage1"))) + .select(2, plainVariant(ModelLocationUtils.getModelLocation(Blocks.COCOA, "_stage2"))) + ) + .with(ROTATION_HORIZONTAL_FACING_ALT) + ); + } + + private void createDirtPath() { + net.minecraft.client.renderer.block.model.Variant variant = plainModel(ModelLocationUtils.getModelLocation(Blocks.DIRT_PATH)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.DIRT_PATH, createRotatedVariants(variant))); + } + + private void createWeightedPressurePlate(Block pressurePlateBlock, Block plateMaterialBlock) { + TextureMapping textureMapping = TextureMapping.defaultTexture(plateMaterialBlock); + MultiVariant multiVariant = plainVariant(ModelTemplates.PRESSURE_PLATE_UP.create(pressurePlateBlock, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.PRESSURE_PLATE_DOWN.create(pressurePlateBlock, textureMapping, this.modelOutput)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(pressurePlateBlock).with(createEmptyOrFullDispatch(BlockStateProperties.POWER, 1, multiVariant2, multiVariant))); + } + + private void createHopper() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.HOPPER)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.HOPPER, "_side")); + this.registerSimpleFlatItemModel(Items.HOPPER); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.HOPPER) + .with( + PropertyDispatch.initial(BlockStateProperties.FACING_HOPPER) + .select(Direction.DOWN, multiVariant) + .select(Direction.NORTH, multiVariant2) + .select(Direction.EAST, multiVariant2.with(Y_ROT_90)) + .select(Direction.SOUTH, multiVariant2.with(Y_ROT_180)) + .select(Direction.WEST, multiVariant2.with(Y_ROT_270)) + ) + ); + } + + private void copyModel(Block sourceBlock, Block targetBlock) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(sourceBlock)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(targetBlock, multiVariant)); + this.itemModelOutput.copy(sourceBlock.asItem(), targetBlock.asItem()); + } + + private void createIronBars() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_post_ends")); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_post")); + MultiVariant multiVariant3 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_cap")); + MultiVariant multiVariant4 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_cap_alt")); + MultiVariant multiVariant5 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_side")); + MultiVariant multiVariant6 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.IRON_BARS, "_side_alt")); + this.blockStateOutput + .accept( + MultiPartGenerator.multiPart(Blocks.IRON_BARS) + .with(multiVariant) + .with( + condition() + .term(BlockStateProperties.NORTH, false) + .term(BlockStateProperties.EAST, false) + .term(BlockStateProperties.SOUTH, false) + .term(BlockStateProperties.WEST, false), + multiVariant2 + ) + .with( + condition() + .term(BlockStateProperties.NORTH, true) + .term(BlockStateProperties.EAST, false) + .term(BlockStateProperties.SOUTH, false) + .term(BlockStateProperties.WEST, false), + multiVariant3 + ) + .with( + condition() + .term(BlockStateProperties.NORTH, false) + .term(BlockStateProperties.EAST, true) + .term(BlockStateProperties.SOUTH, false) + .term(BlockStateProperties.WEST, false), + multiVariant3.with(Y_ROT_90) + ) + .with( + condition() + .term(BlockStateProperties.NORTH, false) + .term(BlockStateProperties.EAST, false) + .term(BlockStateProperties.SOUTH, true) + .term(BlockStateProperties.WEST, false), + multiVariant4 + ) + .with( + condition() + .term(BlockStateProperties.NORTH, false) + .term(BlockStateProperties.EAST, false) + .term(BlockStateProperties.SOUTH, false) + .term(BlockStateProperties.WEST, true), + multiVariant4.with(Y_ROT_90) + ) + .with(condition().term(BlockStateProperties.NORTH, true), multiVariant5) + .with(condition().term(BlockStateProperties.EAST, true), multiVariant5.with(Y_ROT_90)) + .with(condition().term(BlockStateProperties.SOUTH, true), multiVariant6) + .with(condition().term(BlockStateProperties.WEST, true), multiVariant6.with(Y_ROT_90)) + ); + this.registerSimpleFlatItemModel(Blocks.IRON_BARS); + } + + private void createNonTemplateHorizontalBlock(Block horizontalBlock) { + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(horizontalBlock, plainVariant(ModelLocationUtils.getModelLocation(horizontalBlock))).with(ROTATION_HORIZONTAL_FACING)); + } + + private void createLever() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.LEVER)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.LEVER, "_on")); + this.registerSimpleFlatItemModel(Blocks.LEVER); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.LEVER) + .with(createBooleanModelDispatch(BlockStateProperties.POWERED, multiVariant, multiVariant2)) + .with( + PropertyDispatch.modify(BlockStateProperties.ATTACH_FACE, BlockStateProperties.HORIZONTAL_FACING) + .select(AttachFace.CEILING, Direction.NORTH, X_ROT_180.then(Y_ROT_180)) + .select(AttachFace.CEILING, Direction.EAST, X_ROT_180.then(Y_ROT_270)) + .select(AttachFace.CEILING, Direction.SOUTH, X_ROT_180) + .select(AttachFace.CEILING, Direction.WEST, X_ROT_180.then(Y_ROT_90)) + .select(AttachFace.FLOOR, Direction.NORTH, NOP) + .select(AttachFace.FLOOR, Direction.EAST, Y_ROT_90) + .select(AttachFace.FLOOR, Direction.SOUTH, Y_ROT_180) + .select(AttachFace.FLOOR, Direction.WEST, Y_ROT_270) + .select(AttachFace.WALL, Direction.NORTH, X_ROT_90) + .select(AttachFace.WALL, Direction.EAST, X_ROT_90.then(Y_ROT_90)) + .select(AttachFace.WALL, Direction.SOUTH, X_ROT_90.then(Y_ROT_180)) + .select(AttachFace.WALL, Direction.WEST, X_ROT_90.then(Y_ROT_270)) + ) + ); + } + + private void createLilyPad() { + ResourceLocation resourceLocation = this.createFlatItemModelWithBlockTexture(Items.LILY_PAD, Blocks.LILY_PAD); + this.registerSimpleTintedItemModel(Blocks.LILY_PAD, resourceLocation, ItemModelUtils.constantTint(-9321636)); + net.minecraft.client.renderer.block.model.Variant variant = plainModel(ModelLocationUtils.getModelLocation(Blocks.LILY_PAD)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.LILY_PAD, createRotatedVariants(variant))); + } + + private void createFrogspawnBlock() { + this.registerSimpleFlatItemModel(Blocks.FROGSPAWN); + this.blockStateOutput.accept(createSimpleBlock(Blocks.FROGSPAWN, plainVariant(ModelLocationUtils.getModelLocation(Blocks.FROGSPAWN)))); + } + + private void createNetherPortalBlock() { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.NETHER_PORTAL) + .with( + PropertyDispatch.initial(BlockStateProperties.HORIZONTAL_AXIS) + .select(Direction.Axis.X, plainVariant(ModelLocationUtils.getModelLocation(Blocks.NETHER_PORTAL, "_ns"))) + .select(Direction.Axis.Z, plainVariant(ModelLocationUtils.getModelLocation(Blocks.NETHER_PORTAL, "_ew"))) + ) + ); + } + + private void createNetherrack() { + net.minecraft.client.renderer.block.model.Variant variant = plainModel(TexturedModel.CUBE.create(Blocks.NETHERRACK, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch( + Blocks.NETHERRACK, + variants( + variant, + variant.with(X_ROT_90), + variant.with(X_ROT_180), + variant.with(X_ROT_270), + variant.with(Y_ROT_90), + variant.with(Y_ROT_90.then(X_ROT_90)), + variant.with(Y_ROT_90.then(X_ROT_180)), + variant.with(Y_ROT_90.then(X_ROT_270)), + variant.with(Y_ROT_180), + variant.with(Y_ROT_180.then(X_ROT_90)), + variant.with(Y_ROT_180.then(X_ROT_180)), + variant.with(Y_ROT_180.then(X_ROT_270)), + variant.with(Y_ROT_270), + variant.with(Y_ROT_270.then(X_ROT_90)), + variant.with(Y_ROT_270.then(X_ROT_180)), + variant.with(Y_ROT_270.then(X_ROT_270)) + ) + ) + ); + } + + private void createObserver() { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.OBSERVER)); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.OBSERVER, "_on")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.OBSERVER) + .with(createBooleanModelDispatch(BlockStateProperties.POWERED, multiVariant2, multiVariant)) + .with(ROTATION_FACING) + ); + } + + private void createPistons() { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.BOTTOM, TextureMapping.getBlockTexture(Blocks.PISTON, "_bottom")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.PISTON, "_side")); + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.PISTON, "_top_sticky"); + ResourceLocation resourceLocation2 = TextureMapping.getBlockTexture(Blocks.PISTON, "_top"); + TextureMapping textureMapping2 = textureMapping.copyAndUpdate(TextureSlot.PLATFORM, resourceLocation); + TextureMapping textureMapping3 = textureMapping.copyAndUpdate(TextureSlot.PLATFORM, resourceLocation2); + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(Blocks.PISTON, "_base")); + this.createPistonVariant(Blocks.PISTON, multiVariant, textureMapping3); + this.createPistonVariant(Blocks.STICKY_PISTON, multiVariant, textureMapping2); + ResourceLocation resourceLocation3 = ModelTemplates.CUBE_BOTTOM_TOP + .createWithSuffix(Blocks.PISTON, "_inventory", textureMapping.copyAndUpdate(TextureSlot.TOP, resourceLocation2), this.modelOutput); + ResourceLocation resourceLocation4 = ModelTemplates.CUBE_BOTTOM_TOP + .createWithSuffix(Blocks.STICKY_PISTON, "_inventory", textureMapping.copyAndUpdate(TextureSlot.TOP, resourceLocation), this.modelOutput); + this.registerSimpleItemModel(Blocks.PISTON, resourceLocation3); + this.registerSimpleItemModel(Blocks.STICKY_PISTON, resourceLocation4); + } + + private void createPistonVariant(Block block, MultiVariant variants, TextureMapping topTextureMapping) { + MultiVariant multiVariant = plainVariant(ModelTemplates.PISTON.create(block, topTextureMapping, this.modelOutput)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(block).with(createBooleanModelDispatch(BlockStateProperties.EXTENDED, variants, multiVariant)).with(ROTATION_FACING)); + } + + private void createPistonHeads() { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.UNSTICKY, TextureMapping.getBlockTexture(Blocks.PISTON, "_top")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.PISTON, "_side")); + TextureMapping textureMapping2 = textureMapping.copyAndUpdate(TextureSlot.PLATFORM, TextureMapping.getBlockTexture(Blocks.PISTON, "_top_sticky")); + TextureMapping textureMapping3 = textureMapping.copyAndUpdate(TextureSlot.PLATFORM, TextureMapping.getBlockTexture(Blocks.PISTON, "_top")); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.PISTON_HEAD) + .with( + PropertyDispatch.initial(BlockStateProperties.SHORT, BlockStateProperties.PISTON_TYPE) + .select(false, PistonType.DEFAULT, plainVariant(ModelTemplates.PISTON_HEAD.createWithSuffix(Blocks.PISTON, "_head", textureMapping3, this.modelOutput))) + .select( + false, PistonType.STICKY, plainVariant(ModelTemplates.PISTON_HEAD.createWithSuffix(Blocks.PISTON, "_head_sticky", textureMapping2, this.modelOutput)) + ) + .select( + true, + PistonType.DEFAULT, + plainVariant(ModelTemplates.PISTON_HEAD_SHORT.createWithSuffix(Blocks.PISTON, "_head_short", textureMapping3, this.modelOutput)) + ) + .select( + true, + PistonType.STICKY, + plainVariant(ModelTemplates.PISTON_HEAD_SHORT.createWithSuffix(Blocks.PISTON, "_head_short_sticky", textureMapping2, this.modelOutput)) + ) + ) + .with(ROTATION_FACING) + ); + } + + private void createTrialSpawner() { + Block block = Blocks.TRIAL_SPAWNER; + TextureMapping textureMapping = TextureMapping.trialSpawner(block, "_side_inactive", "_top_inactive"); + TextureMapping textureMapping2 = TextureMapping.trialSpawner(block, "_side_active", "_top_active"); + TextureMapping textureMapping3 = TextureMapping.trialSpawner(block, "_side_active", "_top_ejecting_reward"); + TextureMapping textureMapping4 = TextureMapping.trialSpawner(block, "_side_inactive_ominous", "_top_inactive_ominous"); + TextureMapping textureMapping5 = TextureMapping.trialSpawner(block, "_side_active_ominous", "_top_active_ominous"); + TextureMapping textureMapping6 = TextureMapping.trialSpawner(block, "_side_active_ominous", "_top_ejecting_reward_ominous"); + ResourceLocation resourceLocation = ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.create(block, textureMapping, this.modelOutput); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.createWithSuffix(block, "_active", textureMapping2, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant( + ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.createWithSuffix(block, "_ejecting_reward", textureMapping3, this.modelOutput) + ); + MultiVariant multiVariant4 = plainVariant( + ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.createWithSuffix(block, "_inactive_ominous", textureMapping4, this.modelOutput) + ); + MultiVariant multiVariant5 = plainVariant( + ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.createWithSuffix(block, "_active_ominous", textureMapping5, this.modelOutput) + ); + MultiVariant multiVariant6 = plainVariant( + ModelTemplates.CUBE_BOTTOM_TOP_INNER_FACES.createWithSuffix(block, "_ejecting_reward_ominous", textureMapping6, this.modelOutput) + ); + this.registerSimpleItemModel(block, resourceLocation); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(block) + .with(PropertyDispatch.initial(BlockStateProperties.TRIAL_SPAWNER_STATE, BlockStateProperties.OMINOUS).generate((trialSpawnerState, boolean_) -> { + return switch (trialSpawnerState) { + case INACTIVE, COOLDOWN -> boolean_ ? multiVariant4 : multiVariant; + case WAITING_FOR_PLAYERS, ACTIVE, WAITING_FOR_REWARD_EJECTION -> boolean_ ? multiVariant5 : multiVariant2; + case EJECTING_REWARD -> boolean_ ? multiVariant6 : multiVariant3; + }; + })) + ); + } + + private void createVault() { + Block block = Blocks.VAULT; + TextureMapping textureMapping = TextureMapping.vault(block, "_front_off", "_side_off", "_top", "_bottom"); + TextureMapping textureMapping2 = TextureMapping.vault(block, "_front_on", "_side_on", "_top", "_bottom"); + TextureMapping textureMapping3 = TextureMapping.vault(block, "_front_ejecting", "_side_on", "_top", "_bottom"); + TextureMapping textureMapping4 = TextureMapping.vault(block, "_front_ejecting", "_side_on", "_top_ejecting", "_bottom"); + ResourceLocation resourceLocation = ModelTemplates.VAULT.create(block, textureMapping, this.modelOutput); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_active", textureMapping2, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_unlocking", textureMapping3, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_ejecting_reward", textureMapping4, this.modelOutput)); + TextureMapping textureMapping5 = TextureMapping.vault(block, "_front_off_ominous", "_side_off_ominous", "_top_ominous", "_bottom_ominous"); + TextureMapping textureMapping6 = TextureMapping.vault(block, "_front_on_ominous", "_side_on_ominous", "_top_ominous", "_bottom_ominous"); + TextureMapping textureMapping7 = TextureMapping.vault(block, "_front_ejecting_ominous", "_side_on_ominous", "_top_ominous", "_bottom_ominous"); + TextureMapping textureMapping8 = TextureMapping.vault(block, "_front_ejecting_ominous", "_side_on_ominous", "_top_ejecting_ominous", "_bottom_ominous"); + MultiVariant multiVariant5 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_ominous", textureMapping5, this.modelOutput)); + MultiVariant multiVariant6 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_active_ominous", textureMapping6, this.modelOutput)); + MultiVariant multiVariant7 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_unlocking_ominous", textureMapping7, this.modelOutput)); + MultiVariant multiVariant8 = plainVariant(ModelTemplates.VAULT.createWithSuffix(block, "_ejecting_reward_ominous", textureMapping8, this.modelOutput)); + this.registerSimpleItemModel(block, resourceLocation); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(block).with(PropertyDispatch.initial(VaultBlock.STATE, VaultBlock.OMINOUS).generate((vaultState, boolean_) -> { + return switch (vaultState) { + case INACTIVE -> boolean_ ? multiVariant5 : multiVariant; + case ACTIVE -> boolean_ ? multiVariant6 : multiVariant2; + case UNLOCKING -> boolean_ ? multiVariant7 : multiVariant3; + case EJECTING -> boolean_ ? multiVariant8 : multiVariant4; + }; + })).with(ROTATION_HORIZONTAL_FACING)); + } + + private void createSculkSensor() { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(Blocks.SCULK_SENSOR, "_inactive"); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.SCULK_SENSOR, "_active")); + this.registerSimpleItemModel(Blocks.SCULK_SENSOR, resourceLocation); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SCULK_SENSOR) + .with( + PropertyDispatch.initial(BlockStateProperties.SCULK_SENSOR_PHASE) + .generate( + sculkSensorPhase -> sculkSensorPhase != SculkSensorPhase.ACTIVE && sculkSensorPhase != SculkSensorPhase.COOLDOWN ? multiVariant : multiVariant2 + ) + ) + ); + } + + private void createCalibratedSculkSensor() { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(Blocks.CALIBRATED_SCULK_SENSOR, "_inactive"); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.CALIBRATED_SCULK_SENSOR, "_active")); + this.registerSimpleItemModel(Blocks.CALIBRATED_SCULK_SENSOR, resourceLocation); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.CALIBRATED_SCULK_SENSOR) + .with( + PropertyDispatch.initial(BlockStateProperties.SCULK_SENSOR_PHASE) + .generate( + sculkSensorPhase -> sculkSensorPhase != SculkSensorPhase.ACTIVE && sculkSensorPhase != SculkSensorPhase.COOLDOWN ? multiVariant : multiVariant2 + ) + ) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private void createSculkShrieker() { + ResourceLocation resourceLocation = ModelTemplates.SCULK_SHRIEKER.create(Blocks.SCULK_SHRIEKER, TextureMapping.sculkShrieker(false), this.modelOutput); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant( + ModelTemplates.SCULK_SHRIEKER.createWithSuffix(Blocks.SCULK_SHRIEKER, "_can_summon", TextureMapping.sculkShrieker(true), this.modelOutput) + ); + this.registerSimpleItemModel(Blocks.SCULK_SHRIEKER, resourceLocation); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.SCULK_SHRIEKER).with(createBooleanModelDispatch(BlockStateProperties.CAN_SUMMON, multiVariant2, multiVariant))); + } + + private void createScaffolding() { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(Blocks.SCAFFOLDING, "_stable"); + MultiVariant multiVariant = plainVariant(resourceLocation); + MultiVariant multiVariant2 = plainVariant(ModelLocationUtils.getModelLocation(Blocks.SCAFFOLDING, "_unstable")); + this.registerSimpleItemModel(Blocks.SCAFFOLDING, resourceLocation); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.SCAFFOLDING).with(createBooleanModelDispatch(BlockStateProperties.BOTTOM, multiVariant2, multiVariant))); + } + + private void createCaveVines() { + MultiVariant multiVariant = plainVariant(this.createSuffixedVariant(Blocks.CAVE_VINES, "", ModelTemplates.CROSS, TextureMapping::cross)); + MultiVariant multiVariant2 = plainVariant(this.createSuffixedVariant(Blocks.CAVE_VINES, "_lit", ModelTemplates.CROSS, TextureMapping::cross)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.CAVE_VINES).with(createBooleanModelDispatch(BlockStateProperties.BERRIES, multiVariant2, multiVariant))); + MultiVariant multiVariant3 = plainVariant(this.createSuffixedVariant(Blocks.CAVE_VINES_PLANT, "", ModelTemplates.CROSS, TextureMapping::cross)); + MultiVariant multiVariant4 = plainVariant(this.createSuffixedVariant(Blocks.CAVE_VINES_PLANT, "_lit", ModelTemplates.CROSS, TextureMapping::cross)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.CAVE_VINES_PLANT).with(createBooleanModelDispatch(BlockStateProperties.BERRIES, multiVariant4, multiVariant3))); + } + + private void createRedstoneLamp() { + MultiVariant multiVariant = plainVariant(TexturedModel.CUBE.create(Blocks.REDSTONE_LAMP, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(this.createSuffixedVariant(Blocks.REDSTONE_LAMP, "_on", ModelTemplates.CUBE_ALL, TextureMapping::cube)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.REDSTONE_LAMP).with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant2, multiVariant))); + } + + private void createNormalTorch(Block torchBlock, Block wallTorchBlock) { + TextureMapping textureMapping = TextureMapping.torch(torchBlock); + this.blockStateOutput.accept(createSimpleBlock(torchBlock, plainVariant(ModelTemplates.TORCH.create(torchBlock, textureMapping, this.modelOutput)))); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(wallTorchBlock, plainVariant(ModelTemplates.WALL_TORCH.create(wallTorchBlock, textureMapping, this.modelOutput))) + .with(ROTATION_TORCH) + ); + this.registerSimpleFlatItemModel(torchBlock); + } + + private void createRedstoneTorch() { + TextureMapping textureMapping = TextureMapping.torch(Blocks.REDSTONE_TORCH); + TextureMapping textureMapping2 = TextureMapping.torch(TextureMapping.getBlockTexture(Blocks.REDSTONE_TORCH, "_off")); + MultiVariant multiVariant = plainVariant(ModelTemplates.REDSTONE_TORCH.create(Blocks.REDSTONE_TORCH, textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.TORCH_UNLIT.createWithSuffix(Blocks.REDSTONE_TORCH, "_off", textureMapping2, this.modelOutput)); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(Blocks.REDSTONE_TORCH).with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant, multiVariant2))); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.REDSTONE_WALL_TORCH.create(Blocks.REDSTONE_WALL_TORCH, textureMapping, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant( + ModelTemplates.WALL_TORCH_UNLIT.createWithSuffix(Blocks.REDSTONE_WALL_TORCH, "_off", textureMapping2, this.modelOutput) + ); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.REDSTONE_WALL_TORCH) + .with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant3, multiVariant4)) + .with(ROTATION_TORCH) + ); + this.registerSimpleFlatItemModel(Blocks.REDSTONE_TORCH); + } + + private void createRepeater() { + this.registerSimpleFlatItemModel(Items.REPEATER); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.REPEATER) + .with( + PropertyDispatch.initial(BlockStateProperties.DELAY, BlockStateProperties.LOCKED, BlockStateProperties.POWERED) + .generate((integer, boolean_, boolean2) -> { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append('_').append(integer).append("tick"); + if (boolean2) { + stringBuilder.append("_on"); + } + + if (boolean_) { + stringBuilder.append("_locked"); + } + + return plainVariant(TextureMapping.getBlockTexture(Blocks.REPEATER, stringBuilder.toString())); + }) + ) + .with(ROTATION_HORIZONTAL_FACING_ALT) + ); + } + + private void createSeaPickle() { + this.registerSimpleFlatItemModel(Items.SEA_PICKLE); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SEA_PICKLE) + .with( + PropertyDispatch.initial(BlockStateProperties.PICKLES, BlockStateProperties.WATERLOGGED) + .select(1, false, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("dead_sea_pickle")))) + .select(2, false, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("two_dead_sea_pickles")))) + .select(3, false, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("three_dead_sea_pickles")))) + .select(4, false, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("four_dead_sea_pickles")))) + .select(1, true, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("sea_pickle")))) + .select(2, true, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("two_sea_pickles")))) + .select(3, true, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("three_sea_pickles")))) + .select(4, true, createRotatedVariants(plainModel(ModelLocationUtils.decorateBlockModelLocation("four_sea_pickles")))) + ) + ); + } + + private void createSnowBlocks() { + TextureMapping textureMapping = TextureMapping.cube(Blocks.SNOW); + MultiVariant multiVariant = plainVariant(ModelTemplates.CUBE_ALL.create(Blocks.SNOW_BLOCK, textureMapping, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SNOW) + .with( + PropertyDispatch.initial(BlockStateProperties.LAYERS) + .generate(integer -> integer < 8 ? plainVariant(ModelLocationUtils.getModelLocation(Blocks.SNOW, "_height" + integer * 2)) : multiVariant) + ) + ); + this.registerSimpleItemModel(Blocks.SNOW, ModelLocationUtils.getModelLocation(Blocks.SNOW, "_height2")); + this.blockStateOutput.accept(createSimpleBlock(Blocks.SNOW_BLOCK, multiVariant)); + } + + private void createStonecutter() { + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.STONECUTTER, plainVariant(ModelLocationUtils.getModelLocation(Blocks.STONECUTTER))).with(ROTATION_HORIZONTAL_FACING) + ); + } + + private void createStructureBlock() { + ResourceLocation resourceLocation = TexturedModel.CUBE.create(Blocks.STRUCTURE_BLOCK, this.modelOutput); + this.registerSimpleItemModel(Blocks.STRUCTURE_BLOCK, resourceLocation); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.STRUCTURE_BLOCK) + .with( + PropertyDispatch.initial(BlockStateProperties.STRUCTUREBLOCK_MODE) + .generate( + structureMode -> plainVariant( + this.createSuffixedVariant(Blocks.STRUCTURE_BLOCK, "_" + structureMode.getSerializedName(), ModelTemplates.CUBE_ALL, TextureMapping::cube) + ) + ) + ) + ); + } + + private void createTestBlock() { + Map map = new HashMap(); + + for (TestBlockMode testBlockMode : TestBlockMode.values()) { + map.put(testBlockMode, this.createSuffixedVariant(Blocks.TEST_BLOCK, "_" + testBlockMode.getSerializedName(), ModelTemplates.CUBE_ALL, TextureMapping::cube)); + } + + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.TEST_BLOCK) + .with(PropertyDispatch.initial(BlockStateProperties.TEST_BLOCK_MODE).generate(testBlockModex -> plainVariant((ResourceLocation)map.get(testBlockModex)))) + ); + this.itemModelOutput + .accept( + Items.TEST_BLOCK, + ItemModelUtils.selectBlockItemProperty( + TestBlock.MODE, + ItemModelUtils.plainModel((ResourceLocation)map.get(TestBlockMode.START)), + Map.of( + TestBlockMode.FAIL, + ItemModelUtils.plainModel((ResourceLocation)map.get(TestBlockMode.FAIL)), + TestBlockMode.LOG, + ItemModelUtils.plainModel((ResourceLocation)map.get(TestBlockMode.LOG)), + TestBlockMode.ACCEPT, + ItemModelUtils.plainModel((ResourceLocation)map.get(TestBlockMode.ACCEPT)) + ) + ) + ); + } + + private void createSweetBerryBush() { + this.registerSimpleFlatItemModel(Items.SWEET_BERRIES); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SWEET_BERRY_BUSH) + .with( + PropertyDispatch.initial(BlockStateProperties.AGE_3) + .generate(integer -> plainVariant(this.createSuffixedVariant(Blocks.SWEET_BERRY_BUSH, "_stage" + integer, ModelTemplates.CROSS, TextureMapping::cross))) + ) + ); + } + + private void createTripwire() { + this.registerSimpleFlatItemModel(Items.STRING); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.TRIPWIRE) + .with( + PropertyDispatch.initial( + BlockStateProperties.ATTACHED, BlockStateProperties.EAST, BlockStateProperties.NORTH, BlockStateProperties.SOUTH, BlockStateProperties.WEST + ) + .select(false, false, false, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ns"))) + .select(false, true, false, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_n")).with(Y_ROT_90)) + .select(false, false, true, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_n"))) + .select(false, false, false, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_n")).with(Y_ROT_180)) + .select(false, false, false, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_n")).with(Y_ROT_270)) + .select(false, true, true, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ne"))) + .select(false, true, false, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ne")).with(Y_ROT_90)) + .select(false, false, false, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ne")).with(Y_ROT_180)) + .select(false, false, true, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ne")).with(Y_ROT_270)) + .select(false, false, true, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ns"))) + .select(false, true, false, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_ns")).with(Y_ROT_90)) + .select(false, true, true, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_nse"))) + .select(false, true, false, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_nse")).with(Y_ROT_90)) + .select(false, false, true, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_nse")).with(Y_ROT_180)) + .select(false, true, true, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_nse")).with(Y_ROT_270)) + .select(false, true, true, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_nsew"))) + .select(true, false, false, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ns"))) + .select(true, false, true, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_n"))) + .select(true, false, false, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_n")).with(Y_ROT_180)) + .select(true, true, false, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_n")).with(Y_ROT_90)) + .select(true, false, false, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_n")).with(Y_ROT_270)) + .select(true, true, true, false, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ne"))) + .select(true, true, false, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ne")).with(Y_ROT_90)) + .select(true, false, false, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ne")).with(Y_ROT_180)) + .select(true, false, true, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ne")).with(Y_ROT_270)) + .select(true, false, true, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ns"))) + .select(true, true, false, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_ns")).with(Y_ROT_90)) + .select(true, true, true, true, false, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_nse"))) + .select(true, true, false, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_nse")).with(Y_ROT_90)) + .select(true, false, true, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_nse")).with(Y_ROT_180)) + .select(true, true, true, false, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_nse")).with(Y_ROT_270)) + .select(true, true, true, true, true, plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE, "_attached_nsew"))) + ) + ); + } + + private void createTripwireHook() { + this.registerSimpleFlatItemModel(Blocks.TRIPWIRE_HOOK); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.TRIPWIRE_HOOK) + .with( + PropertyDispatch.initial(BlockStateProperties.ATTACHED, BlockStateProperties.POWERED) + .generate( + (boolean_, boolean2) -> plainVariant(ModelLocationUtils.getModelLocation(Blocks.TRIPWIRE_HOOK, (boolean_ ? "_attached" : "") + (boolean2 ? "_on" : ""))) + ) + ) + .with(ROTATION_HORIZONTAL_FACING) + ); + } + + private net.minecraft.client.renderer.block.model.Variant createTurtleEggModel(int eggs, String variantName, TextureMapping textureMapping) { + return switch (eggs) { + case 1 -> plainModel( + ModelTemplates.TURTLE_EGG.create(ModelLocationUtils.decorateBlockModelLocation(variantName + "turtle_egg"), textureMapping, this.modelOutput) + ); + case 2 -> plainModel( + ModelTemplates.TWO_TURTLE_EGGS + .create(ModelLocationUtils.decorateBlockModelLocation("two_" + variantName + "turtle_eggs"), textureMapping, this.modelOutput) + ); + case 3 -> plainModel( + ModelTemplates.THREE_TURTLE_EGGS + .create(ModelLocationUtils.decorateBlockModelLocation("three_" + variantName + "turtle_eggs"), textureMapping, this.modelOutput) + ); + case 4 -> plainModel( + ModelTemplates.FOUR_TURTLE_EGGS + .create(ModelLocationUtils.decorateBlockModelLocation("four_" + variantName + "turtle_eggs"), textureMapping, this.modelOutput) + ); + default -> throw new UnsupportedOperationException(); + }; + } + + private net.minecraft.client.renderer.block.model.Variant createTurtleEggModel(int eggs, int hatchAmount) { + return switch (hatchAmount) { + case 0 -> this.createTurtleEggModel(eggs, "", TextureMapping.cube(TextureMapping.getBlockTexture(Blocks.TURTLE_EGG))); + case 1 -> this.createTurtleEggModel(eggs, "slightly_cracked_", TextureMapping.cube(TextureMapping.getBlockTexture(Blocks.TURTLE_EGG, "_slightly_cracked"))); + case 2 -> this.createTurtleEggModel(eggs, "very_cracked_", TextureMapping.cube(TextureMapping.getBlockTexture(Blocks.TURTLE_EGG, "_very_cracked"))); + default -> throw new UnsupportedOperationException(); + }; + } + + private void createTurtleEgg() { + this.registerSimpleFlatItemModel(Items.TURTLE_EGG); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.TURTLE_EGG) + .with( + PropertyDispatch.initial(BlockStateProperties.EGGS, BlockStateProperties.HATCH) + .generate((integer, integer2) -> createRotatedVariants(this.createTurtleEggModel(integer, integer2))) + ) + ); + } + + private void createSnifferEgg() { + this.registerSimpleFlatItemModel(Items.SNIFFER_EGG); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.SNIFFER_EGG).with(PropertyDispatch.initial(SnifferEggBlock.HATCH).generate(integer -> { + String string = switch (integer) { + case 1 -> "_slightly_cracked"; + case 2 -> "_very_cracked"; + default -> "_not_cracked"; + }; + TextureMapping textureMapping = TextureMapping.snifferEgg(string); + return plainVariant(ModelTemplates.SNIFFER_EGG.createWithSuffix(Blocks.SNIFFER_EGG, string, textureMapping, this.modelOutput)); + }))); + } + + private void createMultiface(Block multifaceBlock) { + this.registerSimpleFlatItemModel(multifaceBlock); + this.createMultifaceBlockStates(multifaceBlock); + } + + private void createMultiface(Block block, Item item) { + this.registerSimpleFlatItemModel(item); + this.createMultifaceBlockStates(block); + } + + private static > Map selectMultifaceProperties(StateHolder state, Function facePropertyGetter) { + Builder builder = ImmutableMap.builderWithExpectedSize(MULTIFACE_GENERATOR.size()); + MULTIFACE_GENERATOR.forEach((direction, variantMutator) -> { + T property = (T)facePropertyGetter.apply(direction); + if (state.hasProperty(property)) { + builder.put(property, variantMutator); + } + }); + return builder.build(); + } + + private void createMultifaceBlockStates(Block block) { + Map, VariantMutator> map = selectMultifaceProperties(block.defaultBlockState(), MultifaceBlock::getFaceProperty); + ConditionBuilder conditionBuilder = condition(); + map.forEach((property, variantMutator) -> conditionBuilder.term(property, false)); + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block)); + MultiPartGenerator multiPartGenerator = MultiPartGenerator.multiPart(block); + map.forEach((property, variantMutator) -> { + multiPartGenerator.with(condition().term(property, true), multiVariant.with(variantMutator)); + multiPartGenerator.with(conditionBuilder, multiVariant.with(variantMutator)); + }); + this.blockStateOutput.accept(multiPartGenerator); + } + + private void createMossyCarpet(Block block) { + Map, VariantMutator> map = selectMultifaceProperties(block.defaultBlockState(), MossyCarpetBlock::getPropertyForFace); + ConditionBuilder conditionBuilder = condition().term(MossyCarpetBlock.BASE, false); + map.forEach((property, variantMutator) -> conditionBuilder.term(property, WallSide.NONE)); + MultiVariant multiVariant = plainVariant(TexturedModel.CARPET.create(block, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant( + TexturedModel.MOSSY_CARPET_SIDE + .get(block) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(block, "_side_tall"))) + .createWithSuffix(block, "_side_tall", this.modelOutput) + ); + MultiVariant multiVariant3 = plainVariant( + TexturedModel.MOSSY_CARPET_SIDE + .get(block) + .updateTextures(textureMapping -> textureMapping.put(TextureSlot.SIDE, TextureMapping.getBlockTexture(block, "_side_small"))) + .createWithSuffix(block, "_side_small", this.modelOutput) + ); + MultiPartGenerator multiPartGenerator = MultiPartGenerator.multiPart(block); + multiPartGenerator.with(condition().term(MossyCarpetBlock.BASE, true), multiVariant); + multiPartGenerator.with(conditionBuilder, multiVariant); + map.forEach((property, variantMutator) -> { + multiPartGenerator.with(condition().term(property, WallSide.TALL), multiVariant2.with(variantMutator)); + multiPartGenerator.with(condition().term(property, WallSide.LOW), multiVariant3.with(variantMutator)); + multiPartGenerator.with(conditionBuilder, multiVariant2.with(variantMutator)); + }); + this.blockStateOutput.accept(multiPartGenerator); + } + + private void createHangingMoss(Block block) { + this.registerSimpleFlatItemModel(block); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block).with(PropertyDispatch.initial(HangingMossBlock.TIP).generate(boolean_ -> { + String string = boolean_ ? "_tip" : ""; + TextureMapping textureMapping = TextureMapping.cross(TextureMapping.getBlockTexture(block, string)); + return plainVariant(BlockModelGenerators.PlantType.NOT_TINTED.getCross().createWithSuffix(block, string, textureMapping, this.modelOutput)); + }))); + } + + private void createSculkCatalyst() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.SCULK_CATALYST, "_bottom"); + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.BOTTOM, resourceLocation) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.SCULK_CATALYST, "_top")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.SCULK_CATALYST, "_side")); + TextureMapping textureMapping2 = new TextureMapping() + .put(TextureSlot.BOTTOM, resourceLocation) + .put(TextureSlot.TOP, TextureMapping.getBlockTexture(Blocks.SCULK_CATALYST, "_top_bloom")) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.SCULK_CATALYST, "_side_bloom")); + ResourceLocation resourceLocation2 = ModelTemplates.CUBE_BOTTOM_TOP.create(Blocks.SCULK_CATALYST, textureMapping, this.modelOutput); + MultiVariant multiVariant = plainVariant(resourceLocation2); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.CUBE_BOTTOM_TOP.createWithSuffix(Blocks.SCULK_CATALYST, "_bloom", textureMapping2, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.SCULK_CATALYST) + .with(PropertyDispatch.initial(BlockStateProperties.BLOOM).generate(boolean_ -> boolean_ ? multiVariant2 : multiVariant)) + ); + this.registerSimpleItemModel(Blocks.SCULK_CATALYST, resourceLocation2); + } + + private void createChiseledBookshelf() { + Block block = Blocks.CHISELED_BOOKSHELF; + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block)); + MultiPartGenerator multiPartGenerator = MultiPartGenerator.multiPart(block); + List.of(Pair.of(Direction.NORTH, NOP), Pair.of(Direction.EAST, Y_ROT_90), Pair.of(Direction.SOUTH, Y_ROT_180), Pair.of(Direction.WEST, Y_ROT_270)) + .forEach(pair -> { + Direction direction = (Direction)pair.getFirst(); + VariantMutator variantMutator = (VariantMutator)pair.getSecond(); + Condition condition = condition().term(BlockStateProperties.HORIZONTAL_FACING, direction).build(); + multiPartGenerator.with(condition, multiVariant.with(variantMutator).with(UV_LOCK)); + this.addSlotStateAndRotationVariants(multiPartGenerator, condition, variantMutator); + }); + this.blockStateOutput.accept(multiPartGenerator); + this.registerSimpleItemModel(block, ModelLocationUtils.getModelLocation(block, "_inventory")); + CHISELED_BOOKSHELF_SLOT_MODEL_CACHE.clear(); + } + + private void addSlotStateAndRotationVariants(MultiPartGenerator generator, Condition condition, VariantMutator rotation) { + List.of( + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_0_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_TOP_LEFT), + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_1_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_TOP_MID), + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_2_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_TOP_RIGHT), + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_3_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_BOTTOM_LEFT), + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_4_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_BOTTOM_MID), + Pair.of(BlockStateProperties.CHISELED_BOOKSHELF_SLOT_5_OCCUPIED, ModelTemplates.CHISELED_BOOKSHELF_SLOT_BOTTOM_RIGHT) + ) + .forEach(pair -> { + BooleanProperty booleanProperty = (BooleanProperty)pair.getFirst(); + ModelTemplate modelTemplate = (ModelTemplate)pair.getSecond(); + this.addBookSlotModel(generator, condition, rotation, booleanProperty, modelTemplate, true); + this.addBookSlotModel(generator, condition, rotation, booleanProperty, modelTemplate, false); + }); + } + + private void addBookSlotModel( + MultiPartGenerator generator, Condition conditon, VariantMutator rotation, BooleanProperty hasBookProperty, ModelTemplate template, boolean hasBook + ) { + String string = hasBook ? "_occupied" : "_empty"; + TextureMapping textureMapping = new TextureMapping().put(TextureSlot.TEXTURE, TextureMapping.getBlockTexture(Blocks.CHISELED_BOOKSHELF, string)); + BlockModelGenerators.BookSlotModelCacheKey bookSlotModelCacheKey = new BlockModelGenerators.BookSlotModelCacheKey(template, string); + MultiVariant multiVariant = plainVariant( + (ResourceLocation)CHISELED_BOOKSHELF_SLOT_MODEL_CACHE.computeIfAbsent( + bookSlotModelCacheKey, bookSlotModelCacheKeyx -> template.createWithSuffix(Blocks.CHISELED_BOOKSHELF, string, textureMapping, this.modelOutput) + ) + ); + generator.with( + new CombinedCondition(CombinedCondition.Operation.AND, List.of(conditon, condition().term(hasBookProperty, hasBook).build())), multiVariant.with(rotation) + ); + } + + private void createMagmaBlock() { + MultiVariant multiVariant = plainVariant( + ModelTemplates.CUBE_ALL.create(Blocks.MAGMA_BLOCK, TextureMapping.cube(ModelLocationUtils.decorateBlockModelLocation("magma")), this.modelOutput) + ); + this.blockStateOutput.accept(createSimpleBlock(Blocks.MAGMA_BLOCK, multiVariant)); + } + + private void createShulkerBox(Block block, @Nullable DyeColor color) { + this.createParticleOnlyBlock(block); + Item item = block.asItem(); + ResourceLocation resourceLocation = ModelTemplates.SHULKER_BOX_INVENTORY.create(item, TextureMapping.particle(block), this.modelOutput); + ItemModel.Unbaked unbaked = color != null + ? ItemModelUtils.specialModel(resourceLocation, new ShulkerBoxSpecialRenderer.Unbaked(color)) + : ItemModelUtils.specialModel(resourceLocation, new ShulkerBoxSpecialRenderer.Unbaked()); + this.itemModelOutput.accept(item, unbaked); + } + + private void createGrowingPlant(Block plantBlock, Block tipBlock, BlockModelGenerators.PlantType plantType) { + this.createCrossBlock(plantBlock, plantType); + this.createCrossBlock(tipBlock, plantType); + } + + private void createInfestedStone() { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(Blocks.STONE); + net.minecraft.client.renderer.block.model.Variant variant = plainModel(resourceLocation); + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(ModelLocationUtils.getModelLocation(Blocks.STONE, "_mirrored")); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.INFESTED_STONE, createRotatedVariants(variant, variant2))); + this.registerSimpleItemModel(Blocks.INFESTED_STONE, resourceLocation); + } + + private void createInfestedDeepslate() { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(Blocks.DEEPSLATE); + net.minecraft.client.renderer.block.model.Variant variant = plainModel(resourceLocation); + net.minecraft.client.renderer.block.model.Variant variant2 = plainModel(ModelLocationUtils.getModelLocation(Blocks.DEEPSLATE, "_mirrored")); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.INFESTED_DEEPSLATE, createRotatedVariants(variant, variant2)).with(createRotatedPillar())); + this.registerSimpleItemModel(Blocks.INFESTED_DEEPSLATE, resourceLocation); + } + + private void createNetherRoots(Block plantBlock, Block pottedPlantBlock) { + this.createCrossBlockWithDefaultItem(plantBlock, BlockModelGenerators.PlantType.NOT_TINTED); + TextureMapping textureMapping = TextureMapping.plant(TextureMapping.getBlockTexture(plantBlock, "_pot")); + MultiVariant multiVariant = plainVariant(BlockModelGenerators.PlantType.NOT_TINTED.getCrossPot().create(pottedPlantBlock, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createSimpleBlock(pottedPlantBlock, multiVariant)); + } + + private void createRespawnAnchor() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.RESPAWN_ANCHOR, "_bottom"); + ResourceLocation resourceLocation2 = TextureMapping.getBlockTexture(Blocks.RESPAWN_ANCHOR, "_top_off"); + ResourceLocation resourceLocation3 = TextureMapping.getBlockTexture(Blocks.RESPAWN_ANCHOR, "_top"); + ResourceLocation[] resourceLocations = new ResourceLocation[5]; + + for (int i = 0; i < 5; i++) { + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.BOTTOM, resourceLocation) + .put(TextureSlot.TOP, i == 0 ? resourceLocation2 : resourceLocation3) + .put(TextureSlot.SIDE, TextureMapping.getBlockTexture(Blocks.RESPAWN_ANCHOR, "_side" + i)); + resourceLocations[i] = ModelTemplates.CUBE_BOTTOM_TOP.createWithSuffix(Blocks.RESPAWN_ANCHOR, "_" + i, textureMapping, this.modelOutput); + } + + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.RESPAWN_ANCHOR) + .with(PropertyDispatch.initial(BlockStateProperties.RESPAWN_ANCHOR_CHARGES).generate(integer -> plainVariant(resourceLocations[integer]))) + ); + this.registerSimpleItemModel(Blocks.RESPAWN_ANCHOR, resourceLocations[0]); + } + + private static VariantMutator applyRotation(FrontAndTop rotation) { + return switch (rotation) { + case DOWN_NORTH -> X_ROT_90; + case DOWN_SOUTH -> X_ROT_90.then(Y_ROT_180); + case DOWN_WEST -> X_ROT_90.then(Y_ROT_270); + case DOWN_EAST -> X_ROT_90.then(Y_ROT_90); + case UP_NORTH -> X_ROT_270.then(Y_ROT_180); + case UP_SOUTH -> X_ROT_270; + case UP_WEST -> X_ROT_270.then(Y_ROT_90); + case UP_EAST -> X_ROT_270.then(Y_ROT_270); + case NORTH_UP -> NOP; + case SOUTH_UP -> Y_ROT_180; + case WEST_UP -> Y_ROT_270; + case EAST_UP -> Y_ROT_90; + }; + } + + private void createJigsaw() { + ResourceLocation resourceLocation = TextureMapping.getBlockTexture(Blocks.JIGSAW, "_top"); + ResourceLocation resourceLocation2 = TextureMapping.getBlockTexture(Blocks.JIGSAW, "_bottom"); + ResourceLocation resourceLocation3 = TextureMapping.getBlockTexture(Blocks.JIGSAW, "_side"); + ResourceLocation resourceLocation4 = TextureMapping.getBlockTexture(Blocks.JIGSAW, "_lock"); + TextureMapping textureMapping = new TextureMapping() + .put(TextureSlot.DOWN, resourceLocation3) + .put(TextureSlot.WEST, resourceLocation3) + .put(TextureSlot.EAST, resourceLocation3) + .put(TextureSlot.PARTICLE, resourceLocation) + .put(TextureSlot.NORTH, resourceLocation) + .put(TextureSlot.SOUTH, resourceLocation2) + .put(TextureSlot.UP, resourceLocation4); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(Blocks.JIGSAW, plainVariant(ModelTemplates.CUBE_DIRECTIONAL.create(Blocks.JIGSAW, textureMapping, this.modelOutput))) + .with(PropertyDispatch.modify(BlockStateProperties.ORIENTATION).generate(BlockModelGenerators::applyRotation)) + ); + } + + private void createPetrifiedOakSlab() { + Block block = Blocks.OAK_PLANKS; + MultiVariant multiVariant = plainVariant(ModelLocationUtils.getModelLocation(block)); + TextureMapping textureMapping = TextureMapping.cube(block); + Block block2 = Blocks.PETRIFIED_OAK_SLAB; + MultiVariant multiVariant2 = plainVariant(ModelTemplates.SLAB_BOTTOM.create(block2, textureMapping, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.SLAB_TOP.create(block2, textureMapping, this.modelOutput)); + this.blockStateOutput.accept(createSlab(block2, multiVariant2, multiVariant3, multiVariant)); + } + + private void createHead(Block headBlock, Block wallHeadBlock, SkullBlock.Type type, ResourceLocation modelLocation) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.decorateBlockModelLocation("skull")); + this.blockStateOutput.accept(createSimpleBlock(headBlock, multiVariant)); + this.blockStateOutput.accept(createSimpleBlock(wallHeadBlock, multiVariant)); + this.itemModelOutput.accept(headBlock.asItem(), ItemModelUtils.specialModel(modelLocation, new Unbaked(type))); + } + + private void createHeads() { + ResourceLocation resourceLocation = ModelLocationUtils.decorateItemModelLocation("template_skull"); + this.createHead(Blocks.CREEPER_HEAD, Blocks.CREEPER_WALL_HEAD, SkullBlock.Types.CREEPER, resourceLocation); + this.createHead(Blocks.PLAYER_HEAD, Blocks.PLAYER_WALL_HEAD, SkullBlock.Types.PLAYER, resourceLocation); + this.createHead(Blocks.ZOMBIE_HEAD, Blocks.ZOMBIE_WALL_HEAD, SkullBlock.Types.ZOMBIE, resourceLocation); + this.createHead(Blocks.SKELETON_SKULL, Blocks.SKELETON_WALL_SKULL, SkullBlock.Types.SKELETON, resourceLocation); + this.createHead(Blocks.WITHER_SKELETON_SKULL, Blocks.WITHER_SKELETON_WALL_SKULL, SkullBlock.Types.WITHER_SKELETON, resourceLocation); + this.createHead(Blocks.PIGLIN_HEAD, Blocks.PIGLIN_WALL_HEAD, SkullBlock.Types.PIGLIN, resourceLocation); + this.createHead(Blocks.DRAGON_HEAD, Blocks.DRAGON_WALL_HEAD, SkullBlock.Types.DRAGON, ModelLocationUtils.getModelLocation(Items.DRAGON_HEAD)); + } + + private void createBanner(Block block, Block wallBlock, DyeColor color) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.decorateBlockModelLocation("banner")); + ResourceLocation resourceLocation = ModelLocationUtils.decorateItemModelLocation("template_banner"); + this.blockStateOutput.accept(createSimpleBlock(block, multiVariant)); + this.blockStateOutput.accept(createSimpleBlock(wallBlock, multiVariant)); + Item item = block.asItem(); + this.itemModelOutput + .accept(item, ItemModelUtils.specialModel(resourceLocation, new net.minecraft.client.renderer.special.BannerSpecialRenderer.Unbaked(color))); + } + + private void createBanners() { + this.createBanner(Blocks.WHITE_BANNER, Blocks.WHITE_WALL_BANNER, DyeColor.WHITE); + this.createBanner(Blocks.ORANGE_BANNER, Blocks.ORANGE_WALL_BANNER, DyeColor.ORANGE); + this.createBanner(Blocks.MAGENTA_BANNER, Blocks.MAGENTA_WALL_BANNER, DyeColor.MAGENTA); + this.createBanner(Blocks.LIGHT_BLUE_BANNER, Blocks.LIGHT_BLUE_WALL_BANNER, DyeColor.LIGHT_BLUE); + this.createBanner(Blocks.YELLOW_BANNER, Blocks.YELLOW_WALL_BANNER, DyeColor.YELLOW); + this.createBanner(Blocks.LIME_BANNER, Blocks.LIME_WALL_BANNER, DyeColor.LIME); + this.createBanner(Blocks.PINK_BANNER, Blocks.PINK_WALL_BANNER, DyeColor.PINK); + this.createBanner(Blocks.GRAY_BANNER, Blocks.GRAY_WALL_BANNER, DyeColor.GRAY); + this.createBanner(Blocks.LIGHT_GRAY_BANNER, Blocks.LIGHT_GRAY_WALL_BANNER, DyeColor.LIGHT_GRAY); + this.createBanner(Blocks.CYAN_BANNER, Blocks.CYAN_WALL_BANNER, DyeColor.CYAN); + this.createBanner(Blocks.PURPLE_BANNER, Blocks.PURPLE_WALL_BANNER, DyeColor.PURPLE); + this.createBanner(Blocks.BLUE_BANNER, Blocks.BLUE_WALL_BANNER, DyeColor.BLUE); + this.createBanner(Blocks.BROWN_BANNER, Blocks.BROWN_WALL_BANNER, DyeColor.BROWN); + this.createBanner(Blocks.GREEN_BANNER, Blocks.GREEN_WALL_BANNER, DyeColor.GREEN); + this.createBanner(Blocks.RED_BANNER, Blocks.RED_WALL_BANNER, DyeColor.RED); + this.createBanner(Blocks.BLACK_BANNER, Blocks.BLACK_WALL_BANNER, DyeColor.BLACK); + } + + private void createChest(Block chestBlock, Block particleBlock, ResourceLocation texture, boolean useGiftTexture) { + this.createParticleOnlyBlock(chestBlock, particleBlock); + Item item = chestBlock.asItem(); + ResourceLocation resourceLocation = ModelTemplates.CHEST_INVENTORY.create(item, TextureMapping.particle(particleBlock), this.modelOutput); + ItemModel.Unbaked unbaked = ItemModelUtils.specialModel(resourceLocation, new ChestSpecialRenderer.Unbaked(texture)); + if (useGiftTexture) { + ItemModel.Unbaked unbaked2 = ItemModelUtils.specialModel(resourceLocation, new ChestSpecialRenderer.Unbaked(ChestSpecialRenderer.GIFT_CHEST_TEXTURE)); + this.itemModelOutput.accept(item, ItemModelUtils.isXmas(unbaked2, unbaked)); + } else { + this.itemModelOutput.accept(item, unbaked); + } + } + + private void createChests() { + this.createChest(Blocks.CHEST, Blocks.OAK_PLANKS, ChestSpecialRenderer.NORMAL_CHEST_TEXTURE, true); + this.createChest(Blocks.TRAPPED_CHEST, Blocks.OAK_PLANKS, ChestSpecialRenderer.TRAPPED_CHEST_TEXTURE, true); + this.createChest(Blocks.ENDER_CHEST, Blocks.OBSIDIAN, ChestSpecialRenderer.ENDER_CHEST_TEXTURE, false); + } + + private void createBed(Block block, Block particleBlock, DyeColor color) { + MultiVariant multiVariant = plainVariant(ModelLocationUtils.decorateBlockModelLocation("bed")); + this.blockStateOutput.accept(createSimpleBlock(block, multiVariant)); + Item item = block.asItem(); + ResourceLocation resourceLocation = ModelTemplates.BED_INVENTORY + .create(ModelLocationUtils.getModelLocation(item), TextureMapping.particle(particleBlock), this.modelOutput); + this.itemModelOutput.accept(item, ItemModelUtils.specialModel(resourceLocation, new BedSpecialRenderer.Unbaked(color))); + } + + private void createBeds() { + this.createBed(Blocks.WHITE_BED, Blocks.WHITE_WOOL, DyeColor.WHITE); + this.createBed(Blocks.ORANGE_BED, Blocks.ORANGE_WOOL, DyeColor.ORANGE); + this.createBed(Blocks.MAGENTA_BED, Blocks.MAGENTA_WOOL, DyeColor.MAGENTA); + this.createBed(Blocks.LIGHT_BLUE_BED, Blocks.LIGHT_BLUE_WOOL, DyeColor.LIGHT_BLUE); + this.createBed(Blocks.YELLOW_BED, Blocks.YELLOW_WOOL, DyeColor.YELLOW); + this.createBed(Blocks.LIME_BED, Blocks.LIME_WOOL, DyeColor.LIME); + this.createBed(Blocks.PINK_BED, Blocks.PINK_WOOL, DyeColor.PINK); + this.createBed(Blocks.GRAY_BED, Blocks.GRAY_WOOL, DyeColor.GRAY); + this.createBed(Blocks.LIGHT_GRAY_BED, Blocks.LIGHT_GRAY_WOOL, DyeColor.LIGHT_GRAY); + this.createBed(Blocks.CYAN_BED, Blocks.CYAN_WOOL, DyeColor.CYAN); + this.createBed(Blocks.PURPLE_BED, Blocks.PURPLE_WOOL, DyeColor.PURPLE); + this.createBed(Blocks.BLUE_BED, Blocks.BLUE_WOOL, DyeColor.BLUE); + this.createBed(Blocks.BROWN_BED, Blocks.BROWN_WOOL, DyeColor.BROWN); + this.createBed(Blocks.GREEN_BED, Blocks.GREEN_WOOL, DyeColor.GREEN); + this.createBed(Blocks.RED_BED, Blocks.RED_WOOL, DyeColor.RED); + this.createBed(Blocks.BLACK_BED, Blocks.BLACK_WOOL, DyeColor.BLACK); + } + + private void generateSimpleSpecialItemModel(Block block, net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked specialModel) { + Item item = block.asItem(); + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(item); + this.itemModelOutput.accept(item, ItemModelUtils.specialModel(resourceLocation, specialModel)); + } + + public void run() { + BlockFamilies.getAllFamilies() + .filter(BlockFamily::shouldGenerateModel) + .forEach(blockFamily -> this.family(blockFamily.getBaseBlock()).generateFor(blockFamily)); + this.family(Blocks.CUT_COPPER) + .generateFor(BlockFamilies.CUT_COPPER) + .donateModelTo(Blocks.CUT_COPPER, Blocks.WAXED_CUT_COPPER) + .donateModelTo(Blocks.CHISELED_COPPER, Blocks.WAXED_CHISELED_COPPER) + .generateFor(BlockFamilies.WAXED_CUT_COPPER); + this.family(Blocks.EXPOSED_CUT_COPPER) + .generateFor(BlockFamilies.EXPOSED_CUT_COPPER) + .donateModelTo(Blocks.EXPOSED_CUT_COPPER, Blocks.WAXED_EXPOSED_CUT_COPPER) + .donateModelTo(Blocks.EXPOSED_CHISELED_COPPER, Blocks.WAXED_EXPOSED_CHISELED_COPPER) + .generateFor(BlockFamilies.WAXED_EXPOSED_CUT_COPPER); + this.family(Blocks.WEATHERED_CUT_COPPER) + .generateFor(BlockFamilies.WEATHERED_CUT_COPPER) + .donateModelTo(Blocks.WEATHERED_CUT_COPPER, Blocks.WAXED_WEATHERED_CUT_COPPER) + .donateModelTo(Blocks.WEATHERED_CHISELED_COPPER, Blocks.WAXED_WEATHERED_CHISELED_COPPER) + .generateFor(BlockFamilies.WAXED_WEATHERED_CUT_COPPER); + this.family(Blocks.OXIDIZED_CUT_COPPER) + .generateFor(BlockFamilies.OXIDIZED_CUT_COPPER) + .donateModelTo(Blocks.OXIDIZED_CUT_COPPER, Blocks.WAXED_OXIDIZED_CUT_COPPER) + .donateModelTo(Blocks.OXIDIZED_CHISELED_COPPER, Blocks.WAXED_OXIDIZED_CHISELED_COPPER) + .generateFor(BlockFamilies.WAXED_OXIDIZED_CUT_COPPER); + this.createCopperBulb(Blocks.COPPER_BULB); + this.createCopperBulb(Blocks.EXPOSED_COPPER_BULB); + this.createCopperBulb(Blocks.WEATHERED_COPPER_BULB); + this.createCopperBulb(Blocks.OXIDIZED_COPPER_BULB); + this.copyCopperBulbModel(Blocks.COPPER_BULB, Blocks.WAXED_COPPER_BULB); + this.copyCopperBulbModel(Blocks.EXPOSED_COPPER_BULB, Blocks.WAXED_EXPOSED_COPPER_BULB); + this.copyCopperBulbModel(Blocks.WEATHERED_COPPER_BULB, Blocks.WAXED_WEATHERED_COPPER_BULB); + this.copyCopperBulbModel(Blocks.OXIDIZED_COPPER_BULB, Blocks.WAXED_OXIDIZED_COPPER_BULB); + this.createNonTemplateModelBlock(Blocks.AIR); + this.createNonTemplateModelBlock(Blocks.CAVE_AIR, Blocks.AIR); + this.createNonTemplateModelBlock(Blocks.VOID_AIR, Blocks.AIR); + this.createNonTemplateModelBlock(Blocks.BEACON); + this.createNonTemplateModelBlock(Blocks.CACTUS); + this.createNonTemplateModelBlock(Blocks.BUBBLE_COLUMN, Blocks.WATER); + this.createNonTemplateModelBlock(Blocks.DRAGON_EGG); + this.createNonTemplateModelBlock(Blocks.DRIED_KELP_BLOCK); + this.createNonTemplateModelBlock(Blocks.ENCHANTING_TABLE); + this.createNonTemplateModelBlock(Blocks.FLOWER_POT); + this.registerSimpleFlatItemModel(Items.FLOWER_POT); + this.createNonTemplateModelBlock(Blocks.HONEY_BLOCK); + this.createNonTemplateModelBlock(Blocks.WATER); + this.createNonTemplateModelBlock(Blocks.LAVA); + this.createNonTemplateModelBlock(Blocks.SLIME_BLOCK); + this.registerSimpleFlatItemModel(Items.CHAIN); + this.createCandleAndCandleCake(Blocks.WHITE_CANDLE, Blocks.WHITE_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.ORANGE_CANDLE, Blocks.ORANGE_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.MAGENTA_CANDLE, Blocks.MAGENTA_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.LIGHT_BLUE_CANDLE, Blocks.LIGHT_BLUE_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.YELLOW_CANDLE, Blocks.YELLOW_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.LIME_CANDLE, Blocks.LIME_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.PINK_CANDLE, Blocks.PINK_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.GRAY_CANDLE, Blocks.GRAY_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.LIGHT_GRAY_CANDLE, Blocks.LIGHT_GRAY_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.CYAN_CANDLE, Blocks.CYAN_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.PURPLE_CANDLE, Blocks.PURPLE_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.BLUE_CANDLE, Blocks.BLUE_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.BROWN_CANDLE, Blocks.BROWN_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.GREEN_CANDLE, Blocks.GREEN_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.RED_CANDLE, Blocks.RED_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.BLACK_CANDLE, Blocks.BLACK_CANDLE_CAKE); + this.createCandleAndCandleCake(Blocks.CANDLE, Blocks.CANDLE_CAKE); + this.createNonTemplateModelBlock(Blocks.POTTED_BAMBOO); + this.createNonTemplateModelBlock(Blocks.POTTED_CACTUS); + this.createNonTemplateModelBlock(Blocks.POWDER_SNOW); + this.createNonTemplateModelBlock(Blocks.SPORE_BLOSSOM); + this.createAzalea(Blocks.AZALEA); + this.createAzalea(Blocks.FLOWERING_AZALEA); + this.createPottedAzalea(Blocks.POTTED_AZALEA); + this.createPottedAzalea(Blocks.POTTED_FLOWERING_AZALEA); + this.createCaveVines(); + this.createFullAndCarpetBlocks(Blocks.MOSS_BLOCK, Blocks.MOSS_CARPET); + this.createMossyCarpet(Blocks.PALE_MOSS_CARPET); + this.createHangingMoss(Blocks.PALE_HANGING_MOSS); + this.createTrivialCube(Blocks.PALE_MOSS_BLOCK); + this.createFlowerBed(Blocks.PINK_PETALS); + this.createFlowerBed(Blocks.WILDFLOWERS); + this.createLeafLitter(Blocks.LEAF_LITTER); + this.createCrossBlock(Blocks.FIREFLY_BUSH, BlockModelGenerators.PlantType.EMISSIVE_NOT_TINTED); + this.registerSimpleFlatItemModel(Items.FIREFLY_BUSH); + this.createAirLikeBlock(Blocks.BARRIER, Items.BARRIER); + this.registerSimpleFlatItemModel(Items.BARRIER); + this.createLightBlock(); + this.createAirLikeBlock(Blocks.STRUCTURE_VOID, Items.STRUCTURE_VOID); + this.registerSimpleFlatItemModel(Items.STRUCTURE_VOID); + this.createAirLikeBlock(Blocks.MOVING_PISTON, TextureMapping.getBlockTexture(Blocks.PISTON, "_side")); + this.createTrivialCube(Blocks.COAL_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_COAL_ORE); + this.createTrivialCube(Blocks.COAL_BLOCK); + this.createTrivialCube(Blocks.DIAMOND_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_DIAMOND_ORE); + this.createTrivialCube(Blocks.DIAMOND_BLOCK); + this.createTrivialCube(Blocks.EMERALD_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_EMERALD_ORE); + this.createTrivialCube(Blocks.EMERALD_BLOCK); + this.createTrivialCube(Blocks.GOLD_ORE); + this.createTrivialCube(Blocks.NETHER_GOLD_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_GOLD_ORE); + this.createTrivialCube(Blocks.GOLD_BLOCK); + this.createTrivialCube(Blocks.IRON_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_IRON_ORE); + this.createTrivialCube(Blocks.IRON_BLOCK); + this.createTrivialBlock(Blocks.ANCIENT_DEBRIS, TexturedModel.COLUMN); + this.createTrivialCube(Blocks.NETHERITE_BLOCK); + this.createTrivialCube(Blocks.LAPIS_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_LAPIS_ORE); + this.createTrivialCube(Blocks.LAPIS_BLOCK); + this.createTrivialCube(Blocks.RESIN_BLOCK); + this.createTrivialCube(Blocks.NETHER_QUARTZ_ORE); + this.createTrivialCube(Blocks.REDSTONE_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_REDSTONE_ORE); + this.createTrivialCube(Blocks.REDSTONE_BLOCK); + this.createTrivialCube(Blocks.GILDED_BLACKSTONE); + this.createTrivialCube(Blocks.BLUE_ICE); + this.createTrivialCube(Blocks.CLAY); + this.createTrivialCube(Blocks.COARSE_DIRT); + this.createTrivialCube(Blocks.CRYING_OBSIDIAN); + this.createTrivialCube(Blocks.END_STONE); + this.createTrivialCube(Blocks.GLOWSTONE); + this.createTrivialCube(Blocks.GRAVEL); + this.createTrivialCube(Blocks.HONEYCOMB_BLOCK); + this.createTrivialCube(Blocks.ICE); + this.createTrivialBlock(Blocks.JUKEBOX, TexturedModel.CUBE_TOP); + this.createTrivialBlock(Blocks.LODESTONE, TexturedModel.COLUMN); + this.createTrivialBlock(Blocks.MELON, TexturedModel.COLUMN); + this.createNonTemplateModelBlock(Blocks.MANGROVE_ROOTS); + this.createNonTemplateModelBlock(Blocks.POTTED_MANGROVE_PROPAGULE); + this.createTrivialCube(Blocks.NETHER_WART_BLOCK); + this.createTrivialCube(Blocks.NOTE_BLOCK); + this.createTrivialCube(Blocks.PACKED_ICE); + this.createTrivialCube(Blocks.OBSIDIAN); + this.createTrivialCube(Blocks.QUARTZ_BRICKS); + this.createTrivialCube(Blocks.SEA_LANTERN); + this.createTrivialCube(Blocks.SHROOMLIGHT); + this.createTrivialCube(Blocks.SOUL_SAND); + this.createTrivialCube(Blocks.SOUL_SOIL); + this.createTrivialBlock(Blocks.SPAWNER, TexturedModel.CUBE_INNER_FACES); + this.createCreakingHeart(Blocks.CREAKING_HEART); + this.createTrivialCube(Blocks.SPONGE); + this.createTrivialBlock(Blocks.SEAGRASS, TexturedModel.SEAGRASS); + this.registerSimpleFlatItemModel(Items.SEAGRASS); + this.createTrivialBlock(Blocks.TNT, TexturedModel.CUBE_TOP_BOTTOM); + this.createTrivialBlock(Blocks.TARGET, TexturedModel.COLUMN); + this.createTrivialCube(Blocks.WARPED_WART_BLOCK); + this.createTrivialCube(Blocks.WET_SPONGE); + this.createTrivialCube(Blocks.AMETHYST_BLOCK); + this.createTrivialCube(Blocks.BUDDING_AMETHYST); + this.createTrivialCube(Blocks.CALCITE); + this.createTrivialCube(Blocks.DRIPSTONE_BLOCK); + this.createTrivialCube(Blocks.RAW_IRON_BLOCK); + this.createTrivialCube(Blocks.RAW_COPPER_BLOCK); + this.createTrivialCube(Blocks.RAW_GOLD_BLOCK); + this.createRotatedMirroredVariantBlock(Blocks.SCULK); + this.createNonTemplateModelBlock(Blocks.HEAVY_CORE); + this.createPetrifiedOakSlab(); + this.createTrivialCube(Blocks.COPPER_ORE); + this.createTrivialCube(Blocks.DEEPSLATE_COPPER_ORE); + this.createTrivialCube(Blocks.COPPER_BLOCK); + this.createTrivialCube(Blocks.EXPOSED_COPPER); + this.createTrivialCube(Blocks.WEATHERED_COPPER); + this.createTrivialCube(Blocks.OXIDIZED_COPPER); + this.copyModel(Blocks.COPPER_BLOCK, Blocks.WAXED_COPPER_BLOCK); + this.copyModel(Blocks.EXPOSED_COPPER, Blocks.WAXED_EXPOSED_COPPER); + this.copyModel(Blocks.WEATHERED_COPPER, Blocks.WAXED_WEATHERED_COPPER); + this.copyModel(Blocks.OXIDIZED_COPPER, Blocks.WAXED_OXIDIZED_COPPER); + this.createDoor(Blocks.COPPER_DOOR); + this.createDoor(Blocks.EXPOSED_COPPER_DOOR); + this.createDoor(Blocks.WEATHERED_COPPER_DOOR); + this.createDoor(Blocks.OXIDIZED_COPPER_DOOR); + this.copyDoorModel(Blocks.COPPER_DOOR, Blocks.WAXED_COPPER_DOOR); + this.copyDoorModel(Blocks.EXPOSED_COPPER_DOOR, Blocks.WAXED_EXPOSED_COPPER_DOOR); + this.copyDoorModel(Blocks.WEATHERED_COPPER_DOOR, Blocks.WAXED_WEATHERED_COPPER_DOOR); + this.copyDoorModel(Blocks.OXIDIZED_COPPER_DOOR, Blocks.WAXED_OXIDIZED_COPPER_DOOR); + this.createTrapdoor(Blocks.COPPER_TRAPDOOR); + this.createTrapdoor(Blocks.EXPOSED_COPPER_TRAPDOOR); + this.createTrapdoor(Blocks.WEATHERED_COPPER_TRAPDOOR); + this.createTrapdoor(Blocks.OXIDIZED_COPPER_TRAPDOOR); + this.copyTrapdoorModel(Blocks.COPPER_TRAPDOOR, Blocks.WAXED_COPPER_TRAPDOOR); + this.copyTrapdoorModel(Blocks.EXPOSED_COPPER_TRAPDOOR, Blocks.WAXED_EXPOSED_COPPER_TRAPDOOR); + this.copyTrapdoorModel(Blocks.WEATHERED_COPPER_TRAPDOOR, Blocks.WAXED_WEATHERED_COPPER_TRAPDOOR); + this.copyTrapdoorModel(Blocks.OXIDIZED_COPPER_TRAPDOOR, Blocks.WAXED_OXIDIZED_COPPER_TRAPDOOR); + this.createTrivialCube(Blocks.COPPER_GRATE); + this.createTrivialCube(Blocks.EXPOSED_COPPER_GRATE); + this.createTrivialCube(Blocks.WEATHERED_COPPER_GRATE); + this.createTrivialCube(Blocks.OXIDIZED_COPPER_GRATE); + this.copyModel(Blocks.COPPER_GRATE, Blocks.WAXED_COPPER_GRATE); + this.copyModel(Blocks.EXPOSED_COPPER_GRATE, Blocks.WAXED_EXPOSED_COPPER_GRATE); + this.copyModel(Blocks.WEATHERED_COPPER_GRATE, Blocks.WAXED_WEATHERED_COPPER_GRATE); + this.copyModel(Blocks.OXIDIZED_COPPER_GRATE, Blocks.WAXED_OXIDIZED_COPPER_GRATE); + this.createWeightedPressurePlate(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, Blocks.GOLD_BLOCK); + this.createWeightedPressurePlate(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, Blocks.IRON_BLOCK); + this.createAmethystClusters(); + this.createBookshelf(); + this.createChiseledBookshelf(); + this.createBrewingStand(); + this.createCakeBlock(); + this.createCampfires(Blocks.CAMPFIRE, Blocks.SOUL_CAMPFIRE); + this.createCartographyTable(); + this.createCauldrons(); + this.createChorusFlower(); + this.createChorusPlant(); + this.createComposter(); + this.createDaylightDetector(); + this.createEndPortalFrame(); + this.createRotatableColumn(Blocks.END_ROD); + this.createLightningRod(); + this.createFarmland(); + this.createFire(); + this.createSoulFire(); + this.createFrostedIce(); + this.createGrassBlocks(); + this.createCocoa(); + this.createDirtPath(); + this.createGrindstone(); + this.createHopper(); + this.createIronBars(); + this.createLever(); + this.createLilyPad(); + this.createNetherPortalBlock(); + this.createNetherrack(); + this.createObserver(); + this.createPistons(); + this.createPistonHeads(); + this.createScaffolding(); + this.createRedstoneTorch(); + this.createRedstoneLamp(); + this.createRepeater(); + this.createSeaPickle(); + this.createSmithingTable(); + this.createSnowBlocks(); + this.createStonecutter(); + this.createStructureBlock(); + this.createSweetBerryBush(); + this.createTestBlock(); + this.createTrivialCube(Blocks.TEST_INSTANCE_BLOCK); + this.createTripwire(); + this.createTripwireHook(); + this.createTurtleEgg(); + this.createSnifferEgg(); + this.createVine(); + this.createMultiface(Blocks.GLOW_LICHEN); + this.createMultiface(Blocks.SCULK_VEIN); + this.createMultiface(Blocks.RESIN_CLUMP, Items.RESIN_CLUMP); + this.createMagmaBlock(); + this.createJigsaw(); + this.createSculkSensor(); + this.createCalibratedSculkSensor(); + this.createSculkShrieker(); + this.createFrogspawnBlock(); + this.createMangrovePropagule(); + this.createMuddyMangroveRoots(); + this.createTrialSpawner(); + this.createVault(); + this.createNonTemplateHorizontalBlock(Blocks.LADDER); + this.registerSimpleFlatItemModel(Blocks.LADDER); + this.createNonTemplateHorizontalBlock(Blocks.LECTERN); + this.createBigDripLeafBlock(); + this.createNonTemplateHorizontalBlock(Blocks.BIG_DRIPLEAF_STEM); + this.createNormalTorch(Blocks.TORCH, Blocks.WALL_TORCH); + this.createNormalTorch(Blocks.SOUL_TORCH, Blocks.SOUL_WALL_TORCH); + this.createCraftingTableLike(Blocks.CRAFTING_TABLE, Blocks.OAK_PLANKS, TextureMapping::craftingTable); + this.createCraftingTableLike(Blocks.FLETCHING_TABLE, Blocks.BIRCH_PLANKS, TextureMapping::fletchingTable); + this.createNyliumBlock(Blocks.CRIMSON_NYLIUM); + this.createNyliumBlock(Blocks.WARPED_NYLIUM); + this.createDispenserBlock(Blocks.DISPENSER); + this.createDispenserBlock(Blocks.DROPPER); + this.createCrafterBlock(); + this.createLantern(Blocks.LANTERN); + this.createLantern(Blocks.SOUL_LANTERN); + this.createAxisAlignedPillarBlockCustomModel(Blocks.CHAIN, plainVariant(ModelLocationUtils.getModelLocation(Blocks.CHAIN))); + this.createAxisAlignedPillarBlock(Blocks.BASALT, TexturedModel.COLUMN); + this.createAxisAlignedPillarBlock(Blocks.POLISHED_BASALT, TexturedModel.COLUMN); + this.createTrivialCube(Blocks.SMOOTH_BASALT); + this.createAxisAlignedPillarBlock(Blocks.BONE_BLOCK, TexturedModel.COLUMN); + this.createRotatedVariantBlock(Blocks.DIRT); + this.createRotatedVariantBlock(Blocks.ROOTED_DIRT); + this.createRotatedVariantBlock(Blocks.SAND); + this.createBrushableBlock(Blocks.SUSPICIOUS_SAND); + this.createBrushableBlock(Blocks.SUSPICIOUS_GRAVEL); + this.createRotatedVariantBlock(Blocks.RED_SAND); + this.createRotatedMirroredVariantBlock(Blocks.BEDROCK); + this.createTrivialBlock(Blocks.REINFORCED_DEEPSLATE, TexturedModel.CUBE_TOP_BOTTOM); + this.createRotatedPillarWithHorizontalVariant(Blocks.HAY_BLOCK, TexturedModel.COLUMN, TexturedModel.COLUMN_HORIZONTAL); + this.createRotatedPillarWithHorizontalVariant(Blocks.PURPUR_PILLAR, TexturedModel.COLUMN_ALT, TexturedModel.COLUMN_HORIZONTAL_ALT); + this.createRotatedPillarWithHorizontalVariant(Blocks.QUARTZ_PILLAR, TexturedModel.COLUMN_ALT, TexturedModel.COLUMN_HORIZONTAL_ALT); + this.createRotatedPillarWithHorizontalVariant(Blocks.OCHRE_FROGLIGHT, TexturedModel.COLUMN, TexturedModel.COLUMN_HORIZONTAL); + this.createRotatedPillarWithHorizontalVariant(Blocks.VERDANT_FROGLIGHT, TexturedModel.COLUMN, TexturedModel.COLUMN_HORIZONTAL); + this.createRotatedPillarWithHorizontalVariant(Blocks.PEARLESCENT_FROGLIGHT, TexturedModel.COLUMN, TexturedModel.COLUMN_HORIZONTAL); + this.createHorizontallyRotatedBlock(Blocks.LOOM, TexturedModel.ORIENTABLE); + this.createPumpkins(); + this.createBeeNest(Blocks.BEE_NEST, TextureMapping::orientableCube); + this.createBeeNest(Blocks.BEEHIVE, TextureMapping::orientableCubeSameEnds); + this.createCropBlock(Blocks.BEETROOTS, BlockStateProperties.AGE_3, 0, 1, 2, 3); + this.createCropBlock(Blocks.CARROTS, BlockStateProperties.AGE_7, 0, 0, 1, 1, 2, 2, 2, 3); + this.createCropBlock(Blocks.NETHER_WART, BlockStateProperties.AGE_3, 0, 1, 1, 2); + this.createCropBlock(Blocks.POTATOES, BlockStateProperties.AGE_7, 0, 0, 1, 1, 2, 2, 2, 3); + this.createCropBlock(Blocks.WHEAT, BlockStateProperties.AGE_7, 0, 1, 2, 3, 4, 5, 6, 7); + this.createCrossBlock(Blocks.TORCHFLOWER_CROP, BlockModelGenerators.PlantType.NOT_TINTED, BlockStateProperties.AGE_1, 0, 1); + this.createPitcherCrop(); + this.createPitcherPlant(); + this.createBanners(); + this.createBeds(); + this.createHeads(); + this.createChests(); + this.createShulkerBox(Blocks.SHULKER_BOX, null); + this.createShulkerBox(Blocks.WHITE_SHULKER_BOX, DyeColor.WHITE); + this.createShulkerBox(Blocks.ORANGE_SHULKER_BOX, DyeColor.ORANGE); + this.createShulkerBox(Blocks.MAGENTA_SHULKER_BOX, DyeColor.MAGENTA); + this.createShulkerBox(Blocks.LIGHT_BLUE_SHULKER_BOX, DyeColor.LIGHT_BLUE); + this.createShulkerBox(Blocks.YELLOW_SHULKER_BOX, DyeColor.YELLOW); + this.createShulkerBox(Blocks.LIME_SHULKER_BOX, DyeColor.LIME); + this.createShulkerBox(Blocks.PINK_SHULKER_BOX, DyeColor.PINK); + this.createShulkerBox(Blocks.GRAY_SHULKER_BOX, DyeColor.GRAY); + this.createShulkerBox(Blocks.LIGHT_GRAY_SHULKER_BOX, DyeColor.LIGHT_GRAY); + this.createShulkerBox(Blocks.CYAN_SHULKER_BOX, DyeColor.CYAN); + this.createShulkerBox(Blocks.PURPLE_SHULKER_BOX, DyeColor.PURPLE); + this.createShulkerBox(Blocks.BLUE_SHULKER_BOX, DyeColor.BLUE); + this.createShulkerBox(Blocks.BROWN_SHULKER_BOX, DyeColor.BROWN); + this.createShulkerBox(Blocks.GREEN_SHULKER_BOX, DyeColor.GREEN); + this.createShulkerBox(Blocks.RED_SHULKER_BOX, DyeColor.RED); + this.createShulkerBox(Blocks.BLACK_SHULKER_BOX, DyeColor.BLACK); + this.createParticleOnlyBlock(Blocks.CONDUIT); + this.generateSimpleSpecialItemModel(Blocks.CONDUIT, new net.minecraft.client.renderer.special.ConduitSpecialRenderer.Unbaked()); + this.createParticleOnlyBlock(Blocks.DECORATED_POT, Blocks.TERRACOTTA); + this.generateSimpleSpecialItemModel(Blocks.DECORATED_POT, new net.minecraft.client.renderer.special.DecoratedPotSpecialRenderer.Unbaked()); + this.createParticleOnlyBlock(Blocks.END_PORTAL, Blocks.OBSIDIAN); + this.createParticleOnlyBlock(Blocks.END_GATEWAY, Blocks.OBSIDIAN); + this.createTrivialCube(Blocks.AZALEA_LEAVES); + this.createTrivialCube(Blocks.FLOWERING_AZALEA_LEAVES); + this.createTrivialCube(Blocks.WHITE_CONCRETE); + this.createTrivialCube(Blocks.ORANGE_CONCRETE); + this.createTrivialCube(Blocks.MAGENTA_CONCRETE); + this.createTrivialCube(Blocks.LIGHT_BLUE_CONCRETE); + this.createTrivialCube(Blocks.YELLOW_CONCRETE); + this.createTrivialCube(Blocks.LIME_CONCRETE); + this.createTrivialCube(Blocks.PINK_CONCRETE); + this.createTrivialCube(Blocks.GRAY_CONCRETE); + this.createTrivialCube(Blocks.LIGHT_GRAY_CONCRETE); + this.createTrivialCube(Blocks.CYAN_CONCRETE); + this.createTrivialCube(Blocks.PURPLE_CONCRETE); + this.createTrivialCube(Blocks.BLUE_CONCRETE); + this.createTrivialCube(Blocks.BROWN_CONCRETE); + this.createTrivialCube(Blocks.GREEN_CONCRETE); + this.createTrivialCube(Blocks.RED_CONCRETE); + this.createTrivialCube(Blocks.BLACK_CONCRETE); + this.createColoredBlockWithRandomRotations( + TexturedModel.CUBE, + Blocks.WHITE_CONCRETE_POWDER, + Blocks.ORANGE_CONCRETE_POWDER, + Blocks.MAGENTA_CONCRETE_POWDER, + Blocks.LIGHT_BLUE_CONCRETE_POWDER, + Blocks.YELLOW_CONCRETE_POWDER, + Blocks.LIME_CONCRETE_POWDER, + Blocks.PINK_CONCRETE_POWDER, + Blocks.GRAY_CONCRETE_POWDER, + Blocks.LIGHT_GRAY_CONCRETE_POWDER, + Blocks.CYAN_CONCRETE_POWDER, + Blocks.PURPLE_CONCRETE_POWDER, + Blocks.BLUE_CONCRETE_POWDER, + Blocks.BROWN_CONCRETE_POWDER, + Blocks.GREEN_CONCRETE_POWDER, + Blocks.RED_CONCRETE_POWDER, + Blocks.BLACK_CONCRETE_POWDER + ); + this.createTrivialCube(Blocks.TERRACOTTA); + this.createTrivialCube(Blocks.WHITE_TERRACOTTA); + this.createTrivialCube(Blocks.ORANGE_TERRACOTTA); + this.createTrivialCube(Blocks.MAGENTA_TERRACOTTA); + this.createTrivialCube(Blocks.LIGHT_BLUE_TERRACOTTA); + this.createTrivialCube(Blocks.YELLOW_TERRACOTTA); + this.createTrivialCube(Blocks.LIME_TERRACOTTA); + this.createTrivialCube(Blocks.PINK_TERRACOTTA); + this.createTrivialCube(Blocks.GRAY_TERRACOTTA); + this.createTrivialCube(Blocks.LIGHT_GRAY_TERRACOTTA); + this.createTrivialCube(Blocks.CYAN_TERRACOTTA); + this.createTrivialCube(Blocks.PURPLE_TERRACOTTA); + this.createTrivialCube(Blocks.BLUE_TERRACOTTA); + this.createTrivialCube(Blocks.BROWN_TERRACOTTA); + this.createTrivialCube(Blocks.GREEN_TERRACOTTA); + this.createTrivialCube(Blocks.RED_TERRACOTTA); + this.createTrivialCube(Blocks.BLACK_TERRACOTTA); + this.createTrivialCube(Blocks.TINTED_GLASS); + this.createGlassBlocks(Blocks.GLASS, Blocks.GLASS_PANE); + this.createGlassBlocks(Blocks.WHITE_STAINED_GLASS, Blocks.WHITE_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.ORANGE_STAINED_GLASS, Blocks.ORANGE_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.MAGENTA_STAINED_GLASS, Blocks.MAGENTA_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.LIGHT_BLUE_STAINED_GLASS, Blocks.LIGHT_BLUE_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.YELLOW_STAINED_GLASS, Blocks.YELLOW_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.LIME_STAINED_GLASS, Blocks.LIME_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.PINK_STAINED_GLASS, Blocks.PINK_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.GRAY_STAINED_GLASS, Blocks.GRAY_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.LIGHT_GRAY_STAINED_GLASS, Blocks.LIGHT_GRAY_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.CYAN_STAINED_GLASS, Blocks.CYAN_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.PURPLE_STAINED_GLASS, Blocks.PURPLE_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.BLUE_STAINED_GLASS, Blocks.BLUE_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.BROWN_STAINED_GLASS, Blocks.BROWN_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.GREEN_STAINED_GLASS, Blocks.GREEN_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.RED_STAINED_GLASS, Blocks.RED_STAINED_GLASS_PANE); + this.createGlassBlocks(Blocks.BLACK_STAINED_GLASS, Blocks.BLACK_STAINED_GLASS_PANE); + this.createColoredBlockWithStateRotations( + TexturedModel.GLAZED_TERRACOTTA, + Blocks.WHITE_GLAZED_TERRACOTTA, + Blocks.ORANGE_GLAZED_TERRACOTTA, + Blocks.MAGENTA_GLAZED_TERRACOTTA, + Blocks.LIGHT_BLUE_GLAZED_TERRACOTTA, + Blocks.YELLOW_GLAZED_TERRACOTTA, + Blocks.LIME_GLAZED_TERRACOTTA, + Blocks.PINK_GLAZED_TERRACOTTA, + Blocks.GRAY_GLAZED_TERRACOTTA, + Blocks.LIGHT_GRAY_GLAZED_TERRACOTTA, + Blocks.CYAN_GLAZED_TERRACOTTA, + Blocks.PURPLE_GLAZED_TERRACOTTA, + Blocks.BLUE_GLAZED_TERRACOTTA, + Blocks.BROWN_GLAZED_TERRACOTTA, + Blocks.GREEN_GLAZED_TERRACOTTA, + Blocks.RED_GLAZED_TERRACOTTA, + Blocks.BLACK_GLAZED_TERRACOTTA + ); + this.createFullAndCarpetBlocks(Blocks.WHITE_WOOL, Blocks.WHITE_CARPET); + this.createFullAndCarpetBlocks(Blocks.ORANGE_WOOL, Blocks.ORANGE_CARPET); + this.createFullAndCarpetBlocks(Blocks.MAGENTA_WOOL, Blocks.MAGENTA_CARPET); + this.createFullAndCarpetBlocks(Blocks.LIGHT_BLUE_WOOL, Blocks.LIGHT_BLUE_CARPET); + this.createFullAndCarpetBlocks(Blocks.YELLOW_WOOL, Blocks.YELLOW_CARPET); + this.createFullAndCarpetBlocks(Blocks.LIME_WOOL, Blocks.LIME_CARPET); + this.createFullAndCarpetBlocks(Blocks.PINK_WOOL, Blocks.PINK_CARPET); + this.createFullAndCarpetBlocks(Blocks.GRAY_WOOL, Blocks.GRAY_CARPET); + this.createFullAndCarpetBlocks(Blocks.LIGHT_GRAY_WOOL, Blocks.LIGHT_GRAY_CARPET); + this.createFullAndCarpetBlocks(Blocks.CYAN_WOOL, Blocks.CYAN_CARPET); + this.createFullAndCarpetBlocks(Blocks.PURPLE_WOOL, Blocks.PURPLE_CARPET); + this.createFullAndCarpetBlocks(Blocks.BLUE_WOOL, Blocks.BLUE_CARPET); + this.createFullAndCarpetBlocks(Blocks.BROWN_WOOL, Blocks.BROWN_CARPET); + this.createFullAndCarpetBlocks(Blocks.GREEN_WOOL, Blocks.GREEN_CARPET); + this.createFullAndCarpetBlocks(Blocks.RED_WOOL, Blocks.RED_CARPET); + this.createFullAndCarpetBlocks(Blocks.BLACK_WOOL, Blocks.BLACK_CARPET); + this.createTrivialCube(Blocks.MUD); + this.createTrivialCube(Blocks.PACKED_MUD); + this.createPlant(Blocks.FERN, Blocks.POTTED_FERN, BlockModelGenerators.PlantType.TINTED); + this.createItemWithGrassTint(Blocks.FERN); + this.createPlantWithDefaultItem(Blocks.DANDELION, Blocks.POTTED_DANDELION, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.POPPY, Blocks.POTTED_POPPY, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.OPEN_EYEBLOSSOM, Blocks.POTTED_OPEN_EYEBLOSSOM, BlockModelGenerators.PlantType.EMISSIVE_NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.CLOSED_EYEBLOSSOM, Blocks.POTTED_CLOSED_EYEBLOSSOM, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.BLUE_ORCHID, Blocks.POTTED_BLUE_ORCHID, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.ALLIUM, Blocks.POTTED_ALLIUM, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.AZURE_BLUET, Blocks.POTTED_AZURE_BLUET, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.RED_TULIP, Blocks.POTTED_RED_TULIP, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.ORANGE_TULIP, Blocks.POTTED_ORANGE_TULIP, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.WHITE_TULIP, Blocks.POTTED_WHITE_TULIP, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.PINK_TULIP, Blocks.POTTED_PINK_TULIP, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.OXEYE_DAISY, Blocks.POTTED_OXEYE_DAISY, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.CORNFLOWER, Blocks.POTTED_CORNFLOWER, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.LILY_OF_THE_VALLEY, Blocks.POTTED_LILY_OF_THE_VALLEY, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.WITHER_ROSE, Blocks.POTTED_WITHER_ROSE, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.RED_MUSHROOM, Blocks.POTTED_RED_MUSHROOM, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.BROWN_MUSHROOM, Blocks.POTTED_BROWN_MUSHROOM, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.DEAD_BUSH, Blocks.POTTED_DEAD_BUSH, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPlantWithDefaultItem(Blocks.TORCHFLOWER, Blocks.POTTED_TORCHFLOWER, BlockModelGenerators.PlantType.NOT_TINTED); + this.createPointedDripstone(); + this.createMushroomBlock(Blocks.BROWN_MUSHROOM_BLOCK); + this.createMushroomBlock(Blocks.RED_MUSHROOM_BLOCK); + this.createMushroomBlock(Blocks.MUSHROOM_STEM); + this.createCrossBlock(Blocks.SHORT_GRASS, BlockModelGenerators.PlantType.TINTED); + this.createItemWithGrassTint(Blocks.SHORT_GRASS); + this.createCrossBlockWithDefaultItem(Blocks.SHORT_DRY_GRASS, BlockModelGenerators.PlantType.NOT_TINTED); + this.createCrossBlockWithDefaultItem(Blocks.TALL_DRY_GRASS, BlockModelGenerators.PlantType.NOT_TINTED); + this.createCrossBlock(Blocks.BUSH, BlockModelGenerators.PlantType.TINTED); + this.createItemWithGrassTint(Blocks.BUSH); + this.createCrossBlock(Blocks.SUGAR_CANE, BlockModelGenerators.PlantType.TINTED); + this.registerSimpleFlatItemModel(Items.SUGAR_CANE); + this.createGrowingPlant(Blocks.KELP, Blocks.KELP_PLANT, BlockModelGenerators.PlantType.NOT_TINTED); + this.registerSimpleFlatItemModel(Items.KELP); + this.createCrossBlock(Blocks.HANGING_ROOTS, BlockModelGenerators.PlantType.NOT_TINTED); + this.createGrowingPlant(Blocks.WEEPING_VINES, Blocks.WEEPING_VINES_PLANT, BlockModelGenerators.PlantType.NOT_TINTED); + this.createGrowingPlant(Blocks.TWISTING_VINES, Blocks.TWISTING_VINES_PLANT, BlockModelGenerators.PlantType.NOT_TINTED); + this.registerSimpleFlatItemModel(Blocks.WEEPING_VINES, "_plant"); + this.registerSimpleFlatItemModel(Blocks.TWISTING_VINES, "_plant"); + this.createCrossBlockWithDefaultItem( + Blocks.BAMBOO_SAPLING, BlockModelGenerators.PlantType.TINTED, TextureMapping.cross(TextureMapping.getBlockTexture(Blocks.BAMBOO, "_stage0")) + ); + this.createBamboo(); + this.createCrossBlockWithDefaultItem(Blocks.CACTUS_FLOWER, BlockModelGenerators.PlantType.NOT_TINTED); + this.createCrossBlockWithDefaultItem(Blocks.COBWEB, BlockModelGenerators.PlantType.NOT_TINTED); + this.createDoublePlantWithDefaultItem(Blocks.LILAC, BlockModelGenerators.PlantType.NOT_TINTED); + this.createDoublePlantWithDefaultItem(Blocks.ROSE_BUSH, BlockModelGenerators.PlantType.NOT_TINTED); + this.createDoublePlantWithDefaultItem(Blocks.PEONY, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedDoublePlant(Blocks.TALL_GRASS); + this.createTintedDoublePlant(Blocks.LARGE_FERN); + this.createSunflower(); + this.createTallSeagrass(); + this.createSmallDripleaf(); + this.createCoral( + Blocks.TUBE_CORAL, + Blocks.DEAD_TUBE_CORAL, + Blocks.TUBE_CORAL_BLOCK, + Blocks.DEAD_TUBE_CORAL_BLOCK, + Blocks.TUBE_CORAL_FAN, + Blocks.DEAD_TUBE_CORAL_FAN, + Blocks.TUBE_CORAL_WALL_FAN, + Blocks.DEAD_TUBE_CORAL_WALL_FAN + ); + this.createCoral( + Blocks.BRAIN_CORAL, + Blocks.DEAD_BRAIN_CORAL, + Blocks.BRAIN_CORAL_BLOCK, + Blocks.DEAD_BRAIN_CORAL_BLOCK, + Blocks.BRAIN_CORAL_FAN, + Blocks.DEAD_BRAIN_CORAL_FAN, + Blocks.BRAIN_CORAL_WALL_FAN, + Blocks.DEAD_BRAIN_CORAL_WALL_FAN + ); + this.createCoral( + Blocks.BUBBLE_CORAL, + Blocks.DEAD_BUBBLE_CORAL, + Blocks.BUBBLE_CORAL_BLOCK, + Blocks.DEAD_BUBBLE_CORAL_BLOCK, + Blocks.BUBBLE_CORAL_FAN, + Blocks.DEAD_BUBBLE_CORAL_FAN, + Blocks.BUBBLE_CORAL_WALL_FAN, + Blocks.DEAD_BUBBLE_CORAL_WALL_FAN + ); + this.createCoral( + Blocks.FIRE_CORAL, + Blocks.DEAD_FIRE_CORAL, + Blocks.FIRE_CORAL_BLOCK, + Blocks.DEAD_FIRE_CORAL_BLOCK, + Blocks.FIRE_CORAL_FAN, + Blocks.DEAD_FIRE_CORAL_FAN, + Blocks.FIRE_CORAL_WALL_FAN, + Blocks.DEAD_FIRE_CORAL_WALL_FAN + ); + this.createCoral( + Blocks.HORN_CORAL, + Blocks.DEAD_HORN_CORAL, + Blocks.HORN_CORAL_BLOCK, + Blocks.DEAD_HORN_CORAL_BLOCK, + Blocks.HORN_CORAL_FAN, + Blocks.DEAD_HORN_CORAL_FAN, + Blocks.HORN_CORAL_WALL_FAN, + Blocks.DEAD_HORN_CORAL_WALL_FAN + ); + this.createStems(Blocks.MELON_STEM, Blocks.ATTACHED_MELON_STEM); + this.createStems(Blocks.PUMPKIN_STEM, Blocks.ATTACHED_PUMPKIN_STEM); + this.woodProvider(Blocks.MANGROVE_LOG).logWithHorizontal(Blocks.MANGROVE_LOG).wood(Blocks.MANGROVE_WOOD); + this.woodProvider(Blocks.STRIPPED_MANGROVE_LOG).logWithHorizontal(Blocks.STRIPPED_MANGROVE_LOG).wood(Blocks.STRIPPED_MANGROVE_WOOD); + this.createHangingSign(Blocks.STRIPPED_MANGROVE_LOG, Blocks.MANGROVE_HANGING_SIGN, Blocks.MANGROVE_WALL_HANGING_SIGN); + this.createTintedLeaves(Blocks.MANGROVE_LEAVES, TexturedModel.LEAVES, -7158200); + this.woodProvider(Blocks.ACACIA_LOG).logWithHorizontal(Blocks.ACACIA_LOG).wood(Blocks.ACACIA_WOOD); + this.woodProvider(Blocks.STRIPPED_ACACIA_LOG).logWithHorizontal(Blocks.STRIPPED_ACACIA_LOG).wood(Blocks.STRIPPED_ACACIA_WOOD); + this.createHangingSign(Blocks.STRIPPED_ACACIA_LOG, Blocks.ACACIA_HANGING_SIGN, Blocks.ACACIA_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.ACACIA_SAPLING, Blocks.POTTED_ACACIA_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.ACACIA_LEAVES, TexturedModel.LEAVES, -12012264); + this.woodProvider(Blocks.CHERRY_LOG).logUVLocked(Blocks.CHERRY_LOG).wood(Blocks.CHERRY_WOOD); + this.woodProvider(Blocks.STRIPPED_CHERRY_LOG).logUVLocked(Blocks.STRIPPED_CHERRY_LOG).wood(Blocks.STRIPPED_CHERRY_WOOD); + this.createHangingSign(Blocks.STRIPPED_CHERRY_LOG, Blocks.CHERRY_HANGING_SIGN, Blocks.CHERRY_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.CHERRY_SAPLING, Blocks.POTTED_CHERRY_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTrivialBlock(Blocks.CHERRY_LEAVES, TexturedModel.LEAVES); + this.woodProvider(Blocks.BIRCH_LOG).logWithHorizontal(Blocks.BIRCH_LOG).wood(Blocks.BIRCH_WOOD); + this.woodProvider(Blocks.STRIPPED_BIRCH_LOG).logWithHorizontal(Blocks.STRIPPED_BIRCH_LOG).wood(Blocks.STRIPPED_BIRCH_WOOD); + this.createHangingSign(Blocks.STRIPPED_BIRCH_LOG, Blocks.BIRCH_HANGING_SIGN, Blocks.BIRCH_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.BIRCH_SAPLING, Blocks.POTTED_BIRCH_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.BIRCH_LEAVES, TexturedModel.LEAVES, -8345771); + this.woodProvider(Blocks.OAK_LOG).logWithHorizontal(Blocks.OAK_LOG).wood(Blocks.OAK_WOOD); + this.woodProvider(Blocks.STRIPPED_OAK_LOG).logWithHorizontal(Blocks.STRIPPED_OAK_LOG).wood(Blocks.STRIPPED_OAK_WOOD); + this.createHangingSign(Blocks.STRIPPED_OAK_LOG, Blocks.OAK_HANGING_SIGN, Blocks.OAK_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.OAK_SAPLING, Blocks.POTTED_OAK_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.OAK_LEAVES, TexturedModel.LEAVES, -12012264); + this.woodProvider(Blocks.SPRUCE_LOG).logWithHorizontal(Blocks.SPRUCE_LOG).wood(Blocks.SPRUCE_WOOD); + this.woodProvider(Blocks.STRIPPED_SPRUCE_LOG).logWithHorizontal(Blocks.STRIPPED_SPRUCE_LOG).wood(Blocks.STRIPPED_SPRUCE_WOOD); + this.createHangingSign(Blocks.STRIPPED_SPRUCE_LOG, Blocks.SPRUCE_HANGING_SIGN, Blocks.SPRUCE_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.SPRUCE_SAPLING, Blocks.POTTED_SPRUCE_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.SPRUCE_LEAVES, TexturedModel.LEAVES, -10380959); + this.woodProvider(Blocks.DARK_OAK_LOG).logWithHorizontal(Blocks.DARK_OAK_LOG).wood(Blocks.DARK_OAK_WOOD); + this.woodProvider(Blocks.STRIPPED_DARK_OAK_LOG).logWithHorizontal(Blocks.STRIPPED_DARK_OAK_LOG).wood(Blocks.STRIPPED_DARK_OAK_WOOD); + this.createHangingSign(Blocks.STRIPPED_DARK_OAK_LOG, Blocks.DARK_OAK_HANGING_SIGN, Blocks.DARK_OAK_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.DARK_OAK_SAPLING, Blocks.POTTED_DARK_OAK_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.DARK_OAK_LEAVES, TexturedModel.LEAVES, -12012264); + this.woodProvider(Blocks.PALE_OAK_LOG).logWithHorizontal(Blocks.PALE_OAK_LOG).wood(Blocks.PALE_OAK_WOOD); + this.woodProvider(Blocks.STRIPPED_PALE_OAK_LOG).logWithHorizontal(Blocks.STRIPPED_PALE_OAK_LOG).wood(Blocks.STRIPPED_PALE_OAK_WOOD); + this.createHangingSign(Blocks.STRIPPED_PALE_OAK_LOG, Blocks.PALE_OAK_HANGING_SIGN, Blocks.PALE_OAK_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.PALE_OAK_SAPLING, Blocks.POTTED_PALE_OAK_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTrivialBlock(Blocks.PALE_OAK_LEAVES, TexturedModel.LEAVES); + this.woodProvider(Blocks.JUNGLE_LOG).logWithHorizontal(Blocks.JUNGLE_LOG).wood(Blocks.JUNGLE_WOOD); + this.woodProvider(Blocks.STRIPPED_JUNGLE_LOG).logWithHorizontal(Blocks.STRIPPED_JUNGLE_LOG).wood(Blocks.STRIPPED_JUNGLE_WOOD); + this.createHangingSign(Blocks.STRIPPED_JUNGLE_LOG, Blocks.JUNGLE_HANGING_SIGN, Blocks.JUNGLE_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.JUNGLE_SAPLING, Blocks.POTTED_JUNGLE_SAPLING, BlockModelGenerators.PlantType.NOT_TINTED); + this.createTintedLeaves(Blocks.JUNGLE_LEAVES, TexturedModel.LEAVES, -12012264); + this.woodProvider(Blocks.CRIMSON_STEM).log(Blocks.CRIMSON_STEM).wood(Blocks.CRIMSON_HYPHAE); + this.woodProvider(Blocks.STRIPPED_CRIMSON_STEM).log(Blocks.STRIPPED_CRIMSON_STEM).wood(Blocks.STRIPPED_CRIMSON_HYPHAE); + this.createHangingSign(Blocks.STRIPPED_CRIMSON_STEM, Blocks.CRIMSON_HANGING_SIGN, Blocks.CRIMSON_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.CRIMSON_FUNGUS, Blocks.POTTED_CRIMSON_FUNGUS, BlockModelGenerators.PlantType.NOT_TINTED); + this.createNetherRoots(Blocks.CRIMSON_ROOTS, Blocks.POTTED_CRIMSON_ROOTS); + this.woodProvider(Blocks.WARPED_STEM).log(Blocks.WARPED_STEM).wood(Blocks.WARPED_HYPHAE); + this.woodProvider(Blocks.STRIPPED_WARPED_STEM).log(Blocks.STRIPPED_WARPED_STEM).wood(Blocks.STRIPPED_WARPED_HYPHAE); + this.createHangingSign(Blocks.STRIPPED_WARPED_STEM, Blocks.WARPED_HANGING_SIGN, Blocks.WARPED_WALL_HANGING_SIGN); + this.createPlantWithDefaultItem(Blocks.WARPED_FUNGUS, Blocks.POTTED_WARPED_FUNGUS, BlockModelGenerators.PlantType.NOT_TINTED); + this.createNetherRoots(Blocks.WARPED_ROOTS, Blocks.POTTED_WARPED_ROOTS); + this.woodProvider(Blocks.BAMBOO_BLOCK).logUVLocked(Blocks.BAMBOO_BLOCK); + this.woodProvider(Blocks.STRIPPED_BAMBOO_BLOCK).logUVLocked(Blocks.STRIPPED_BAMBOO_BLOCK); + this.createHangingSign(Blocks.BAMBOO_PLANKS, Blocks.BAMBOO_HANGING_SIGN, Blocks.BAMBOO_WALL_HANGING_SIGN); + this.createCrossBlock(Blocks.NETHER_SPROUTS, BlockModelGenerators.PlantType.NOT_TINTED); + this.registerSimpleFlatItemModel(Items.NETHER_SPROUTS); + this.createDoor(Blocks.IRON_DOOR); + this.createTrapdoor(Blocks.IRON_TRAPDOOR); + this.createSmoothStoneSlab(); + this.createPassiveRail(Blocks.RAIL); + this.createActiveRail(Blocks.POWERED_RAIL); + this.createActiveRail(Blocks.DETECTOR_RAIL); + this.createActiveRail(Blocks.ACTIVATOR_RAIL); + this.createComparator(); + this.createCommandBlock(Blocks.COMMAND_BLOCK); + this.createCommandBlock(Blocks.REPEATING_COMMAND_BLOCK); + this.createCommandBlock(Blocks.CHAIN_COMMAND_BLOCK); + this.createAnvil(Blocks.ANVIL); + this.createAnvil(Blocks.CHIPPED_ANVIL); + this.createAnvil(Blocks.DAMAGED_ANVIL); + this.createBarrel(); + this.createBell(); + this.createFurnace(Blocks.FURNACE, TexturedModel.ORIENTABLE_ONLY_TOP); + this.createFurnace(Blocks.BLAST_FURNACE, TexturedModel.ORIENTABLE_ONLY_TOP); + this.createFurnace(Blocks.SMOKER, TexturedModel.ORIENTABLE); + this.createRedstoneWire(); + this.createRespawnAnchor(); + this.createSculkCatalyst(); + this.copyModel(Blocks.CHISELED_STONE_BRICKS, Blocks.INFESTED_CHISELED_STONE_BRICKS); + this.copyModel(Blocks.COBBLESTONE, Blocks.INFESTED_COBBLESTONE); + this.copyModel(Blocks.CRACKED_STONE_BRICKS, Blocks.INFESTED_CRACKED_STONE_BRICKS); + this.copyModel(Blocks.MOSSY_STONE_BRICKS, Blocks.INFESTED_MOSSY_STONE_BRICKS); + this.createInfestedStone(); + this.copyModel(Blocks.STONE_BRICKS, Blocks.INFESTED_STONE_BRICKS); + this.createInfestedDeepslate(); + } + + private void createLightBlock() { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(Items.LIGHT)); + Map map = new HashMap(16); + PropertyDispatch.C1 c1 = PropertyDispatch.initial(BlockStateProperties.LEVEL); + + for (int i = 0; i <= 15; i++) { + String string = String.format(Locale.ROOT, "_%02d", i); + ResourceLocation resourceLocation = TextureMapping.getItemTexture(Items.LIGHT, string); + c1.select(i, plainVariant(ModelTemplates.PARTICLE_ONLY.createWithSuffix(Blocks.LIGHT, string, TextureMapping.particle(resourceLocation), this.modelOutput))); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel( + ModelTemplates.FLAT_ITEM.create(ModelLocationUtils.getModelLocation(Items.LIGHT, string), TextureMapping.layer0(resourceLocation), this.modelOutput) + ); + map.put(i, unbaked2); + } + + this.itemModelOutput.accept(Items.LIGHT, ItemModelUtils.selectBlockItemProperty(LightBlock.LEVEL, unbaked, map)); + this.blockStateOutput.accept(MultiVariantGenerator.dispatch(Blocks.LIGHT).with(c1)); + } + + private void createCandleAndCandleCake(Block candleBlock, Block candleCakeBlock) { + this.registerSimpleFlatItemModel(candleBlock.asItem()); + TextureMapping textureMapping = TextureMapping.cube(TextureMapping.getBlockTexture(candleBlock)); + TextureMapping textureMapping2 = TextureMapping.cube(TextureMapping.getBlockTexture(candleBlock, "_lit")); + MultiVariant multiVariant = plainVariant(ModelTemplates.CANDLE.createWithSuffix(candleBlock, "_one_candle", textureMapping, this.modelOutput)); + MultiVariant multiVariant2 = plainVariant(ModelTemplates.TWO_CANDLES.createWithSuffix(candleBlock, "_two_candles", textureMapping, this.modelOutput)); + MultiVariant multiVariant3 = plainVariant(ModelTemplates.THREE_CANDLES.createWithSuffix(candleBlock, "_three_candles", textureMapping, this.modelOutput)); + MultiVariant multiVariant4 = plainVariant(ModelTemplates.FOUR_CANDLES.createWithSuffix(candleBlock, "_four_candles", textureMapping, this.modelOutput)); + MultiVariant multiVariant5 = plainVariant(ModelTemplates.CANDLE.createWithSuffix(candleBlock, "_one_candle_lit", textureMapping2, this.modelOutput)); + MultiVariant multiVariant6 = plainVariant(ModelTemplates.TWO_CANDLES.createWithSuffix(candleBlock, "_two_candles_lit", textureMapping2, this.modelOutput)); + MultiVariant multiVariant7 = plainVariant(ModelTemplates.THREE_CANDLES.createWithSuffix(candleBlock, "_three_candles_lit", textureMapping2, this.modelOutput)); + MultiVariant multiVariant8 = plainVariant(ModelTemplates.FOUR_CANDLES.createWithSuffix(candleBlock, "_four_candles_lit", textureMapping2, this.modelOutput)); + this.blockStateOutput + .accept( + MultiVariantGenerator.dispatch(candleBlock) + .with( + PropertyDispatch.initial(BlockStateProperties.CANDLES, BlockStateProperties.LIT) + .select(1, false, multiVariant) + .select(2, false, multiVariant2) + .select(3, false, multiVariant3) + .select(4, false, multiVariant4) + .select(1, true, multiVariant5) + .select(2, true, multiVariant6) + .select(3, true, multiVariant7) + .select(4, true, multiVariant8) + ) + ); + MultiVariant multiVariant9 = plainVariant(ModelTemplates.CANDLE_CAKE.create(candleCakeBlock, TextureMapping.candleCake(candleBlock, false), this.modelOutput)); + MultiVariant multiVariant10 = plainVariant( + ModelTemplates.CANDLE_CAKE.createWithSuffix(candleCakeBlock, "_lit", TextureMapping.candleCake(candleBlock, true), this.modelOutput) + ); + this.blockStateOutput + .accept(MultiVariantGenerator.dispatch(candleCakeBlock).with(createBooleanModelDispatch(BlockStateProperties.LIT, multiVariant10, multiVariant9))); + } + + @Environment(EnvType.CLIENT) + class BlockFamilyProvider { + private final TextureMapping mapping; + private final Map models = new HashMap(); + @Nullable + private BlockFamily family; + @Nullable + private net.minecraft.client.renderer.block.model.Variant fullBlock; + private final Set skipGeneratingModelsFor = new HashSet(); + + public BlockFamilyProvider(final TextureMapping mapping) { + this.mapping = mapping; + } + + public BlockModelGenerators.BlockFamilyProvider fullBlock(Block block, ModelTemplate modelTemplate) { + this.fullBlock = BlockModelGenerators.plainModel(modelTemplate.create(block, this.mapping, BlockModelGenerators.this.modelOutput)); + if (BlockModelGenerators.FULL_BLOCK_MODEL_CUSTOM_GENERATORS.containsKey(block)) { + BlockModelGenerators.this.blockStateOutput + .accept( + ((BlockModelGenerators.BlockStateGeneratorSupplier)BlockModelGenerators.FULL_BLOCK_MODEL_CUSTOM_GENERATORS.get(block)) + .create(block, this.fullBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + } else { + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, BlockModelGenerators.variant(this.fullBlock))); + } + + return this; + } + + public BlockModelGenerators.BlockFamilyProvider donateModelTo(Block sourceBlock, Block block) { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(sourceBlock); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, BlockModelGenerators.plainVariant(resourceLocation))); + BlockModelGenerators.this.itemModelOutput.copy(sourceBlock.asItem(), block.asItem()); + this.skipGeneratingModelsFor.add(block); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider button(Block buttonBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant(ModelTemplates.BUTTON.create(buttonBlock, this.mapping, BlockModelGenerators.this.modelOutput)); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.BUTTON_PRESSED.create(buttonBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createButton(buttonBlock, multiVariant, multiVariant2)); + ResourceLocation resourceLocation = ModelTemplates.BUTTON_INVENTORY.create(buttonBlock, this.mapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.registerSimpleItemModel(buttonBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider wall(Block wallBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.WALL_POST.create(wallBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.WALL_LOW_SIDE.create(wallBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant3 = BlockModelGenerators.plainVariant( + ModelTemplates.WALL_TALL_SIDE.create(wallBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createWall(wallBlock, multiVariant, multiVariant2, multiVariant3)); + ResourceLocation resourceLocation = ModelTemplates.WALL_INVENTORY.create(wallBlock, this.mapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.registerSimpleItemModel(wallBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider customFence(Block fenceBlock) { + TextureMapping textureMapping = TextureMapping.customParticle(fenceBlock); + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_POST.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_SIDE_NORTH.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant3 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_SIDE_EAST.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant4 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_SIDE_SOUTH.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant5 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_SIDE_WEST.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createCustomFence(fenceBlock, multiVariant, multiVariant2, multiVariant3, multiVariant4, multiVariant5)); + ResourceLocation resourceLocation = ModelTemplates.CUSTOM_FENCE_INVENTORY.create(fenceBlock, textureMapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.registerSimpleItemModel(fenceBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider fence(Block fenceBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_POST.create(fenceBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_SIDE.create(fenceBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createFence(fenceBlock, multiVariant, multiVariant2)); + ResourceLocation resourceLocation = ModelTemplates.FENCE_INVENTORY.create(fenceBlock, this.mapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.registerSimpleItemModel(fenceBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider customFenceGate(Block customFenceGateBlock) { + TextureMapping textureMapping = TextureMapping.customParticle(customFenceGateBlock); + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_GATE_OPEN.create(customFenceGateBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_GATE_CLOSED.create(customFenceGateBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant3 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_GATE_WALL_OPEN.create(customFenceGateBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant4 = BlockModelGenerators.plainVariant( + ModelTemplates.CUSTOM_FENCE_GATE_WALL_CLOSED.create(customFenceGateBlock, textureMapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createFenceGate(customFenceGateBlock, multiVariant, multiVariant2, multiVariant3, multiVariant4, false)); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider fenceGate(Block fenceGateBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_GATE_OPEN.create(fenceGateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_GATE_CLOSED.create(fenceGateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant3 = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_GATE_WALL_OPEN.create(fenceGateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant4 = BlockModelGenerators.plainVariant( + ModelTemplates.FENCE_GATE_WALL_CLOSED.create(fenceGateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createFenceGate(fenceGateBlock, multiVariant, multiVariant2, multiVariant3, multiVariant4, true)); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider pressurePlate(Block pressurePlateBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.PRESSURE_PLATE_UP.create(pressurePlateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant( + ModelTemplates.PRESSURE_PLATE_DOWN.create(pressurePlateBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createPressurePlate(pressurePlateBlock, multiVariant, multiVariant2)); + return this; + } + + public BlockModelGenerators.BlockFamilyProvider sign(Block signBlock) { + if (this.family == null) { + throw new IllegalStateException("Family not defined"); + } else { + Block block = (Block)this.family.getVariants().get(Variant.WALL_SIGN); + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.PARTICLE_ONLY.create(signBlock, this.mapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(signBlock, multiVariant)); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, multiVariant)); + BlockModelGenerators.this.registerSimpleFlatItemModel(signBlock.asItem()); + return this; + } + } + + public BlockModelGenerators.BlockFamilyProvider slab(Block slabBlock) { + if (this.fullBlock == null) { + throw new IllegalStateException("Full block not generated yet"); + } else { + ResourceLocation resourceLocation = this.getOrCreateModel(ModelTemplates.SLAB_BOTTOM, slabBlock); + MultiVariant multiVariant = BlockModelGenerators.plainVariant(this.getOrCreateModel(ModelTemplates.SLAB_TOP, slabBlock)); + BlockModelGenerators.this.blockStateOutput + .accept( + BlockModelGenerators.createSlab( + slabBlock, BlockModelGenerators.plainVariant(resourceLocation), multiVariant, BlockModelGenerators.variant(this.fullBlock) + ) + ); + BlockModelGenerators.this.registerSimpleItemModel(slabBlock, resourceLocation); + return this; + } + } + + public BlockModelGenerators.BlockFamilyProvider stairs(Block stairsBlock) { + MultiVariant multiVariant = BlockModelGenerators.plainVariant(this.getOrCreateModel(ModelTemplates.STAIRS_INNER, stairsBlock)); + ResourceLocation resourceLocation = this.getOrCreateModel(ModelTemplates.STAIRS_STRAIGHT, stairsBlock); + MultiVariant multiVariant2 = BlockModelGenerators.plainVariant(this.getOrCreateModel(ModelTemplates.STAIRS_OUTER, stairsBlock)); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createStairs(stairsBlock, multiVariant, BlockModelGenerators.plainVariant(resourceLocation), multiVariant2)); + BlockModelGenerators.this.registerSimpleItemModel(stairsBlock, resourceLocation); + return this; + } + + private BlockModelGenerators.BlockFamilyProvider fullBlockVariant(Block block) { + TexturedModel texturedModel = (TexturedModel)BlockModelGenerators.TEXTURED_MODELS.getOrDefault(block, TexturedModel.CUBE.get(block)); + MultiVariant multiVariant = BlockModelGenerators.plainVariant(texturedModel.create(block, BlockModelGenerators.this.modelOutput)); + BlockModelGenerators.this.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(block, multiVariant)); + return this; + } + + private BlockModelGenerators.BlockFamilyProvider door(Block doorBlock) { + BlockModelGenerators.this.createDoor(doorBlock); + return this; + } + + private void trapdoor(Block trapdoorBlock) { + if (BlockModelGenerators.NON_ORIENTABLE_TRAPDOOR.contains(trapdoorBlock)) { + BlockModelGenerators.this.createTrapdoor(trapdoorBlock); + } else { + BlockModelGenerators.this.createOrientableTrapdoor(trapdoorBlock); + } + } + + private ResourceLocation getOrCreateModel(ModelTemplate modelTemplate, Block block) { + return (ResourceLocation)this.models + .computeIfAbsent(modelTemplate, modelTemplatex -> modelTemplatex.create(block, this.mapping, BlockModelGenerators.this.modelOutput)); + } + + public BlockModelGenerators.BlockFamilyProvider generateFor(BlockFamily family) { + this.family = family; + family.getVariants() + .forEach( + (variant, block) -> { + if (!this.skipGeneratingModelsFor.contains(block)) { + BiConsumer biConsumer = (BiConsumer)BlockModelGenerators.SHAPE_CONSUMERS + .get(variant); + if (biConsumer != null) { + biConsumer.accept(this, block); + } + } + } + ); + return this; + } + } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + interface BlockStateGeneratorSupplier { + BlockModelDefinitionGenerator create( + Block block, + net.minecraft.client.renderer.block.model.Variant variant, + TextureMapping textureMapping, + BiConsumer biConsumer + ); + } + + @Environment(EnvType.CLIENT) + record BookSlotModelCacheKey(ModelTemplate template, String modelSuffix) { + } + + @Environment(EnvType.CLIENT) + static enum PlantType { + TINTED(ModelTemplates.TINTED_CROSS, ModelTemplates.TINTED_FLOWER_POT_CROSS, false), + NOT_TINTED(ModelTemplates.CROSS, ModelTemplates.FLOWER_POT_CROSS, false), + EMISSIVE_NOT_TINTED(ModelTemplates.CROSS_EMISSIVE, ModelTemplates.FLOWER_POT_CROSS_EMISSIVE, true); + + private final ModelTemplate blockTemplate; + private final ModelTemplate flowerPotTemplate; + private final boolean isEmissive; + + private PlantType(final ModelTemplate blockTemplate, final ModelTemplate flowerPotTemplate, final boolean isEmissive) { + this.blockTemplate = blockTemplate; + this.flowerPotTemplate = flowerPotTemplate; + this.isEmissive = isEmissive; + } + + public ModelTemplate getCross() { + return this.blockTemplate; + } + + public ModelTemplate getCrossPot() { + return this.flowerPotTemplate; + } + + public ResourceLocation createItemModel(BlockModelGenerators generator, Block block) { + Item item = block.asItem(); + return this.isEmissive + ? generator.createFlatItemModelWithBlockTextureAndOverlay(item, block, "_emissive") + : generator.createFlatItemModelWithBlockTexture(item, block); + } + + public TextureMapping getTextureMapping(Block block) { + return this.isEmissive ? TextureMapping.crossEmissive(block) : TextureMapping.cross(block); + } + + public TextureMapping getPlantTextureMapping(Block block) { + return this.isEmissive ? TextureMapping.plantEmissive(block) : TextureMapping.plant(block); + } + } + + @Environment(EnvType.CLIENT) + class WoodProvider { + private final TextureMapping logMapping; + + public WoodProvider(final TextureMapping logMapping) { + this.logMapping = logMapping; + } + + public BlockModelGenerators.WoodProvider wood(Block woodBlock) { + TextureMapping textureMapping = this.logMapping.copyAndUpdate(TextureSlot.END, this.logMapping.get(TextureSlot.SIDE)); + ResourceLocation resourceLocation = ModelTemplates.CUBE_COLUMN.create(woodBlock, textureMapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createAxisAlignedPillarBlock(woodBlock, BlockModelGenerators.plainVariant(resourceLocation))); + BlockModelGenerators.this.registerSimpleItemModel(woodBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.WoodProvider log(Block logBlock) { + ResourceLocation resourceLocation = ModelTemplates.CUBE_COLUMN.create(logBlock, this.logMapping, BlockModelGenerators.this.modelOutput); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createAxisAlignedPillarBlock(logBlock, BlockModelGenerators.plainVariant(resourceLocation))); + BlockModelGenerators.this.registerSimpleItemModel(logBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.WoodProvider logWithHorizontal(Block logBlock) { + ResourceLocation resourceLocation = ModelTemplates.CUBE_COLUMN.create(logBlock, this.logMapping, BlockModelGenerators.this.modelOutput); + MultiVariant multiVariant = BlockModelGenerators.plainVariant( + ModelTemplates.CUBE_COLUMN_HORIZONTAL.create(logBlock, this.logMapping, BlockModelGenerators.this.modelOutput) + ); + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createRotatedPillarWithHorizontalVariant(logBlock, BlockModelGenerators.plainVariant(resourceLocation), multiVariant)); + BlockModelGenerators.this.registerSimpleItemModel(logBlock, resourceLocation); + return this; + } + + public BlockModelGenerators.WoodProvider logUVLocked(Block logBlock) { + BlockModelGenerators.this.blockStateOutput + .accept(BlockModelGenerators.createPillarBlockUVLocked(logBlock, this.logMapping, BlockModelGenerators.this.modelOutput)); + BlockModelGenerators.this.registerSimpleItemModel( + logBlock, ModelTemplates.CUBE_COLUMN.create(logBlock, this.logMapping, BlockModelGenerators.this.modelOutput) + ); + return this; + } + } +} diff --git a/net/minecraft/client/data/models/EquipmentAssetProvider.java b/net/minecraft/client/data/models/EquipmentAssetProvider.java new file mode 100644 index 00000000..19d1858d --- /dev/null +++ b/net/minecraft/client/data/models/EquipmentAssetProvider.java @@ -0,0 +1,123 @@ +package net.minecraft.client.data.models; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.Map.Entry; +import java.util.concurrent.CompletableFuture; +import java.util.function.BiConsumer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.resources.model.EquipmentClientInfo; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.DataProvider; +import net.minecraft.data.PackOutput; +import net.minecraft.data.PackOutput.PathProvider; +import net.minecraft.data.PackOutput.Target; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.equipment.EquipmentAsset; +import net.minecraft.world.item.equipment.EquipmentAssets; + +@Environment(EnvType.CLIENT) +public class EquipmentAssetProvider implements DataProvider { + private final PathProvider pathProvider; + + public EquipmentAssetProvider(PackOutput output) { + this.pathProvider = output.createPathProvider(Target.RESOURCE_PACK, "equipment"); + } + + private static void bootstrap(BiConsumer, EquipmentClientInfo> output) { + output.accept( + EquipmentAssets.LEATHER, + EquipmentClientInfo.builder() + .addHumanoidLayers(ResourceLocation.withDefaultNamespace("leather"), true) + .addHumanoidLayers(ResourceLocation.withDefaultNamespace("leather_overlay"), false) + .addLayers(EquipmentClientInfo.LayerType.HORSE_BODY, EquipmentClientInfo.Layer.leatherDyeable(ResourceLocation.withDefaultNamespace("leather"), true)) + .build() + ); + output.accept(EquipmentAssets.CHAINMAIL, onlyHumanoid("chainmail")); + output.accept(EquipmentAssets.IRON, humanoidAndHorse("iron")); + output.accept(EquipmentAssets.GOLD, humanoidAndHorse("gold")); + output.accept(EquipmentAssets.DIAMOND, humanoidAndHorse("diamond")); + output.accept( + EquipmentAssets.TURTLE_SCUTE, EquipmentClientInfo.builder().addMainHumanoidLayer(ResourceLocation.withDefaultNamespace("turtle_scute"), false).build() + ); + output.accept(EquipmentAssets.NETHERITE, onlyHumanoid("netherite")); + output.accept( + EquipmentAssets.ARMADILLO_SCUTE, + EquipmentClientInfo.builder() + .addLayers(EquipmentClientInfo.LayerType.WOLF_BODY, EquipmentClientInfo.Layer.onlyIfDyed(ResourceLocation.withDefaultNamespace("armadillo_scute"), false)) + .addLayers( + EquipmentClientInfo.LayerType.WOLF_BODY, EquipmentClientInfo.Layer.onlyIfDyed(ResourceLocation.withDefaultNamespace("armadillo_scute_overlay"), true) + ) + .build() + ); + output.accept( + EquipmentAssets.ELYTRA, + EquipmentClientInfo.builder() + .addLayers(EquipmentClientInfo.LayerType.WINGS, new EquipmentClientInfo.Layer(ResourceLocation.withDefaultNamespace("elytra"), Optional.empty(), true)) + .build() + ); + EquipmentClientInfo.Layer layer = new EquipmentClientInfo.Layer(ResourceLocation.withDefaultNamespace("saddle")); + output.accept( + EquipmentAssets.SADDLE, + EquipmentClientInfo.builder() + .addLayers(EquipmentClientInfo.LayerType.PIG_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.STRIDER_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.CAMEL_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.HORSE_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.DONKEY_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.MULE_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.SKELETON_HORSE_SADDLE, layer) + .addLayers(EquipmentClientInfo.LayerType.ZOMBIE_HORSE_SADDLE, layer) + .build() + ); + + for (Entry> entry : EquipmentAssets.CARPETS.entrySet()) { + DyeColor dyeColor = (DyeColor)entry.getKey(); + ResourceKey resourceKey = (ResourceKey)entry.getValue(); + output.accept( + resourceKey, + EquipmentClientInfo.builder() + .addLayers(EquipmentClientInfo.LayerType.LLAMA_BODY, new EquipmentClientInfo.Layer(ResourceLocation.withDefaultNamespace(dyeColor.getSerializedName()))) + .build() + ); + } + + output.accept( + EquipmentAssets.TRADER_LLAMA, + EquipmentClientInfo.builder() + .addLayers(EquipmentClientInfo.LayerType.LLAMA_BODY, new EquipmentClientInfo.Layer(ResourceLocation.withDefaultNamespace("trader_llama"))) + .build() + ); + } + + private static EquipmentClientInfo onlyHumanoid(String name) { + return EquipmentClientInfo.builder().addHumanoidLayers(ResourceLocation.withDefaultNamespace(name)).build(); + } + + private static EquipmentClientInfo humanoidAndHorse(String name) { + return EquipmentClientInfo.builder() + .addHumanoidLayers(ResourceLocation.withDefaultNamespace(name)) + .addLayers(EquipmentClientInfo.LayerType.HORSE_BODY, EquipmentClientInfo.Layer.leatherDyeable(ResourceLocation.withDefaultNamespace(name), false)) + .build(); + } + + @Override + public CompletableFuture run(CachedOutput output) { + Map, EquipmentClientInfo> map = new HashMap(); + bootstrap((resourceKey, equipmentClientInfo) -> { + if (map.putIfAbsent(resourceKey, equipmentClientInfo) != null) { + throw new IllegalStateException("Tried to register equipment asset twice for id: " + resourceKey); + } + }); + return DataProvider.saveAll(output, EquipmentClientInfo.CODEC, this.pathProvider::json, map); + } + + @Override + public String getName() { + return "Equipment Asset Definitions"; + } +} diff --git a/net/minecraft/client/data/models/ItemModelGenerators.java b/net/minecraft/client/data/models/ItemModelGenerators.java new file mode 100644 index 00000000..5ef58ad3 --- /dev/null +++ b/net/minecraft/client/data/models/ItemModelGenerators.java @@ -0,0 +1,836 @@ +package net.minecraft.client.data.models; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.function.BiConsumer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.item.Dye; +import net.minecraft.client.color.item.Firework; +import net.minecraft.client.color.item.ItemTintSource; +import net.minecraft.client.color.item.MapColor; +import net.minecraft.client.color.item.Potion; +import net.minecraft.client.data.models.model.ItemModelUtils; +import net.minecraft.client.data.models.model.ModelInstance; +import net.minecraft.client.data.models.model.ModelLocationUtils; +import net.minecraft.client.data.models.model.ModelTemplate; +import net.minecraft.client.data.models.model.ModelTemplates; +import net.minecraft.client.data.models.model.TextureMapping; +import net.minecraft.client.renderer.item.BundleSelectedItemSpecialRenderer; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.client.renderer.item.RangeSelectItemModel; +import net.minecraft.client.renderer.item.SelectItemModel; +import net.minecraft.client.renderer.item.properties.conditional.Broken; +import net.minecraft.client.renderer.item.properties.conditional.BundleHasSelectedItem; +import net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty; +import net.minecraft.client.renderer.item.properties.conditional.FishingRodCast; +import net.minecraft.client.renderer.item.properties.numeric.CompassAngle; +import net.minecraft.client.renderer.item.properties.numeric.CompassAngleState; +import net.minecraft.client.renderer.item.properties.numeric.CrossbowPull; +import net.minecraft.client.renderer.item.properties.numeric.Time; +import net.minecraft.client.renderer.item.properties.numeric.UseCycle; +import net.minecraft.client.renderer.item.properties.numeric.UseDuration; +import net.minecraft.client.renderer.item.properties.select.Charge; +import net.minecraft.client.renderer.item.properties.select.DisplayContext; +import net.minecraft.client.renderer.item.properties.select.TrimMaterialProperty; +import net.minecraft.client.renderer.special.ShieldSpecialRenderer.Unbaked; +import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; +import net.minecraft.world.item.CrossbowItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.equipment.EquipmentAsset; +import net.minecraft.world.item.equipment.EquipmentAssets; +import net.minecraft.world.item.equipment.trim.MaterialAssetGroup; +import net.minecraft.world.item.equipment.trim.TrimMaterial; +import net.minecraft.world.item.equipment.trim.TrimMaterials; + +@Environment(EnvType.CLIENT) +public class ItemModelGenerators { + private static final ItemTintSource BLANK_LAYER = ItemModelUtils.constantTint(-1); + public static final ResourceLocation TRIM_PREFIX_HELMET = prefixForSlotTrim("helmet"); + public static final ResourceLocation TRIM_PREFIX_CHESTPLATE = prefixForSlotTrim("chestplate"); + public static final ResourceLocation TRIM_PREFIX_LEGGINGS = prefixForSlotTrim("leggings"); + public static final ResourceLocation TRIM_PREFIX_BOOTS = prefixForSlotTrim("boots"); + public static final List TRIM_MATERIAL_MODELS = List.of( + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.QUARTZ, TrimMaterials.QUARTZ), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.IRON, TrimMaterials.IRON), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.NETHERITE, TrimMaterials.NETHERITE), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.REDSTONE, TrimMaterials.REDSTONE), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.COPPER, TrimMaterials.COPPER), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.GOLD, TrimMaterials.GOLD), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.EMERALD, TrimMaterials.EMERALD), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.DIAMOND, TrimMaterials.DIAMOND), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.LAPIS, TrimMaterials.LAPIS), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.AMETHYST, TrimMaterials.AMETHYST), + new ItemModelGenerators.TrimMaterialData(MaterialAssetGroup.RESIN, TrimMaterials.RESIN) + ); + private final ItemModelOutput itemModelOutput; + private final BiConsumer modelOutput; + + public static ResourceLocation prefixForSlotTrim(String name) { + return ResourceLocation.withDefaultNamespace("trims/items/" + name + "_trim"); + } + + public ItemModelGenerators(ItemModelOutput itemModelOutput, BiConsumer modelOutput) { + this.itemModelOutput = itemModelOutput; + this.modelOutput = modelOutput; + } + + private void declareCustomModelItem(Item item) { + this.itemModelOutput.accept(item, ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(item))); + } + + private ResourceLocation createFlatItemModel(Item item, ModelTemplate modelTemplate) { + return modelTemplate.create(ModelLocationUtils.getModelLocation(item), TextureMapping.layer0(item), this.modelOutput); + } + + private void generateFlatItem(Item item, ModelTemplate modelTemplate) { + this.itemModelOutput.accept(item, ItemModelUtils.plainModel(this.createFlatItemModel(item, modelTemplate))); + } + + private ResourceLocation createFlatItemModel(Item item, String suffix, ModelTemplate modelTemplate) { + return modelTemplate.create( + ModelLocationUtils.getModelLocation(item, suffix), TextureMapping.layer0(TextureMapping.getItemTexture(item, suffix)), this.modelOutput + ); + } + + private ResourceLocation createFlatItemModel(Item item, Item layerZeroItem, ModelTemplate modelTemplate) { + return modelTemplate.create(ModelLocationUtils.getModelLocation(item), TextureMapping.layer0(layerZeroItem), this.modelOutput); + } + + private void generateFlatItem(Item item, Item layerZeroItem, ModelTemplate modelTemplate) { + this.itemModelOutput.accept(item, ItemModelUtils.plainModel(this.createFlatItemModel(item, layerZeroItem, modelTemplate))); + } + + private void generateItemWithTintedOverlay(Item item, ItemTintSource tintSource) { + this.generateItemWithTintedOverlay(item, "_overlay", tintSource); + } + + private void generateItemWithTintedOverlay(Item item, String suffix, ItemTintSource tintSource) { + ResourceLocation resourceLocation = this.generateLayeredItem(item, TextureMapping.getItemTexture(item), TextureMapping.getItemTexture(item, suffix)); + this.itemModelOutput.accept(item, ItemModelUtils.tintedModel(resourceLocation, BLANK_LAYER, tintSource)); + } + + private List createCompassModels(Item item) { + List list = new ArrayList(); + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(item, "_16", ModelTemplates.FLAT_ITEM)); + list.add(ItemModelUtils.override(unbaked, 0.0F)); + + for (int i = 1; i < 32; i++) { + int j = Mth.positiveModulo(i - 16, 32); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(item, String.format(Locale.ROOT, "_%02d", j), ModelTemplates.FLAT_ITEM)); + list.add(ItemModelUtils.override(unbaked2, i - 0.5F)); + } + + list.add(ItemModelUtils.override(unbaked, 31.5F)); + return list; + } + + private void generateStandardCompassItem(Item item) { + List list = this.createCompassModels(item); + this.itemModelOutput + .accept( + item, + ItemModelUtils.conditional( + ItemModelUtils.hasComponent(DataComponents.LODESTONE_TRACKER), + ItemModelUtils.rangeSelect(new CompassAngle(true, CompassAngleState.CompassTarget.LODESTONE), 32.0F, list), + ItemModelUtils.inOverworld( + ItemModelUtils.rangeSelect(new CompassAngle(true, CompassAngleState.CompassTarget.SPAWN), 32.0F, list), + ItemModelUtils.rangeSelect(new CompassAngle(true, CompassAngleState.CompassTarget.NONE), 32.0F, list) + ) + ) + ); + } + + private void generateRecoveryCompassItem(Item item) { + this.itemModelOutput + .accept(item, ItemModelUtils.rangeSelect(new CompassAngle(true, CompassAngleState.CompassTarget.RECOVERY), 32.0F, this.createCompassModels(item))); + } + + private void generateClockItem(Item item) { + List list = new ArrayList(); + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(item, "_00", ModelTemplates.FLAT_ITEM)); + list.add(ItemModelUtils.override(unbaked, 0.0F)); + + for (int i = 1; i < 64; i++) { + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(item, String.format(Locale.ROOT, "_%02d", i), ModelTemplates.FLAT_ITEM)); + list.add(ItemModelUtils.override(unbaked2, i - 0.5F)); + } + + list.add(ItemModelUtils.override(unbaked, 63.5F)); + this.itemModelOutput + .accept( + item, + ItemModelUtils.inOverworld( + ItemModelUtils.rangeSelect(new Time(true, Time.TimeSource.DAYTIME), 64.0F, list), + ItemModelUtils.rangeSelect(new Time(true, Time.TimeSource.RANDOM), 64.0F, list) + ) + ); + } + + private ResourceLocation generateLayeredItem(Item item, ResourceLocation layer0, ResourceLocation layer1) { + return ModelTemplates.TWO_LAYERED_ITEM.create(item, TextureMapping.layered(layer0, layer1), this.modelOutput); + } + + private ResourceLocation generateLayeredItem(ResourceLocation modelLocation, ResourceLocation layer0, ResourceLocation layer1) { + return ModelTemplates.TWO_LAYERED_ITEM.create(modelLocation, TextureMapping.layered(layer0, layer1), this.modelOutput); + } + + private void generateLayeredItem(ResourceLocation modelLocation, ResourceLocation layer0, ResourceLocation layer1, ResourceLocation layer2) { + ModelTemplates.THREE_LAYERED_ITEM.create(modelLocation, TextureMapping.layered(layer0, layer1, layer2), this.modelOutput); + } + + private void generateTrimmableItem(Item item, ResourceKey equipmentAsset, ResourceLocation modelId, boolean usesSecondLayer) { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(item); + ResourceLocation resourceLocation2 = TextureMapping.getItemTexture(item); + ResourceLocation resourceLocation3 = TextureMapping.getItemTexture(item, "_overlay"); + List>> list = new ArrayList(TRIM_MATERIAL_MODELS.size()); + + for (ItemModelGenerators.TrimMaterialData trimMaterialData : TRIM_MATERIAL_MODELS) { + ResourceLocation resourceLocation4 = resourceLocation.withSuffix("_" + trimMaterialData.assets().base().suffix() + "_trim"); + ResourceLocation resourceLocation5 = modelId.withSuffix("_" + trimMaterialData.assets().assetId(equipmentAsset).suffix()); + ItemModel.Unbaked unbaked; + if (usesSecondLayer) { + this.generateLayeredItem(resourceLocation4, resourceLocation2, resourceLocation3, resourceLocation5); + unbaked = ItemModelUtils.tintedModel(resourceLocation4, new Dye(-6265536)); + } else { + this.generateLayeredItem(resourceLocation4, resourceLocation2, resourceLocation5); + unbaked = ItemModelUtils.plainModel(resourceLocation4); + } + + list.add(ItemModelUtils.when(trimMaterialData.materialKey, unbaked)); + } + + ItemModel.Unbaked unbaked2; + if (usesSecondLayer) { + ModelTemplates.TWO_LAYERED_ITEM.create(resourceLocation, TextureMapping.layered(resourceLocation2, resourceLocation3), this.modelOutput); + unbaked2 = ItemModelUtils.tintedModel(resourceLocation, new Dye(-6265536)); + } else { + ModelTemplates.FLAT_ITEM.create(resourceLocation, TextureMapping.layer0(resourceLocation2), this.modelOutput); + unbaked2 = ItemModelUtils.plainModel(resourceLocation); + } + + this.itemModelOutput.accept(item, ItemModelUtils.select(new TrimMaterialProperty(), unbaked2, list)); + } + + private void generateBundleModels(Item bundleItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(bundleItem, ModelTemplates.FLAT_ITEM)); + ResourceLocation resourceLocation = this.generateBundleCoverModel(bundleItem, ModelTemplates.BUNDLE_OPEN_BACK_INVENTORY, "_open_back"); + ResourceLocation resourceLocation2 = this.generateBundleCoverModel(bundleItem, ModelTemplates.BUNDLE_OPEN_FRONT_INVENTORY, "_open_front"); + ItemModel.Unbaked unbaked2 = ItemModelUtils.composite( + ItemModelUtils.plainModel(resourceLocation), new BundleSelectedItemSpecialRenderer.Unbaked(), ItemModelUtils.plainModel(resourceLocation2) + ); + ItemModel.Unbaked unbaked3 = ItemModelUtils.conditional(new BundleHasSelectedItem(), unbaked2, unbaked); + this.itemModelOutput.accept(bundleItem, ItemModelUtils.select(new DisplayContext(), unbaked, ItemModelUtils.when(ItemDisplayContext.GUI, unbaked3))); + } + + private ResourceLocation generateBundleCoverModel(Item bundleItem, ModelTemplate modelTemplate, String suffix) { + ResourceLocation resourceLocation = TextureMapping.getItemTexture(bundleItem, suffix); + return modelTemplate.create(bundleItem, TextureMapping.layer0(resourceLocation), this.modelOutput); + } + + private void generateBow(Item bowItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(bowItem)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(bowItem, "_pulling_0", ModelTemplates.BOW)); + ItemModel.Unbaked unbaked3 = ItemModelUtils.plainModel(this.createFlatItemModel(bowItem, "_pulling_1", ModelTemplates.BOW)); + ItemModel.Unbaked unbaked4 = ItemModelUtils.plainModel(this.createFlatItemModel(bowItem, "_pulling_2", ModelTemplates.BOW)); + this.itemModelOutput + .accept( + bowItem, + ItemModelUtils.conditional( + ItemModelUtils.isUsingItem(), + ItemModelUtils.rangeSelect(new UseDuration(false), 0.05F, unbaked2, ItemModelUtils.override(unbaked3, 0.65F), ItemModelUtils.override(unbaked4, 0.9F)), + unbaked + ) + ); + } + + private void generateCrossbow(Item crossbowItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(crossbowItem)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(crossbowItem, "_pulling_0", ModelTemplates.CROSSBOW)); + ItemModel.Unbaked unbaked3 = ItemModelUtils.plainModel(this.createFlatItemModel(crossbowItem, "_pulling_1", ModelTemplates.CROSSBOW)); + ItemModel.Unbaked unbaked4 = ItemModelUtils.plainModel(this.createFlatItemModel(crossbowItem, "_pulling_2", ModelTemplates.CROSSBOW)); + ItemModel.Unbaked unbaked5 = ItemModelUtils.plainModel(this.createFlatItemModel(crossbowItem, "_arrow", ModelTemplates.CROSSBOW)); + ItemModel.Unbaked unbaked6 = ItemModelUtils.plainModel(this.createFlatItemModel(crossbowItem, "_firework", ModelTemplates.CROSSBOW)); + this.itemModelOutput + .accept( + crossbowItem, + ItemModelUtils.select( + new Charge(), + ItemModelUtils.conditional( + ItemModelUtils.isUsingItem(), + ItemModelUtils.rangeSelect(new CrossbowPull(), unbaked2, ItemModelUtils.override(unbaked3, 0.58F), ItemModelUtils.override(unbaked4, 1.0F)), + unbaked + ), + ItemModelUtils.when(CrossbowItem.ChargeType.ARROW, unbaked5), + ItemModelUtils.when(CrossbowItem.ChargeType.ROCKET, unbaked6) + ) + ); + } + + private void generateBooleanDispatch(Item item, ConditionalItemModelProperty property, ItemModel.Unbaked trueModel, ItemModel.Unbaked falseModel) { + this.itemModelOutput.accept(item, ItemModelUtils.conditional(property, trueModel, falseModel)); + } + + private void generateElytra(Item elytraItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(elytraItem, ModelTemplates.FLAT_ITEM)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(elytraItem, "_broken", ModelTemplates.FLAT_ITEM)); + this.generateBooleanDispatch(elytraItem, new Broken(), unbaked2, unbaked); + } + + private void generateBrush(Item brushItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(brushItem)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(brushItem, "_brushing_0")); + ItemModel.Unbaked unbaked3 = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(brushItem, "_brushing_1")); + ItemModel.Unbaked unbaked4 = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(brushItem, "_brushing_2")); + this.itemModelOutput + .accept( + brushItem, + ItemModelUtils.rangeSelect( + new UseCycle(10.0F), + 0.1F, + unbaked, + ItemModelUtils.override(unbaked2, 0.25F), + ItemModelUtils.override(unbaked3, 0.5F), + ItemModelUtils.override(unbaked4, 0.75F) + ) + ); + } + + private void generateFishingRod(Item fishingRodItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(fishingRodItem, ModelTemplates.FLAT_HANDHELD_ROD_ITEM)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(this.createFlatItemModel(fishingRodItem, "_cast", ModelTemplates.FLAT_HANDHELD_ROD_ITEM)); + this.generateBooleanDispatch(fishingRodItem, new FishingRodCast(), unbaked2, unbaked); + } + + private void generateGoatHorn(Item goatHornItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(goatHornItem)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(ModelLocationUtils.decorateItemModelLocation("tooting_goat_horn")); + this.generateBooleanDispatch(goatHornItem, ItemModelUtils.isUsingItem(), unbaked2, unbaked); + } + + private void generateShield(Item shieldItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.specialModel(ModelLocationUtils.getModelLocation(shieldItem), new Unbaked()); + ItemModel.Unbaked unbaked2 = ItemModelUtils.specialModel(ModelLocationUtils.getModelLocation(shieldItem, "_blocking"), new Unbaked()); + this.generateBooleanDispatch(shieldItem, ItemModelUtils.isUsingItem(), unbaked2, unbaked); + } + + private static ItemModel.Unbaked createFlatModelDispatch(ItemModel.Unbaked itemModel, ItemModel.Unbaked holdingModel) { + return ItemModelUtils.select( + new DisplayContext(), holdingModel, ItemModelUtils.when(List.of(ItemDisplayContext.GUI, ItemDisplayContext.GROUND, ItemDisplayContext.FIXED), itemModel) + ); + } + + private void generateSpyglass(Item spyglassItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(spyglassItem, ModelTemplates.FLAT_ITEM)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.plainModel(ModelLocationUtils.getModelLocation(spyglassItem, "_in_hand")); + this.itemModelOutput.accept(spyglassItem, createFlatModelDispatch(unbaked, unbaked2)); + } + + private void generateTrident(Item tridentItem) { + ItemModel.Unbaked unbaked = ItemModelUtils.plainModel(this.createFlatItemModel(tridentItem, ModelTemplates.FLAT_ITEM)); + ItemModel.Unbaked unbaked2 = ItemModelUtils.specialModel( + ModelLocationUtils.getModelLocation(tridentItem, "_in_hand"), new net.minecraft.client.renderer.special.TridentSpecialRenderer.Unbaked() + ); + ItemModel.Unbaked unbaked3 = ItemModelUtils.specialModel( + ModelLocationUtils.getModelLocation(tridentItem, "_throwing"), new net.minecraft.client.renderer.special.TridentSpecialRenderer.Unbaked() + ); + ItemModel.Unbaked unbaked4 = ItemModelUtils.conditional(ItemModelUtils.isUsingItem(), unbaked3, unbaked2); + this.itemModelOutput.accept(tridentItem, createFlatModelDispatch(unbaked, unbaked4)); + } + + private void addPotionTint(Item potionItem, ResourceLocation model) { + this.itemModelOutput.accept(potionItem, ItemModelUtils.tintedModel(model, new Potion())); + } + + private void generatePotion(Item potionItem) { + ResourceLocation resourceLocation = this.generateLayeredItem( + potionItem, ModelLocationUtils.decorateItemModelLocation("potion_overlay"), ModelLocationUtils.getModelLocation(potionItem) + ); + this.addPotionTint(potionItem, resourceLocation); + } + + private void generateTippedArrow(Item arrowItem) { + ResourceLocation resourceLocation = this.generateLayeredItem( + arrowItem, ModelLocationUtils.getModelLocation(arrowItem, "_head"), ModelLocationUtils.getModelLocation(arrowItem, "_base") + ); + this.addPotionTint(arrowItem, resourceLocation); + } + + private void generateDyedItem(Item item, int color) { + ResourceLocation resourceLocation = this.createFlatItemModel(item, ModelTemplates.FLAT_ITEM); + this.itemModelOutput.accept(item, ItemModelUtils.tintedModel(resourceLocation, new Dye(color))); + } + + private void generateWolfArmor(Item armorItem) { + ResourceLocation resourceLocation = TextureMapping.getItemTexture(armorItem); + ResourceLocation resourceLocation2 = TextureMapping.getItemTexture(armorItem, "_overlay"); + ResourceLocation resourceLocation3 = ModelTemplates.FLAT_ITEM.create(armorItem, TextureMapping.layer0(resourceLocation), this.modelOutput); + ResourceLocation resourceLocation4 = ModelLocationUtils.getModelLocation(armorItem, "_dyed"); + ModelTemplates.TWO_LAYERED_ITEM.create(resourceLocation4, TextureMapping.layered(resourceLocation, resourceLocation2), this.modelOutput); + this.itemModelOutput + .accept( + armorItem, + ItemModelUtils.conditional( + ItemModelUtils.hasComponent(DataComponents.DYED_COLOR), + ItemModelUtils.tintedModel(resourceLocation4, BLANK_LAYER, new Dye(0)), + ItemModelUtils.plainModel(resourceLocation3) + ) + ); + } + + public void run() { + this.generateFlatItem(Items.ACACIA_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHERRY_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ACACIA_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHERRY_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.AMETHYST_SHARD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.APPLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ARMADILLO_SCUTE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ARMOR_STAND, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ARROW, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BAKED_POTATO, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BAMBOO, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.BEEF, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BEETROOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BEETROOT_SOUP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BIRCH_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BIRCH_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLACK_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLAZE_POWDER, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLAZE_ROD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.BLUE_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BONE_MEAL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BORDURE_INDENTED_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BOOK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BOWL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BREAD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BRICK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BREEZE_ROD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.BROWN_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CARROT_ON_A_STICK, ModelTemplates.FLAT_HANDHELD_ROD_ITEM); + this.generateFlatItem(Items.WARPED_FUNGUS_ON_A_STICK, ModelTemplates.FLAT_HANDHELD_ROD_ITEM); + this.generateFlatItem(Items.CHARCOAL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHEST_MINECART, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHICKEN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHORUS_FRUIT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CLAY_BALL, ModelTemplates.FLAT_ITEM); + this.generateClockItem(Items.CLOCK); + this.generateFlatItem(Items.COAL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COD_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COMMAND_BLOCK_MINECART, ModelTemplates.FLAT_ITEM); + this.generateStandardCompassItem(Items.COMPASS); + this.generateRecoveryCompassItem(Items.RECOVERY_COMPASS); + this.generateFlatItem(Items.COOKED_BEEF, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_CHICKEN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_COD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_MUTTON, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_PORKCHOP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_RABBIT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKED_SALMON, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COOKIE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RAW_COPPER, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COPPER_INGOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CREEPER_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CYAN_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DARK_OAK_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DARK_OAK_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DIAMOND, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DIAMOND_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.DIAMOND_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.DIAMOND_HORSE_ARMOR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DIAMOND_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.DIAMOND_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.DIAMOND_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.DRAGON_BREATH, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DRIED_KELP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLUE_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BROWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EMERALD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENCHANTED_BOOK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENDER_EYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENDER_PEARL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.END_CRYSTAL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EXPERIENCE_BOTTLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FERMENTED_SPIDER_EYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FIELD_MASONED_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FIREWORK_ROCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FIRE_CHARGE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLINT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLINT_AND_STEEL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLOW_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLOWER_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FURNACE_MINECART, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GHAST_TEAR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLASS_BOTTLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLISTERING_MELON_SLICE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOBE_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOW_BERRIES, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOWSTONE_DUST, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOW_INK_SAC, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOW_ITEM_FRAME, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RAW_GOLD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOLDEN_APPLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOLDEN_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.GOLDEN_CARROT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOLDEN_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.GOLDEN_HORSE_ARMOR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOLDEN_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.GOLDEN_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.GOLDEN_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.GOLD_INGOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOLD_NUGGET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GRAY_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GREEN_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GUNPOWDER, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GUSTER_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HEART_OF_THE_SEA, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HONEYCOMB, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HONEY_BOTTLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HOPPER_MINECART, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.INK_SAC, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RAW_IRON, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.IRON_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.IRON_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.IRON_HORSE_ARMOR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.IRON_INGOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.IRON_NUGGET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.IRON_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.IRON_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.IRON_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.ITEM_FRAME, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.JUNGLE_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.JUNGLE_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.KNOWLEDGE_BOOK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LAPIS_LAZULI, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LAVA_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LEATHER, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LIGHT_BLUE_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LIGHT_GRAY_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LIME_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MAGENTA_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MAGMA_CREAM, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MANGROVE_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MANGROVE_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BAMBOO_RAFT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BAMBOO_CHEST_RAFT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MAP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MELON_SLICE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MILK_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MINECART, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MOJANG_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MUSHROOM_STEW, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DISC_FRAGMENT_5, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MUSIC_DISC_11, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_13, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_BLOCKS, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_CAT, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_CHIRP, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_CREATOR, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_CREATOR_MUSIC_BOX, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_FAR, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_MALL, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_MELLOHI, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_PIGSTEP, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_PRECIPICE, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_STAL, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_STRAD, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_WAIT, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_WARD, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_OTHERSIDE, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_RELIC, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUSIC_DISC_5, ModelTemplates.MUSIC_DISC); + this.generateFlatItem(Items.MUTTON, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NAME_TAG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NAUTILUS_SHELL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NETHERITE_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.NETHERITE_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.NETHERITE_INGOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NETHERITE_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.NETHERITE_SCRAP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NETHERITE_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.NETHERITE_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.NETHER_BRICK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RESIN_BRICK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NETHER_STAR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.OAK_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.OAK_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ORANGE_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PAINTING, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PALE_OAK_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PALE_OAK_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PAPER, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PHANTOM_MEMBRANE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PIGLIN_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PINK_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.POISONOUS_POTATO, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.POPPED_CHORUS_FRUIT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PORKCHOP, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.POWDER_SNOW_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PRISMARINE_CRYSTALS, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PRISMARINE_SHARD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PUFFERFISH, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PUFFERFISH_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PUMPKIN_PIE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PURPLE_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.QUARTZ, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RABBIT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RABBIT_FOOT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RABBIT_HIDE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RABBIT_STEW, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RED_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ROTTEN_FLESH, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SADDLE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SALMON, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SALMON_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TURTLE_SCUTE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHEARS, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHULKER_SHELL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SKULL_BANNER_PATTERN, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SLIME_BALL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SNOWBALL, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ECHO_SHARD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPECTRAL_ARROW, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPIDER_EYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPRUCE_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPRUCE_CHEST_BOAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.STICK, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.STONE_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.STONE_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.STONE_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.STONE_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.STONE_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.SUGAR, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SUSPICIOUS_STEW, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TNT_MINECART, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TOTEM_OF_UNDYING, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TROPICAL_FISH, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TROPICAL_FISH_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.AXOLOTL_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TADPOLE_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WATER_BUCKET, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WHEAT, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WHITE_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WIND_CHARGE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MACE, ModelTemplates.FLAT_HANDHELD_MACE_ITEM); + this.generateFlatItem(Items.WOODEN_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.WOODEN_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.WOODEN_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.WOODEN_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.WOODEN_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.WRITABLE_BOOK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WRITTEN_BOOK, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.YELLOW_DYE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DUNE_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WARD_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.VEX_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RIB_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RAISER_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HOST_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLOW_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BOLT_ARMOR_TRIM_SMITHING_TEMPLATE, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DEBUG_STICK, Items.STICK, ModelTemplates.FLAT_HANDHELD_ITEM); + this.generateFlatItem(Items.ENCHANTED_GOLDEN_APPLE, Items.GOLDEN_APPLE, ModelTemplates.FLAT_ITEM); + this.generateTrimmableItem(Items.TURTLE_HELMET, EquipmentAssets.TURTLE_SCUTE, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.LEATHER_HELMET, EquipmentAssets.LEATHER, TRIM_PREFIX_HELMET, true); + this.generateTrimmableItem(Items.LEATHER_CHESTPLATE, EquipmentAssets.LEATHER, TRIM_PREFIX_CHESTPLATE, true); + this.generateTrimmableItem(Items.LEATHER_LEGGINGS, EquipmentAssets.LEATHER, TRIM_PREFIX_LEGGINGS, true); + this.generateTrimmableItem(Items.LEATHER_BOOTS, EquipmentAssets.LEATHER, TRIM_PREFIX_BOOTS, true); + this.generateTrimmableItem(Items.CHAINMAIL_HELMET, EquipmentAssets.CHAINMAIL, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.CHAINMAIL_CHESTPLATE, EquipmentAssets.CHAINMAIL, TRIM_PREFIX_CHESTPLATE, false); + this.generateTrimmableItem(Items.CHAINMAIL_LEGGINGS, EquipmentAssets.CHAINMAIL, TRIM_PREFIX_LEGGINGS, false); + this.generateTrimmableItem(Items.CHAINMAIL_BOOTS, EquipmentAssets.CHAINMAIL, TRIM_PREFIX_BOOTS, false); + this.generateTrimmableItem(Items.IRON_HELMET, EquipmentAssets.IRON, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.IRON_CHESTPLATE, EquipmentAssets.IRON, TRIM_PREFIX_CHESTPLATE, false); + this.generateTrimmableItem(Items.IRON_LEGGINGS, EquipmentAssets.IRON, TRIM_PREFIX_LEGGINGS, false); + this.generateTrimmableItem(Items.IRON_BOOTS, EquipmentAssets.IRON, TRIM_PREFIX_BOOTS, false); + this.generateTrimmableItem(Items.DIAMOND_HELMET, EquipmentAssets.DIAMOND, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.DIAMOND_CHESTPLATE, EquipmentAssets.DIAMOND, TRIM_PREFIX_CHESTPLATE, false); + this.generateTrimmableItem(Items.DIAMOND_LEGGINGS, EquipmentAssets.DIAMOND, TRIM_PREFIX_LEGGINGS, false); + this.generateTrimmableItem(Items.DIAMOND_BOOTS, EquipmentAssets.DIAMOND, TRIM_PREFIX_BOOTS, false); + this.generateTrimmableItem(Items.GOLDEN_HELMET, EquipmentAssets.GOLD, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.GOLDEN_CHESTPLATE, EquipmentAssets.GOLD, TRIM_PREFIX_CHESTPLATE, false); + this.generateTrimmableItem(Items.GOLDEN_LEGGINGS, EquipmentAssets.GOLD, TRIM_PREFIX_LEGGINGS, false); + this.generateTrimmableItem(Items.GOLDEN_BOOTS, EquipmentAssets.GOLD, TRIM_PREFIX_BOOTS, false); + this.generateTrimmableItem(Items.NETHERITE_HELMET, EquipmentAssets.NETHERITE, TRIM_PREFIX_HELMET, false); + this.generateTrimmableItem(Items.NETHERITE_CHESTPLATE, EquipmentAssets.NETHERITE, TRIM_PREFIX_CHESTPLATE, false); + this.generateTrimmableItem(Items.NETHERITE_LEGGINGS, EquipmentAssets.NETHERITE, TRIM_PREFIX_LEGGINGS, false); + this.generateTrimmableItem(Items.NETHERITE_BOOTS, EquipmentAssets.NETHERITE, TRIM_PREFIX_BOOTS, false); + this.generateDyedItem(Items.LEATHER_HORSE_ARMOR, -6265536); + this.generateFlatItem(Items.ANGLER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ARCHER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ARMS_UP_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLADE_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BREWER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BURN_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DANGER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EXPLORER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FLOW_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FRIEND_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GUSTER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HEART_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HEARTBREAK_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HOWL_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MINER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MOURNER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PLENTY_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PRIZE_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SCRAPE_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHEAF_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHELTER_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SKULL_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SNORT_POTTERY_SHERD, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TRIAL_KEY, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.OMINOUS_TRIAL_KEY, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.OMINOUS_BOTTLE, ModelTemplates.FLAT_ITEM); + this.generateItemWithTintedOverlay(Items.FIREWORK_STAR, new Firework()); + this.generateItemWithTintedOverlay(Items.FILLED_MAP, "_markings", new MapColor()); + this.generateBundleModels(Items.BUNDLE); + this.generateBundleModels(Items.BLACK_BUNDLE); + this.generateBundleModels(Items.WHITE_BUNDLE); + this.generateBundleModels(Items.GRAY_BUNDLE); + this.generateBundleModels(Items.LIGHT_GRAY_BUNDLE); + this.generateBundleModels(Items.LIGHT_BLUE_BUNDLE); + this.generateBundleModels(Items.BLUE_BUNDLE); + this.generateBundleModels(Items.CYAN_BUNDLE); + this.generateBundleModels(Items.YELLOW_BUNDLE); + this.generateBundleModels(Items.RED_BUNDLE); + this.generateBundleModels(Items.PURPLE_BUNDLE); + this.generateBundleModels(Items.MAGENTA_BUNDLE); + this.generateBundleModels(Items.PINK_BUNDLE); + this.generateBundleModels(Items.GREEN_BUNDLE); + this.generateBundleModels(Items.LIME_BUNDLE); + this.generateBundleModels(Items.BROWN_BUNDLE); + this.generateBundleModels(Items.ORANGE_BUNDLE); + this.generateSpyglass(Items.SPYGLASS); + this.generateTrident(Items.TRIDENT); + this.generateWolfArmor(Items.WOLF_ARMOR); + this.generateBow(Items.BOW); + this.generateCrossbow(Items.CROSSBOW); + this.generateElytra(Items.ELYTRA); + this.generateBrush(Items.BRUSH); + this.generateFishingRod(Items.FISHING_ROD); + this.generateGoatHorn(Items.GOAT_HORN); + this.generateShield(Items.SHIELD); + this.generateTippedArrow(Items.TIPPED_ARROW); + this.generatePotion(Items.POTION); + this.generatePotion(Items.SPLASH_POTION); + this.generatePotion(Items.LINGERING_POTION); + this.generateFlatItem(Items.ARMADILLO_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ALLAY_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.AXOLOTL_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BAT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BEE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BLAZE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BOGGED_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.BREEZE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CAT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CAMEL_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CAVE_SPIDER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CHICKEN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COD_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.COW_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CREEPER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DOLPHIN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DONKEY_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.DROWNED_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ELDER_GUARDIAN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENDER_DRAGON_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENDERMAN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ENDERMITE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.EVOKER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FOX_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.FROG_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GHAST_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GLOW_SQUID_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GOAT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.GUARDIAN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HOGLIN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HORSE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.HUSK_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.IRON_GOLEM_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.LLAMA_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MAGMA_CUBE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MOOSHROOM_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.MULE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.OCELOT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PANDA_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PARROT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PHANTOM_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PIG_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PIGLIN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PIGLIN_BRUTE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PILLAGER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.POLAR_BEAR_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.PUFFERFISH_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RABBIT_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.RAVAGER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SALMON_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHEEP_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SHULKER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SILVERFISH_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SKELETON_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SKELETON_HORSE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SLIME_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SNIFFER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SNOW_GOLEM_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SPIDER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.SQUID_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.STRAY_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.STRIDER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TADPOLE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TRADER_LLAMA_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TROPICAL_FISH_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.TURTLE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.VEX_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.VILLAGER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.VINDICATOR_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WANDERING_TRADER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WARDEN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WITCH_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WITHER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WITHER_SKELETON_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.WOLF_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ZOGLIN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.CREAKING_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ZOMBIE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ZOMBIE_HORSE_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ZOMBIE_VILLAGER_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.generateFlatItem(Items.ZOMBIFIED_PIGLIN_SPAWN_EGG, ModelTemplates.FLAT_ITEM); + this.declareCustomModelItem(Items.AIR); + this.declareCustomModelItem(Items.AMETHYST_CLUSTER); + this.declareCustomModelItem(Items.SMALL_AMETHYST_BUD); + this.declareCustomModelItem(Items.MEDIUM_AMETHYST_BUD); + this.declareCustomModelItem(Items.LARGE_AMETHYST_BUD); + this.declareCustomModelItem(Items.SMALL_DRIPLEAF); + this.declareCustomModelItem(Items.BIG_DRIPLEAF); + this.declareCustomModelItem(Items.HANGING_ROOTS); + this.declareCustomModelItem(Items.POINTED_DRIPSTONE); + this.declareCustomModelItem(Items.BONE); + this.declareCustomModelItem(Items.COD); + this.declareCustomModelItem(Items.FEATHER); + this.declareCustomModelItem(Items.LEAD); + } + + @Environment(EnvType.CLIENT) + public record TrimMaterialData(MaterialAssetGroup assets, ResourceKey materialKey) { + } +} diff --git a/net/minecraft/client/data/models/ItemModelOutput.java b/net/minecraft/client/data/models/ItemModelOutput.java new file mode 100644 index 00000000..eb9ad513 --- /dev/null +++ b/net/minecraft/client/data/models/ItemModelOutput.java @@ -0,0 +1,13 @@ +package net.minecraft.client.data.models; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.world.item.Item; + +@Environment(EnvType.CLIENT) +public interface ItemModelOutput { + void accept(Item item, ItemModel.Unbaked model); + + void copy(Item item1, Item item2); +} diff --git a/net/minecraft/client/data/models/ModelProvider.java b/net/minecraft/client/data/models/ModelProvider.java new file mode 100644 index 00000000..5c0324f1 --- /dev/null +++ b/net/minecraft/client/data/models/ModelProvider.java @@ -0,0 +1,167 @@ +package net.minecraft.client.data.models; + +import com.google.common.collect.Maps; +import com.google.gson.JsonElement; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.data.models.blockstates.BlockModelDefinitionGenerator; +import net.minecraft.client.data.models.model.ItemModelUtils; +import net.minecraft.client.data.models.model.ModelInstance; +import net.minecraft.client.data.models.model.ModelLocationUtils; +import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.client.renderer.item.ClientItem; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.core.Holder.Reference; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.DataProvider; +import net.minecraft.data.PackOutput; +import net.minecraft.data.PackOutput.PathProvider; +import net.minecraft.data.PackOutput.Target; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class ModelProvider implements DataProvider { + private final PathProvider blockStatePathProvider; + private final PathProvider itemInfoPathProvider; + private final PathProvider modelPathProvider; + + public ModelProvider(PackOutput output) { + this.blockStatePathProvider = output.createPathProvider(Target.RESOURCE_PACK, "blockstates"); + this.itemInfoPathProvider = output.createPathProvider(Target.RESOURCE_PACK, "items"); + this.modelPathProvider = output.createPathProvider(Target.RESOURCE_PACK, "models"); + } + + @Override + public CompletableFuture run(CachedOutput output) { + ModelProvider.ItemInfoCollector itemInfoCollector = new ModelProvider.ItemInfoCollector(); + ModelProvider.BlockStateGeneratorCollector blockStateGeneratorCollector = new ModelProvider.BlockStateGeneratorCollector(); + ModelProvider.SimpleModelCollector simpleModelCollector = new ModelProvider.SimpleModelCollector(); + new BlockModelGenerators(blockStateGeneratorCollector, itemInfoCollector, simpleModelCollector).run(); + new ItemModelGenerators(itemInfoCollector, simpleModelCollector).run(); + blockStateGeneratorCollector.validate(); + itemInfoCollector.finalizeAndValidate(); + return CompletableFuture.allOf( + blockStateGeneratorCollector.save(output, this.blockStatePathProvider), + simpleModelCollector.save(output, this.modelPathProvider), + itemInfoCollector.save(output, this.itemInfoPathProvider) + ); + } + + @Override + public final String getName() { + return "Model Definitions"; + } + + @Environment(EnvType.CLIENT) + static class BlockStateGeneratorCollector implements Consumer { + private final Map generators = new HashMap(); + + public void accept(BlockModelDefinitionGenerator blockModelDefinitionGenerator) { + Block block = blockModelDefinitionGenerator.block(); + BlockModelDefinitionGenerator blockModelDefinitionGenerator2 = (BlockModelDefinitionGenerator)this.generators.put(block, blockModelDefinitionGenerator); + if (blockModelDefinitionGenerator2 != null) { + throw new IllegalStateException("Duplicate blockstate definition for " + block); + } + } + + public void validate() { + Stream> stream = BuiltInRegistries.BLOCK.listElements().filter(reference -> true); + List list = stream.filter(reference -> !this.generators.containsKey(reference.value())) + .map(reference -> reference.key().location()) + .toList(); + if (!list.isEmpty()) { + throw new IllegalStateException("Missing blockstate definitions for: " + list); + } + } + + public CompletableFuture save(CachedOutput output, PathProvider pathProvider) { + Map map = Maps.transformValues(this.generators, BlockModelDefinitionGenerator::create); + Function function = block -> pathProvider.json(block.builtInRegistryHolder().key().location()); + return DataProvider.saveAll(output, BlockModelDefinition.CODEC, function, map); + } + } + + @Environment(EnvType.CLIENT) + static class ItemInfoCollector implements ItemModelOutput { + private final Map itemInfos = new HashMap(); + private final Map copies = new HashMap(); + + @Override + public void accept(Item item, ItemModel.Unbaked model) { + this.register(item, new ClientItem(model, ClientItem.Properties.DEFAULT)); + } + + private void register(Item item, ClientItem clientItem) { + ClientItem clientItem2 = (ClientItem)this.itemInfos.put(item, clientItem); + if (clientItem2 != null) { + throw new IllegalStateException("Duplicate item model definition for " + item); + } + } + + @Override + public void copy(Item item1, Item item2) { + this.copies.put(item2, item1); + } + + public void finalizeAndValidate() { + BuiltInRegistries.ITEM.forEach(item -> { + if (!this.copies.containsKey(item)) { + if (item instanceof BlockItem blockItem && !this.itemInfos.containsKey(blockItem)) { + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(blockItem.getBlock()); + this.accept(blockItem, ItemModelUtils.plainModel(resourceLocation)); + } + } + }); + this.copies.forEach((item, item2) -> { + ClientItem clientItem = (ClientItem)this.itemInfos.get(item2); + if (clientItem == null) { + throw new IllegalStateException("Missing donor: " + item2 + " -> " + item); + } else { + this.register(item, clientItem); + } + }); + List list = BuiltInRegistries.ITEM + .listElements() + .filter(reference -> !this.itemInfos.containsKey(reference.value())) + .map(reference -> reference.key().location()) + .toList(); + if (!list.isEmpty()) { + throw new IllegalStateException("Missing item model definitions for: " + list); + } + } + + public CompletableFuture save(CachedOutput output, PathProvider pathProvider) { + return DataProvider.saveAll(output, ClientItem.CODEC, item -> pathProvider.json(item.builtInRegistryHolder().key().location()), this.itemInfos); + } + } + + @Environment(EnvType.CLIENT) + static class SimpleModelCollector implements BiConsumer { + private final Map models = new HashMap(); + + public void accept(ResourceLocation resourceLocation, ModelInstance modelInstance) { + Supplier supplier = (Supplier)this.models.put(resourceLocation, modelInstance); + if (supplier != null) { + throw new IllegalStateException("Duplicate model definition for " + resourceLocation); + } + } + + public CompletableFuture save(CachedOutput output, PathProvider pathProvider) { + return DataProvider.saveAll(output, Supplier::get, pathProvider::json, this.models); + } + } +} diff --git a/net/minecraft/client/data/models/MultiVariant.java b/net/minecraft/client/data/models/MultiVariant.java new file mode 100644 index 00000000..36dd973c --- /dev/null +++ b/net/minecraft/client/data/models/MultiVariant.java @@ -0,0 +1,34 @@ +package net.minecraft.client.data.models; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.block.model.SingleVariant; +import net.minecraft.client.renderer.block.model.Variant; +import net.minecraft.client.renderer.block.model.VariantMutator; +import net.minecraft.client.resources.model.WeightedVariants; +import net.minecraft.util.random.Weighted; +import net.minecraft.util.random.WeightedList; + +@Environment(EnvType.CLIENT) +public record MultiVariant(WeightedList variants) { + public MultiVariant(WeightedList variants) { + if (variants.isEmpty()) { + throw new IllegalArgumentException("Variant list must contain at least one element"); + } else { + this.variants = variants; + } + } + + public MultiVariant with(VariantMutator other) { + return new MultiVariant(this.variants.map(other)); + } + + public BlockStateModel.Unbaked toUnbaked() { + List> list = this.variants.unwrap(); + return (BlockStateModel.Unbaked)(list.size() == 1 + ? new SingleVariant.Unbaked((Variant)((Weighted)list.getFirst()).value()) + : new WeightedVariants.Unbaked(this.variants.map(SingleVariant.Unbaked::new))); + } +} diff --git a/net/minecraft/client/data/models/blockstates/BlockModelDefinitionGenerator.java b/net/minecraft/client/data/models/blockstates/BlockModelDefinitionGenerator.java new file mode 100644 index 00000000..2958d508 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/BlockModelDefinitionGenerator.java @@ -0,0 +1,13 @@ +package net.minecraft.client.data.models.blockstates; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public interface BlockModelDefinitionGenerator { + Block block(); + + BlockModelDefinition create(); +} diff --git a/net/minecraft/client/data/models/blockstates/ConditionBuilder.java b/net/minecraft/client/data/models/blockstates/ConditionBuilder.java new file mode 100644 index 00000000..0f827bcb --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/ConditionBuilder.java @@ -0,0 +1,46 @@ +package net.minecraft.client.data.models.blockstates; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; +import java.util.List; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.multipart.Condition; +import net.minecraft.client.renderer.block.model.multipart.KeyValueCondition; +import net.minecraft.world.level.block.state.properties.Property; + +@Environment(EnvType.CLIENT) +public class ConditionBuilder { + private final Builder terms = ImmutableMap.builder(); + + private > void putValue(Property property, KeyValueCondition.Terms terms) { + this.terms.put(property.getName(), terms); + } + + public final > ConditionBuilder term(Property property, T value) { + this.putValue(property, new KeyValueCondition.Terms(List.of(new KeyValueCondition.Term(property.getName(value), false)))); + return this; + } + + @SafeVarargs + public final > ConditionBuilder term(Property property, T value, T... otherValues) { + List list = Stream.concat(Stream.of(value), Stream.of(otherValues)) + .map(property::getName) + .sorted() + .distinct() + .map(string -> new KeyValueCondition.Term(string, false)) + .toList(); + this.putValue(property, new KeyValueCondition.Terms(list)); + return this; + } + + public final > ConditionBuilder negatedTerm(Property property, T value) { + this.putValue(property, new KeyValueCondition.Terms(List.of(new KeyValueCondition.Term(property.getName(value), true)))); + return this; + } + + public Condition build() { + return new KeyValueCondition(this.terms.buildOrThrow()); + } +} diff --git a/net/minecraft/client/data/models/blockstates/MultiPartGenerator.java b/net/minecraft/client/data/models/blockstates/MultiPartGenerator.java new file mode 100644 index 00000000..e41a3fb1 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/MultiPartGenerator.java @@ -0,0 +1,64 @@ +package net.minecraft.client.data.models.blockstates; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.data.models.MultiVariant; +import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.client.renderer.block.model.multipart.Condition; +import net.minecraft.client.renderer.block.model.multipart.Selector; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class MultiPartGenerator implements BlockModelDefinitionGenerator { + private final Block block; + private final List parts = new ArrayList(); + + private MultiPartGenerator(Block block) { + this.block = block; + } + + @Override + public Block block() { + return this.block; + } + + public static MultiPartGenerator multiPart(Block block) { + return new MultiPartGenerator(block); + } + + public MultiPartGenerator with(MultiVariant variants) { + this.parts.add(new MultiPartGenerator.Entry(Optional.empty(), variants)); + return this; + } + + private void validateCondition(Condition condition) { + condition.instantiate(this.block.getStateDefinition()); + } + + public MultiPartGenerator with(Condition condition, MultiVariant variants) { + this.validateCondition(condition); + this.parts.add(new MultiPartGenerator.Entry(Optional.of(condition), variants)); + return this; + } + + public MultiPartGenerator with(ConditionBuilder condition, MultiVariant variants) { + return this.with(condition.build(), variants); + } + + @Override + public BlockModelDefinition create() { + return new BlockModelDefinition( + Optional.empty(), Optional.of(new BlockModelDefinition.MultiPartDefinition(this.parts.stream().map(MultiPartGenerator.Entry::toUnbaked).toList())) + ); + } + + @Environment(EnvType.CLIENT) + record Entry(Optional condition, MultiVariant variants) { + public Selector toUnbaked() { + return new Selector(this.condition, this.variants.toUnbaked()); + } + } +} diff --git a/net/minecraft/client/data/models/blockstates/MultiVariantGenerator.java b/net/minecraft/client/data/models/blockstates/MultiVariantGenerator.java new file mode 100644 index 00000000..fb0ac251 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/MultiVariantGenerator.java @@ -0,0 +1,114 @@ +package net.minecraft.client.data.models.blockstates; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.data.models.MultiVariant; +import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.block.model.VariantMutator; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.properties.Property; + +@Environment(EnvType.CLIENT) +public class MultiVariantGenerator implements BlockModelDefinitionGenerator { + private final Block block; + private final List entries; + private final Set> seenProperties; + + MultiVariantGenerator(Block block, List entries, Set> seenProperties) { + this.block = block; + this.entries = entries; + this.seenProperties = seenProperties; + } + + static Set> validateAndExpandProperties(Set> seenProperties, Block block, PropertyDispatch propertyDispatch) { + List> list = propertyDispatch.getDefinedProperties(); + list.forEach(property -> { + if (block.getStateDefinition().getProperty(property.getName()) != property) { + throw new IllegalStateException("Property " + property + " is not defined for block " + block); + } else if (seenProperties.contains(property)) { + throw new IllegalStateException("Values of property " + property + " already defined for block " + block); + } + }); + Set> set = new HashSet(seenProperties); + set.addAll(list); + return set; + } + + public MultiVariantGenerator with(PropertyDispatch propertyDispatch) { + Set> set = validateAndExpandProperties(this.seenProperties, this.block, propertyDispatch); + List list = this.entries.stream().flatMap(entry -> entry.apply(propertyDispatch)).toList(); + return new MultiVariantGenerator(this.block, list, set); + } + + public MultiVariantGenerator with(VariantMutator mutator) { + List list = this.entries.stream().flatMap(entry -> entry.apply(mutator)).toList(); + return new MultiVariantGenerator(this.block, list, this.seenProperties); + } + + @Override + public BlockModelDefinition create() { + Map map = new HashMap(); + + for (MultiVariantGenerator.Entry entry : this.entries) { + map.put(entry.properties.getKey(), entry.variant.toUnbaked()); + } + + return new BlockModelDefinition(Optional.of(new BlockModelDefinition.SimpleModelSelectors(map)), Optional.empty()); + } + + @Override + public Block block() { + return this.block; + } + + public static MultiVariantGenerator.Empty dispatch(Block block) { + return new MultiVariantGenerator.Empty(block); + } + + public static MultiVariantGenerator dispatch(Block block, MultiVariant variants) { + return new MultiVariantGenerator(block, List.of(new MultiVariantGenerator.Entry(PropertyValueList.EMPTY, variants)), Set.of()); + } + + @Environment(EnvType.CLIENT) + public static class Empty { + private final Block block; + + public Empty(Block block) { + this.block = block; + } + + public MultiVariantGenerator with(PropertyDispatch propertyDispatch) { + Set> set = MultiVariantGenerator.validateAndExpandProperties(Set.of(), this.block, propertyDispatch); + List list = propertyDispatch.getEntries() + .entrySet() + .stream() + .map(entry -> new MultiVariantGenerator.Entry((PropertyValueList)entry.getKey(), (MultiVariant)entry.getValue())) + .toList(); + return new MultiVariantGenerator(this.block, list, set); + } + } + + @Environment(EnvType.CLIENT) + record Entry(PropertyValueList properties, MultiVariant variant) { + + public Stream apply(PropertyDispatch propertyDispatch) { + return propertyDispatch.getEntries().entrySet().stream().map(entry -> { + PropertyValueList propertyValueList = this.properties.extend((PropertyValueList)entry.getKey()); + MultiVariant multiVariant = this.variant.with((VariantMutator)entry.getValue()); + return new MultiVariantGenerator.Entry(propertyValueList, multiVariant); + }); + } + + public Stream apply(VariantMutator mutator) { + return Stream.of(new MultiVariantGenerator.Entry(this.properties, this.variant.with(mutator))); + } + } +} diff --git a/net/minecraft/client/data/models/blockstates/PropertyDispatch.java b/net/minecraft/client/data/models/blockstates/PropertyDispatch.java new file mode 100644 index 00000000..1779f0f0 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/PropertyDispatch.java @@ -0,0 +1,327 @@ +package net.minecraft.client.data.models.blockstates; + +import com.mojang.datafixers.util.Function3; +import com.mojang.datafixers.util.Function4; +import com.mojang.datafixers.util.Function5; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.data.models.MultiVariant; +import net.minecraft.client.renderer.block.model.VariantMutator; +import net.minecraft.world.level.block.state.properties.Property; + +@Environment(EnvType.CLIENT) +public abstract class PropertyDispatch { + private final Map values = new HashMap(); + + protected void putValue(PropertyValueList properties, V value) { + V object = (V)this.values.put(properties, value); + if (object != null) { + throw new IllegalStateException("Value " + properties + " is already defined"); + } + } + + Map getEntries() { + this.verifyComplete(); + return Map.copyOf(this.values); + } + + private void verifyComplete() { + List> list = this.getDefinedProperties(); + Stream stream = Stream.of(PropertyValueList.EMPTY); + + for (Property property : list) { + stream = stream.flatMap(propertyValueList -> property.getAllValues().map(propertyValueList::extend)); + } + + List list2 = stream.filter(propertyValueList -> !this.values.containsKey(propertyValueList)).toList(); + if (!list2.isEmpty()) { + throw new IllegalStateException("Missing definition for properties: " + list2); + } + } + + abstract List> getDefinedProperties(); + + public static > PropertyDispatch.C1 initial(Property property) { + return new PropertyDispatch.C1<>(property); + } + + public static , T2 extends Comparable> PropertyDispatch.C2 initial( + Property property1, Property property2 + ) { + return new PropertyDispatch.C2<>(property1, property2); + } + + public static , T2 extends Comparable, T3 extends Comparable> PropertyDispatch.C3 initial( + Property property1, Property property2, Property property3 + ) { + return new PropertyDispatch.C3<>(property1, property2, property3); + } + + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable> PropertyDispatch.C4 initial( + Property property1, Property property2, Property property3, Property property4 + ) { + return new PropertyDispatch.C4<>(property1, property2, property3, property4); + } + + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable, T5 extends Comparable> PropertyDispatch.C5 initial( + Property property1, Property property2, Property property3, Property property4, Property property5 + ) { + return new PropertyDispatch.C5<>(property1, property2, property3, property4, property5); + } + + public static > PropertyDispatch.C1 modify(Property property) { + return new PropertyDispatch.C1<>(property); + } + + public static , T2 extends Comparable> PropertyDispatch.C2 modify( + Property property1, Property property2 + ) { + return new PropertyDispatch.C2<>(property1, property2); + } + + public static , T2 extends Comparable, T3 extends Comparable> PropertyDispatch.C3 modify( + Property property1, Property property2, Property property3 + ) { + return new PropertyDispatch.C3<>(property1, property2, property3); + } + + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable> PropertyDispatch.C4 modify( + Property property1, Property property2, Property property3, Property property4 + ) { + return new PropertyDispatch.C4<>(property1, property2, property3, property4); + } + + public static , T2 extends Comparable, T3 extends Comparable, T4 extends Comparable, T5 extends Comparable> PropertyDispatch.C5 modify( + Property property1, Property property2, Property property3, Property property4, Property property5 + ) { + return new PropertyDispatch.C5<>(property1, property2, property3, property4, property5); + } + + @Environment(EnvType.CLIENT) + public static class C1> extends PropertyDispatch { + private final Property property1; + + C1(Property property1) { + this.property1 = property1; + } + + @Override + public List> getDefinedProperties() { + return List.of(this.property1); + } + + public PropertyDispatch.C1 select(T1 property, V value) { + PropertyValueList propertyValueList = PropertyValueList.of(this.property1.value(property)); + this.putValue(propertyValueList, value); + return this; + } + + public PropertyDispatch generate(Function generator) { + this.property1.getPossibleValues().forEach(comparable -> this.select((T1)comparable, (V)generator.apply(comparable))); + return this; + } + } + + @Environment(EnvType.CLIENT) + public static class C2, T2 extends Comparable> extends PropertyDispatch { + private final Property property1; + private final Property property2; + + C2(Property property1, Property property2) { + this.property1 = property1; + this.property2 = property2; + } + + @Override + public List> getDefinedProperties() { + return List.of(this.property1, this.property2); + } + + public PropertyDispatch.C2 select(T1 property1, T2 property2, V value) { + PropertyValueList propertyValueList = PropertyValueList.of(this.property1.value(property1), this.property2.value(property2)); + this.putValue(propertyValueList, value); + return this; + } + + public PropertyDispatch generate(BiFunction generator) { + this.property1 + .getPossibleValues() + .forEach( + comparable -> this.property2 + .getPossibleValues() + .forEach(comparable2 -> this.select((T1)comparable, (T2)comparable2, (V)generator.apply(comparable, comparable2))) + ); + return this; + } + } + + @Environment(EnvType.CLIENT) + public static class C3, T2 extends Comparable, T3 extends Comparable> extends PropertyDispatch { + private final Property property1; + private final Property property2; + private final Property property3; + + C3(Property property1, Property property2, Property property3) { + this.property1 = property1; + this.property2 = property2; + this.property3 = property3; + } + + @Override + public List> getDefinedProperties() { + return List.of(this.property1, this.property2, this.property3); + } + + public PropertyDispatch.C3 select(T1 property1, T2 property2, T3 property3, V value) { + PropertyValueList propertyValueList = PropertyValueList.of(this.property1.value(property1), this.property2.value(property2), this.property3.value(property3)); + this.putValue(propertyValueList, value); + return this; + } + + public PropertyDispatch generate(Function3 generator) { + this.property1 + .getPossibleValues() + .forEach( + comparable -> this.property2 + .getPossibleValues() + .forEach( + comparable2 -> this.property3 + .getPossibleValues() + .forEach( + comparable3 -> this.select((T1)comparable, (T2)comparable2, (T3)comparable3, generator.apply((T1)comparable, (T2)comparable2, (T3)comparable3)) + ) + ) + ); + return this; + } + } + + @Environment(EnvType.CLIENT) + public static class C4, T2 extends Comparable, T3 extends Comparable, T4 extends Comparable> + extends PropertyDispatch { + private final Property property1; + private final Property property2; + private final Property property3; + private final Property property4; + + C4(Property property1, Property property2, Property property3, Property property4) { + this.property1 = property1; + this.property2 = property2; + this.property3 = property3; + this.property4 = property4; + } + + @Override + public List> getDefinedProperties() { + return List.of(this.property1, this.property2, this.property3, this.property4); + } + + public PropertyDispatch.C4 select(T1 property1, T2 property2, T3 property3, T4 property4, V value) { + PropertyValueList propertyValueList = PropertyValueList.of( + this.property1.value(property1), this.property2.value(property2), this.property3.value(property3), this.property4.value(property4) + ); + this.putValue(propertyValueList, value); + return this; + } + + public PropertyDispatch generate(Function4 generator) { + this.property1 + .getPossibleValues() + .forEach( + comparable -> this.property2 + .getPossibleValues() + .forEach( + comparable2 -> this.property3 + .getPossibleValues() + .forEach( + comparable3 -> this.property4 + .getPossibleValues() + .forEach( + comparable4 -> this.select( + (T1)comparable, + (T2)comparable2, + (T3)comparable3, + (T4)comparable4, + generator.apply((T1)comparable, (T2)comparable2, (T3)comparable3, (T4)comparable4) + ) + ) + ) + ) + ); + return this; + } + } + + @Environment(EnvType.CLIENT) + public static class C5, T2 extends Comparable, T3 extends Comparable, T4 extends Comparable, T5 extends Comparable> + extends PropertyDispatch { + private final Property property1; + private final Property property2; + private final Property property3; + private final Property property4; + private final Property property5; + + C5(Property property1, Property property2, Property property3, Property property4, Property property5) { + this.property1 = property1; + this.property2 = property2; + this.property3 = property3; + this.property4 = property4; + this.property5 = property5; + } + + @Override + public List> getDefinedProperties() { + return List.of(this.property1, this.property2, this.property3, this.property4, this.property5); + } + + public PropertyDispatch.C5 select(T1 property1, T2 property2, T3 property3, T4 property4, T5 property5, V value) { + PropertyValueList propertyValueList = PropertyValueList.of( + this.property1.value(property1), + this.property2.value(property2), + this.property3.value(property3), + this.property4.value(property4), + this.property5.value(property5) + ); + this.putValue(propertyValueList, value); + return this; + } + + public PropertyDispatch generate(Function5 generator) { + this.property1 + .getPossibleValues() + .forEach( + comparable -> this.property2 + .getPossibleValues() + .forEach( + comparable2 -> this.property3 + .getPossibleValues() + .forEach( + comparable3 -> this.property4 + .getPossibleValues() + .forEach( + comparable4 -> this.property5 + .getPossibleValues() + .forEach( + comparable5 -> this.select( + (T1)comparable, + (T2)comparable2, + (T3)comparable3, + (T4)comparable4, + (T5)comparable5, + generator.apply((T1)comparable, (T2)comparable2, (T3)comparable3, (T4)comparable4, (T5)comparable5) + ) + ) + ) + ) + ) + ); + return this; + } + } +} diff --git a/net/minecraft/client/data/models/blockstates/PropertyValueList.java b/net/minecraft/client/data/models/blockstates/PropertyValueList.java new file mode 100644 index 00000000..7147ec28 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/PropertyValueList.java @@ -0,0 +1,36 @@ +package net.minecraft.client.data.models.blockstates; + +import com.google.common.collect.ImmutableList; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.Util; +import net.minecraft.world.level.block.state.properties.Property.Value; + +@Environment(EnvType.CLIENT) +public record PropertyValueList(List> values) { + public static final PropertyValueList EMPTY = new PropertyValueList(List.of()); + private static final Comparator> COMPARE_BY_NAME = Comparator.comparing(value -> value.property().getName()); + + public PropertyValueList extend(Value value) { + return new PropertyValueList(Util.copyAndAdd(this.values, value)); + } + + public PropertyValueList extend(PropertyValueList values) { + return new PropertyValueList(ImmutableList.>builder().addAll(this.values).addAll(values.values).build()); + } + + public static PropertyValueList of(Value... values) { + return new PropertyValueList(List.of(values)); + } + + public String getKey() { + return (String)this.values.stream().sorted(COMPARE_BY_NAME).map(Value::toString).collect(Collectors.joining(",")); + } + + public String toString() { + return this.getKey(); + } +} diff --git a/net/minecraft/client/data/models/blockstates/package-info.java b/net/minecraft/client/data/models/blockstates/package-info.java new file mode 100644 index 00000000..6b37a233 --- /dev/null +++ b/net/minecraft/client/data/models/blockstates/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.data.models.blockstates; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/data/models/model/DelegatedModel.java b/net/minecraft/client/data/models/model/DelegatedModel.java new file mode 100644 index 00000000..9cde96a7 --- /dev/null +++ b/net/minecraft/client/data/models/model/DelegatedModel.java @@ -0,0 +1,22 @@ +package net.minecraft.client.data.models.model; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +public class DelegatedModel implements ModelInstance { + private final ResourceLocation parent; + + public DelegatedModel(ResourceLocation parent) { + this.parent = parent; + } + + public JsonElement get() { + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty("parent", this.parent.toString()); + return jsonObject; + } +} diff --git a/net/minecraft/client/data/models/model/ItemModelUtils.java b/net/minecraft/client/data/models/model/ItemModelUtils.java new file mode 100644 index 00000000..7abed64a --- /dev/null +++ b/net/minecraft/client/data/models/model/ItemModelUtils.java @@ -0,0 +1,135 @@ +package net.minecraft.client.data.models.model; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Map.Entry; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.item.Constant; +import net.minecraft.client.color.item.ItemTintSource; +import net.minecraft.client.renderer.item.BlockModelWrapper; +import net.minecraft.client.renderer.item.CompositeModel; +import net.minecraft.client.renderer.item.ConditionalItemModel; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.client.renderer.item.RangeSelectItemModel; +import net.minecraft.client.renderer.item.SelectItemModel; +import net.minecraft.client.renderer.item.SpecialModelWrapper; +import net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty; +import net.minecraft.client.renderer.item.properties.conditional.HasComponent; +import net.minecraft.client.renderer.item.properties.conditional.IsUsingItem; +import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperty; +import net.minecraft.client.renderer.item.properties.select.ContextDimension; +import net.minecraft.client.renderer.item.properties.select.ItemBlockState; +import net.minecraft.client.renderer.item.properties.select.LocalTime; +import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty; +import net.minecraft.client.renderer.special.SpecialModelRenderer; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.properties.Property; + +@Environment(EnvType.CLIENT) +public class ItemModelUtils { + public static ItemModel.Unbaked plainModel(ResourceLocation model) { + return new BlockModelWrapper.Unbaked(model, List.of()); + } + + public static ItemModel.Unbaked tintedModel(ResourceLocation model, ItemTintSource... tintSources) { + return new BlockModelWrapper.Unbaked(model, List.of(tintSources)); + } + + public static ItemTintSource constantTint(int value) { + return new Constant(value); + } + + public static ItemModel.Unbaked composite(ItemModel.Unbaked... models) { + return new CompositeModel.Unbaked(List.of(models)); + } + + public static ItemModel.Unbaked specialModel(ResourceLocation base, SpecialModelRenderer.Unbaked specialModel) { + return new SpecialModelWrapper.Unbaked(base, specialModel); + } + + public static RangeSelectItemModel.Entry override(ItemModel.Unbaked threshold, float model) { + return new RangeSelectItemModel.Entry(model, threshold); + } + + public static ItemModel.Unbaked rangeSelect(RangeSelectItemModelProperty property, ItemModel.Unbaked fallback, RangeSelectItemModel.Entry... entries) { + return new RangeSelectItemModel.Unbaked(property, 1.0F, List.of(entries), Optional.of(fallback)); + } + + public static ItemModel.Unbaked rangeSelect( + RangeSelectItemModelProperty property, float scale, ItemModel.Unbaked fallback, RangeSelectItemModel.Entry... entries + ) { + return new RangeSelectItemModel.Unbaked(property, scale, List.of(entries), Optional.of(fallback)); + } + + public static ItemModel.Unbaked rangeSelect(RangeSelectItemModelProperty property, ItemModel.Unbaked fallback, List entries) { + return new RangeSelectItemModel.Unbaked(property, 1.0F, entries, Optional.of(fallback)); + } + + public static ItemModel.Unbaked rangeSelect(RangeSelectItemModelProperty property, List entries) { + return new RangeSelectItemModel.Unbaked(property, 1.0F, entries, Optional.empty()); + } + + public static ItemModel.Unbaked rangeSelect(RangeSelectItemModelProperty property, float scale, List entries) { + return new RangeSelectItemModel.Unbaked(property, scale, entries, Optional.empty()); + } + + public static ItemModel.Unbaked conditional(ConditionalItemModelProperty property, ItemModel.Unbaked onTrue, ItemModel.Unbaked onFalse) { + return new ConditionalItemModel.Unbaked(property, onTrue, onFalse); + } + + public static SelectItemModel.SwitchCase when(T value, ItemModel.Unbaked model) { + return new SelectItemModel.SwitchCase<>(List.of(value), model); + } + + public static SelectItemModel.SwitchCase when(List values, ItemModel.Unbaked model) { + return new SelectItemModel.SwitchCase<>(values, model); + } + + @SafeVarargs + public static ItemModel.Unbaked select(SelectItemModelProperty property, ItemModel.Unbaked fallback, SelectItemModel.SwitchCase... cases) { + return select(property, fallback, List.of(cases)); + } + + public static ItemModel.Unbaked select(SelectItemModelProperty property, ItemModel.Unbaked fallback, List> cases) { + return new SelectItemModel.Unbaked(new SelectItemModel.UnbakedSwitch<>(property, cases), Optional.of(fallback)); + } + + @SafeVarargs + public static ItemModel.Unbaked select(SelectItemModelProperty property, SelectItemModel.SwitchCase... cases) { + return select(property, List.of(cases)); + } + + public static ItemModel.Unbaked select(SelectItemModelProperty property, List> cases) { + return new SelectItemModel.Unbaked(new SelectItemModel.UnbakedSwitch<>(property, cases), Optional.empty()); + } + + public static ConditionalItemModelProperty isUsingItem() { + return new IsUsingItem(); + } + + public static ConditionalItemModelProperty hasComponent(DataComponentType componentType) { + return new HasComponent(componentType, false); + } + + public static ItemModel.Unbaked inOverworld(ItemModel.Unbaked inOverworldModel, ItemModel.Unbaked notInOverworldModel) { + return select(new ContextDimension(), notInOverworldModel, when(Level.OVERWORLD, inOverworldModel)); + } + + public static > ItemModel.Unbaked selectBlockItemProperty( + Property property, ItemModel.Unbaked fallback, Map modelMap + ) { + List> list = modelMap.entrySet().stream().sorted(Entry.comparingByKey()).map(entry -> { + String string = property.getName((T)entry.getKey()); + return new SelectItemModel.SwitchCase(List.of(string), (ItemModel.Unbaked)entry.getValue()); + }).toList(); + return select(new ItemBlockState(property.getName()), fallback, list); + } + + public static ItemModel.Unbaked isXmas(ItemModel.Unbaked xmasModel, ItemModel.Unbaked normalModel) { + return select(LocalTime.create("MM-dd", "", Optional.empty()), normalModel, List.of(when(List.of("12-24", "12-25", "12-26"), xmasModel))); + } +} diff --git a/net/minecraft/client/data/models/model/ModelInstance.java b/net/minecraft/client/data/models/model/ModelInstance.java new file mode 100644 index 00000000..730fbfbf --- /dev/null +++ b/net/minecraft/client/data/models/model/ModelInstance.java @@ -0,0 +1,10 @@ +package net.minecraft.client.data.models.model; + +import com.google.gson.JsonElement; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public interface ModelInstance extends Supplier { +} diff --git a/net/minecraft/data/models/model/ModelLocationUtils.java b/net/minecraft/client/data/models/model/ModelLocationUtils.java similarity index 75% rename from net/minecraft/data/models/model/ModelLocationUtils.java rename to net/minecraft/client/data/models/model/ModelLocationUtils.java index fa216f2a..a00c9276 100644 --- a/net/minecraft/data/models/model/ModelLocationUtils.java +++ b/net/minecraft/client/data/models/model/ModelLocationUtils.java @@ -1,24 +1,27 @@ -package net.minecraft.data.models.model; +package net.minecraft.client.data.models.model; import java.util.function.UnaryOperator; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; +@Environment(EnvType.CLIENT) public class ModelLocationUtils { @Deprecated - public static ResourceLocation decorateBlockModelLocation(String blockModelLocation) { - return ResourceLocation.withDefaultNamespace("block/" + blockModelLocation); + public static ResourceLocation decorateBlockModelLocation(String name) { + return ResourceLocation.withDefaultNamespace("block/" + name); } - public static ResourceLocation decorateItemModelLocation(String itemModelLocation) { - return ResourceLocation.withDefaultNamespace("item/" + itemModelLocation); + public static ResourceLocation decorateItemModelLocation(String name) { + return ResourceLocation.withDefaultNamespace("item/" + name); } - public static ResourceLocation getModelLocation(Block block, String modelLocationSuffix) { + public static ResourceLocation getModelLocation(Block block, String suffix) { ResourceLocation resourceLocation = BuiltInRegistries.BLOCK.getKey(block); - return resourceLocation.withPath((UnaryOperator)(string2 -> "block/" + string2 + modelLocationSuffix)); + return resourceLocation.withPath((UnaryOperator)(string2 -> "block/" + string2 + suffix)); } public static ResourceLocation getModelLocation(Block block) { @@ -31,8 +34,8 @@ public class ModelLocationUtils { return resourceLocation.withPrefix("item/"); } - public static ResourceLocation getModelLocation(Item item, String modelLocationSuffix) { + public static ResourceLocation getModelLocation(Item item, String suffix) { ResourceLocation resourceLocation = BuiltInRegistries.ITEM.getKey(item); - return resourceLocation.withPath((UnaryOperator)(string2 -> "item/" + string2 + modelLocationSuffix)); + return resourceLocation.withPath((UnaryOperator)(string2 -> "item/" + string2 + suffix)); } } diff --git a/net/minecraft/client/data/models/model/ModelTemplate.java b/net/minecraft/client/data/models/model/ModelTemplate.java new file mode 100644 index 00000000..5e28d3b6 --- /dev/null +++ b/net/minecraft/client/data/models/model/ModelTemplate.java @@ -0,0 +1,70 @@ +package net.minecraft.client.data.models.model; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Streams; +import com.google.gson.JsonObject; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.BiConsumer; +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class ModelTemplate { + private final Optional model; + private final Set requiredSlots; + private final Optional suffix; + + public ModelTemplate(Optional model, Optional suffix, TextureSlot... requiredSlots) { + this.model = model; + this.suffix = suffix; + this.requiredSlots = ImmutableSet.copyOf(requiredSlots); + } + + public ResourceLocation getDefaultModelLocation(Block block) { + return ModelLocationUtils.getModelLocation(block, (String)this.suffix.orElse("")); + } + + public ResourceLocation create(Block block, TextureMapping textureMapping, BiConsumer output) { + return this.create(ModelLocationUtils.getModelLocation(block, (String)this.suffix.orElse("")), textureMapping, output); + } + + public ResourceLocation createWithSuffix(Block block, String suffix, TextureMapping textureMapping, BiConsumer output) { + return this.create(ModelLocationUtils.getModelLocation(block, suffix + (String)this.suffix.orElse("")), textureMapping, output); + } + + public ResourceLocation createWithOverride(Block block, String suffix, TextureMapping textureMapping, BiConsumer output) { + return this.create(ModelLocationUtils.getModelLocation(block, suffix), textureMapping, output); + } + + public ResourceLocation create(Item item, TextureMapping textureMapping, BiConsumer output) { + return this.create(ModelLocationUtils.getModelLocation(item, (String)this.suffix.orElse("")), textureMapping, output); + } + + public ResourceLocation create(ResourceLocation modelLocation, TextureMapping textureMapping, BiConsumer output) { + Map map = this.createMap(textureMapping); + output.accept(modelLocation, (ModelInstance)() -> { + JsonObject jsonObject = new JsonObject(); + this.model.ifPresent(resourceLocation -> jsonObject.addProperty("parent", resourceLocation.toString())); + if (!map.isEmpty()) { + JsonObject jsonObject2 = new JsonObject(); + map.forEach((textureSlot, resourceLocation) -> jsonObject2.addProperty(textureSlot.getId(), resourceLocation.toString())); + jsonObject.add("textures", jsonObject2); + } + + return jsonObject; + }); + return modelLocation; + } + + private Map createMap(TextureMapping textureMapping) { + return (Map)Streams.concat(this.requiredSlots.stream(), textureMapping.getForced()) + .collect(ImmutableMap.toImmutableMap(Function.identity(), textureMapping::get)); + } +} diff --git a/net/minecraft/data/models/model/ModelTemplates.java b/net/minecraft/client/data/models/model/ModelTemplates.java similarity index 90% rename from net/minecraft/data/models/model/ModelTemplates.java rename to net/minecraft/client/data/models/model/ModelTemplates.java index ed89cb12..89e1b8e4 100644 --- a/net/minecraft/data/models/model/ModelTemplates.java +++ b/net/minecraft/client/data/models/model/ModelTemplates.java @@ -1,9 +1,12 @@ -package net.minecraft.data.models.model; +package net.minecraft.client.data.models.model; import java.util.Optional; import java.util.stream.IntStream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import net.minecraft.resources.ResourceLocation; +@Environment(EnvType.CLIENT) public class ModelTemplates { public static final ModelTemplate CUBE = create( "cube", TextureSlot.PARTICLE, TextureSlot.NORTH, TextureSlot.SOUTH, TextureSlot.EAST, TextureSlot.WEST, TextureSlot.UP, TextureSlot.DOWN @@ -81,8 +84,10 @@ public class ModelTemplates { public static final ModelTemplate POINTED_DRIPSTONE = create("pointed_dripstone", TextureSlot.CROSS); public static final ModelTemplate CROSS = create("cross", TextureSlot.CROSS); public static final ModelTemplate TINTED_CROSS = create("tinted_cross", TextureSlot.CROSS); + public static final ModelTemplate CROSS_EMISSIVE = create("cross_emissive", TextureSlot.CROSS, TextureSlot.CROSS_EMISSIVE); public static final ModelTemplate FLOWER_POT_CROSS = create("flower_pot_cross", TextureSlot.PLANT); public static final ModelTemplate TINTED_FLOWER_POT_CROSS = create("tinted_flower_pot_cross", TextureSlot.PLANT); + public static final ModelTemplate FLOWER_POT_CROSS_EMISSIVE = create("flower_pot_cross_emissive", TextureSlot.PLANT, TextureSlot.CROSS_EMISSIVE); public static final ModelTemplate RAIL_FLAT = create("rail_flat", TextureSlot.RAIL); public static final ModelTemplate RAIL_CURVED = create("rail_curved", "_corner", TextureSlot.RAIL); public static final ModelTemplate RAIL_RAISED_NE = create("template_rail_raised_ne", "_raised_ne", TextureSlot.RAIL); @@ -93,6 +98,10 @@ public class ModelTemplates { public static final ModelTemplate FLOWERBED_2 = create("flowerbed_2", "_2", TextureSlot.FLOWERBED, TextureSlot.STEM); public static final ModelTemplate FLOWERBED_3 = create("flowerbed_3", "_3", TextureSlot.FLOWERBED, TextureSlot.STEM); public static final ModelTemplate FLOWERBED_4 = create("flowerbed_4", "_4", TextureSlot.FLOWERBED, TextureSlot.STEM); + public static final ModelTemplate LEAF_LITTER_1 = create("template_leaf_litter_1", "_1", TextureSlot.TEXTURE); + public static final ModelTemplate LEAF_LITTER_2 = create("template_leaf_litter_2", "_2", TextureSlot.TEXTURE); + public static final ModelTemplate LEAF_LITTER_3 = create("template_leaf_litter_3", "_3", TextureSlot.TEXTURE); + public static final ModelTemplate LEAF_LITTER_4 = create("template_leaf_litter_4", "_4", TextureSlot.TEXTURE); public static final ModelTemplate CORAL_FAN = create("coral_fan", TextureSlot.FAN); public static final ModelTemplate CORAL_WALL_FAN = create("coral_wall_fan", TextureSlot.FAN); public static final ModelTemplate GLAZED_TERRACOTTA = create("template_glazed_terracotta", TextureSlot.PATTERN); @@ -171,8 +180,11 @@ public class ModelTemplates { public static final ModelTemplate THREE_LAYERED_ITEM = createItem("generated", TextureSlot.LAYER0, TextureSlot.LAYER1, TextureSlot.LAYER2); public static final ModelTemplate SHULKER_BOX_INVENTORY = createItem("template_shulker_box", TextureSlot.PARTICLE); public static final ModelTemplate BED_INVENTORY = createItem("template_bed", TextureSlot.PARTICLE); - public static final ModelTemplate BANNER_INVENTORY = createItem("template_banner"); - public static final ModelTemplate SKULL_INVENTORY = createItem("template_skull"); + public static final ModelTemplate CHEST_INVENTORY = createItem("template_chest", TextureSlot.PARTICLE); + public static final ModelTemplate BUNDLE_OPEN_FRONT_INVENTORY = createItem("template_bundle_open_front", "_open_front", TextureSlot.LAYER0); + public static final ModelTemplate BUNDLE_OPEN_BACK_INVENTORY = createItem("template_bundle_open_back", "_open_back", TextureSlot.LAYER0); + public static final ModelTemplate BOW = createItem("bow", TextureSlot.LAYER0); + public static final ModelTemplate CROSSBOW = createItem("crossbow", TextureSlot.LAYER0); public static final ModelTemplate CANDLE = create("template_candle", TextureSlot.ALL, TextureSlot.PARTICLE); public static final ModelTemplate TWO_CANDLES = create("template_two_candles", TextureSlot.ALL, TextureSlot.PARTICLE); public static final ModelTemplate THREE_CANDLES = create("template_three_candles", TextureSlot.ALL, TextureSlot.PARTICLE); @@ -190,15 +202,19 @@ public class ModelTemplates { return new ModelTemplate(Optional.empty(), Optional.empty(), requiredSlots); } - private static ModelTemplate create(String blockModelLocation, TextureSlot... requiredSlots) { - return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("block/" + blockModelLocation)), Optional.empty(), requiredSlots); + private static ModelTemplate create(String name, TextureSlot... requiredSlots) { + return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("block/" + name)), Optional.empty(), requiredSlots); } - private static ModelTemplate createItem(String itemModelLocation, TextureSlot... requiredSlots) { - return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("item/" + itemModelLocation)), Optional.empty(), requiredSlots); + private static ModelTemplate createItem(String name, TextureSlot... requiredSlots) { + return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("item/" + name)), Optional.empty(), requiredSlots); } - private static ModelTemplate create(String blockModelLocation, String suffix, TextureSlot... requiredSlots) { - return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("block/" + blockModelLocation)), Optional.of(suffix), requiredSlots); + private static ModelTemplate createItem(String name, String suffix, TextureSlot... requiredSlots) { + return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("item/" + name)), Optional.of(suffix), requiredSlots); + } + + private static ModelTemplate create(String name, String suffix, TextureSlot... requiredSlots) { + return new ModelTemplate(Optional.of(ResourceLocation.withDefaultNamespace("block/" + name)), Optional.of(suffix), requiredSlots); } } diff --git a/net/minecraft/client/data/models/model/TextureMapping.java b/net/minecraft/client/data/models/model/TextureMapping.java new file mode 100644 index 00000000..ec345330 --- /dev/null +++ b/net/minecraft/client/data/models/model/TextureMapping.java @@ -0,0 +1,416 @@ +package net.minecraft.client.data.models.model; + +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import java.util.Map; +import java.util.Set; +import java.util.function.UnaryOperator; +import java.util.stream.Stream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; + +@Environment(EnvType.CLIENT) +public class TextureMapping { + private final Map slots = Maps.newHashMap(); + private final Set forcedSlots = Sets.newHashSet(); + + public TextureMapping put(TextureSlot slot, ResourceLocation texture) { + this.slots.put(slot, texture); + return this; + } + + public TextureMapping putForced(TextureSlot slot, ResourceLocation texture) { + this.slots.put(slot, texture); + this.forcedSlots.add(slot); + return this; + } + + public Stream getForced() { + return this.forcedSlots.stream(); + } + + public TextureMapping copySlot(TextureSlot source, TextureSlot destination) { + this.slots.put(destination, (ResourceLocation)this.slots.get(source)); + return this; + } + + public TextureMapping copyForced(TextureSlot source, TextureSlot destination) { + this.slots.put(destination, (ResourceLocation)this.slots.get(source)); + this.forcedSlots.add(destination); + return this; + } + + public ResourceLocation get(TextureSlot slot) { + for (TextureSlot textureSlot = slot; textureSlot != null; textureSlot = textureSlot.getParent()) { + ResourceLocation resourceLocation = (ResourceLocation)this.slots.get(textureSlot); + if (resourceLocation != null) { + return resourceLocation; + } + } + + throw new IllegalStateException("Can't find texture for slot " + slot); + } + + public TextureMapping copyAndUpdate(TextureSlot slot, ResourceLocation texture) { + TextureMapping textureMapping = new TextureMapping(); + textureMapping.slots.putAll(this.slots); + textureMapping.forcedSlots.addAll(this.forcedSlots); + textureMapping.put(slot, texture); + return textureMapping; + } + + public static TextureMapping cube(Block block) { + ResourceLocation resourceLocation = getBlockTexture(block); + return cube(resourceLocation); + } + + public static TextureMapping defaultTexture(Block block) { + ResourceLocation resourceLocation = getBlockTexture(block); + return defaultTexture(resourceLocation); + } + + public static TextureMapping defaultTexture(ResourceLocation texture) { + return new TextureMapping().put(TextureSlot.TEXTURE, texture); + } + + public static TextureMapping cube(ResourceLocation texture) { + return new TextureMapping().put(TextureSlot.ALL, texture); + } + + public static TextureMapping cross(Block block) { + return singleSlot(TextureSlot.CROSS, getBlockTexture(block)); + } + + public static TextureMapping side(Block block) { + return singleSlot(TextureSlot.SIDE, getBlockTexture(block)); + } + + public static TextureMapping crossEmissive(Block block) { + return new TextureMapping().put(TextureSlot.CROSS, getBlockTexture(block)).put(TextureSlot.CROSS_EMISSIVE, getBlockTexture(block, "_emissive")); + } + + public static TextureMapping cross(ResourceLocation texture) { + return singleSlot(TextureSlot.CROSS, texture); + } + + public static TextureMapping plant(Block block) { + return singleSlot(TextureSlot.PLANT, getBlockTexture(block)); + } + + public static TextureMapping plantEmissive(Block block) { + return new TextureMapping().put(TextureSlot.PLANT, getBlockTexture(block)).put(TextureSlot.CROSS_EMISSIVE, getBlockTexture(block, "_emissive")); + } + + public static TextureMapping plant(ResourceLocation texture) { + return singleSlot(TextureSlot.PLANT, texture); + } + + public static TextureMapping rail(Block block) { + return singleSlot(TextureSlot.RAIL, getBlockTexture(block)); + } + + public static TextureMapping rail(ResourceLocation texture) { + return singleSlot(TextureSlot.RAIL, texture); + } + + public static TextureMapping wool(Block block) { + return singleSlot(TextureSlot.WOOL, getBlockTexture(block)); + } + + public static TextureMapping flowerbed(Block block) { + return new TextureMapping().put(TextureSlot.FLOWERBED, getBlockTexture(block)).put(TextureSlot.STEM, getBlockTexture(block, "_stem")); + } + + public static TextureMapping wool(ResourceLocation texture) { + return singleSlot(TextureSlot.WOOL, texture); + } + + public static TextureMapping stem(Block block) { + return singleSlot(TextureSlot.STEM, getBlockTexture(block)); + } + + public static TextureMapping attachedStem(Block stemBlock, Block upperStemBlock) { + return new TextureMapping().put(TextureSlot.STEM, getBlockTexture(stemBlock)).put(TextureSlot.UPPER_STEM, getBlockTexture(upperStemBlock)); + } + + public static TextureMapping pattern(Block block) { + return singleSlot(TextureSlot.PATTERN, getBlockTexture(block)); + } + + public static TextureMapping fan(Block block) { + return singleSlot(TextureSlot.FAN, getBlockTexture(block)); + } + + public static TextureMapping crop(ResourceLocation block) { + return singleSlot(TextureSlot.CROP, block); + } + + public static TextureMapping pane(Block block, Block edgeBlock) { + return new TextureMapping().put(TextureSlot.PANE, getBlockTexture(block)).put(TextureSlot.EDGE, getBlockTexture(edgeBlock, "_top")); + } + + public static TextureMapping singleSlot(TextureSlot slot, ResourceLocation texture) { + return new TextureMapping().put(slot, texture); + } + + public static TextureMapping column(Block block) { + return new TextureMapping().put(TextureSlot.SIDE, getBlockTexture(block, "_side")).put(TextureSlot.END, getBlockTexture(block, "_top")); + } + + public static TextureMapping cubeTop(Block block) { + return new TextureMapping().put(TextureSlot.SIDE, getBlockTexture(block, "_side")).put(TextureSlot.TOP, getBlockTexture(block, "_top")); + } + + public static TextureMapping pottedAzalea(Block block) { + return new TextureMapping() + .put(TextureSlot.PLANT, getBlockTexture(block, "_plant")) + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")); + } + + public static TextureMapping logColumn(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block)) + .put(TextureSlot.END, getBlockTexture(block, "_top")) + .put(TextureSlot.PARTICLE, getBlockTexture(block)); + } + + public static TextureMapping column(ResourceLocation side, ResourceLocation end) { + return new TextureMapping().put(TextureSlot.SIDE, side).put(TextureSlot.END, end); + } + + public static TextureMapping fence(Block block) { + return new TextureMapping() + .put(TextureSlot.TEXTURE, getBlockTexture(block)) + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")); + } + + public static TextureMapping customParticle(Block block) { + return new TextureMapping().put(TextureSlot.TEXTURE, getBlockTexture(block)).put(TextureSlot.PARTICLE, getBlockTexture(block, "_particle")); + } + + public static TextureMapping cubeBottomTop(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")) + .put(TextureSlot.BOTTOM, getBlockTexture(block, "_bottom")); + } + + public static TextureMapping cubeBottomTopWithWall(Block block) { + ResourceLocation resourceLocation = getBlockTexture(block); + return new TextureMapping() + .put(TextureSlot.WALL, resourceLocation) + .put(TextureSlot.SIDE, resourceLocation) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")) + .put(TextureSlot.BOTTOM, getBlockTexture(block, "_bottom")); + } + + public static TextureMapping columnWithWall(Block block) { + ResourceLocation resourceLocation = getBlockTexture(block); + return new TextureMapping() + .put(TextureSlot.TEXTURE, resourceLocation) + .put(TextureSlot.WALL, resourceLocation) + .put(TextureSlot.SIDE, resourceLocation) + .put(TextureSlot.END, getBlockTexture(block, "_top")); + } + + public static TextureMapping door(ResourceLocation top, ResourceLocation bottom) { + return new TextureMapping().put(TextureSlot.TOP, top).put(TextureSlot.BOTTOM, bottom); + } + + public static TextureMapping door(Block block) { + return new TextureMapping().put(TextureSlot.TOP, getBlockTexture(block, "_top")).put(TextureSlot.BOTTOM, getBlockTexture(block, "_bottom")); + } + + public static TextureMapping particle(Block block) { + return new TextureMapping().put(TextureSlot.PARTICLE, getBlockTexture(block)); + } + + public static TextureMapping particle(ResourceLocation texture) { + return new TextureMapping().put(TextureSlot.PARTICLE, texture); + } + + public static TextureMapping fire0(Block block) { + return new TextureMapping().put(TextureSlot.FIRE, getBlockTexture(block, "_0")); + } + + public static TextureMapping fire1(Block block) { + return new TextureMapping().put(TextureSlot.FIRE, getBlockTexture(block, "_1")); + } + + public static TextureMapping lantern(Block block) { + return new TextureMapping().put(TextureSlot.LANTERN, getBlockTexture(block)); + } + + public static TextureMapping torch(Block block) { + return new TextureMapping().put(TextureSlot.TORCH, getBlockTexture(block)); + } + + public static TextureMapping torch(ResourceLocation texture) { + return new TextureMapping().put(TextureSlot.TORCH, texture); + } + + public static TextureMapping trialSpawner(Block block, String sideSuffix, String topSuffix) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, sideSuffix)) + .put(TextureSlot.TOP, getBlockTexture(block, topSuffix)) + .put(TextureSlot.BOTTOM, getBlockTexture(block, "_bottom")); + } + + public static TextureMapping vault(Block block, String frontSuffix, String sideSuffix, String topSuffix, String bottomSuffix) { + return new TextureMapping() + .put(TextureSlot.FRONT, getBlockTexture(block, frontSuffix)) + .put(TextureSlot.SIDE, getBlockTexture(block, sideSuffix)) + .put(TextureSlot.TOP, getBlockTexture(block, topSuffix)) + .put(TextureSlot.BOTTOM, getBlockTexture(block, bottomSuffix)); + } + + public static TextureMapping particleFromItem(Item item) { + return new TextureMapping().put(TextureSlot.PARTICLE, getItemTexture(item)); + } + + public static TextureMapping commandBlock(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.FRONT, getBlockTexture(block, "_front")) + .put(TextureSlot.BACK, getBlockTexture(block, "_back")); + } + + public static TextureMapping orientableCube(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.FRONT, getBlockTexture(block, "_front")) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")) + .put(TextureSlot.BOTTOM, getBlockTexture(block, "_bottom")); + } + + public static TextureMapping orientableCubeOnlyTop(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.FRONT, getBlockTexture(block, "_front")) + .put(TextureSlot.TOP, getBlockTexture(block, "_top")); + } + + public static TextureMapping orientableCubeSameEnds(Block block) { + return new TextureMapping() + .put(TextureSlot.SIDE, getBlockTexture(block, "_side")) + .put(TextureSlot.FRONT, getBlockTexture(block, "_front")) + .put(TextureSlot.END, getBlockTexture(block, "_end")); + } + + public static TextureMapping top(Block block) { + return new TextureMapping().put(TextureSlot.TOP, getBlockTexture(block, "_top")); + } + + public static TextureMapping craftingTable(Block block, Block bottom) { + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(block, "_front")) + .put(TextureSlot.DOWN, getBlockTexture(bottom)) + .put(TextureSlot.UP, getBlockTexture(block, "_top")) + .put(TextureSlot.NORTH, getBlockTexture(block, "_front")) + .put(TextureSlot.EAST, getBlockTexture(block, "_side")) + .put(TextureSlot.SOUTH, getBlockTexture(block, "_side")) + .put(TextureSlot.WEST, getBlockTexture(block, "_front")); + } + + public static TextureMapping fletchingTable(Block block, Block bottom) { + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(block, "_front")) + .put(TextureSlot.DOWN, getBlockTexture(bottom)) + .put(TextureSlot.UP, getBlockTexture(block, "_top")) + .put(TextureSlot.NORTH, getBlockTexture(block, "_front")) + .put(TextureSlot.SOUTH, getBlockTexture(block, "_front")) + .put(TextureSlot.EAST, getBlockTexture(block, "_side")) + .put(TextureSlot.WEST, getBlockTexture(block, "_side")); + } + + public static TextureMapping snifferEgg(String name) { + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(Blocks.SNIFFER_EGG, name + "_north")) + .put(TextureSlot.BOTTOM, getBlockTexture(Blocks.SNIFFER_EGG, name + "_bottom")) + .put(TextureSlot.TOP, getBlockTexture(Blocks.SNIFFER_EGG, name + "_top")) + .put(TextureSlot.NORTH, getBlockTexture(Blocks.SNIFFER_EGG, name + "_north")) + .put(TextureSlot.SOUTH, getBlockTexture(Blocks.SNIFFER_EGG, name + "_south")) + .put(TextureSlot.EAST, getBlockTexture(Blocks.SNIFFER_EGG, name + "_east")) + .put(TextureSlot.WEST, getBlockTexture(Blocks.SNIFFER_EGG, name + "_west")); + } + + public static TextureMapping campfire(Block block) { + return new TextureMapping().put(TextureSlot.LIT_LOG, getBlockTexture(block, "_log_lit")).put(TextureSlot.FIRE, getBlockTexture(block, "_fire")); + } + + public static TextureMapping candleCake(Block block, boolean lit) { + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(Blocks.CAKE, "_side")) + .put(TextureSlot.BOTTOM, getBlockTexture(Blocks.CAKE, "_bottom")) + .put(TextureSlot.TOP, getBlockTexture(Blocks.CAKE, "_top")) + .put(TextureSlot.SIDE, getBlockTexture(Blocks.CAKE, "_side")) + .put(TextureSlot.CANDLE, getBlockTexture(block, lit ? "_lit" : "")); + } + + public static TextureMapping cauldron(ResourceLocation texture) { + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(Blocks.CAULDRON, "_side")) + .put(TextureSlot.SIDE, getBlockTexture(Blocks.CAULDRON, "_side")) + .put(TextureSlot.TOP, getBlockTexture(Blocks.CAULDRON, "_top")) + .put(TextureSlot.BOTTOM, getBlockTexture(Blocks.CAULDRON, "_bottom")) + .put(TextureSlot.INSIDE, getBlockTexture(Blocks.CAULDRON, "_inner")) + .put(TextureSlot.CONTENT, texture); + } + + public static TextureMapping sculkShrieker(boolean canSummon) { + String string = canSummon ? "_can_summon" : ""; + return new TextureMapping() + .put(TextureSlot.PARTICLE, getBlockTexture(Blocks.SCULK_SHRIEKER, "_bottom")) + .put(TextureSlot.SIDE, getBlockTexture(Blocks.SCULK_SHRIEKER, "_side")) + .put(TextureSlot.TOP, getBlockTexture(Blocks.SCULK_SHRIEKER, "_top")) + .put(TextureSlot.INNER_TOP, getBlockTexture(Blocks.SCULK_SHRIEKER, string + "_inner_top")) + .put(TextureSlot.BOTTOM, getBlockTexture(Blocks.SCULK_SHRIEKER, "_bottom")); + } + + public static TextureMapping layer0(Item item) { + return new TextureMapping().put(TextureSlot.LAYER0, getItemTexture(item)); + } + + public static TextureMapping layer0(Block block) { + return new TextureMapping().put(TextureSlot.LAYER0, getBlockTexture(block)); + } + + public static TextureMapping layer0(ResourceLocation texture) { + return new TextureMapping().put(TextureSlot.LAYER0, texture); + } + + public static TextureMapping layered(ResourceLocation layer0, ResourceLocation layer1) { + return new TextureMapping().put(TextureSlot.LAYER0, layer0).put(TextureSlot.LAYER1, layer1); + } + + public static TextureMapping layered(ResourceLocation layer0, ResourceLocation layer1, ResourceLocation layer2) { + return new TextureMapping().put(TextureSlot.LAYER0, layer0).put(TextureSlot.LAYER1, layer1).put(TextureSlot.LAYER2, layer2); + } + + public static ResourceLocation getBlockTexture(Block block) { + ResourceLocation resourceLocation = BuiltInRegistries.BLOCK.getKey(block); + return resourceLocation.withPrefix("block/"); + } + + public static ResourceLocation getBlockTexture(Block block, String suffix) { + ResourceLocation resourceLocation = BuiltInRegistries.BLOCK.getKey(block); + return resourceLocation.withPath((UnaryOperator)(string2 -> "block/" + string2 + suffix)); + } + + public static ResourceLocation getItemTexture(Item item) { + ResourceLocation resourceLocation = BuiltInRegistries.ITEM.getKey(item); + return resourceLocation.withPrefix("item/"); + } + + public static ResourceLocation getItemTexture(Item item, String suffix) { + ResourceLocation resourceLocation = BuiltInRegistries.ITEM.getKey(item); + return resourceLocation.withPath((UnaryOperator)(string2 -> "item/" + string2 + suffix)); + } +} diff --git a/net/minecraft/data/models/model/TextureSlot.java b/net/minecraft/client/data/models/model/TextureSlot.java similarity index 93% rename from net/minecraft/data/models/model/TextureSlot.java rename to net/minecraft/client/data/models/model/TextureSlot.java index 8f488da1..892dd4c6 100644 --- a/net/minecraft/data/models/model/TextureSlot.java +++ b/net/minecraft/client/data/models/model/TextureSlot.java @@ -1,7 +1,10 @@ -package net.minecraft.data.models.model; +package net.minecraft.client.data.models.model; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import org.jetbrains.annotations.Nullable; +@Environment(EnvType.CLIENT) public final class TextureSlot { public static final TextureSlot ALL = create("all"); public static final TextureSlot TEXTURE = create("texture", ALL); @@ -19,6 +22,7 @@ public final class TextureSlot { public static final TextureSlot UP = create("up"); public static final TextureSlot DOWN = create("down"); public static final TextureSlot CROSS = create("cross"); + public static final TextureSlot CROSS_EMISSIVE = create("cross_emissive"); public static final TextureSlot PLANT = create("plant"); public static final TextureSlot WALL = create("wall", ALL); public static final TextureSlot RAIL = create("rail"); diff --git a/net/minecraft/client/data/models/model/TexturedModel.java b/net/minecraft/client/data/models/model/TexturedModel.java new file mode 100644 index 00000000..2ced7407 --- /dev/null +++ b/net/minecraft/client/data/models/model/TexturedModel.java @@ -0,0 +1,97 @@ +package net.minecraft.client.data.models.model; + +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class TexturedModel { + public static final TexturedModel.Provider CUBE = createDefault(TextureMapping::cube, ModelTemplates.CUBE_ALL); + public static final TexturedModel.Provider CUBE_INNER_FACES = createDefault(TextureMapping::cube, ModelTemplates.CUBE_ALL_INNER_FACES); + public static final TexturedModel.Provider CUBE_MIRRORED = createDefault(TextureMapping::cube, ModelTemplates.CUBE_MIRRORED_ALL); + public static final TexturedModel.Provider COLUMN = createDefault(TextureMapping::column, ModelTemplates.CUBE_COLUMN); + public static final TexturedModel.Provider COLUMN_HORIZONTAL = createDefault(TextureMapping::column, ModelTemplates.CUBE_COLUMN_HORIZONTAL); + public static final TexturedModel.Provider CUBE_TOP_BOTTOM = createDefault(TextureMapping::cubeBottomTop, ModelTemplates.CUBE_BOTTOM_TOP); + public static final TexturedModel.Provider CUBE_TOP = createDefault(TextureMapping::cubeTop, ModelTemplates.CUBE_TOP); + public static final TexturedModel.Provider ORIENTABLE_ONLY_TOP = createDefault(TextureMapping::orientableCubeOnlyTop, ModelTemplates.CUBE_ORIENTABLE); + public static final TexturedModel.Provider ORIENTABLE = createDefault(TextureMapping::orientableCube, ModelTemplates.CUBE_ORIENTABLE_TOP_BOTTOM); + public static final TexturedModel.Provider CARPET = createDefault(TextureMapping::wool, ModelTemplates.CARPET); + public static final TexturedModel.Provider MOSSY_CARPET_SIDE = createDefault(TextureMapping::side, ModelTemplates.MOSSY_CARPET_SIDE); + public static final TexturedModel.Provider FLOWERBED_1 = createDefault(TextureMapping::flowerbed, ModelTemplates.FLOWERBED_1); + public static final TexturedModel.Provider FLOWERBED_2 = createDefault(TextureMapping::flowerbed, ModelTemplates.FLOWERBED_2); + public static final TexturedModel.Provider FLOWERBED_3 = createDefault(TextureMapping::flowerbed, ModelTemplates.FLOWERBED_3); + public static final TexturedModel.Provider FLOWERBED_4 = createDefault(TextureMapping::flowerbed, ModelTemplates.FLOWERBED_4); + public static final TexturedModel.Provider LEAF_LITTER_1 = createDefault(TextureMapping::defaultTexture, ModelTemplates.LEAF_LITTER_1); + public static final TexturedModel.Provider LEAF_LITTER_2 = createDefault(TextureMapping::defaultTexture, ModelTemplates.LEAF_LITTER_2); + public static final TexturedModel.Provider LEAF_LITTER_3 = createDefault(TextureMapping::defaultTexture, ModelTemplates.LEAF_LITTER_3); + public static final TexturedModel.Provider LEAF_LITTER_4 = createDefault(TextureMapping::defaultTexture, ModelTemplates.LEAF_LITTER_4); + public static final TexturedModel.Provider GLAZED_TERRACOTTA = createDefault(TextureMapping::pattern, ModelTemplates.GLAZED_TERRACOTTA); + public static final TexturedModel.Provider CORAL_FAN = createDefault(TextureMapping::fan, ModelTemplates.CORAL_FAN); + public static final TexturedModel.Provider ANVIL = createDefault(TextureMapping::top, ModelTemplates.ANVIL); + public static final TexturedModel.Provider LEAVES = createDefault(TextureMapping::cube, ModelTemplates.LEAVES); + public static final TexturedModel.Provider LANTERN = createDefault(TextureMapping::lantern, ModelTemplates.LANTERN); + public static final TexturedModel.Provider HANGING_LANTERN = createDefault(TextureMapping::lantern, ModelTemplates.HANGING_LANTERN); + public static final TexturedModel.Provider SEAGRASS = createDefault(TextureMapping::defaultTexture, ModelTemplates.SEAGRASS); + public static final TexturedModel.Provider COLUMN_ALT = createDefault(TextureMapping::logColumn, ModelTemplates.CUBE_COLUMN); + public static final TexturedModel.Provider COLUMN_HORIZONTAL_ALT = createDefault(TextureMapping::logColumn, ModelTemplates.CUBE_COLUMN_HORIZONTAL); + public static final TexturedModel.Provider TOP_BOTTOM_WITH_WALL = createDefault(TextureMapping::cubeBottomTopWithWall, ModelTemplates.CUBE_BOTTOM_TOP); + public static final TexturedModel.Provider COLUMN_WITH_WALL = createDefault(TextureMapping::columnWithWall, ModelTemplates.CUBE_COLUMN); + private final TextureMapping mapping; + private final ModelTemplate template; + + private TexturedModel(TextureMapping mapping, ModelTemplate template) { + this.mapping = mapping; + this.template = template; + } + + public ModelTemplate getTemplate() { + return this.template; + } + + public TextureMapping getMapping() { + return this.mapping; + } + + public TexturedModel updateTextures(Consumer updater) { + updater.accept(this.mapping); + return this; + } + + public ResourceLocation create(Block block, BiConsumer output) { + return this.template.create(block, this.mapping, output); + } + + public ResourceLocation createWithSuffix(Block block, String suffix, BiConsumer output) { + return this.template.createWithSuffix(block, suffix, this.mapping, output); + } + + private static TexturedModel.Provider createDefault(Function textureMappingGetter, ModelTemplate template) { + return block -> new TexturedModel((TextureMapping)textureMappingGetter.apply(block), template); + } + + public static TexturedModel createAllSame(ResourceLocation location) { + return new TexturedModel(TextureMapping.cube(location), ModelTemplates.CUBE_ALL); + } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface Provider { + TexturedModel get(Block block); + + default ResourceLocation create(Block block, BiConsumer output) { + return this.get(block).create(block, output); + } + + default ResourceLocation createWithSuffix(Block block, String suffix, BiConsumer output) { + return this.get(block).createWithSuffix(block, suffix, output); + } + + default TexturedModel.Provider updateTexture(Consumer updater) { + return block -> this.get(block).updateTextures(updater); + } + } +} diff --git a/net/minecraft/client/data/models/model/package-info.java b/net/minecraft/client/data/models/model/package-info.java new file mode 100644 index 00000000..88467d9d --- /dev/null +++ b/net/minecraft/client/data/models/model/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.data.models.model; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/data/models/package-info.java b/net/minecraft/client/data/models/package-info.java new file mode 100644 index 00000000..9f0cc8d1 --- /dev/null +++ b/net/minecraft/client/data/models/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.data.models; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/data/package-info.java b/net/minecraft/client/data/package-info.java new file mode 100644 index 00000000..c6f8e507 --- /dev/null +++ b/net/minecraft/client/data/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.data; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/gui/BundleMouseActions.java b/net/minecraft/client/gui/BundleMouseActions.java index a3cadbb0..951311b0 100644 --- a/net/minecraft/client/gui/BundleMouseActions.java +++ b/net/minecraft/client/gui/BundleMouseActions.java @@ -29,18 +29,18 @@ public class BundleMouseActions implements ItemSlotMouseAction { } @Override - public boolean onMouseScrolled(double d, double e, int i, ItemStack itemStack) { - int j = BundleItem.getNumberOfItemsToShow(itemStack); - if (j == 0) { + public boolean onMouseScrolled(double xOffset, double yOffset, int hoveredSlotIndex, ItemStack hoveredSlotItem) { + int i = BundleItem.getNumberOfItemsToShow(hoveredSlotItem); + if (i == 0) { return false; } else { - Vector2i vector2i = this.scrollWheelHandler.onMouseScroll(d, e); - int k = vector2i.y == 0 ? -vector2i.x : vector2i.y; - if (k != 0) { - int l = BundleItem.getSelectedItem(itemStack); - int m = ScrollWheelHandler.getNextScrollWheelSelection(k, l, j); - if (l != m) { - this.toggleSelectedBundleItem(itemStack, i, m); + Vector2i vector2i = this.scrollWheelHandler.onMouseScroll(xOffset, yOffset); + int j = vector2i.y == 0 ? -vector2i.x : vector2i.y; + if (j != 0) { + int k = BundleItem.getSelectedItem(hoveredSlotItem); + int l = ScrollWheelHandler.getNextScrollWheelSelection(j, k, i); + if (k != l) { + this.toggleSelectedBundleItem(hoveredSlotItem, hoveredSlotIndex, l); } } @@ -60,15 +60,15 @@ public class BundleMouseActions implements ItemSlotMouseAction { } } - private void toggleSelectedBundleItem(ItemStack itemStack, int i, int j) { - if (this.minecraft.getConnection() != null && j < BundleItem.getNumberOfItemsToShow(itemStack)) { + private void toggleSelectedBundleItem(ItemStack stack, int index, int nextIndex) { + if (this.minecraft.getConnection() != null && nextIndex < BundleItem.getNumberOfItemsToShow(stack)) { ClientPacketListener clientPacketListener = this.minecraft.getConnection(); - BundleItem.toggleSelectedItem(itemStack, j); - clientPacketListener.send(new ServerboundSelectBundleItemPacket(i, j)); + BundleItem.toggleSelectedItem(stack, nextIndex); + clientPacketListener.send(new ServerboundSelectBundleItemPacket(index, nextIndex)); } } - public void unselectedBundleItem(ItemStack itemStack, int i) { - this.toggleSelectedBundleItem(itemStack, i, -1); + public void unselectedBundleItem(ItemStack bundle, int slotIndex) { + this.toggleSelectedBundleItem(bundle, slotIndex, -1); } } diff --git a/net/minecraft/client/gui/Font.java b/net/minecraft/client/gui/Font.java index 27b8ea4c..d8c642cf 100644 --- a/net/minecraft/client/gui/Font.java +++ b/net/minecraft/client/gui/Font.java @@ -30,12 +30,12 @@ import net.minecraft.util.RandomSource; import net.minecraft.util.StringDecomposer; import org.jetbrains.annotations.Nullable; import org.joml.Matrix4f; -import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class Font { private static final float EFFECT_DEPTH = 0.01F; - private static final Vector3f SHADOW_OFFSET = new Vector3f(0.0F, 0.0F, 0.03F); + public static final float SHADOW_DEPTH = 0.03F; + public static final int NO_SHADOW = 0; public static final int ALPHA_CUTOFF = 8; public final int lineHeight = 9; public final RandomSource random = RandomSource.create(); @@ -72,8 +72,8 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords @@ -82,7 +82,7 @@ public class Font { text = this.bidirectionalShaping(text); } - return this.drawInternal(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInternal(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public int drawInBatch( @@ -91,29 +91,31 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords ) { - return this.drawInBatch(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInBatch(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public int drawInBatch( - Component component, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + Component text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - return this.drawInternal(component.getVisualOrderText(), f, g, i, bl, matrix4f, multiBufferSource, displayMode, j, k, bl2); + return this.drawInternal( + text.getVisualOrderText(), x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth + ); } public int drawInBatch( @@ -122,22 +124,20 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords ) { - return this.drawInternal(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInternal(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public void drawInBatch8xOutline( - FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f matrix, MultiBufferSource bufferSource, int packedLightCoords + FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f pose, MultiBufferSource bufferSource, int packedLightCoords ) { int i = adjustColor(backgroundColor); - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( - bufferSource, 0.0F, 0.0F, i, false, matrix, Font.DisplayMode.NORMAL, packedLightCoords - ); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(bufferSource, 0.0F, 0.0F, i, false, pose, Font.DisplayMode.NORMAL, packedLightCoords); for (int j = -1; j <= 1; j++) { for (int k = -1; k <= 1; k++) { @@ -160,7 +160,7 @@ public class Font { stringRenderOutput.renderCharacters(); Font.StringRenderOutput stringRenderOutput2 = new Font.StringRenderOutput( - bufferSource, x, y, adjustColor(color), false, matrix, Font.DisplayMode.POLYGON_OFFSET, packedLightCoords + bufferSource, x, y, adjustColor(color), false, pose, Font.DisplayMode.POLYGON_OFFSET, packedLightCoords ); text.accept(stringRenderOutput2); stringRenderOutput2.finish(x); @@ -176,82 +176,74 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords, - boolean bidirectional + boolean inverseDepth ) { color = adjustColor(color); - Matrix4f matrix4f = new Matrix4f(matrix); - if (dropShadow) { - this.renderText(text, x, y, color, true, matrix, buffer, displayMode, backgroundColor, packedLightCoords, bidirectional); - matrix4f.translate(SHADOW_OFFSET); - } - - x = this.renderText(text, x, y, color, false, matrix4f, buffer, displayMode, backgroundColor, packedLightCoords, bidirectional); + x = this.renderText(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); return (int)x + (dropShadow ? 1 : 0); } private int drawInternal( - FormattedCharSequence formattedCharSequence, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + FormattedCharSequence text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - i = adjustColor(i); - Matrix4f matrix4f2 = new Matrix4f(matrix4f); - if (bl) { - this.renderText(formattedCharSequence, f, g, i, true, matrix4f, multiBufferSource, displayMode, j, k, bl2); - matrix4f2.translate(SHADOW_OFFSET); - } - - f = this.renderText(formattedCharSequence, f, g, i, false, matrix4f2, multiBufferSource, displayMode, j, k, bl2); - return (int)f + (bl ? 1 : 0); + color = adjustColor(color); + x = this.renderText(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); + return (int)x + (dropShadow ? 1 : 0); } private float renderText( - String string, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + String text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(multiBufferSource, f, g, i, j, bl, matrix4f, displayMode, k, bl2); - StringDecomposer.iterateFormatted(string, Style.EMPTY, stringRenderOutput); - return stringRenderOutput.finish(f); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( + bufferSource, x, y, color, backgroundColor, dropShadow, pose, displayMode, packedLightCoords, inverseDepth + ); + StringDecomposer.iterateFormatted(text, Style.EMPTY, stringRenderOutput); + return stringRenderOutput.finish(x); } private float renderText( - FormattedCharSequence formattedCharSequence, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + FormattedCharSequence text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(multiBufferSource, f, g, i, j, bl, matrix4f, displayMode, k, bl2); - formattedCharSequence.accept(stringRenderOutput); - return stringRenderOutput.finish(f); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( + bufferSource, x, y, color, backgroundColor, dropShadow, pose, displayMode, packedLightCoords, inverseDepth + ); + text.accept(stringRenderOutput); + return stringRenderOutput.finish(x); } /** @@ -317,8 +309,7 @@ public class Font { @Environment(EnvType.CLIENT) class StringRenderOutput implements FormattedCharSink { final MultiBufferSource bufferSource; - private final boolean dropShadow; - private final float dimFactor; + private final boolean drawShadow; private final int color; private final int backgroundColor; private final Matrix4f pose; @@ -353,28 +344,27 @@ public class Font { } public StringRenderOutput( - final MultiBufferSource multiBufferSource, - final float f, - final float g, - final int i, - final int j, - final boolean bl, - final Matrix4f matrix4f, + final MultiBufferSource buferSource, + final float x, + final float y, + final int color, + final int backgroundColor, + final boolean dropShadow, + final Matrix4f pose, final Font.DisplayMode displayMode, - final int k, - final boolean bl2 + final int packedLightCoords, + final boolean inverseDepth ) { - this.bufferSource = multiBufferSource; - this.x = f; - this.y = g; - this.dropShadow = bl; - this.dimFactor = bl ? 0.25F : 1.0F; - this.color = ARGB.scaleRGB(i, this.dimFactor); - this.backgroundColor = j; - this.pose = matrix4f; + this.bufferSource = buferSource; + this.x = x; + this.y = y; + this.drawShadow = dropShadow; + this.color = color; + this.backgroundColor = backgroundColor; + this.pose = pose; this.mode = displayMode; - this.packedLightCoords = k; - this.inverseDepth = bl2; + this.packedLightCoords = packedLightCoords; + this.inverseDepth = inverseDepth; } @Override @@ -384,32 +374,32 @@ public class Font { BakedGlyph bakedGlyph = style.isObfuscated() && j != 32 ? fontSet.getRandomGlyph(glyphInfo) : fontSet.getGlyph(j); boolean bl = style.isBold(); TextColor textColor = style.getColor(); - int k = textColor != null ? ARGB.color(ARGB.alpha(this.color), ARGB.scaleRGB(textColor.getValue(), this.dimFactor)) : this.color; + int k = this.getTextColor(textColor); + int l = this.getShadowColor(style, k); float f = glyphInfo.getAdvance(bl); float g = i == 0 ? this.x - 1.0F : this.x; + float h = glyphInfo.getShadowOffset(); if (!(bakedGlyph instanceof EmptyGlyph)) { - float h = bl ? glyphInfo.getBoldOffset() : 0.0F; - float l = this.dropShadow ? glyphInfo.getShadowOffset() : 0.0F; - this.glyphInstances.add(new BakedGlyph.GlyphInstance(this.x + l, this.y + l, k, bakedGlyph, style, h)); + float m = bl ? glyphInfo.getBoldOffset() : 0.0F; + this.glyphInstances.add(new BakedGlyph.GlyphInstance(this.x, this.y, k, l, bakedGlyph, style, m, h)); } - float h = this.dropShadow ? 1.0F : 0.0F; if (style.isStrikethrough()) { - this.addEffect(new BakedGlyph.Effect(g + h, this.y + h + 4.5F, this.x + h + f, this.y + h + 4.5F - 1.0F, this.getOverTextEffectDepth(), k)); + this.addEffect(new BakedGlyph.Effect(g, this.y + 4.5F, this.x + f, this.y + 4.5F - 1.0F, this.getOverTextEffectDepth(), k, l, h)); } if (style.isUnderlined()) { - this.addEffect(new BakedGlyph.Effect(g + h, this.y + h + 9.0F, this.x + h + f, this.y + h + 9.0F - 1.0F, this.getOverTextEffectDepth(), k)); + this.addEffect(new BakedGlyph.Effect(g, this.y + 9.0F, this.x + f, this.y + 9.0F - 1.0F, this.getOverTextEffectDepth(), k, l, h)); } this.x += f; return true; } - float finish(float f) { + float finish(float x) { BakedGlyph bakedGlyph = null; if (this.backgroundColor != 0) { - BakedGlyph.Effect effect = new BakedGlyph.Effect(f - 1.0F, this.y + 9.0F, this.x, this.y - 1.0F, this.getUnderTextEffectDepth(), this.backgroundColor); + BakedGlyph.Effect effect = new BakedGlyph.Effect(x - 1.0F, this.y + 9.0F, this.x, this.y - 1.0F, this.getUnderTextEffectDepth(), this.backgroundColor); bakedGlyph = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph(); VertexConsumer vertexConsumer = this.bufferSource.getBuffer(bakedGlyph.renderType(this.mode)); bakedGlyph.renderEffect(effect, this.pose, vertexConsumer, this.packedLightCoords); @@ -431,6 +421,27 @@ public class Font { return this.x; } + private int getTextColor(@Nullable TextColor textColor) { + if (textColor != null) { + int i = ARGB.alpha(this.color); + int j = textColor.getValue(); + return ARGB.color(i, j); + } else { + return this.color; + } + } + + private int getShadowColor(Style style, int textColor) { + Integer integer = style.getShadowColor(); + if (integer != null) { + float f = ARGB.alphaFloat(textColor); + float g = ARGB.alphaFloat(integer); + return f != 1.0F ? ARGB.color(ARGB.as8BitChannel(f * g), integer) : integer; + } else { + return this.drawShadow ? ARGB.scaleRGB(textColor, 0.25F) : 0; + } + } + void renderCharacters() { for (BakedGlyph.GlyphInstance glyphInstance : this.glyphInstances) { BakedGlyph bakedGlyph = glyphInstance.glyph(); diff --git a/net/minecraft/client/gui/Gui.java b/net/minecraft/client/gui/Gui.java index 87554588..84653b2e 100644 --- a/net/minecraft/client/gui/Gui.java +++ b/net/minecraft/client/gui/Gui.java @@ -23,6 +23,7 @@ import net.minecraft.client.gui.components.DebugScreenOverlay; import net.minecraft.client.gui.components.PlayerTabOverlay; import net.minecraft.client.gui.components.SubtitleOverlay; import net.minecraft.client.gui.components.spectator.SpectatorGui; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -133,7 +134,7 @@ public class Gui { private static final int AIR_BUBBLE_SIZE = 9; private static final int AIR_BUBBLE_SEPERATION = 8; private static final int AIR_BUBBLE_POPPING_DURATION = 2; - private static final int EMPTY_AIR_BUBBLE_DELAY_DURATION = 4; + private static final int EMPTY_AIR_BUBBLE_DELAY_DURATION = 1; private static final float AIR_BUBBLE_POP_SOUND_VOLUME_BASE = 0.5F; private static final float AIR_BUBBLE_POP_SOUND_VOLUME_INCREMENT = 0.1F; private static final float AIR_BUBBLE_POP_SOUND_PITCH_BASE = 1.0F; @@ -255,16 +256,17 @@ public class Gui { this.renderVignette(guiGraphics, this.minecraft.getCameraEntity()); } + LocalPlayer localPlayer = this.minecraft.player; float f = deltaTracker.getGameTimeDeltaTicks(); this.scopeScale = Mth.lerp(0.5F * f, this.scopeScale, 1.125F); if (this.minecraft.options.getCameraType().isFirstPerson()) { - if (this.minecraft.player.isScoping()) { + if (localPlayer.isScoping()) { this.renderSpyglassOverlay(guiGraphics, this.scopeScale); } else { this.scopeScale = 0.5F; for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) { - ItemStack itemStack = this.minecraft.player.getItemBySlot(equipmentSlot); + ItemStack itemStack = localPlayer.getItemBySlot(equipmentSlot); Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); if (equippable != null && equippable.slot() == equipmentSlot && equippable.cameraOverlay().isPresent()) { this.renderTextureOverlay( @@ -275,22 +277,20 @@ public class Gui { } } - if (this.minecraft.player.getTicksFrozen() > 0) { - this.renderTextureOverlay(guiGraphics, POWDER_SNOW_OUTLINE_LOCATION, this.minecraft.player.getPercentFrozen()); + if (localPlayer.getTicksFrozen() > 0) { + this.renderTextureOverlay(guiGraphics, POWDER_SNOW_OUTLINE_LOCATION, localPlayer.getPercentFrozen()); } - float g = Mth.lerp( - deltaTracker.getGameTimeDeltaPartialTick(false), this.minecraft.player.oSpinningEffectIntensity, this.minecraft.player.spinningEffectIntensity - ); - if (g > 0.0F) { - if (!this.minecraft.player.hasEffect(MobEffects.CONFUSION)) { - this.renderPortalOverlay(guiGraphics, g); - } else { - float h = this.minecraft.options.screenEffectScale().get().floatValue(); - if (h < 1.0F) { - float i = g * (1.0F - h); - this.renderConfusionOverlay(guiGraphics, i); - } + float g = deltaTracker.getGameTimeDeltaPartialTick(false); + float h = Mth.lerp(g, localPlayer.oPortalEffectIntensity, localPlayer.portalEffectIntensity); + float i = localPlayer.getEffectBlendFactor(MobEffects.NAUSEA, g); + if (h > 0.0F) { + this.renderPortalOverlay(guiGraphics, h); + } else if (i > 0.0F) { + float j = this.minecraft.options.screenEffectScale().get().floatValue(); + if (j < 1.0F) { + float k = i * (1.0F - j); + this.renderConfusionOverlay(guiGraphics, k); } } } @@ -382,8 +382,8 @@ public class Gui { private void renderChat(GuiGraphics guiGraphics, DeltaTracker deltaTracker) { if (!this.chat.isChatFocused()) { Window window = this.minecraft.getWindow(); - int i = Mth.floor(this.minecraft.mouseHandler.xpos() * window.getGuiScaledWidth() / window.getScreenWidth()); - int j = Mth.floor(this.minecraft.mouseHandler.ypos() * window.getGuiScaledHeight() / window.getScreenHeight()); + int i = Mth.floor(this.minecraft.mouseHandler.getScaledXPos(window)); + int j = Mth.floor(this.minecraft.mouseHandler.getScaledYPos(window)); this.chat.render(guiGraphics, this.tickCount, i, j, false); } } @@ -430,7 +430,7 @@ public class Gui { matrix4fStack.rotateX(-camera.getXRot() * (float) (Math.PI / 180.0)); matrix4fStack.rotateY(camera.getYRot() * (float) (Math.PI / 180.0)); matrix4fStack.scale(-1.0F, -1.0F, -1.0F); - RenderSystem.renderCrosshair(10); + this.debugOverlay.render3dCrosshair(); matrix4fStack.popMatrix(); } else { int i = 15; @@ -572,7 +572,7 @@ public class Gui { guiGraphics.pose().translate(0.0F, 0.0F, -90.0F); guiGraphics.blitSprite(RenderType::guiTextured, HOTBAR_SPRITE, i - 91, guiGraphics.guiHeight() - 22, 182, 22); guiGraphics.blitSprite( - RenderType::guiTextured, HOTBAR_SELECTION_SPRITE, i - 91 - 1 + player.getInventory().selected * 20, guiGraphics.guiHeight() - 22 - 1, 24, 23 + RenderType::guiTextured, HOTBAR_SELECTION_SPRITE, i - 91 - 1 + player.getInventory().getSelectedSlot() * 20, guiGraphics.guiHeight() - 22 - 1, 24, 23 ); if (!itemStack.isEmpty()) { if (humanoidArm == HumanoidArm.LEFT) { @@ -588,7 +588,7 @@ public class Gui { for (int m = 0; m < 9; m++) { int n = i - 90 + m * 20 + 2; int o = guiGraphics.guiHeight() - 16 - 3; - this.renderSlot(guiGraphics, n, o, deltaTracker, player, player.getInventory().items.get(m), l++); + this.renderSlot(guiGraphics, n, o, deltaTracker, player, player.getInventory().getItem(m), l++); } if (!itemStack.isEmpty()) { @@ -1012,54 +1012,54 @@ public class Gui { guiGraphics.blitSprite(RenderType::guiTextured, heartType.getSprite(hardcore, blinking, halfHeart), x, y, 9, 9); } - private void renderAirBubbles(GuiGraphics guiGraphics, Player player, int i, int j, int k) { - int l = player.getMaxAirSupply(); - int m = Math.clamp(player.getAirSupply(), 0, l); + private void renderAirBubbles(GuiGraphics guiGraphics, Player player, int vehicleMaxHealth, int y, int x) { + int i = player.getMaxAirSupply(); + int j = Math.clamp(player.getAirSupply(), 0, i); boolean bl = player.isEyeInFluid(FluidTags.WATER); - if (bl || m < l) { - j = this.getAirBubbleYLine(i, j); - int n = getCurrentAirSupplyBubble(m, l, -2); - int o = getCurrentAirSupplyBubble(m, l, 0); - int p = 10 - getCurrentAirSupplyBubble(m, l, getEmptyBubbleDelayDuration(m, bl)); - boolean bl2 = n != o; + if (bl || j < i) { + y = this.getAirBubbleYLine(vehicleMaxHealth, y); + int k = getCurrentAirSupplyBubble(j, i, -2); + int l = getCurrentAirSupplyBubble(j, i, 0); + int m = 10 - getCurrentAirSupplyBubble(j, i, getEmptyBubbleDelayDuration(j, bl)); + boolean bl2 = k != l; if (!bl) { this.lastBubblePopSoundPlayed = 0; } - for (int q = 1; q <= 10; q++) { - int r = k - (q - 1) * 8 - 9; - if (q <= n) { - guiGraphics.blitSprite(RenderType::guiTextured, AIR_SPRITE, r, j, 9, 9); - } else if (bl2 && q == o && bl) { - guiGraphics.blitSprite(RenderType::guiTextured, AIR_POPPING_SPRITE, r, j, 9, 9); - this.playAirBubblePoppedSound(q, player, p); - } else if (q > 10 - p) { - int s = p == 10 && this.tickCount % 2 == 0 ? this.random.nextInt(2) : 0; - guiGraphics.blitSprite(RenderType::guiTextured, AIR_EMPTY_SPRITE, r, j + s, 9, 9); + for (int n = 1; n <= 10; n++) { + int o = x - (n - 1) * 8 - 9; + if (n <= k) { + guiGraphics.blitSprite(RenderType::guiTextured, AIR_SPRITE, o, y, 9, 9); + } else if (bl2 && n == l && bl) { + guiGraphics.blitSprite(RenderType::guiTextured, AIR_POPPING_SPRITE, o, y, 9, 9); + this.playAirBubblePoppedSound(n, player, m); + } else if (n > 10 - m) { + int p = m == 10 && this.tickCount % 2 == 0 ? this.random.nextInt(2) : 0; + guiGraphics.blitSprite(RenderType::guiTextured, AIR_EMPTY_SPRITE, o, y + p, 9, 9); } } } } - private int getAirBubbleYLine(int i, int j) { - int k = this.getVisibleVehicleHeartRows(i) - 1; - return j - k * 10; + private int getAirBubbleYLine(int vehicleMaxHealth, int startX) { + int i = this.getVisibleVehicleHeartRows(vehicleMaxHealth) - 1; + return startX - i * 10; } - private static int getCurrentAirSupplyBubble(int i, int j, int k) { - return Mth.ceil((float)((i + k) * 10) / j); + private static int getCurrentAirSupplyBubble(int currentAirSupply, int maxAirSupply, int offset) { + return Mth.ceil((float)((currentAirSupply + offset) * 10) / maxAirSupply); } - private static int getEmptyBubbleDelayDuration(int i, boolean bl) { - return i != 0 && bl ? 4 : 0; + private static int getEmptyBubbleDelayDuration(int airSupply, boolean inWater) { + return airSupply != 0 && inWater ? 1 : 0; } - private void playAirBubblePoppedSound(int i, Player player, int j) { - if (this.lastBubblePopSoundPlayed != i) { - float f = 0.5F + 0.1F * Math.max(0, j - 3 + 1); - float g = 1.0F + 0.1F * Math.max(0, j - 5 + 1); + private void playAirBubblePoppedSound(int bubble, Player player, int pitch) { + if (this.lastBubblePopSoundPlayed != bubble) { + float f = 0.5F + 0.1F * Math.max(0, pitch - 3 + 1); + float g = 1.0F + 0.1F * Math.max(0, pitch - 5 + 1); player.playSound(SoundEvents.BUBBLE_POP, f, g); - this.lastBubblePopSoundPlayed = i; + this.lastBubblePopSoundPlayed = bubble; } } @@ -1255,18 +1255,18 @@ public class Gui { guiGraphics.blitSprite(RenderType::guiTexturedOverlay, textureAtlasSprite, 0, 0, guiGraphics.guiWidth(), guiGraphics.guiHeight(), i); } - private void renderConfusionOverlay(GuiGraphics guiGraphics, float f) { + private void renderConfusionOverlay(GuiGraphics guiGraphics, float intensity) { int i = guiGraphics.guiWidth(); int j = guiGraphics.guiHeight(); guiGraphics.pose().pushPose(); - float g = Mth.lerp(f, 2.0F, 1.0F); + float f = Mth.lerp(intensity, 2.0F, 1.0F); guiGraphics.pose().translate(i / 2.0F, j / 2.0F, 0.0F); - guiGraphics.pose().scale(g, g, g); + guiGraphics.pose().scale(f, f, f); guiGraphics.pose().translate(-i / 2.0F, -j / 2.0F, 0.0F); - float h = 0.2F * f; - float k = 0.4F * f; - float l = 0.2F * f; - guiGraphics.blit(resourceLocation -> RenderType.guiNauseaOverlay(), NAUSEA_LOCATION, 0, 0, 0.0F, 0.0F, i, j, i, j, ARGB.colorFromFloat(1.0F, h, k, l)); + float g = 0.2F * intensity; + float h = 0.4F * intensity; + float k = 0.2F * intensity; + guiGraphics.blit(resourceLocation -> RenderType.guiNauseaOverlay(), NAUSEA_LOCATION, 0, 0, 0.0F, 0.0F, i, j, i, j, ARGB.colorFromFloat(1.0F, g, h, k)); guiGraphics.pose().popPose(); } @@ -1323,7 +1323,7 @@ public class Gui { } if (this.minecraft.player != null) { - ItemStack itemStack = this.minecraft.player.getInventory().getSelected(); + ItemStack itemStack = this.minecraft.player.getInventory().getSelectedItem(); if (itemStack.isEmpty()) { this.toolHighlightTimer = 0; } else if (this.lastToolHighlight.isEmpty() @@ -1432,10 +1432,7 @@ public class Gui { this.titleTime = this.titleFadeInTime + this.titleStayTime + this.titleFadeOutTime; } - /** - * Clears the title and subtitle, resetting the title display time. - */ - public void clear() { + public void clearTitles() { this.title = null; this.subtitle = null; this.titleTime = 0; @@ -1486,6 +1483,8 @@ public class Gui { this.minecraft.getToastManager().clear(); this.debugOverlay.reset(); this.chat.clearMessages(true); + this.clearTitles(); + this.resetTitleTimes(); } /** diff --git a/net/minecraft/client/gui/GuiGraphics.java b/net/minecraft/client/gui/GuiGraphics.java index c43f71fb..7acea9d6 100644 --- a/net/minecraft/client/gui/GuiGraphics.java +++ b/net/minecraft/client/gui/GuiGraphics.java @@ -21,6 +21,7 @@ import net.minecraft.CrashReportDetail; import net.minecraft.ReportedException; import net.minecraft.Util; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Font.DisplayMode; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; @@ -30,18 +31,18 @@ import net.minecraft.client.gui.screens.inventory.tooltip.TooltipRenderUtil; import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.metadata.gui.GuiSpriteScaling; import net.minecraft.client.resources.metadata.gui.GuiSpriteScaling.NineSlice.Border; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.component.DataComponents; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.Style; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.ItemTags; import net.minecraft.util.ARGB; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; @@ -61,18 +62,19 @@ public class GuiGraphics { private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE = 2; private final Minecraft minecraft; private final PoseStack pose; - private final MultiBufferSource.BufferSource bufferSource; + private final BufferSource bufferSource; private final GuiGraphics.ScissorStack scissorStack = new GuiGraphics.ScissorStack(); private final GuiSpriteManager sprites; + private final ItemStackRenderState scratchItemStackRenderState = new ItemStackRenderState(); - private GuiGraphics(Minecraft minecraft, PoseStack pose, MultiBufferSource.BufferSource bufferSource) { + private GuiGraphics(Minecraft minecraft, PoseStack pose, BufferSource bufferSource) { this.minecraft = minecraft; this.pose = pose; this.bufferSource = bufferSource; this.sprites = minecraft.getGuiSprites(); } - public GuiGraphics(Minecraft minecraft, MultiBufferSource.BufferSource bufferSource) { + public GuiGraphics(Minecraft minecraft, BufferSource bufferSource) { this(minecraft, new PoseStack(), bufferSource); } @@ -175,7 +177,8 @@ public class GuiGraphics { * @param maxY the maximum y-coordinate of the scissor region. */ public void enableScissor(int minX, int minY, int maxX, int maxY) { - this.applyScissor(this.scissorStack.push(new ScreenRectangle(minX, minY, maxX - minX, maxY - minY))); + ScreenRectangle screenRectangle = new ScreenRectangle(minX, minY, maxX - minX, maxY - minY).transformAxisAligned(this.pose.last().pose()); + this.applyScissor(this.scissorStack.push(screenRectangle)); } /** @@ -430,7 +433,7 @@ public class GuiGraphics { public int drawString(Font font, @Nullable String text, int x, int y, int color, boolean dropShadow) { return text == null ? 0 - : font.drawInBatch(text, (float)x, (float)y, color, dropShadow, this.pose.last().pose(), this.bufferSource, Font.DisplayMode.NORMAL, 0, 15728880); + : font.drawInBatch(text, (float)x, (float)y, color, dropShadow, this.pose.last().pose(), this.bufferSource, DisplayMode.NORMAL, 0, 15728880); } /** @@ -461,7 +464,7 @@ public class GuiGraphics { * @param dropShadow whether to apply a drop shadow to the string. */ public int drawString(Font font, FormattedCharSequence text, int x, int y, int color, boolean dropShadow) { - return font.drawInBatch(text, (float)x, (float)y, color, dropShadow, this.pose.last().pose(), this.bufferSource, Font.DisplayMode.NORMAL, 0, 15728880); + return font.drawInBatch(text, (float)x, (float)y, color, dropShadow, this.pose.last().pose(), this.bufferSource, DisplayMode.NORMAL, 0, 15728880); } /** @@ -506,8 +509,12 @@ public class GuiGraphics { * @param color the color of the text. */ public void drawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color) { + this.drawWordWrap(font, text, x, y, lineWidth, color, true); + } + + public void drawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color, boolean dropShadow) { for (FormattedCharSequence formattedCharSequence : font.split(text, lineWidth)) { - this.drawString(font, formattedCharSequence, x, y, color, false); + this.drawString(font, formattedCharSequence, x, y, color, dropShadow); y += 9; } } @@ -538,309 +545,384 @@ public class GuiGraphics { this.fill(x + width - 1, y + 1, x + width, y + height - 1, color); } - public void blitSprite(Function function, ResourceLocation resourceLocation, int i, int j, int k, int l) { - this.blitSprite(function, resourceLocation, i, j, k, l, -1); + public void blitSprite(Function renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height) { + this.blitSprite(renderTypeGetter, sprite, x, y, width, height, -1); } - public void blitSprite(Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, int m) { - TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(resourceLocation); + public void blitSprite(Function renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height, int blitOffset) { + TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(sprite); GuiSpriteScaling guiSpriteScaling = this.sprites.getSpriteScaling(textureAtlasSprite); if (guiSpriteScaling instanceof GuiSpriteScaling.Stretch) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, m); + this.blitSprite(renderTypeGetter, textureAtlasSprite, x, y, width, height, blitOffset); } else if (guiSpriteScaling instanceof GuiSpriteScaling.Tile tile) { - this.blitTiledSprite(function, textureAtlasSprite, i, j, k, l, 0, 0, tile.width(), tile.height(), tile.width(), tile.height(), m); + this.blitTiledSprite(renderTypeGetter, textureAtlasSprite, x, y, width, height, 0, 0, tile.width(), tile.height(), tile.width(), tile.height(), blitOffset); } else if (guiSpriteScaling instanceof GuiSpriteScaling.NineSlice nineSlice) { - this.blitNineSlicedSprite(function, textureAtlasSprite, nineSlice, i, j, k, l, m); + this.blitNineSlicedSprite(renderTypeGetter, textureAtlasSprite, nineSlice, x, y, width, height, blitOffset); } } public void blitSprite( - Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, int m, int n, int o, int p + Function renderTypeGetter, + ResourceLocation sprite, + int textureWidth, + int textureHeight, + int uPosition, + int vPosition, + int x, + int y, + int uWidth, + int vHeight ) { - TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(resourceLocation); + TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(sprite); GuiSpriteScaling guiSpriteScaling = this.sprites.getSpriteScaling(textureAtlasSprite); if (guiSpriteScaling instanceof GuiSpriteScaling.Stretch) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, m, n, o, p, -1); + this.blitSprite(renderTypeGetter, textureAtlasSprite, textureWidth, textureHeight, uPosition, vPosition, x, y, uWidth, vHeight, -1); } else { - this.blitSprite(function, textureAtlasSprite, m, n, o, p); + this.enableScissor(x, y, x + uWidth, y + vHeight); + this.blitSprite(renderTypeGetter, sprite, x - uPosition, y - vPosition, textureWidth, textureHeight, -1); + this.disableScissor(); } } - public void blitSprite(Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, -1); + public void blitSprite(Function renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height) { + this.blitSprite(renderTypeGetter, sprite, x, y, width, height, -1); } - public void blitSprite(Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l, int m) { - if (k != 0 && l != 0) { + public void blitSprite(Function renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height, int blitOffset) { + if (width != 0 && height != 0) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - i, - i + k, - j, - j + l, - textureAtlasSprite.getU0(), - textureAtlasSprite.getU1(), - textureAtlasSprite.getV0(), - textureAtlasSprite.getV1(), - m + renderTypeGetter, sprite.atlasLocation(), x, x + width, y, y + height, sprite.getU0(), sprite.getU1(), sprite.getV0(), sprite.getV1(), blitOffset ); } } private void blitSprite( - Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l, int m, int n, int o, int p, int q + Function renderTypeGetter, + TextureAtlasSprite sprite, + int textureWidth, + int textureHeight, + int uPosition, + int vPosition, + int x, + int y, + int uWidth, + int vHeight, + int blitOffset ) { - if (o != 0 && p != 0) { + if (uWidth != 0 && vHeight != 0) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - m, - m + o, - n, - n + p, - textureAtlasSprite.getU((float)k / i), - textureAtlasSprite.getU((float)(k + o) / i), - textureAtlasSprite.getV((float)l / j), - textureAtlasSprite.getV((float)(l + p) / j), - q + renderTypeGetter, + sprite.atlasLocation(), + x, + x + uWidth, + y, + y + vHeight, + sprite.getU((float)uPosition / textureWidth), + sprite.getU((float)(uPosition + uWidth) / textureWidth), + sprite.getV((float)vPosition / textureHeight), + sprite.getV((float)(vPosition + vHeight) / textureHeight), + blitOffset ); } } private void blitNineSlicedSprite( - Function function, - TextureAtlasSprite textureAtlasSprite, + Function renderTypeGetter, + TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, - int i, - int j, - int k, - int l, - int m + int x, + int y, + int blitOffset, + int width, + int height ) { Border border = nineSlice.border(); - int n = Math.min(border.left(), k / 2); - int o = Math.min(border.right(), k / 2); - int p = Math.min(border.top(), l / 2); - int q = Math.min(border.bottom(), l / 2); - if (k == nineSlice.width() && l == nineSlice.height()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, k, l, m); - } else if (l == nineSlice.height()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, n, l, m); + int i = Math.min(border.left(), blitOffset / 2); + int j = Math.min(border.right(), blitOffset / 2); + int k = Math.min(border.top(), width / 2); + int l = Math.min(border.bottom(), width / 2); + if (blitOffset == nineSlice.width() && width == nineSlice.height()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, blitOffset, width, height); + } else if (width == nineSlice.height()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, i, width, height); this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + n, - j, - k - o - n, - l, - n, - 0, - nineSlice.width() - o - n, - nineSlice.height(), - nineSlice.width(), - nineSlice.height(), - m - ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, 0, i + k - o, j, o, l, m); - } else if (k == nineSlice.width()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, k, p, m); - this.blitNineSliceInnerSegment( - function, - nineSlice, - textureAtlasSprite, + sprite, + x + i, + y, + blitOffset - j - i, + width, i, - j + p, - k, - l - q - p, 0, - p, - nineSlice.width(), - nineSlice.height() - q - p, + nineSlice.width() - j - i, + nineSlice.height(), nineSlice.width(), nineSlice.height(), - m + height ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - q, i, j + l - q, k, q, m); - } else { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, n, p, m); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - j, 0, x + blitOffset - j, y, j, width, height); + } else if (blitOffset == nineSlice.width()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, blitOffset, k, height); this.blitNineSliceInnerSegment( - function, nineSlice, textureAtlasSprite, i + n, j, k - o - n, p, n, 0, nineSlice.width() - o - n, p, nineSlice.width(), nineSlice.height(), m - ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, 0, i + k - o, j, o, p, m); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - q, i, j + l - q, n, q, m); - this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + n, - j + l - q, - k - o - n, - q, - n, - nineSlice.height() - q, - nineSlice.width() - o - n, - q, + sprite, + x, + y + k, + blitOffset, + width - l - k, + 0, + k, + nineSlice.width(), + nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), - m + height + ); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - l, x, y + width - l, blitOffset, l, height); + } else { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, i, k, height); + this.blitNineSliceInnerSegment( + renderTypeGetter, nineSlice, sprite, x + i, y, blitOffset - j - i, k, i, 0, nineSlice.width() - j - i, k, nineSlice.width(), nineSlice.height(), height + ); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - j, 0, x + blitOffset - j, y, j, k, height); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - l, x, y + width - l, i, l, height); + this.blitNineSliceInnerSegment( + renderTypeGetter, + nineSlice, + sprite, + x + i, + y + width - l, + blitOffset - j - i, + l, + i, + nineSlice.height() - l, + nineSlice.width() - j - i, + l, + nineSlice.width(), + nineSlice.height(), + height ); this.blitSprite( - function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, nineSlice.height() - q, i + k - o, j + l - q, o, q, m - ); - this.blitNineSliceInnerSegment( - function, nineSlice, textureAtlasSprite, i, j + p, n, l - q - p, 0, p, n, nineSlice.height() - q - p, nineSlice.width(), nineSlice.height(), m - ); - this.blitNineSliceInnerSegment( - function, - nineSlice, - textureAtlasSprite, - i + n, - j + p, - k - o - n, - l - q - p, - n, - p, - nineSlice.width() - o - n, - nineSlice.height() - q - p, + renderTypeGetter, + sprite, nineSlice.width(), nineSlice.height(), - m + nineSlice.width() - j, + nineSlice.height() - l, + x + blitOffset - j, + y + width - l, + j, + l, + height ); this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, sprite, x, y + k, i, width - l - k, 0, k, i, nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), height + ); + this.blitNineSliceInnerSegment( + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + k - o, - j + p, - n, - l - q - p, - nineSlice.width() - o, - p, - o, - nineSlice.height() - q - p, + sprite, + x + i, + y + k, + blitOffset - j - i, + width - l - k, + i, + k, + nineSlice.width() - j - i, + nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), - m + height + ); + this.blitNineSliceInnerSegment( + renderTypeGetter, + nineSlice, + sprite, + x + blitOffset - j, + y + k, + j, + width - l - k, + nineSlice.width() - j, + k, + j, + nineSlice.height() - l - k, + nineSlice.width(), + nineSlice.height(), + height ); } } private void blitNineSliceInnerSegment( - Function function, + Function renderTypeGetter, GuiSpriteScaling.NineSlice nineSlice, - TextureAtlasSprite textureAtlasSprite, - int i, - int j, - int k, - int l, - int m, - int n, - int o, - int p, - int q, - int r, - int s + TextureAtlasSprite sprite, + int x, + int y, + int width, + int height, + int uPosition, + int vPosition, + int spriteWidth, + int spriteHeight, + int nineSliceWidth, + int nineSliceHeight, + int blitOffset ) { - if (k > 0 && l > 0) { + if (width > 0 && height > 0) { if (nineSlice.stretchInner()) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - i, - i + k, - j, - j + l, - textureAtlasSprite.getU((float)m / q), - textureAtlasSprite.getU((float)(m + o) / q), - textureAtlasSprite.getV((float)n / r), - textureAtlasSprite.getV((float)(n + p) / r), - s + renderTypeGetter, + sprite.atlasLocation(), + x, + x + width, + y, + y + height, + sprite.getU((float)uPosition / nineSliceWidth), + sprite.getU((float)(uPosition + spriteWidth) / nineSliceWidth), + sprite.getV((float)vPosition / nineSliceHeight), + sprite.getV((float)(vPosition + spriteHeight) / nineSliceHeight), + blitOffset ); } else { - this.blitTiledSprite(function, textureAtlasSprite, i, j, k, l, m, n, o, p, q, r, s); + this.blitTiledSprite( + renderTypeGetter, sprite, x, y, width, height, uPosition, vPosition, spriteWidth, spriteHeight, nineSliceWidth, nineSliceHeight, blitOffset + ); } } } private void blitTiledSprite( - Function function, - TextureAtlasSprite textureAtlasSprite, - int i, - int j, - int k, - int l, - int m, - int n, - int o, - int p, - int q, - int r, - int s + Function renderTypeGetter, + TextureAtlasSprite sprite, + int x, + int y, + int width, + int height, + int uPosition, + int vPosition, + int spriteWidth, + int spriteHeight, + int nineSliceWidth, + int nineSliceHeight, + int blitOffset ) { - if (k > 0 && l > 0) { - if (o > 0 && p > 0) { - for (int t = 0; t < k; t += o) { - int u = Math.min(o, k - t); + if (width > 0 && height > 0) { + if (spriteWidth > 0 && spriteHeight > 0) { + for (int i = 0; i < width; i += spriteWidth) { + int j = Math.min(spriteWidth, width - i); - for (int v = 0; v < l; v += p) { - int w = Math.min(p, l - v); - this.blitSprite(function, textureAtlasSprite, q, r, m, n, i + t, j + v, u, w, s); + for (int k = 0; k < height; k += spriteHeight) { + int l = Math.min(spriteHeight, height - k); + this.blitSprite(renderTypeGetter, sprite, nineSliceWidth, nineSliceHeight, uPosition, vPosition, x + i, y + k, j, l, blitOffset); } } } else { - throw new IllegalArgumentException("Tiled sprite texture size must be positive, got " + o + "x" + p); + throw new IllegalArgumentException("Tiled sprite texture size must be positive, got " + spriteWidth + "x" + spriteHeight); } } } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n, int o + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int textureWidth, + int textureHeight, + int color ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, k, l, m, n, o); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, uWidth, vHeight, textureWidth, textureHeight, color); } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int textureWidth, + int textureHeight ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, k, l, m, n); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, uWidth, vHeight, textureWidth, textureHeight); } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n, int o, int p + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int width, + int height, + int textureWidth, + int textureHeight ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, m, n, o, p, -1); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, width, height, textureWidth, textureHeight, -1); } public void blit( - Function function, - ResourceLocation resourceLocation, - int i, - int j, - float f, - float g, - int k, - int l, - int m, - int n, - int o, - int p, - int q + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int width, + int height, + int textureWidth, + int textureHeight, + int color ) { - this.innerBlit(function, resourceLocation, i, i + k, j, j + l, (f + 0.0F) / o, (f + m) / o, (g + 0.0F) / p, (g + n) / p, q); + this.innerBlit( + renderTypeGetter, + atlasLocation, + x, + x + uWidth, + y, + y + vHeight, + (uOffset + 0.0F) / textureWidth, + (uOffset + width) / textureWidth, + (vOffset + 0.0F) / textureHeight, + (vOffset + height) / textureHeight, + color + ); } private void innerBlit( - Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, float f, float g, float h, float m, int n + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x1, + int x2, + int y1, + int y2, + float minU, + float maxU, + float minV, + float maxV, + int color ) { - RenderType renderType = (RenderType)function.apply(resourceLocation); + RenderType renderType = (RenderType)renderTypeGetter.apply(atlasLocation); Matrix4f matrix4f = this.pose.last().pose(); VertexConsumer vertexConsumer = this.bufferSource.getBuffer(renderType); - vertexConsumer.addVertex(matrix4f, (float)i, (float)k, 0.0F).setUv(f, h).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)i, (float)l, 0.0F).setUv(f, m).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)j, (float)l, 0.0F).setUv(g, m).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)j, (float)k, 0.0F).setUv(g, h).setColor(n); + vertexConsumer.addVertex(matrix4f, (float)x1, (float)y1, 0.0F).setUv(minU, minV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x1, (float)y2, 0.0F).setUv(minU, maxV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x2, (float)y2, 0.0F).setUv(maxU, maxV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x2, (float)y1, 0.0F).setUv(maxU, minV).setColor(color); } /** @@ -934,36 +1016,25 @@ public class GuiGraphics { */ private void renderItem(@Nullable LivingEntity entity, @Nullable Level level, ItemStack stack, int x, int y, int seed, int guiOffset) { if (!stack.isEmpty()) { - BakedModel bakedModel = this.minecraft.getItemRenderer().getModel(stack, level, entity, seed); + this.minecraft.getItemModelResolver().updateForTopItem(this.scratchItemStackRenderState, stack, ItemDisplayContext.GUI, level, entity, seed); this.pose.pushPose(); - this.pose.translate((float)(x + 8), (float)(y + 8), (float)(150 + (bakedModel.isGui3d() ? guiOffset : 0))); + this.pose.translate((float)(x + 8), (float)(y + 8), (float)(150 + guiOffset)); try { this.pose.scale(16.0F, -16.0F, 16.0F); - boolean bl = !bakedModel.usesBlockLight(); + boolean bl = !this.scratchItemStackRenderState.usesBlockLight(); if (bl) { this.flush(); Lighting.setupForFlatItems(); } - if (stack.is(ItemTags.BUNDLES)) { - this.minecraft - .getItemRenderer() - .renderBundleItem( - stack, ItemDisplayContext.GUI, false, this.pose, this.bufferSource, 15728880, OverlayTexture.NO_OVERLAY, bakedModel, level, entity, seed - ); - } else { - this.minecraft - .getItemRenderer() - .render(stack, ItemDisplayContext.GUI, false, this.pose, this.bufferSource, 15728880, OverlayTexture.NO_OVERLAY, bakedModel); - } - + this.scratchItemStackRenderState.render(this.pose, this.bufferSource, 15728880, OverlayTexture.NO_OVERLAY); this.flush(); if (bl) { Lighting.setupFor3DItems(); } - } catch (Throwable var12) { - CrashReport crashReport = CrashReport.forThrowable(var12, "Rendering item"); + } catch (Throwable var11) { + CrashReport crashReport = CrashReport.forThrowable(var11, "Rendering item"); CrashReportCategory crashReportCategory = crashReport.addCategory("Item being rendered"); crashReportCategory.setDetail("Item Type", (CrashReportDetail)(() -> String.valueOf(stack.getItem()))); crashReportCategory.setDetail("Item Components", (CrashReportDetail)(() -> String.valueOf(stack.getComponents()))); @@ -1031,13 +1102,15 @@ public class GuiGraphics { this.renderTooltip(font, tooltipLines, visualTooltipComponent, mouseX, mouseY, null); } - public void renderTooltip(Font font, List list, Optional optional, int i, int j, @Nullable ResourceLocation resourceLocation) { - List list2 = (List)list.stream() + public void renderTooltip( + Font font, List tooltipLines, Optional visualTooltipComponent, int mouseX, int mouseY, @Nullable ResourceLocation sprite + ) { + List list = (List)tooltipLines.stream() .map(Component::getVisualOrderText) .map(ClientTooltipComponent::create) .collect(Util.toMutableList()); - optional.ifPresent(tooltipComponent -> list2.add(list2.isEmpty() ? 0 : 1, ClientTooltipComponent.create(tooltipComponent))); - this.renderTooltipInternal(font, list2, i, j, DefaultTooltipPositioner.INSTANCE, resourceLocation); + visualTooltipComponent.ifPresent(tooltipComponent -> list.add(list.isEmpty() ? 0 : 1, ClientTooltipComponent.create(tooltipComponent))); + this.renderTooltipInternal(font, list, mouseX, mouseY, DefaultTooltipPositioner.INSTANCE, sprite); } /** @@ -1052,8 +1125,8 @@ public class GuiGraphics { this.renderTooltip(font, text, mouseX, mouseY, null); } - public void renderTooltip(Font font, Component component, int i, int j, @Nullable ResourceLocation resourceLocation) { - this.renderTooltip(font, List.of(component.getVisualOrderText()), i, j, resourceLocation); + public void renderTooltip(Font font, Component text, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { + this.renderTooltip(font, List.of(text.getVisualOrderText()), mouseX, mouseY, sprite); } /** @@ -1068,14 +1141,14 @@ public class GuiGraphics { this.renderComponentTooltip(font, tooltipLines, mouseX, mouseY, null); } - public void renderComponentTooltip(Font font, List list, int i, int j, @Nullable ResourceLocation resourceLocation) { + public void renderComponentTooltip(Font font, List tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { this.renderTooltipInternal( font, - list.stream().map(Component::getVisualOrderText).map(ClientTooltipComponent::create).toList(), - i, - j, + tooltipLines.stream().map(Component::getVisualOrderText).map(ClientTooltipComponent::create).toList(), + mouseX, + mouseY, DefaultTooltipPositioner.INSTANCE, - resourceLocation + sprite ); } @@ -1091,14 +1164,14 @@ public class GuiGraphics { this.renderTooltip(font, tooltipLines, mouseX, mouseY, null); } - public void renderTooltip(Font font, List list, int i, int j, @Nullable ResourceLocation resourceLocation) { + public void renderTooltip(Font font, List tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { this.renderTooltipInternal( font, - (List)list.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), - i, - j, + (List)tooltipLines.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), + mouseX, + mouseY, DefaultTooltipPositioner.INSTANCE, - resourceLocation + sprite ); } @@ -1123,78 +1196,78 @@ public class GuiGraphics { } private void renderTooltipInternal( - Font font, List list, int i, int j, ClientTooltipPositioner clientTooltipPositioner, @Nullable ResourceLocation resourceLocation + Font font, List tooltipLines, int mouseX, int mouseY, ClientTooltipPositioner tooltipPositioner, @Nullable ResourceLocation sprite ) { - if (!list.isEmpty()) { - int k = 0; - int l = list.size() == 1 ? -2 : 0; + if (!tooltipLines.isEmpty()) { + int i = 0; + int j = tooltipLines.size() == 1 ? -2 : 0; - for (ClientTooltipComponent clientTooltipComponent : list) { - int m = clientTooltipComponent.getWidth(font); - if (m > k) { - k = m; + for (ClientTooltipComponent clientTooltipComponent : tooltipLines) { + int k = clientTooltipComponent.getWidth(font); + if (k > i) { + i = k; } - l += clientTooltipComponent.getHeight(font); + j += clientTooltipComponent.getHeight(font); } - int n = k; - int o = l; - Vector2ic vector2ic = clientTooltipPositioner.positionTooltip(this.guiWidth(), this.guiHeight(), i, j, k, l); - int p = vector2ic.x(); - int q = vector2ic.y(); + int l = i; + int m = j; + Vector2ic vector2ic = tooltipPositioner.positionTooltip(this.guiWidth(), this.guiHeight(), mouseX, mouseY, i, j); + int n = vector2ic.x(); + int o = vector2ic.y(); this.pose.pushPose(); - int r = 400; - TooltipRenderUtil.renderTooltipBackground(this, p, q, k, l, 400, resourceLocation); + int p = 400; + TooltipRenderUtil.renderTooltipBackground(this, n, o, i, j, 400, sprite); this.pose.translate(0.0F, 0.0F, 400.0F); - int s = q; + int q = o; - for (int t = 0; t < list.size(); t++) { - ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)list.get(t); - clientTooltipComponent2.renderText(font, p, s, this.pose.last().pose(), this.bufferSource); - s += clientTooltipComponent2.getHeight(font) + (t == 0 ? 2 : 0); + for (int r = 0; r < tooltipLines.size(); r++) { + ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)tooltipLines.get(r); + clientTooltipComponent2.renderText(font, n, q, this.pose.last().pose(), this.bufferSource); + q += clientTooltipComponent2.getHeight(font) + (r == 0 ? 2 : 0); } - s = q; + q = o; - for (int t = 0; t < list.size(); t++) { - ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)list.get(t); - clientTooltipComponent2.renderImage(font, p, s, n, o, this); - s += clientTooltipComponent2.getHeight(font) + (t == 0 ? 2 : 0); + for (int r = 0; r < tooltipLines.size(); r++) { + ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)tooltipLines.get(r); + clientTooltipComponent2.renderImage(font, n, q, l, m, this); + q += clientTooltipComponent2.getHeight(font) + (r == 0 ? 2 : 0); } this.pose.popPose(); } } - private void renderItemBar(ItemStack itemStack, int i, int j) { - if (itemStack.isBarVisible()) { - int k = i + 2; - int l = j + 13; - this.fill(RenderType.gui(), k, l, k + 13, l + 2, 200, -16777216); - this.fill(RenderType.gui(), k, l, k + itemStack.getBarWidth(), l + 1, 200, ARGB.opaque(itemStack.getBarColor())); + private void renderItemBar(ItemStack stack, int x, int y) { + if (stack.isBarVisible()) { + int i = x + 2; + int j = y + 13; + this.fill(RenderType.gui(), i, j, i + 13, j + 2, 200, -16777216); + this.fill(RenderType.gui(), i, j, i + stack.getBarWidth(), j + 1, 200, ARGB.opaque(stack.getBarColor())); } } - private void renderItemCount(Font font, ItemStack itemStack, int i, int j, @Nullable String string) { - if (itemStack.getCount() != 1 || string != null) { - String string2 = string == null ? String.valueOf(itemStack.getCount()) : string; + private void renderItemCount(Font font, ItemStack stack, int x, int y, @Nullable String text) { + if (stack.getCount() != 1 || text != null) { + String string = text == null ? String.valueOf(stack.getCount()) : text; this.pose.pushPose(); this.pose.translate(0.0F, 0.0F, 200.0F); - this.drawString(font, string2, i + 19 - 2 - font.width(string2), j + 6 + 3, -1, true); + this.drawString(font, string, x + 19 - 2 - font.width(string), y + 6 + 3, -1, true); this.pose.popPose(); } } - private void renderItemCooldown(ItemStack itemStack, int i, int j) { + private void renderItemCooldown(ItemStack stack, int x, int y) { LocalPlayer localPlayer = this.minecraft.player; float f = localPlayer == null ? 0.0F - : localPlayer.getCooldowns().getCooldownPercent(itemStack, this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true)); + : localPlayer.getCooldowns().getCooldownPercent(stack, this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true)); if (f > 0.0F) { - int k = j + Mth.floor(16.0F * (1.0F - f)); - int l = k + Mth.ceil(16.0F * f); - this.fill(RenderType.gui(), i, k, i + 16, l, 200, Integer.MAX_VALUE); + int i = y + Mth.floor(16.0F * (1.0F - f)); + int j = i + Mth.ceil(16.0F * f); + this.fill(RenderType.gui(), x, i, x + 16, j, 200, Integer.MAX_VALUE); } } @@ -1208,28 +1281,26 @@ public class GuiGraphics { */ public void renderComponentHoverEffect(Font font, @Nullable Style style, int mouseX, int mouseY) { if (style != null && style.getHoverEvent() != null) { - HoverEvent hoverEvent = style.getHoverEvent(); - HoverEvent.ItemStackInfo itemStackInfo = hoverEvent.getValue(HoverEvent.Action.SHOW_ITEM); - if (itemStackInfo != null) { - this.renderTooltip(font, itemStackInfo.getItemStack(), mouseX, mouseY); - } else { - HoverEvent.EntityTooltipInfo entityTooltipInfo = hoverEvent.getValue(HoverEvent.Action.SHOW_ENTITY); - if (entityTooltipInfo != null) { + switch (style.getHoverEvent()) { + case HoverEvent.ShowItem(ItemStack var17): + this.renderTooltip(font, var17, mouseX, mouseY); + break; + case HoverEvent.ShowEntity(HoverEvent.EntityTooltipInfo var22): + HoverEvent.EntityTooltipInfo var18 = var22; if (this.minecraft.options.advancedItemTooltips) { - this.renderComponentTooltip(font, entityTooltipInfo.getTooltipLines(), mouseX, mouseY); + this.renderComponentTooltip(font, var18.getTooltipLines(), mouseX, mouseY); } - } else { - Component component = hoverEvent.getValue(HoverEvent.Action.SHOW_TEXT); - if (component != null) { - this.renderTooltip(font, font.split(component, Math.max(this.guiWidth() / 2, 200)), mouseX, mouseY); - } - } + break; + case HoverEvent.ShowText(Component var13): + this.renderTooltip(font, font.split(var13, Math.max(this.guiWidth() / 2, 200)), mouseX, mouseY); + break; + default: } } } - public void drawSpecial(Consumer consumer) { - consumer.accept(this.bufferSource); + public void drawSpecial(Consumer drawer) { + drawer.accept(this.bufferSource); this.bufferSource.endBatch(); } diff --git a/net/minecraft/client/gui/GuiSpriteManager.java b/net/minecraft/client/gui/GuiSpriteManager.java index a761bfd8..965f11e9 100644 --- a/net/minecraft/client/gui/GuiSpriteManager.java +++ b/net/minecraft/client/gui/GuiSpriteManager.java @@ -9,15 +9,16 @@ import net.minecraft.client.resources.TextureAtlasHolder; import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; import net.minecraft.client.resources.metadata.gui.GuiMetadataSection; import net.minecraft.client.resources.metadata.gui.GuiSpriteScaling; +import net.minecraft.client.resources.model.AtlasIds; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; +import net.minecraft.server.packs.metadata.MetadataSectionType; @Environment(EnvType.CLIENT) public class GuiSpriteManager extends TextureAtlasHolder { - private static final Set> METADATA_SECTIONS = Set.of(AnimationMetadataSection.SERIALIZER, GuiMetadataSection.TYPE); + private static final Set> METADATA_SECTIONS = Set.of(AnimationMetadataSection.TYPE, GuiMetadataSection.TYPE); public GuiSpriteManager(TextureManager textureManager) { - super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/gui.png"), ResourceLocation.withDefaultNamespace("gui"), METADATA_SECTIONS); + super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/gui.png"), AtlasIds.GUI, METADATA_SECTIONS); } @Override diff --git a/net/minecraft/client/gui/ItemSlotMouseAction.java b/net/minecraft/client/gui/ItemSlotMouseAction.java index 822e17d8..995eef94 100644 --- a/net/minecraft/client/gui/ItemSlotMouseAction.java +++ b/net/minecraft/client/gui/ItemSlotMouseAction.java @@ -10,7 +10,7 @@ import net.minecraft.world.item.ItemStack; public interface ItemSlotMouseAction { boolean matches(Slot slot); - boolean onMouseScrolled(double d, double e, int i, ItemStack itemStack); + boolean onMouseScrolled(double xOffset, double yOffset, int hoveredSlotIndex, ItemStack hoveredSlotItem); void onStopHovering(Slot slot); diff --git a/net/minecraft/client/gui/components/AbstractButton.java b/net/minecraft/client/gui/components/AbstractButton.java index 203661d8..e8ae1317 100644 --- a/net/minecraft/client/gui/components/AbstractButton.java +++ b/net/minecraft/client/gui/components/AbstractButton.java @@ -21,8 +21,8 @@ public abstract class AbstractButton extends AbstractWidget { ResourceLocation.withDefaultNamespace("widget/button_highlighted") ); - public AbstractButton(int x, int y, int width, int height, Component message) { - super(x, y, width, height, message); + public AbstractButton(int i, int j, int k, int l, Component component) { + super(i, j, k, l, component); } public abstract void onPress(); diff --git a/net/minecraft/client/gui/components/AbstractContainerWidget.java b/net/minecraft/client/gui/components/AbstractContainerWidget.java index 446d18a6..1b67817c 100644 --- a/net/minecraft/client/gui/components/AbstractContainerWidget.java +++ b/net/minecraft/client/gui/components/AbstractContainerWidget.java @@ -10,7 +10,7 @@ import net.minecraft.network.chat.Component; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public abstract class AbstractContainerWidget extends AbstractWidget implements ContainerEventHandler { +public abstract class AbstractContainerWidget extends AbstractScrollArea implements ContainerEventHandler { @Nullable private GuiEventListener focused; private boolean isDragging; @@ -56,16 +56,19 @@ public abstract class AbstractContainerWidget extends AbstractWidget implements @Override public boolean mouseClicked(double mouseX, double mouseY, int button) { - return ContainerEventHandler.super.mouseClicked(mouseX, mouseY, button); + boolean bl = this.updateScrolling(mouseX, mouseY, button); + return ContainerEventHandler.super.mouseClicked(mouseX, mouseY, button) || bl; } @Override public boolean mouseReleased(double mouseX, double mouseY, int button) { + super.mouseReleased(mouseX, mouseY, button); return ContainerEventHandler.super.mouseReleased(mouseX, mouseY, button); } @Override public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) { + super.mouseDragged(mouseX, mouseY, button, dragX, dragY); return ContainerEventHandler.super.mouseDragged(mouseX, mouseY, button, dragX, dragY); } diff --git a/net/minecraft/client/gui/components/AbstractScrollArea.java b/net/minecraft/client/gui/components/AbstractScrollArea.java new file mode 100644 index 00000000..6cb082d9 --- /dev/null +++ b/net/minecraft/client/gui/components/AbstractScrollArea.java @@ -0,0 +1,113 @@ +package net.minecraft.client.gui.components; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; + +@Environment(EnvType.CLIENT) +public abstract class AbstractScrollArea extends AbstractWidget { + public static final int SCROLLBAR_WIDTH = 6; + private double scrollAmount; + private static final ResourceLocation SCROLLER_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller"); + private static final ResourceLocation SCROLLER_BACKGROUND_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller_background"); + private boolean scrolling; + + public AbstractScrollArea(int i, int j, int k, int l, Component component) { + super(i, j, k, l, component); + } + + @Override + public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) { + if (!this.visible) { + return false; + } else { + this.setScrollAmount(this.scrollAmount() - scrollY * this.scrollRate()); + return true; + } + } + + @Override + public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) { + if (this.scrolling) { + if (mouseY < this.getY()) { + this.setScrollAmount(0.0); + } else if (mouseY > this.getBottom()) { + this.setScrollAmount(this.maxScrollAmount()); + } else { + double d = Math.max(1, this.maxScrollAmount()); + int i = this.scrollerHeight(); + double e = Math.max(1.0, d / (this.height - i)); + this.setScrollAmount(this.scrollAmount() + dragY * e); + } + + return true; + } else { + return super.mouseDragged(mouseX, mouseY, button, dragX, dragY); + } + } + + @Override + public void onRelease(double mouseX, double mouseY) { + this.scrolling = false; + } + + public double scrollAmount() { + return this.scrollAmount; + } + + public void setScrollAmount(double scrollAmount) { + this.scrollAmount = Mth.clamp(scrollAmount, 0.0, (double)this.maxScrollAmount()); + } + + public boolean updateScrolling(double mouseX, double mouseY, int button) { + this.scrolling = this.scrollbarVisible() + && this.isValidClickButton(button) + && mouseX >= this.scrollBarX() + && mouseX <= this.scrollBarX() + 6 + && mouseY >= this.getY() + && mouseY < this.getBottom(); + return this.scrolling; + } + + public void refreshScrollAmount() { + this.setScrollAmount(this.scrollAmount); + } + + public int maxScrollAmount() { + return Math.max(0, this.contentHeight() - this.height); + } + + protected boolean scrollbarVisible() { + return this.maxScrollAmount() > 0; + } + + protected int scrollerHeight() { + return Mth.clamp((int)((float)(this.height * this.height) / this.contentHeight()), 32, this.height - 8); + } + + protected int scrollBarX() { + return this.getRight() - 6; + } + + protected int scrollBarY() { + return Math.max(this.getY(), (int)this.scrollAmount * (this.height - this.scrollerHeight()) / this.maxScrollAmount() + this.getY()); + } + + protected void renderScrollbar(GuiGraphics guiGraphics) { + if (this.scrollbarVisible()) { + int i = this.scrollBarX(); + int j = this.scrollerHeight(); + int k = this.scrollBarY(); + guiGraphics.blitSprite(RenderType::guiTextured, SCROLLER_BACKGROUND_SPRITE, i, this.getY(), 6, this.getHeight()); + guiGraphics.blitSprite(RenderType::guiTextured, SCROLLER_SPRITE, i, k, 6, j); + } + } + + protected abstract int contentHeight(); + + protected abstract double scrollRate(); +} diff --git a/net/minecraft/client/gui/components/AbstractScrollWidget.java b/net/minecraft/client/gui/components/AbstractScrollWidget.java deleted file mode 100644 index f8c22ce7..00000000 --- a/net/minecraft/client/gui/components/AbstractScrollWidget.java +++ /dev/null @@ -1,184 +0,0 @@ -package net.minecraft.client.gui.components; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.Mth; - -@Environment(EnvType.CLIENT) -public abstract class AbstractScrollWidget extends AbstractWidget { - private static final WidgetSprites BACKGROUND_SPRITES = new WidgetSprites( - ResourceLocation.withDefaultNamespace("widget/text_field"), ResourceLocation.withDefaultNamespace("widget/text_field_highlighted") - ); - private static final ResourceLocation SCROLLER_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller"); - private static final int INNER_PADDING = 4; - private static final int SCROLL_BAR_WIDTH = 8; - private double scrollAmount; - private boolean scrolling; - - public AbstractScrollWidget(int x, int y, int width, int height, Component message) { - super(x, y, width, height, message); - } - - @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - if (!this.visible) { - return false; - } else { - boolean bl = this.withinContentAreaPoint(mouseX, mouseY); - boolean bl2 = this.scrollbarVisible() - && mouseX >= this.getX() + this.width - && mouseX <= this.getX() + this.width + 8 - && mouseY >= this.getY() - && mouseY < this.getY() + this.height; - if (bl2 && button == 0) { - this.scrolling = true; - return true; - } else { - return bl || bl2; - } - } - } - - @Override - public boolean mouseReleased(double mouseX, double mouseY, int button) { - if (button == 0) { - this.scrolling = false; - } - - return super.mouseReleased(mouseX, mouseY, button); - } - - @Override - public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) { - if (this.visible && this.isFocused() && this.scrolling) { - if (mouseY < this.getY()) { - this.setScrollAmount(0.0); - } else if (mouseY > this.getY() + this.height) { - this.setScrollAmount(this.getMaxScrollAmount()); - } else { - int i = this.getScrollBarHeight(); - double d = Math.max(1, this.getMaxScrollAmount() / (this.height - i)); - this.setScrollAmount(this.scrollAmount + dragY * d); - } - - return true; - } else { - return false; - } - } - - @Override - public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) { - if (!this.visible) { - return false; - } else { - this.setScrollAmount(this.scrollAmount - scrollY * this.scrollRate()); - return true; - } - } - - @Override - public boolean keyPressed(int keyCode, int scanCode, int modifiers) { - boolean bl = keyCode == 265; - boolean bl2 = keyCode == 264; - if (bl || bl2) { - double d = this.scrollAmount; - this.setScrollAmount(this.scrollAmount + (bl ? -1 : 1) * this.scrollRate()); - if (d != this.scrollAmount) { - return true; - } - } - - return super.keyPressed(keyCode, scanCode, modifiers); - } - - @Override - public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { - if (this.visible) { - this.renderBackground(guiGraphics); - guiGraphics.enableScissor(this.getX() + 1, this.getY() + 1, this.getX() + this.width - 1, this.getY() + this.height - 1); - guiGraphics.pose().pushPose(); - guiGraphics.pose().translate(0.0, -this.scrollAmount, 0.0); - this.renderContents(guiGraphics, mouseX, mouseY, partialTick); - guiGraphics.pose().popPose(); - guiGraphics.disableScissor(); - this.renderDecorations(guiGraphics); - } - } - - private int getScrollBarHeight() { - return Mth.clamp((int)((float)(this.height * this.height) / this.getContentHeight()), 32, this.height); - } - - protected void renderDecorations(GuiGraphics guiGraphics) { - if (this.scrollbarVisible()) { - this.renderScrollBar(guiGraphics); - } - } - - protected int innerPadding() { - return 4; - } - - protected int totalInnerPadding() { - return this.innerPadding() * 2; - } - - protected double scrollAmount() { - return this.scrollAmount; - } - - protected void setScrollAmount(double scrollAmount) { - this.scrollAmount = Mth.clamp(scrollAmount, 0.0, (double)this.getMaxScrollAmount()); - } - - protected int getMaxScrollAmount() { - return Math.max(0, this.getContentHeight() - (this.height - 4)); - } - - private int getContentHeight() { - return this.getInnerHeight() + 4; - } - - protected void renderBackground(GuiGraphics guiGraphics) { - this.renderBorder(guiGraphics, this.getX(), this.getY(), this.getWidth(), this.getHeight()); - } - - protected void renderBorder(GuiGraphics guiGraphics, int x, int y, int width, int height) { - ResourceLocation resourceLocation = BACKGROUND_SPRITES.get(this.isActive(), this.isFocused()); - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, x, y, width, height); - } - - private void renderScrollBar(GuiGraphics guiGraphics) { - int i = this.getScrollBarHeight(); - int j = this.getX() + this.width; - int k = Math.max(this.getY(), (int)this.scrollAmount * (this.height - i) / this.getMaxScrollAmount() + this.getY()); - guiGraphics.blitSprite(RenderType::guiTextured, SCROLLER_SPRITE, j, k, 8, i); - } - - protected boolean withinContentAreaTopBottom(int top, int bottom) { - return bottom - this.scrollAmount >= this.getY() && top - this.scrollAmount <= this.getY() + this.height; - } - - protected boolean withinContentAreaPoint(double x, double y) { - return x >= this.getX() && x < this.getX() + this.width && y >= this.getY() && y < this.getY() + this.height; - } - - protected boolean scrollbarVisible() { - return this.getInnerHeight() > this.getHeight(); - } - - public int scrollbarWidth() { - return 8; - } - - protected abstract int getInnerHeight(); - - protected abstract double scrollRate(); - - protected abstract void renderContents(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick); -} diff --git a/net/minecraft/client/gui/components/AbstractSelectionList.java b/net/minecraft/client/gui/components/AbstractSelectionList.java index 9dc80c06..83f26b03 100644 --- a/net/minecraft/client/gui/components/AbstractSelectionList.java +++ b/net/minecraft/client/gui/components/AbstractSelectionList.java @@ -5,6 +5,7 @@ import java.util.AbstractList; import java.util.Collection; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.function.Predicate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -13,9 +14,9 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.events.ContainerEventHandler; import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; +import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.narration.NarratedElementType; import net.minecraft.client.gui.narration.NarrationElementOutput; -import net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority; import net.minecraft.client.gui.navigation.ScreenDirection; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.renderer.RenderType; @@ -27,19 +28,14 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public abstract class AbstractSelectionList> extends AbstractContainerWidget { - protected static final int SCROLLBAR_WIDTH = 6; - private static final ResourceLocation SCROLLER_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller"); - private static final ResourceLocation SCROLLER_BACKGROUND_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller_background"); private static final ResourceLocation MENU_LIST_BACKGROUND = ResourceLocation.withDefaultNamespace("textures/gui/menu_list_background.png"); private static final ResourceLocation INWORLD_MENU_LIST_BACKGROUND = ResourceLocation.withDefaultNamespace("textures/gui/inworld_menu_list_background.png"); protected final Minecraft minecraft; protected final int itemHeight; private final List children = new AbstractSelectionList.TrackedList(); protected boolean centerListVertically = true; - private double scrollAmount; private boolean renderHeader; protected int headerHeight; - private boolean scrolling; @Nullable private E selected; @Nullable @@ -51,12 +47,10 @@ public abstract class AbstractSelectionList= k && mouseX <= l && n >= 0 && m >= 0 && n < this.getItemCount() ? this.children().get(n) : null); } @@ -151,15 +142,12 @@ public abstract class AbstractSelectionList 0; - } - protected void renderListSeparators(GuiGraphics guiGraphics) { ResourceLocation resourceLocation = this.minecraft.level == null ? Screen.HEADER_SEPARATOR : Screen.INWORLD_HEADER_SEPARATOR; ResourceLocation resourceLocation2 = this.minecraft.level == null ? Screen.FOOTER_SEPARATOR : Screen.INWORLD_FOOTER_SEPARATOR; @@ -217,7 +189,7 @@ public abstract class AbstractSelectionList= this.getScrollbarPosition() && mouseX < this.getScrollbarPosition() + 6; - } - - protected int getScrollbarPosition() { - return this.getDefaultScrollbarPosition(); - } - - protected int getDefaultScrollbarPosition() { - return this.getRealRowRight() + this.getListOutlinePadding(); - } - - private int getListOutlinePadding() { - return 10; - } - - protected boolean isValidMouseClick(int button) { - return button == 0; + this.setScrollAmount(this.scrollAmount() + scroll); } @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - if (!this.isValidMouseClick(button)) { - return false; - } else { - this.updateScrollingState(mouseX, mouseY, button); - if (!this.isMouseOver(mouseX, mouseY)) { - return false; - } else { - E entry = this.getEntryAtPosition(mouseX, mouseY); - if (entry != null) { - if (entry.mouseClicked(mouseX, mouseY, button)) { - E entry2 = this.getFocused(); - if (entry2 != entry && entry2 instanceof ContainerEventHandler containerEventHandler) { - containerEventHandler.setFocused(null); - } - - this.setFocused(entry); - this.setDragging(true); - return true; - } - } else if (this.clickedHeader( - (int)(mouseX - (this.getX() + this.width / 2 - this.getRowWidth() / 2)), (int)(mouseY - this.getY()) + (int)this.getScrollAmount() - 4 - )) { - return true; - } - - return this.scrolling; - } - } + protected double scrollRate() { + return this.itemHeight / 2.0; } @Override - public boolean mouseReleased(double mouseX, double mouseY, int button) { - return this.getFocused() != null ? this.getFocused().mouseReleased(mouseX, mouseY, button) : false; + protected int scrollBarX() { + return this.getRowRight() + 6 + 2; } @Override - public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) { - if (super.mouseDragged(mouseX, mouseY, button, dragX, dragY)) { - return true; - } else if (button == 0 && this.scrolling) { - if (mouseY < this.getY()) { - this.setScrollAmount(0.0); - } else if (mouseY > this.getBottom()) { - this.setScrollAmount(this.getMaxScroll()); - } else { - double d = Math.max(1, this.getMaxScroll()); - int i = this.height; - int j = Mth.clamp((int)((float)(i * i) / this.getMaxPosition()), 32, i - 8); - double e = Math.max(1.0, d / (i - j)); - this.setScrollAmount(this.getScrollAmount() + dragY * e); - } - - return true; - } else { - return false; - } - } - - @Override - public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) { - this.setScrollAmount(this.getScrollAmount() - scrollY * this.itemHeight / 2.0); - return true; + public Optional getChildAt(double mouseX, double mouseY) { + return Optional.ofNullable(this.getEntryAtPosition(mouseX, mouseY)); } @Override public void setFocused(@Nullable GuiEventListener focused) { + E entry = this.getFocused(); + if (entry != focused && entry instanceof ContainerEventHandler containerEventHandler) { + containerEventHandler.setFocused(null); + } + super.setFocused(focused); int i = this.children.indexOf(focused); if (i >= 0) { - E entry = (E)this.children.get(i); - this.setSelected(entry); + E entry2 = (E)this.children.get(i); + this.setSelected(entry2); if (this.minecraft.getLastInputType().isKeyboard()) { - this.ensureVisible(entry); + this.ensureVisible(entry2); } } } @@ -405,11 +291,6 @@ public abstract class AbstractSelectionList= this.getY() && mouseY <= this.getBottom() && mouseX >= this.getX() && mouseX <= this.getRight(); - } - protected void renderListItems(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { int i = this.getRowLeft(); int j = this.getRowWidth(); @@ -447,20 +328,12 @@ public abstract class AbstractSelectionList= this.getX() && mouseY >= this.getY() && mouseX < this.getRight() + 6 && mouseY < this.getBottom(); + } + + @Override + protected int scrollBarX() { + return this.getRight(); + } + + @Override + protected int contentHeight() { + return this.getInnerHeight() + this.totalInnerPadding(); + } + + protected void renderBackground(GuiGraphics guiGraphics) { + this.renderBorder(guiGraphics, this.getX(), this.getY(), this.getWidth(), this.getHeight()); + } + + protected void renderBorder(GuiGraphics guiGraphics, int x, int y, int width, int height) { + ResourceLocation resourceLocation = BACKGROUND_SPRITES.get(this.isActive(), this.isFocused()); + guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, x, y, width, height); + } + + protected boolean withinContentAreaTopBottom(int top, int bottom) { + return bottom - this.scrollAmount() >= this.getY() && top - this.scrollAmount() <= this.getY() + this.height; + } + + protected abstract int getInnerHeight(); + + protected abstract void renderContents(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick); + + protected int getInnerLeft() { + return this.getX() + this.innerPadding(); + } + + protected int getInnerTop() { + return this.getY() + this.innerPadding(); + } + + @Override + public void playDownSound(SoundManager handler) { + } +} diff --git a/net/minecraft/client/gui/components/AbstractWidget.java b/net/minecraft/client/gui/components/AbstractWidget.java index c2279c55..1cca167b 100644 --- a/net/minecraft/client/gui/components/AbstractWidget.java +++ b/net/minecraft/client/gui/components/AbstractWidget.java @@ -14,7 +14,6 @@ import net.minecraft.client.gui.layouts.LayoutElement; import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.narration.NarratedElementType; import net.minecraft.client.gui.narration.NarrationElementOutput; -import net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority; import net.minecraft.client.gui.navigation.FocusNavigationEvent; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.resources.sounds.SimpleSoundInstance; @@ -133,7 +132,7 @@ public abstract class AbstractWidget implements Renderable, GuiEventListener, La public boolean mouseClicked(double mouseX, double mouseY, int button) { if (this.active && this.visible) { if (this.isValidClickButton(button)) { - boolean bl = this.clicked(mouseX, mouseY); + boolean bl = this.isMouseOver(mouseX, mouseY); if (bl) { this.playDownSound(Minecraft.getInstance().getSoundManager()); this.onClick(mouseX, mouseY); @@ -171,15 +170,6 @@ public abstract class AbstractWidget implements Renderable, GuiEventListener, La } } - protected boolean clicked(double mouseX, double mouseY) { - return this.active - && this.visible - && mouseX >= this.getX() - && mouseY >= this.getY() - && mouseX < this.getX() + this.getWidth() - && mouseY < this.getY() + this.getHeight(); - } - @Nullable @Override public ComponentPath nextFocusPath(FocusNavigationEvent event) { @@ -192,12 +182,7 @@ public abstract class AbstractWidget implements Renderable, GuiEventListener, La @Override public boolean isMouseOver(double mouseX, double mouseY) { - return this.active - && this.visible - && mouseX >= this.getX() - && mouseY >= this.getY() - && mouseX < this.getX() + this.width - && mouseY < this.getY() + this.height; + return this.active && this.visible && mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getRight() && mouseY < this.getBottom(); } public void playDownSound(SoundManager handler) { @@ -257,11 +242,11 @@ public abstract class AbstractWidget implements Renderable, GuiEventListener, La } @Override - public NarrationPriority narrationPriority() { + public NarratableEntry.NarrationPriority narrationPriority() { if (this.isFocused()) { - return NarrationPriority.FOCUSED; + return NarratableEntry.NarrationPriority.FOCUSED; } else { - return this.isHovered ? NarrationPriority.HOVERED : NarrationPriority.NONE; + return this.isHovered ? NarratableEntry.NarrationPriority.HOVERED : NarratableEntry.NarrationPriority.NONE; } } diff --git a/net/minecraft/client/gui/components/ChatComponent.java b/net/minecraft/client/gui/components/ChatComponent.java index ba08dedc..a2723ef3 100644 --- a/net/minecraft/client/gui/components/ChatComponent.java +++ b/net/minecraft/client/gui/components/ChatComponent.java @@ -13,12 +13,14 @@ import net.minecraft.client.GuiMessage; import net.minecraft.client.GuiMessageTag; import net.minecraft.client.Minecraft; import net.minecraft.client.GuiMessage.Line; +import net.minecraft.client.GuiMessageTag.Icon; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.ChatScreen; import net.minecraft.client.multiplayer.chat.ChatListener; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MessageSignature; import net.minecraft.network.chat.Style; +import net.minecraft.util.ARGB; import net.minecraft.util.ArrayListDeque; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; @@ -81,7 +83,7 @@ public class ChatComponent { guiGraphics.pose().translate(4.0F, 0.0F, 0.0F); int m = Mth.floor((l - 40) / f); int n = this.getMessageEndIndexAt(this.screenToChatX(mouseX), this.screenToChatY(mouseY)); - double d = this.minecraft.options.chatOpacity().get() * 0.9F + 0.1F; + double d = this.minecraft.options.chatOpacity().get() * 0.9 + 0.1; double e = this.minecraft.options.textBackgroundOpacity().get(); double g = this.minecraft.options.chatLineSpacing().get(); int o = this.getLineHeight(); @@ -116,7 +118,7 @@ public class ChatComponent { guiGraphics.pose().pushPose(); guiGraphics.pose().translate(0.0F, 0.0F, 50.0F); - guiGraphics.drawString(this.minecraft.font, line.content(), 0, y, 16777215 + (u << 24)); + guiGraphics.drawString(this.minecraft.font, line.content(), 0, y, ARGB.color(u, -1)); guiGraphics.pose().popPose(); } } @@ -156,7 +158,7 @@ public class ChatComponent { } } - private void drawTagIcon(GuiGraphics guiGraphics, int left, int bottom, GuiMessageTag.Icon tagIcon) { + private void drawTagIcon(GuiGraphics guiGraphics, int left, int bottom, Icon tagIcon) { int i = bottom - tagIcon.height - 1; tagIcon.draw(guiGraphics, left, i); } @@ -216,7 +218,7 @@ public class ChatComponent { private void addMessageToDisplayQueue(GuiMessage message) { int i = Mth.floor(this.getWidth() / this.getScale()); - GuiMessageTag.Icon icon = message.icon(); + Icon icon = message.icon(); if (icon != null) { i -= icon.width + 4 + 2; } @@ -397,7 +399,7 @@ public class ChatComponent { if (x < 0.0) { return true; } else { - GuiMessageTag.Icon icon = tag.icon(); + Icon icon = tag.icon(); if (icon == null) { return false; } else { diff --git a/net/minecraft/client/gui/components/CommandSuggestions.java b/net/minecraft/client/gui/components/CommandSuggestions.java index 22aa0818..568628a9 100644 --- a/net/minecraft/client/gui/components/CommandSuggestions.java +++ b/net/minecraft/client/gui/components/CommandSuggestions.java @@ -504,16 +504,8 @@ public class CommandSuggestions { } public boolean mouseScrolled(double delta) { - int i = (int)( - CommandSuggestions.this.minecraft.mouseHandler.xpos() - * CommandSuggestions.this.minecraft.getWindow().getGuiScaledWidth() - / CommandSuggestions.this.minecraft.getWindow().getScreenWidth() - ); - int j = (int)( - CommandSuggestions.this.minecraft.mouseHandler.ypos() - * CommandSuggestions.this.minecraft.getWindow().getGuiScaledHeight() - / CommandSuggestions.this.minecraft.getWindow().getScreenHeight() - ); + int i = (int)CommandSuggestions.this.minecraft.mouseHandler.getScaledXPos(CommandSuggestions.this.minecraft.getWindow()); + int j = (int)CommandSuggestions.this.minecraft.mouseHandler.getScaledYPos(CommandSuggestions.this.minecraft.getWindow()); if (this.rect.contains(i, j)) { this.offset = Mth.clamp((int)(this.offset - delta), 0, Math.max(this.suggestionList.size() - CommandSuggestions.this.suggestionLineLimit, 0)); return true; diff --git a/net/minecraft/client/gui/components/ContainerObjectSelectionList.java b/net/minecraft/client/gui/components/ContainerObjectSelectionList.java index 510ca089..556ef556 100644 --- a/net/minecraft/client/gui/components/ContainerObjectSelectionList.java +++ b/net/minecraft/client/gui/components/ContainerObjectSelectionList.java @@ -22,8 +22,12 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public abstract class ContainerObjectSelectionList> extends AbstractSelectionList { - public ContainerObjectSelectionList(Minecraft minecraft, int width, int height, int y, int itemHeight) { - super(minecraft, width, height, y, itemHeight); + public ContainerObjectSelectionList(Minecraft minecraft, int i, int j, int k, int l) { + super(minecraft, i, j, k, l); + } + + public ContainerObjectSelectionList(Minecraft minecraft, int i, int j, int k, int l, int m) { + super(minecraft, i, j, k, l, m); } @Nullable @@ -114,7 +118,9 @@ public abstract class ContainerObjectSelectionList> extends AbstractSelectionList.Entry implements ContainerEventHandler { + public abstract static class Entry> + extends net.minecraft.client.gui.components.AbstractSelectionList.Entry + implements ContainerEventHandler { @Nullable private GuiEventListener focused; @Nullable diff --git a/net/minecraft/client/gui/components/DebugScreenOverlay.java b/net/minecraft/client/gui/components/DebugScreenOverlay.java index 4db0cafe..ba4bc514 100644 --- a/net/minecraft/client/gui/components/DebugScreenOverlay.java +++ b/net/minecraft/client/gui/components/DebugScreenOverlay.java @@ -2,19 +2,35 @@ package net.minecraft.client.gui.components; import com.google.common.base.Strings; import com.google.common.collect.Lists; -import com.mojang.blaze3d.platform.GlUtil; +import com.google.common.collect.Maps; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.pipeline.RenderTarget; +import com.mojang.blaze3d.platform.GLX; +import com.mojang.blaze3d.systems.GpuDevice; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.vertex.BufferBuilder; +import com.mojang.blaze3d.vertex.ByteBufferBuilder; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.vertex.MeshData; +import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.datafixers.DataFixUtils; import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSets; import it.unimi.dsi.fastutil.objects.Object2IntMap; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; -import java.util.EnumMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.OptionalDouble; +import java.util.OptionalInt; import java.util.Map.Entry; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -35,6 +51,7 @@ import net.minecraft.client.gui.components.debugchart.PingDebugChart; import net.minecraft.client.gui.components.debugchart.ProfilerPieChart; import net.minecraft.client.gui.components.debugchart.TpsDebugChart; import net.minecraft.client.multiplayer.ClientPacketListener; +import net.minecraft.client.renderer.RenderPipelines; import net.minecraft.client.server.IntegratedServer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -63,7 +80,7 @@ import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.NaturalSpawner; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeSource; -import net.minecraft.world.level.biome.Climate; +import net.minecraft.world.level.biome.Climate.Sampler; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.chunk.ChunkGenerator; @@ -79,21 +96,33 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class DebugScreenOverlay { + private static final float CROSSHAIR_LENGTH = 10.0F; + private static final int CROSHAIR_INDEX_COUNT = 18; private static final int COLOR_GREY = 14737632; private static final int MARGIN_RIGHT = 2; private static final int MARGIN_LEFT = 2; private static final int MARGIN_TOP = 2; - private static final Map HEIGHTMAP_NAMES = Util.make(new EnumMap(Heightmap.Types.class), enumMap -> { - enumMap.put(Heightmap.Types.WORLD_SURFACE_WG, "SW"); - enumMap.put(Heightmap.Types.WORLD_SURFACE, "S"); - enumMap.put(Heightmap.Types.OCEAN_FLOOR_WG, "OW"); - enumMap.put(Heightmap.Types.OCEAN_FLOOR, "O"); - enumMap.put(Heightmap.Types.MOTION_BLOCKING, "M"); - enumMap.put(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, "ML"); - }); + private static final Map HEIGHTMAP_NAMES = Maps.newEnumMap( + Map.of( + Heightmap.Types.WORLD_SURFACE_WG, + "SW", + Heightmap.Types.WORLD_SURFACE, + "S", + Heightmap.Types.OCEAN_FLOOR_WG, + "OW", + Heightmap.Types.OCEAN_FLOOR, + "O", + Heightmap.Types.MOTION_BLOCKING, + "M", + Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, + "ML" + ) + ); private final Minecraft minecraft; private final DebugScreenOverlay.AllocationRateCalculator allocationRateCalculator; private final Font font; + private final GpuBuffer crosshairBuffer; + private final RenderSystem.AutoStorageIndexBuffer crosshairIndicies = RenderSystem.getSequentialBuffer(VertexFormat.Mode.LINES); private HitResult block; private HitResult liquid; @Nullable @@ -126,6 +155,21 @@ public class DebugScreenOverlay { this.pingChart = new PingDebugChart(this.font, this.pingLogger); this.bandwidthChart = new BandwidthDebugChart(this.font, this.bandwidthLogger); this.profilerPieChart = new ProfilerPieChart(this.font); + + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(DefaultVertexFormat.POSITION_COLOR_NORMAL.getVertexSize() * 12)) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.LINES, DefaultVertexFormat.POSITION_COLOR_NORMAL); + bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-65536).setNormal(1.0F, 0.0F, 0.0F); + bufferBuilder.addVertex(10.0F, 0.0F, 0.0F).setColor(-65536).setNormal(1.0F, 0.0F, 0.0F); + bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-16711936).setNormal(0.0F, 1.0F, 0.0F); + bufferBuilder.addVertex(0.0F, 10.0F, 0.0F).setColor(-16711936).setNormal(0.0F, 1.0F, 0.0F); + bufferBuilder.addVertex(0.0F, 0.0F, 0.0F).setColor(-8421377).setNormal(0.0F, 0.0F, 1.0F); + bufferBuilder.addVertex(0.0F, 0.0F, 10.0F).setColor(-8421377).setNormal(0.0F, 0.0F, 1.0F); + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + this.crosshairBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Crosshair vertex buffer", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); + } + } } public void clearChunkCache() { @@ -289,7 +333,7 @@ public class DebugScreenOverlay { } Level level = this.getLevel(); - LongSet longSet = (LongSet)(level instanceof ServerLevel ? ((ServerLevel)level).getForcedChunks() : LongSets.EMPTY_SET); + LongSet longSet = (LongSet)(level instanceof ServerLevel ? ((ServerLevel)level).getForceLoadedChunks() : LongSets.EMPTY_SET); List list = Lists.newArrayList( "Minecraft " + SharedConstants.getCurrentVersion().getName() @@ -414,7 +458,7 @@ public class DebugScreenOverlay { ChunkGenerator chunkGenerator = serverChunkCache.getGenerator(); RandomState randomState = serverChunkCache.randomState(); chunkGenerator.addDebugScreenInfo(list, randomState, blockPos); - Climate.Sampler sampler = randomState.sampler(); + Sampler sampler = randomState.sampler(); BiomeSource biomeSource = chunkGenerator.getBiomeSource(); biomeSource.addDebugInfo(list, blockPos, sampler); NaturalSpawner.SpawnState spawnState = serverChunkCache.getLastSpawnState(); @@ -499,19 +543,20 @@ public class DebugScreenOverlay { long m = Runtime.getRuntime().totalMemory(); long n = Runtime.getRuntime().freeMemory(); long o = m - n; + GpuDevice gpuDevice = RenderSystem.getDevice(); List list = Lists.newArrayList( String.format(Locale.ROOT, "Java: %s", System.getProperty("java.version")), String.format(Locale.ROOT, "Mem: %2d%% %03d/%03dMB", o * 100L / l, bytesToMegabytes(o), bytesToMegabytes(l)), String.format(Locale.ROOT, "Allocation rate: %03dMB/s", bytesToMegabytes(this.allocationRateCalculator.bytesAllocatedPerSecond(o))), String.format(Locale.ROOT, "Allocated: %2d%% %03dMB", m * 100L / l, bytesToMegabytes(m)), "", - String.format(Locale.ROOT, "CPU: %s", GlUtil.getCpuInfo()), + String.format(Locale.ROOT, "CPU: %s", GLX._getCpuInfo()), "", String.format( - Locale.ROOT, "Display: %dx%d (%s)", Minecraft.getInstance().getWindow().getWidth(), Minecraft.getInstance().getWindow().getHeight(), GlUtil.getVendor() + Locale.ROOT, "Display: %dx%d (%s)", Minecraft.getInstance().getWindow().getWidth(), Minecraft.getInstance().getWindow().getHeight(), gpuDevice.getVendor() ), - GlUtil.getRenderer(), - GlUtil.getOpenGLVersion() + gpuDevice.getRenderer(), + String.format(Locale.ROOT, "%s %s", gpuDevice.getBackendName(), gpuDevice.getVersion()) ); if (this.minecraft.showOnlyReducedInfo()) { return list; @@ -649,6 +694,30 @@ public class DebugScreenOverlay { this.bandwidthLogger.reset(); } + public void render3dCrosshair() { + RenderPipeline renderPipeline = RenderPipelines.LINES; + RenderSystem.setShaderColor(0.0F, 0.0F, 0.0F, 1.0F); + RenderTarget renderTarget = Minecraft.getInstance().getMainRenderTarget(); + GpuTexture gpuTexture = renderTarget.getColorTexture(); + GpuTexture gpuTexture2 = renderTarget.getDepthTexture(); + GpuBuffer gpuBuffer = this.crosshairIndicies.getBuffer(18); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(renderPipeline); + RenderSystem.setShaderColor(0.0F, 0.0F, 0.0F, 1.0F); + RenderSystem.lineWidth(4.0F); + renderPass.setVertexBuffer(0, this.crosshairBuffer); + renderPass.setIndexBuffer(gpuBuffer, this.crosshairIndicies.type()); + renderPass.drawIndexed(0, 18); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.lineWidth(2.0F); + renderPass.drawIndexed(0, 18); + RenderSystem.lineWidth(1.0F); + } + } + @Environment(EnvType.CLIENT) static class AllocationRateCalculator { private static final int UPDATE_INTERVAL_MS = 500; diff --git a/net/minecraft/client/gui/components/FittingMultiLineTextWidget.java b/net/minecraft/client/gui/components/FittingMultiLineTextWidget.java index 75f56634..848b62a0 100644 --- a/net/minecraft/client/gui/components/FittingMultiLineTextWidget.java +++ b/net/minecraft/client/gui/components/FittingMultiLineTextWidget.java @@ -9,7 +9,7 @@ import net.minecraft.client.gui.narration.NarrationElementOutput; import net.minecraft.network.chat.Component; @Environment(EnvType.CLIENT) -public class FittingMultiLineTextWidget extends AbstractScrollWidget { +public class FittingMultiLineTextWidget extends AbstractTextAreaWidget { private final Font font; private final MultiLineTextWidget multilineWidget; @@ -42,32 +42,7 @@ public class FittingMultiLineTextWidget extends AbstractScrollWidget { @Override protected void renderBackground(GuiGraphics guiGraphics) { - if (this.scrollbarVisible()) { - super.renderBackground(guiGraphics); - } else if (this.isFocused()) { - this.renderBorder( - guiGraphics, - this.getX() - this.innerPadding(), - this.getY() - this.innerPadding(), - this.getWidth() + this.totalInnerPadding(), - this.getHeight() + this.totalInnerPadding() - ); - } - } - - @Override - public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { - if (this.visible) { - if (!this.scrollbarVisible()) { - this.renderBackground(guiGraphics); - guiGraphics.pose().pushPose(); - guiGraphics.pose().translate((float)this.getX(), (float)this.getY(), 0.0F); - this.multilineWidget.render(guiGraphics, mouseX, mouseY, partialTick); - guiGraphics.pose().popPose(); - } else { - super.renderWidget(guiGraphics, mouseX, mouseY, partialTick); - } - } + super.renderBackground(guiGraphics); } public boolean showingScrollBar() { @@ -77,7 +52,7 @@ public class FittingMultiLineTextWidget extends AbstractScrollWidget { @Override protected void renderContents(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { guiGraphics.pose().pushPose(); - guiGraphics.pose().translate((float)(this.getX() + this.innerPadding()), (float)(this.getY() + this.innerPadding()), 0.0F); + guiGraphics.pose().translate((float)this.getInnerLeft(), (float)this.getInnerTop(), 0.0F); this.multilineWidget.render(guiGraphics, mouseX, mouseY, partialTick); guiGraphics.pose().popPose(); } @@ -86,4 +61,10 @@ public class FittingMultiLineTextWidget extends AbstractScrollWidget { protected void updateWidgetNarration(NarrationElementOutput narrationElementOutput) { narrationElementOutput.add(NarratedElementType.TITLE, this.getMessage()); } + + @Override + public void setMessage(Component message) { + super.setMessage(message); + this.multilineWidget.setMessage(message); + } } diff --git a/net/minecraft/client/gui/components/LoadingDotsWidget.java b/net/minecraft/client/gui/components/LoadingDotsWidget.java index 83863c78..34dc3893 100644 --- a/net/minecraft/client/gui/components/LoadingDotsWidget.java +++ b/net/minecraft/client/gui/components/LoadingDotsWidget.java @@ -27,9 +27,9 @@ public class LoadingDotsWidget extends AbstractWidget { int i = this.getX() + this.getWidth() / 2; int j = this.getY() + this.getHeight() / 2; Component component = this.getMessage(); - guiGraphics.drawString(this.font, component, i - this.font.width(component) / 2, j - 9, -1, false); + guiGraphics.drawString(this.font, component, i - this.font.width(component) / 2, j - 9, -1); String string = LoadingDotsText.get(Util.getMillis()); - guiGraphics.drawString(this.font, string, i - this.font.width(string) / 2, j + 9, -8355712, false); + guiGraphics.drawString(this.font, string, i - this.font.width(string) / 2, j + 9, -8355712); } @Override diff --git a/net/minecraft/client/gui/components/MultiLineEditBox.java b/net/minecraft/client/gui/components/MultiLineEditBox.java index 00a574a7..618ce39a 100644 --- a/net/minecraft/client/gui/components/MultiLineEditBox.java +++ b/net/minecraft/client/gui/components/MultiLineEditBox.java @@ -15,7 +15,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.util.StringUtil; @Environment(EnvType.CLIENT) -public class MultiLineEditBox extends AbstractScrollWidget { +public class MultiLineEditBox extends AbstractTextAreaWidget { private static final int CURSOR_INSERT_WIDTH = 1; private static final int CURSOR_INSERT_COLOR = -3092272; private static final String CURSOR_APPEND_CHARACTER = "_"; @@ -57,28 +57,16 @@ public class MultiLineEditBox extends AbstractScrollWidget { } @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - if (this.withinContentAreaPoint(mouseX, mouseY) && button == 0) { - this.textField.setSelecting(Screen.hasShiftDown()); - this.seekCursorScreen(mouseX, mouseY); - return true; - } else { - return super.mouseClicked(mouseX, mouseY, button); - } + public void onClick(double mouseX, double mouseY) { + this.textField.setSelecting(Screen.hasShiftDown()); + this.seekCursorScreen(mouseX, mouseY); } @Override - public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) { - if (super.mouseDragged(mouseX, mouseY, button, dragX, dragY)) { - return true; - } else if (this.withinContentAreaPoint(mouseX, mouseY) && button == 0) { - this.textField.setSelecting(true); - this.seekCursorScreen(mouseX, mouseY); - this.textField.setSelecting(Screen.hasShiftDown()); - return true; - } else { - return false; - } + protected void onDrag(double mouseX, double mouseY, double dragX, double dragY) { + this.textField.setSelecting(true); + this.seekCursorScreen(mouseX, mouseY); + this.textField.setSelecting(Screen.hasShiftDown()); } @Override @@ -100,29 +88,26 @@ public class MultiLineEditBox extends AbstractScrollWidget { protected void renderContents(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { String string = this.textField.value(); if (string.isEmpty() && !this.isFocused()) { - guiGraphics.drawWordWrap( - this.font, this.placeholder, this.getX() + this.innerPadding(), this.getY() + this.innerPadding(), this.width - this.totalInnerPadding(), -857677600 - ); + guiGraphics.drawWordWrap(this.font, this.placeholder, this.getInnerLeft(), this.getInnerTop(), this.width - this.totalInnerPadding(), -857677600); } else { int i = this.textField.cursor(); boolean bl = this.isFocused() && (Util.getMillis() - this.focusedTime) / 300L % 2L == 0L; boolean bl2 = i < string.length(); int j = 0; int k = 0; - int l = this.getY() + this.innerPadding(); + int l = this.getInnerTop(); for (StringView stringView : this.textField.iterateLines()) { boolean bl3 = this.withinContentAreaTopBottom(l, l + 9); if (bl && bl2 && i >= stringView.beginIndex() && i <= stringView.endIndex()) { if (bl3) { - j = guiGraphics.drawString(this.font, string.substring(stringView.beginIndex(), i), this.getX() + this.innerPadding(), l, -2039584) - 1; + j = guiGraphics.drawString(this.font, string.substring(stringView.beginIndex(), i), this.getInnerLeft(), l, -2039584) - 1; guiGraphics.fill(j, l - 1, j + 1, l + 1 + 9, -3092272); guiGraphics.drawString(this.font, string.substring(i, stringView.endIndex()), j, l, -2039584); } } else { if (bl3) { - j = guiGraphics.drawString(this.font, string.substring(stringView.beginIndex(), stringView.endIndex()), this.getX() + this.innerPadding(), l, -2039584) - - 1; + j = guiGraphics.drawString(this.font, string.substring(stringView.beginIndex(), stringView.endIndex()), this.getInnerLeft(), l, -2039584) - 1; } k = l; @@ -137,8 +122,8 @@ public class MultiLineEditBox extends AbstractScrollWidget { if (this.textField.hasSelection()) { StringView stringView2 = this.textField.getSelected(); - int m = this.getX() + this.innerPadding(); - l = this.getY() + this.innerPadding(); + int m = this.getInnerLeft(); + l = this.getInnerTop(); for (StringView stringView3 : this.textField.iterateLines()) { if (stringView2.beginIndex() > stringView3.endIndex()) { @@ -182,11 +167,6 @@ public class MultiLineEditBox extends AbstractScrollWidget { return 9 * this.textField.getLineCount(); } - @Override - protected boolean scrollbarVisible() { - return this.textField.getLineCount() > this.getDisplayableLineCount(); - } - @Override protected double scrollRate() { return 9.0 / 2.0; @@ -211,10 +191,6 @@ public class MultiLineEditBox extends AbstractScrollWidget { this.setScrollAmount(d); } - private double getDisplayableLineCount() { - return (this.height - this.totalInnerPadding()) / 9.0; - } - private void seekCursorScreen(double mouseX, double mouseY) { double d = mouseX - this.getX() - this.innerPadding(); double e = mouseY - this.getY() - this.innerPadding() + this.scrollAmount(); diff --git a/net/minecraft/client/gui/components/MultiLineTextWidget.java b/net/minecraft/client/gui/components/MultiLineTextWidget.java index 8f786950..0c313cd1 100644 --- a/net/minecraft/client/gui/components/MultiLineTextWidget.java +++ b/net/minecraft/client/gui/components/MultiLineTextWidget.java @@ -30,8 +30,8 @@ public class MultiLineTextWidget extends AbstractStringWidget { this.active = false; } - public MultiLineTextWidget setColor(int color) { - super.setColor(color); + public MultiLineTextWidget setColor(int i) { + super.setColor(i); return this; } diff --git a/net/minecraft/client/gui/components/ObjectSelectionList.java b/net/minecraft/client/gui/components/ObjectSelectionList.java index 242b058c..c4761885 100644 --- a/net/minecraft/client/gui/components/ObjectSelectionList.java +++ b/net/minecraft/client/gui/components/ObjectSelectionList.java @@ -20,6 +20,10 @@ public abstract class ObjectSelectionList super(minecraft, i, j, k, l); } + public ObjectSelectionList(Minecraft minecraft, int i, int j, int k, int l, int m) { + super(minecraft, i, j, k, l, m); + } + @Nullable @Override public ComponentPath nextFocusPath(FocusNavigationEvent event) { @@ -27,7 +31,12 @@ public abstract class ObjectSelectionList return null; } else if (this.isFocused() && event instanceof ArrowNavigation arrowNavigation) { E entry = this.nextEntry(arrowNavigation.direction()); - return entry != null ? ComponentPath.path(this, ComponentPath.leaf(entry)) : null; + if (entry != null) { + return ComponentPath.path(this, ComponentPath.leaf(entry)); + } else { + this.setSelected(null); + return null; + } } else if (!this.isFocused()) { E entry2 = this.getSelected(); if (entry2 == null) { diff --git a/net/minecraft/client/gui/components/PlayerFaceRenderer.java b/net/minecraft/client/gui/components/PlayerFaceRenderer.java index b034fc3c..2cd97c2c 100644 --- a/net/minecraft/client/gui/components/PlayerFaceRenderer.java +++ b/net/minecraft/client/gui/components/PlayerFaceRenderer.java @@ -24,22 +24,22 @@ public class PlayerFaceRenderer { draw(guiGraphics, skin, x, y, size, -1); } - public static void draw(GuiGraphics guiGraphics, PlayerSkin playerSkin, int i, int j, int k, int l) { - draw(guiGraphics, playerSkin.texture(), i, j, k, true, false, l); + public static void draw(GuiGraphics guiGraphics, PlayerSkin skin, int x, int y, int size, int color) { + draw(guiGraphics, skin.texture(), x, y, size, true, false, color); } - public static void draw(GuiGraphics guiGraphics, ResourceLocation resourceLocation, int i, int j, int k, boolean bl, boolean bl2, int l) { - int m = 8 + (bl2 ? 8 : 0); - int n = 8 * (bl2 ? -1 : 1); - guiGraphics.blit(RenderType::guiTextured, resourceLocation, i, j, 8.0F, m, k, k, 8, n, 64, 64, l); - if (bl) { - drawHat(guiGraphics, resourceLocation, i, j, k, bl2, l); + public static void draw(GuiGraphics guiGraphics, ResourceLocation skinTexture, int x, int y, int size, boolean drawHat, boolean upsideDown, int color) { + int i = 8 + (upsideDown ? 8 : 0); + int j = 8 * (upsideDown ? -1 : 1); + guiGraphics.blit(RenderType::guiTextured, skinTexture, x, y, 8.0F, i, size, size, 8, j, 64, 64, color); + if (drawHat) { + drawHat(guiGraphics, skinTexture, x, y, size, upsideDown, color); } } - private static void drawHat(GuiGraphics guiGraphics, ResourceLocation resourceLocation, int i, int j, int k, boolean bl, int l) { - int m = 8 + (bl ? 8 : 0); - int n = 8 * (bl ? -1 : 1); - guiGraphics.blit(RenderType::guiTextured, resourceLocation, i, j, 40.0F, m, k, k, 8, n, 64, 64, l); + private static void drawHat(GuiGraphics guiGraphics, ResourceLocation skinTexture, int x, int y, int size, boolean upsideDown, int color) { + int i = 8 + (upsideDown ? 8 : 0); + int j = 8 * (upsideDown ? -1 : 1); + guiGraphics.blit(RenderType::guiTextured, skinTexture, x, y, 40.0F, i, size, size, 8, j, 64, 64, color); } } diff --git a/net/minecraft/client/gui/components/PlayerTabOverlay.java b/net/minecraft/client/gui/components/PlayerTabOverlay.java index 2aa65532..a275b640 100644 --- a/net/minecraft/client/gui/components/PlayerTabOverlay.java +++ b/net/minecraft/client/gui/components/PlayerTabOverlay.java @@ -17,7 +17,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.multiplayer.PlayerInfo; -import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; @@ -28,14 +27,13 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.entity.player.PlayerModelPart; import net.minecraft.world.level.GameType; import net.minecraft.world.scores.Objective; import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.ReadOnlyScoreInfo; import net.minecraft.world.scores.ScoreHolder; import net.minecraft.world.scores.Scoreboard; -import net.minecraft.world.scores.criteria.ObjectiveCriteria; +import net.minecraft.world.scores.criteria.ObjectiveCriteria.RenderType; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -124,7 +122,7 @@ public class PlayerTabOverlay { l = readOnlyScoreInfo.value(); } - if (objective.getRenderType() != ObjectiveCriteria.RenderType.HEARTS) { + if (objective.getRenderType() != RenderType.HEARTS) { NumberFormat numberFormat = objective.numberFormatOrDefault(StyledFormat.PLAYER_LIST_DEFAULT); component2 = ReadOnlyScoreInfo.safeFormatValue(readOnlyScoreInfo, numberFormat); m = this.minecraft.font.width(component2); @@ -151,7 +149,7 @@ public class PlayerTabOverlay { boolean bl = this.minecraft.isLocalServer() || this.minecraft.getConnection().getConnection().isEncrypted(); int q; if (objective != null) { - if (objective.getRenderType() == ObjectiveCriteria.RenderType.HEARTS) { + if (objective.getRenderType() == RenderType.HEARTS) { q = 90; } else { q = k; @@ -210,8 +208,7 @@ public class PlayerTabOverlay { if (bl) { Player player = this.minecraft.level.getPlayerByUUID(gameProfile.getId()); boolean bl2 = player != null && LivingEntityRenderer.isEntityUpsideDown(player); - boolean bl3 = player != null && player.isModelPartShown(PlayerModelPart.HAT); - PlayerFaceRenderer.draw(guiGraphics, playerInfo2.getSkin().texture(), y, z, 8, bl3, bl2, -1); + PlayerFaceRenderer.draw(guiGraphics, playerInfo2.getSkin().texture(), y, z, 8, playerInfo2.showHat(), bl2, -1); y += 9; } @@ -258,14 +255,14 @@ public class PlayerTabOverlay { guiGraphics.pose().pushPose(); guiGraphics.pose().translate(0.0F, 0.0F, 100.0F); - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, x + width - 11, y, 10, 8); + guiGraphics.blitSprite(net.minecraft.client.renderer.RenderType::guiTextured, resourceLocation, x + width - 11, y, 10, 8); guiGraphics.pose().popPose(); } private void renderTablistScore( Objective objective, int y, PlayerTabOverlay.ScoreDisplayEntry displayEntry, int minX, int maxX, UUID playerUuid, GuiGraphics guiGraphics ) { - if (objective.getRenderType() == ObjectiveCriteria.RenderType.HEARTS) { + if (objective.getRenderType() == RenderType.HEARTS) { this.renderTablistHearts(y, minX, maxX, playerUuid, guiGraphics, displayEntry.score); } else if (displayEntry.formattedScore != null) { guiGraphics.drawString(this.minecraft.font, displayEntry.formattedScore, maxX - displayEntry.scoreWidth, y, 16777215); @@ -298,27 +295,31 @@ public class PlayerTabOverlay { ResourceLocation resourceLocation = bl ? HEART_CONTAINER_BLINKING_SPRITE : HEART_CONTAINER_SPRITE; for (int l = i; l < j; l++) { - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, minX + l * k, y, 9, 9); + guiGraphics.blitSprite(net.minecraft.client.renderer.RenderType::guiTextured, resourceLocation, minX + l * k, y, 9, 9); } for (int l = 0; l < i; l++) { - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, minX + l * k, y, 9, 9); + guiGraphics.blitSprite(net.minecraft.client.renderer.RenderType::guiTextured, resourceLocation, minX + l * k, y, 9, 9); if (bl) { if (l * 2 + 1 < healthState.displayedValue()) { - guiGraphics.blitSprite(RenderType::guiTextured, HEART_FULL_BLINKING_SPRITE, minX + l * k, y, 9, 9); + guiGraphics.blitSprite(net.minecraft.client.renderer.RenderType::guiTextured, HEART_FULL_BLINKING_SPRITE, minX + l * k, y, 9, 9); } if (l * 2 + 1 == healthState.displayedValue()) { - guiGraphics.blitSprite(RenderType::guiTextured, HEART_HALF_BLINKING_SPRITE, minX + l * k, y, 9, 9); + guiGraphics.blitSprite(net.minecraft.client.renderer.RenderType::guiTextured, HEART_HALF_BLINKING_SPRITE, minX + l * k, y, 9, 9); } } if (l * 2 + 1 < health) { - guiGraphics.blitSprite(RenderType::guiTextured, l >= 10 ? HEART_ABSORBING_FULL_BLINKING_SPRITE : HEART_FULL_SPRITE, minX + l * k, y, 9, 9); + guiGraphics.blitSprite( + net.minecraft.client.renderer.RenderType::guiTextured, l >= 10 ? HEART_ABSORBING_FULL_BLINKING_SPRITE : HEART_FULL_SPRITE, minX + l * k, y, 9, 9 + ); } if (l * 2 + 1 == health) { - guiGraphics.blitSprite(RenderType::guiTextured, l >= 10 ? HEART_ABSORBING_HALF_BLINKING_SPRITE : HEART_HALF_SPRITE, minX + l * k, y, 9, 9); + guiGraphics.blitSprite( + net.minecraft.client.renderer.RenderType::guiTextured, l >= 10 ? HEART_ABSORBING_HALF_BLINKING_SPRITE : HEART_HALF_SPRITE, minX + l * k, y, 9, 9 + ); } } } diff --git a/net/minecraft/client/gui/components/PopupScreen.java b/net/minecraft/client/gui/components/PopupScreen.java index 170a3449..b66cd9ef 100644 --- a/net/minecraft/client/gui/components/PopupScreen.java +++ b/net/minecraft/client/gui/components/PopupScreen.java @@ -101,7 +101,7 @@ public class PopupScreen extends Screen { public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { this.backgroundScreen.render(guiGraphics, -1, -1, partialTick); guiGraphics.flush(); - RenderSystem.clear(256); + RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(this.minecraft.getMainRenderTarget().getDepthTexture(), 1.0); this.renderTransparentBackground(guiGraphics); guiGraphics.blitSprite( RenderType::guiTextured, BACKGROUND_SPRITE, this.layout.getX() - 18, this.layout.getY() - 18, this.layout.getWidth() + 36, this.layout.getHeight() + 36 diff --git a/net/minecraft/client/gui/components/StringWidget.java b/net/minecraft/client/gui/components/StringWidget.java index 2797f676..b85db13c 100644 --- a/net/minecraft/client/gui/components/StringWidget.java +++ b/net/minecraft/client/gui/components/StringWidget.java @@ -22,13 +22,13 @@ public class StringWidget extends AbstractStringWidget { this(0, 0, width, height, message, font); } - public StringWidget(int x, int y, int width, int height, Component message, Font font) { - super(x, y, width, height, message, font); + public StringWidget(int i, int j, int k, int l, Component component, Font font) { + super(i, j, k, l, component, font); this.active = false; } - public StringWidget setColor(int color) { - super.setColor(color); + public StringWidget setColor(int i) { + super.setColor(i); return this; } diff --git a/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java b/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java index 10a487dc..6efa2d70 100644 --- a/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java +++ b/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java @@ -32,12 +32,12 @@ public class ProfilerPieChart { this.font = font; } - public void setPieChartResults(@Nullable ProfileResults profileResults) { - this.profilerPieChartResults = profileResults; + public void setPieChartResults(@Nullable ProfileResults pieChartResults) { + this.profilerPieChartResults = pieChartResults; } - public void setBottomOffset(int i) { - this.bottomOffset = i; + public void setBottomOffset(int bottomOffset) { + this.bottomOffset = bottomOffset; } public void render(GuiGraphics guiGraphics) { @@ -131,26 +131,26 @@ public class ProfilerPieChart { } } - public void profilerPieChartKeyPress(int i) { + public void profilerPieChartKeyPress(int index) { if (this.profilerPieChartResults != null) { List list = this.profilerPieChartResults.getTimes(this.profilerTreePath); if (!list.isEmpty()) { ResultField resultField = (ResultField)list.remove(0); - if (i == 0) { + if (index == 0) { if (!resultField.name.isEmpty()) { - int j = this.profilerTreePath.lastIndexOf(30); - if (j >= 0) { - this.profilerTreePath = this.profilerTreePath.substring(0, j); + int i = this.profilerTreePath.lastIndexOf(30); + if (i >= 0) { + this.profilerTreePath = this.profilerTreePath.substring(0, i); } } } else { - i--; - if (i < list.size() && !"unspecified".equals(((ResultField)list.get(i)).name)) { + index--; + if (index < list.size() && !"unspecified".equals(((ResultField)list.get(index)).name)) { if (!this.profilerTreePath.isEmpty()) { this.profilerTreePath = this.profilerTreePath + "\u001e"; } - this.profilerTreePath = this.profilerTreePath + ((ResultField)list.get(i)).name; + this.profilerTreePath = this.profilerTreePath + ((ResultField)list.get(index)).name; } } } diff --git a/net/minecraft/client/gui/components/events/ContainerEventHandler.java b/net/minecraft/client/gui/components/events/ContainerEventHandler.java index fcb8c066..b44e3c23 100644 --- a/net/minecraft/client/gui/components/events/ContainerEventHandler.java +++ b/net/minecraft/client/gui/components/events/ContainerEventHandler.java @@ -17,6 +17,8 @@ import net.minecraft.client.gui.navigation.ScreenAxis; import net.minecraft.client.gui.navigation.ScreenDirection; import net.minecraft.client.gui.navigation.ScreenPosition; import net.minecraft.client.gui.navigation.ScreenRectangle; +import net.minecraft.client.gui.navigation.FocusNavigationEvent.ArrowNavigation; +import net.minecraft.client.gui.navigation.FocusNavigationEvent.TabNavigation; import org.jetbrains.annotations.Nullable; import org.joml.Vector2i; @@ -42,18 +44,20 @@ public interface ContainerEventHandler extends GuiEventListener { @Override default boolean mouseClicked(double mouseX, double mouseY, int button) { - for (GuiEventListener guiEventListener : this.children()) { + Optional optional = this.getChildAt(mouseX, mouseY); + if (optional.isEmpty()) { + return false; + } else { + GuiEventListener guiEventListener = (GuiEventListener)optional.get(); if (guiEventListener.mouseClicked(mouseX, mouseY, button)) { this.setFocused(guiEventListener); if (button == 0) { this.setDragging(true); } - - return true; } - } - return false; + return true; + } } @Override @@ -65,7 +69,7 @@ public interface ContainerEventHandler extends GuiEventListener { } } - return this.getChildAt(mouseX, mouseY).filter(guiEventListener -> guiEventListener.mouseReleased(mouseX, mouseY, button)).isPresent(); + return false; } @Override @@ -145,10 +149,10 @@ public interface ContainerEventHandler extends GuiEventListener { } } - if (event instanceof FocusNavigationEvent.TabNavigation tabNavigation) { + if (event instanceof TabNavigation tabNavigation) { return this.handleTabNavigation(tabNavigation); } else { - return event instanceof FocusNavigationEvent.ArrowNavigation arrowNavigation ? this.handleArrowNavigation(arrowNavigation) : null; + return event instanceof ArrowNavigation arrowNavigation ? this.handleArrowNavigation(arrowNavigation) : null; } } @@ -160,7 +164,7 @@ public interface ContainerEventHandler extends GuiEventListener { * @param tabNavigation The tab navigation event. */ @Nullable - private ComponentPath handleTabNavigation(FocusNavigationEvent.TabNavigation tabNavigation) { + private ComponentPath handleTabNavigation(TabNavigation tabNavigation) { boolean bl = tabNavigation.forward(); GuiEventListener guiEventListener = this.getFocused(); List list = new ArrayList(this.children()); @@ -198,11 +202,11 @@ public interface ContainerEventHandler extends GuiEventListener { * @param arrowNavigation The arrow navigation event. */ @Nullable - private ComponentPath handleArrowNavigation(FocusNavigationEvent.ArrowNavigation arrowNavigation) { + private ComponentPath handleArrowNavigation(ArrowNavigation arrowNavigation) { GuiEventListener guiEventListener = this.getFocused(); if (guiEventListener == null) { ScreenDirection screenDirection = arrowNavigation.direction(); - ScreenRectangle screenRectangle = this.getRectangle().getBorder(screenDirection.getOpposite()); + ScreenRectangle screenRectangle = this.getBorderForArrowNavigation(screenDirection.getOpposite()); return ComponentPath.path(this, this.nextFocusPathInDirection(screenRectangle, screenDirection, null, arrowNavigation)); } else { ScreenRectangle screenRectangle2 = guiEventListener.getRectangle(); diff --git a/net/minecraft/client/gui/components/events/GuiEventListener.java b/net/minecraft/client/gui/components/events/GuiEventListener.java index b6c07bd8..f091c61c 100644 --- a/net/minecraft/client/gui/components/events/GuiEventListener.java +++ b/net/minecraft/client/gui/components/events/GuiEventListener.java @@ -5,6 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.gui.ComponentPath; import net.minecraft.client.gui.components.TabOrderedElement; import net.minecraft.client.gui.navigation.FocusNavigationEvent; +import net.minecraft.client.gui.navigation.ScreenDirection; import net.minecraft.client.gui.navigation.ScreenRectangle; import org.jetbrains.annotations.Nullable; @@ -159,4 +160,8 @@ public interface GuiEventListener extends TabOrderedElement { default ScreenRectangle getRectangle() { return ScreenRectangle.empty(); } + + default ScreenRectangle getBorderForArrowNavigation(ScreenDirection direction) { + return this.getRectangle().getBorder(direction); + } } diff --git a/net/minecraft/client/gui/components/tabs/TabNavigationBar.java b/net/minecraft/client/gui/components/tabs/TabNavigationBar.java index d5c0c29c..b13acb89 100644 --- a/net/minecraft/client/gui/components/tabs/TabNavigationBar.java +++ b/net/minecraft/client/gui/components/tabs/TabNavigationBar.java @@ -19,7 +19,6 @@ import net.minecraft.client.gui.layouts.LinearLayout; import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.narration.NarratedElementType; import net.minecraft.client.gui.narration.NarrationElementOutput; -import net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority; import net.minecraft.client.gui.navigation.FocusNavigationEvent; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.navigation.FocusNavigationEvent.TabNavigation; @@ -64,6 +63,14 @@ public class TabNavigationBar extends AbstractContainerEventHandler implements R this.width = width; } + @Override + public boolean isMouseOver(double mouseX, double mouseY) { + return mouseX >= this.layout.getX() + && mouseY >= this.layout.getY() + && mouseX < this.layout.getX() + this.layout.getWidth() + && mouseY < this.layout.getY() + this.layout.getHeight(); + } + @Override public void setFocused(boolean focused) { super.setFocused(focused); @@ -99,8 +106,12 @@ public class TabNavigationBar extends AbstractContainerEventHandler implements R } @Override - public NarrationPriority narrationPriority() { - return (NarrationPriority)this.tabButtons.stream().map(AbstractWidget::narrationPriority).max(Comparator.naturalOrder()).orElse(NarrationPriority.NONE); + public NarratableEntry.NarrationPriority narrationPriority() { + return (NarratableEntry.NarrationPriority)this.tabButtons + .stream() + .map(AbstractWidget::narrationPriority) + .max(Comparator.naturalOrder()) + .orElse(NarratableEntry.NarrationPriority.NONE); } @Override diff --git a/net/minecraft/client/gui/components/toasts/AdvancementToast.java b/net/minecraft/client/gui/components/toasts/AdvancementToast.java index f8b2ffd3..3ea149ad 100644 --- a/net/minecraft/client/gui/components/toasts/AdvancementToast.java +++ b/net/minecraft/client/gui/components/toasts/AdvancementToast.java @@ -1,6 +1,7 @@ package net.minecraft.client.gui.components.toasts; import java.util.List; +import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.advancements.AdvancementHolder; @@ -9,18 +10,18 @@ import net.minecraft.advancements.DisplayInfo; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.resources.sounds.SimpleSoundInstance; import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class AdvancementToast implements Toast { private static final ResourceLocation BACKGROUND_SPRITE = ResourceLocation.withDefaultNamespace("toast/advancement"); public static final int DISPLAY_TIME = 5000; private final AdvancementHolder advancement; - private boolean playedSound; private Toast.Visibility wantedVisibility = Toast.Visibility.HIDE; public AdvancementToast(AdvancementHolder advancement) { @@ -33,24 +34,28 @@ public class AdvancementToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { DisplayInfo displayInfo = (DisplayInfo)this.advancement.value().display().orElse(null); if (displayInfo == null) { this.wantedVisibility = Toast.Visibility.HIDE; } else { - if (!this.playedSound && l > 0L) { - this.playedSound = true; - if (displayInfo.getType() == AdvancementType.CHALLENGE) { - toastManager.getMinecraft().getSoundManager().play(SimpleSoundInstance.forUI(SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, 1.0F, 1.0F)); - } - } - - this.wantedVisibility = l >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; + this.wantedVisibility = visibilityTime >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; } } + @Nullable @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public SoundEvent getSoundEvent() { + return this.isChallengeAdvancement() ? SoundEvents.UI_TOAST_CHALLENGE_COMPLETE : null; + } + + private boolean isChallengeAdvancement() { + Optional optional = this.advancement.value().display(); + return optional.isPresent() && ((DisplayInfo)optional.get()).getType().equals(AdvancementType.CHALLENGE); + } + + @Override + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { DisplayInfo displayInfo = (DisplayInfo)this.advancement.value().display().orElse(null); guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); if (displayInfo != null) { @@ -62,16 +67,16 @@ public class AdvancementToast implements Toast { } else { int j = 1500; float f = 300.0F; - if (l < 1500L) { - int k = Mth.floor(Mth.clamp((float)(1500L - l) / 300.0F, 0.0F, 1.0F) * 255.0F) << 24 | 67108864; + if (visibilityTime < 1500L) { + int k = Mth.floor(Mth.clamp((float)(1500L - visibilityTime) / 300.0F, 0.0F, 1.0F) * 255.0F) << 24 | 67108864; guiGraphics.drawString(font, displayInfo.getType().getDisplayName(), 30, 11, i | k, false); } else { - int k = Mth.floor(Mth.clamp((float)(l - 1500L) / 300.0F, 0.0F, 1.0F) * 252.0F) << 24 | 67108864; - int m = this.height() / 2 - list.size() * 9 / 2; + int k = Mth.floor(Mth.clamp((float)(visibilityTime - 1500L) / 300.0F, 0.0F, 1.0F) * 252.0F) << 24 | 67108864; + int l = this.height() / 2 - list.size() * 9 / 2; for (FormattedCharSequence formattedCharSequence : list) { - guiGraphics.drawString(font, formattedCharSequence, 30, m, 16777215 | k, false); - m += 9; + guiGraphics.drawString(font, formattedCharSequence, 30, l, 16777215 | k, false); + l += 9; } } } diff --git a/net/minecraft/client/gui/components/toasts/RecipeToast.java b/net/minecraft/client/gui/components/toasts/RecipeToast.java index 3ea5f8d7..c8acddd4 100644 --- a/net/minecraft/client/gui/components/toasts/RecipeToast.java +++ b/net/minecraft/client/gui/components/toasts/RecipeToast.java @@ -35,25 +35,27 @@ public class RecipeToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.changed) { - this.lastChanged = l; + this.lastChanged = visibilityTime; this.changed = false; } if (this.recipeItems.isEmpty()) { this.wantedVisibility = Toast.Visibility.HIDE; } else { - this.wantedVisibility = l - this.lastChanged >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; + this.wantedVisibility = visibilityTime - this.lastChanged >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() + ? Toast.Visibility.HIDE + : Toast.Visibility.SHOW; } this.displayedRecipeIndex = (int)( - l / Math.max(1.0, 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() / this.recipeItems.size()) % this.recipeItems.size() + visibilityTime / Math.max(1.0, 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() / this.recipeItems.size()) % this.recipeItems.size() ); } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); guiGraphics.drawString(font, TITLE_TEXT, 30, 7, -11534256, false); guiGraphics.drawString(font, DESCRIPTION_TEXT, 30, 18, -16777216, false); @@ -65,8 +67,8 @@ public class RecipeToast implements Toast { guiGraphics.renderFakeItem(entry.unlockedItem(), 8, 8); } - private void addItem(ItemStack itemStack, ItemStack itemStack2) { - this.recipeItems.add(new RecipeToast.Entry(itemStack, itemStack2)); + private void addItem(ItemStack categoryItem, ItemStack unlockedItem) { + this.recipeItems.add(new RecipeToast.Entry(categoryItem, unlockedItem)); this.changed = true; } diff --git a/net/minecraft/client/gui/components/toasts/SystemToast.java b/net/minecraft/client/gui/components/toasts/SystemToast.java index c7f1cb6c..4b058a47 100644 --- a/net/minecraft/client/gui/components/toasts/SystemToast.java +++ b/net/minecraft/client/gui/components/toasts/SystemToast.java @@ -77,59 +77,31 @@ public class SystemToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.changed) { - this.lastChanged = l; + this.lastChanged = visibilityTime; this.changed = false; } double d = this.id.displayTime * toastManager.getNotificationDisplayTimeMultiplier(); - long m = l - this.lastChanged; - this.wantedVisibility = !this.forceHide && m < d ? Toast.Visibility.SHOW : Toast.Visibility.HIDE; + long l = visibilityTime - this.lastChanged; + this.wantedVisibility = !this.forceHide && l < d ? Toast.Visibility.SHOW : Toast.Visibility.HIDE; } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { - int i = this.width(); - if (i == 160 && this.messageLines.size() <= 1) { - guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, i, this.height()); - } else { - int j = this.height(); - int k = 28; - int m = Math.min(4, j - 28); - this.renderBackgroundRow(guiGraphics, i, 0, 0, 28); - - for (int n = 28; n < j - m; n += 10) { - this.renderBackgroundRow(guiGraphics, i, 16, n, Math.min(16, j - n - m)); - } - - this.renderBackgroundRow(guiGraphics, i, 32 - m, j - m, m); - } - + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { + guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); if (this.messageLines.isEmpty()) { guiGraphics.drawString(font, this.title, 18, 12, -256, false); } else { guiGraphics.drawString(font, this.title, 18, 7, -256, false); - for (int j = 0; j < this.messageLines.size(); j++) { - guiGraphics.drawString(font, (FormattedCharSequence)this.messageLines.get(j), 18, 18 + j * 12, -1, false); + for (int i = 0; i < this.messageLines.size(); i++) { + guiGraphics.drawString(font, (FormattedCharSequence)this.messageLines.get(i), 18, 18 + i * 12, -1, false); } } } - private void renderBackgroundRow(GuiGraphics guiGraphics, int width, int vOffset, int y, int height) { - int i = vOffset == 0 ? 20 : 5; - int j = Math.min(60, width - i); - ResourceLocation resourceLocation = BACKGROUND_SPRITE; - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, 160, 32, 0, vOffset, 0, y, i, height); - - for (int k = i; k < width - j; k += 64) { - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, 160, 32, 32, vOffset, k, y, Math.min(64, width - k - j), height); - } - - guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, 160, 32, 160 - j, vOffset, width - j, y, j, height); - } - public void reset(Component title, @Nullable Component message) { this.title = title; this.messageLines = nullToEmpty(message); @@ -140,21 +112,21 @@ public class SystemToast implements Toast { return this.id; } - public static void add(ToastManager toastManager, SystemToast.SystemToastId systemToastId, Component component, @Nullable Component component2) { - toastManager.addToast(new SystemToast(systemToastId, component, component2)); + public static void add(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) { + toastManager.addToast(new SystemToast(id, title, message)); } - public static void addOrUpdate(ToastManager toastManager, SystemToast.SystemToastId systemToastId, Component component, @Nullable Component component2) { - SystemToast systemToast = toastManager.getToast(SystemToast.class, systemToastId); + public static void addOrUpdate(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) { + SystemToast systemToast = toastManager.getToast(SystemToast.class, id); if (systemToast == null) { - add(toastManager, systemToastId, component, component2); + add(toastManager, id, title, message); } else { - systemToast.reset(component, component2); + systemToast.reset(title, message); } } - public static void forceHide(ToastManager toastManager, SystemToast.SystemToastId systemToastId) { - SystemToast systemToast = toastManager.getToast(SystemToast.class, systemToastId); + public static void forceHide(ToastManager toastManager, SystemToast.SystemToastId id) { + SystemToast systemToast = toastManager.getToast(SystemToast.class, id); if (systemToast != null) { systemToast.forceHide(); } diff --git a/net/minecraft/client/gui/components/toasts/Toast.java b/net/minecraft/client/gui/components/toasts/Toast.java index 63c3f7bf..645b4629 100644 --- a/net/minecraft/client/gui/components/toasts/Toast.java +++ b/net/minecraft/client/gui/components/toasts/Toast.java @@ -9,6 +9,7 @@ import net.minecraft.client.sounds.SoundManager; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.Mth; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public interface Toast { @@ -18,9 +19,14 @@ public interface Toast { Toast.Visibility getWantedVisibility(); - void update(ToastManager toastManager, long l); + void update(ToastManager toastManager, long visibilityTime); - void render(GuiGraphics guiGraphics, Font font, long l); + @Nullable + default SoundEvent getSoundEvent() { + return null; + } + + void render(GuiGraphics guiGraphics, Font font, long visibilityTime); default Object getToken() { return NO_TOKEN; diff --git a/net/minecraft/client/gui/components/toasts/ToastManager.java b/net/minecraft/client/gui/components/toasts/ToastManager.java index e501d72b..c04b96d1 100644 --- a/net/minecraft/client/gui/components/toasts/ToastManager.java +++ b/net/minecraft/client/gui/components/toasts/ToastManager.java @@ -4,13 +4,18 @@ import com.google.common.collect.Queues; import java.util.ArrayList; import java.util.BitSet; import java.util.Deque; +import java.util.HashSet; import java.util.List; +import java.util.Set; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.resources.sounds.SimpleSoundInstance; +import net.minecraft.sounds.SoundEvent; import net.minecraft.util.Mth; +import org.apache.commons.lang3.mutable.MutableBoolean; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -21,14 +26,22 @@ public class ToastManager { private final List> visibleToasts = new ArrayList(); private final BitSet occupiedSlots = new BitSet(5); private final Deque queued = Queues.newArrayDeque(); + private final Set playedToastSounds = new HashSet(); public ToastManager(Minecraft minecraft) { this.minecraft = minecraft; } public void update() { + MutableBoolean mutableBoolean = new MutableBoolean(false); this.visibleToasts.removeIf(toastInstance -> { + Toast.Visibility visibility = toastInstance.visibility; toastInstance.update(); + if (toastInstance.visibility != visibility && mutableBoolean.isFalse()) { + mutableBoolean.setTrue(); + toastInstance.visibility.playSound(this.minecraft.getSoundManager()); + } + if (toastInstance.hasFinishedRendering()) { this.occupiedSlots.clear(toastInstance.firstSlotIndex, toastInstance.firstSlotIndex + toastInstance.occupiedSlotCount); return true; @@ -45,10 +58,17 @@ public class ToastManager { } else { this.visibleToasts.add(new ToastManager.ToastInstance<>(toast, j, i)); this.occupiedSlots.set(j, j + i); + SoundEvent soundEvent = toast.getSoundEvent(); + if (soundEvent != null && this.playedToastSounds.add(soundEvent)) { + this.minecraft.getSoundManager().play(SimpleSoundInstance.forUI(soundEvent, 1.0F, 1.0F)); + } + return true; } }); } + + this.playedToastSounds.clear(); } public void render(GuiGraphics guiGraphics) { @@ -61,15 +81,15 @@ public class ToastManager { } } - private int findFreeSlotsIndex(int i) { - if (this.freeSlotCount() >= i) { - int j = 0; + private int findFreeSlotsIndex(int slots) { + if (this.freeSlotCount() >= slots) { + int i = 0; - for (int k = 0; k < 5; k++) { - if (this.occupiedSlots.get(k)) { - j = 0; - } else if (++j == i) { - return k + 1 - j; + for (int j = 0; j < 5; j++) { + if (this.occupiedSlots.get(j)) { + i = 0; + } else if (++i == slots) { + return j + 1 - i; } } } @@ -82,15 +102,15 @@ public class ToastManager { } @Nullable - public T getToast(Class class_, Object object) { + public T getToast(Class toastClass, Object token) { for (ToastManager.ToastInstance toastInstance : this.visibleToasts) { - if (toastInstance != null && class_.isAssignableFrom(toastInstance.getToast().getClass()) && toastInstance.getToast().getToken().equals(object)) { + if (toastInstance != null && toastClass.isAssignableFrom(toastInstance.getToast().getClass()) && toastInstance.getToast().getToken().equals(token)) { return (T)toastInstance.getToast(); } } for (Toast toast : this.queued) { - if (class_.isAssignableFrom(toast.getClass()) && toast.getToken().equals(object)) { + if (toastClass.isAssignableFrom(toast.getClass()) && toast.getToken().equals(token)) { return (T)toast; } } @@ -124,15 +144,15 @@ public class ToastManager { final int occupiedSlotCount; private long animationStartTime = -1L; private long becameFullyVisibleAt = -1L; - private Toast.Visibility visibility = Toast.Visibility.SHOW; + Toast.Visibility visibility = Toast.Visibility.HIDE; private long fullyVisibleFor; private float visiblePortion; private boolean hasFinishedRendering; - ToastInstance(final T toast, final int i, final int j) { + ToastInstance(final T toast, final int firstSlotIndex, final int occupiedSlotCount) { this.toast = toast; - this.firstSlotIndex = i; - this.occupiedSlotCount = j; + this.firstSlotIndex = firstSlotIndex; + this.occupiedSlotCount = occupiedSlotCount; } public T getToast() { @@ -143,8 +163,8 @@ public class ToastManager { return this.hasFinishedRendering; } - private void calculateVisiblePortion(long l) { - float f = Mth.clamp((float)(l - this.animationStartTime) / 600.0F, 0.0F, 1.0F); + private void calculateVisiblePortion(long visibilityTime) { + float f = Mth.clamp((float)(visibilityTime - this.animationStartTime) / 600.0F, 0.0F, 1.0F); f *= f; if (this.visibility == Toast.Visibility.HIDE) { this.visiblePortion = 1.0F - f; @@ -157,7 +177,7 @@ public class ToastManager { long l = Util.getMillis(); if (this.animationStartTime == -1L) { this.animationStartTime = l; - this.visibility.playSound(ToastManager.this.minecraft.getSoundManager()); + this.visibility = Toast.Visibility.SHOW; } if (this.visibility == Toast.Visibility.SHOW && l - this.animationStartTime <= 600L) { @@ -171,15 +191,14 @@ public class ToastManager { if (visibility != this.visibility) { this.animationStartTime = l - (int)((1.0F - this.visiblePortion) * 600.0F); this.visibility = visibility; - this.visibility.playSound(ToastManager.this.minecraft.getSoundManager()); } this.hasFinishedRendering = this.visibility == Toast.Visibility.HIDE && l - this.animationStartTime > 600L; } - public void render(GuiGraphics guiGraphics, int i) { + public void render(GuiGraphics guiGraphics, int guiWidth) { guiGraphics.pose().pushPose(); - guiGraphics.pose().translate(i - this.toast.width() * this.visiblePortion, (float)(this.firstSlotIndex * 32), 800.0F); + guiGraphics.pose().translate(guiWidth - this.toast.width() * this.visiblePortion, (float)(this.firstSlotIndex * 32), 800.0F); this.toast.render(guiGraphics, ToastManager.this.minecraft.font, this.fullyVisibleFor); guiGraphics.pose().popPose(); } diff --git a/net/minecraft/client/gui/components/toasts/TutorialToast.java b/net/minecraft/client/gui/components/toasts/TutorialToast.java index 7180ec23..1b66ed33 100644 --- a/net/minecraft/client/gui/components/toasts/TutorialToast.java +++ b/net/minecraft/client/gui/components/toasts/TutorialToast.java @@ -1,5 +1,7 @@ package net.minecraft.client.gui.components.toasts; +import java.util.ArrayList; +import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; @@ -7,6 +9,7 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.FormattedCharSequence; import net.minecraft.util.Mth; import org.jetbrains.annotations.Nullable; @@ -16,11 +19,14 @@ public class TutorialToast implements Toast { public static final int PROGRESS_BAR_WIDTH = 154; public static final int PROGRESS_BAR_HEIGHT = 1; public static final int PROGRESS_BAR_X = 3; - public static final int PROGRESS_BAR_Y = 28; + public static final int PROGRESS_BAR_MARGIN_BOTTOM = 4; + private static final int PADDING_TOP = 7; + private static final int PADDING_BOTTOM = 3; + private static final int LINE_SPACING = 11; + private static final int TEXT_LEFT = 30; + private static final int TEXT_WIDTH = 126; private final TutorialToast.Icons icon; - private final Component title; - @Nullable - private final Component message; + private final List lines; private Toast.Visibility visibility = Toast.Visibility.SHOW; private long lastSmoothingTime; private float smoothedProgress; @@ -28,16 +34,20 @@ public class TutorialToast implements Toast { private final boolean progressable; private final int timeToDisplayMs; - public TutorialToast(TutorialToast.Icons icons, Component component, @Nullable Component component2, boolean bl, int i) { - this.icon = icons; - this.title = component; - this.message = component2; - this.progressable = bl; - this.timeToDisplayMs = i; + public TutorialToast(Font font, TutorialToast.Icons icon, Component title, @Nullable Component message, boolean progressable, int timeToDisplayMs) { + this.icon = icon; + this.lines = new ArrayList(2); + this.lines.addAll(font.split(title.copy().withColor(-11534256), 126)); + if (message != null) { + this.lines.addAll(font.split(message, 126)); + } + + this.progressable = progressable; + this.timeToDisplayMs = timeToDisplayMs; } - public TutorialToast(TutorialToast.Icons icon, Component title, @Nullable Component message, boolean progressable) { - this(icon, title, message, progressable, 0); + public TutorialToast(Font font, TutorialToast.Icons icon, Component title, @Nullable Component message, boolean progressable) { + this(font, icon, title, message, progressable, 0); } @Override @@ -46,41 +56,52 @@ public class TutorialToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.timeToDisplayMs > 0) { - this.progress = Math.min((float)l / this.timeToDisplayMs, 1.0F); + this.progress = Math.min((float)visibilityTime / this.timeToDisplayMs, 1.0F); this.smoothedProgress = this.progress; - this.lastSmoothingTime = l; - if (l > this.timeToDisplayMs) { + this.lastSmoothingTime = visibilityTime; + if (visibilityTime > this.timeToDisplayMs) { this.hide(); } } else if (this.progressable) { - this.smoothedProgress = Mth.clampedLerp(this.smoothedProgress, this.progress, (float)(l - this.lastSmoothingTime) / 100.0F); - this.lastSmoothingTime = l; + this.smoothedProgress = Mth.clampedLerp(this.smoothedProgress, this.progress, (float)(visibilityTime - this.lastSmoothingTime) / 100.0F); + this.lastSmoothingTime = visibilityTime; } } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { - guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); + public int height() { + return 7 + this.contentHeight() + 3; + } + + private int contentHeight() { + return Math.max(this.lines.size(), 2) * 11; + } + + @Override + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { + int i = this.height(); + guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), i); this.icon.render(guiGraphics, 6, 6); - if (this.message == null) { - guiGraphics.drawString(font, this.title, 30, 12, -11534256, false); - } else { - guiGraphics.drawString(font, this.title, 30, 7, -11534256, false); - guiGraphics.drawString(font, this.message, 30, 18, -16777216, false); + int j = this.lines.size() * 11; + int k = 7 + (this.contentHeight() - j) / 2; + + for (int l = 0; l < this.lines.size(); l++) { + guiGraphics.drawString(font, (FormattedCharSequence)this.lines.get(l), 30, k + l * 11, -16777216, false); } if (this.progressable) { - guiGraphics.fill(3, 28, 157, 29, -1); - int i; + int l = i - 4; + guiGraphics.fill(3, l, 157, l + 1, -1); + int m; if (this.progress >= this.smoothedProgress) { - i = -16755456; + m = -16755456; } else { - i = -11206656; + m = -11206656; } - guiGraphics.fill(3, 28, (int)(3.0F + 154.0F * this.smoothedProgress), 29, i); + guiGraphics.fill(3, l, (int)(3.0F + 154.0F * this.smoothedProgress), l + 1, m); } } diff --git a/net/minecraft/client/gui/font/CodepointMap.java b/net/minecraft/client/gui/font/CodepointMap.java index cb8ccf05..5ab980ac 100644 --- a/net/minecraft/client/gui/font/CodepointMap.java +++ b/net/minecraft/client/gui/font/CodepointMap.java @@ -74,15 +74,15 @@ public class CodepointMap { } @Nullable - public T remove(int i) { - int j = i >> 8; - int k = i & 0xFF; - T[] objects = this.blockMap[j]; + public T remove(int index) { + int i = index >> 8; + int j = index & 0xFF; + T[] objects = this.blockMap[i]; if (objects == this.empty) { return null; } else { - T object = objects[k]; - objects[k] = null; + T object = objects[j]; + objects[j] = null; return object; } } diff --git a/net/minecraft/client/gui/font/FontSet.java b/net/minecraft/client/gui/font/FontSet.java index c5176947..073b8305 100644 --- a/net/minecraft/client/gui/font/FontSet.java +++ b/net/minecraft/client/gui/font/FontSet.java @@ -63,7 +63,7 @@ public class FontSet implements AutoCloseable { } private void resetTextures() { - this.closeTextures(); + this.textures.clear(); this.glyphs.clear(); this.glyphInfos.clear(); this.glyphsByWidth.clear(); @@ -99,14 +99,6 @@ public class FontSet implements AutoCloseable { } public void close() { - this.closeTextures(); - } - - private void closeTextures() { - for (FontTexture fontTexture : this.textures) { - fontTexture.close(); - } - this.textures.clear(); } @@ -172,7 +164,7 @@ public class FontSet implements AutoCloseable { GlyphRenderTypes glyphRenderTypes = bl ? GlyphRenderTypes.createForColorTexture(resourceLocation) : GlyphRenderTypes.createForIntensityTexture(resourceLocation); - FontTexture fontTexture2 = new FontTexture(glyphRenderTypes, bl); + FontTexture fontTexture2 = new FontTexture(resourceLocation::toString, glyphRenderTypes, bl); this.textures.add(fontTexture2); this.textureManager.register(resourceLocation, fontTexture2); BakedGlyph bakedGlyph2 = fontTexture2.add(glyphInfo); diff --git a/net/minecraft/client/gui/font/FontTexture.java b/net/minecraft/client/gui/font/FontTexture.java index 8bc67e3b..de311a5b 100644 --- a/net/minecraft/client/gui/font/FontTexture.java +++ b/net/minecraft/client/gui/font/FontTexture.java @@ -1,16 +1,18 @@ package net.minecraft.client.gui.font; import com.mojang.blaze3d.font.SheetGlyphInfo; -import com.mojang.blaze3d.platform.NativeImage; import com.mojang.blaze3d.platform.TextureUtil; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.TextureFormat; import java.nio.file.Path; +import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.font.glyphs.BakedGlyph; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.client.renderer.texture.Dumpable; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -20,31 +22,22 @@ public class FontTexture extends AbstractTexture implements Dumpable { private final boolean colored; private final FontTexture.Node root; - public FontTexture(GlyphRenderTypes renderTypes, boolean colored) { + public FontTexture(Supplier label, GlyphRenderTypes renderTypes, boolean colored) { this.colored = colored; this.root = new FontTexture.Node(0, 0, 256, 256); - TextureUtil.prepareImage(colored ? NativeImage.InternalGlFormat.RGBA : NativeImage.InternalGlFormat.RED, this.getId(), 256, 256); + this.texture = RenderSystem.getDevice().createTexture(label, colored ? TextureFormat.RGBA8 : TextureFormat.RED8, 256, 256, 1); + this.texture.setTextureFilter(FilterMode.NEAREST, false); this.renderTypes = renderTypes; } - @Override - public void load(ResourceManager resourceManager) { - } - - @Override - public void close() { - this.releaseId(); - } - @Nullable public BakedGlyph add(SheetGlyphInfo glyphInfo) { if (glyphInfo.isColored() != this.colored) { return null; } else { FontTexture.Node node = this.root.insert(glyphInfo); - if (node != null) { - this.bind(); - glyphInfo.upload(node.x, node.y); + if (node != null && this.texture != null) { + glyphInfo.upload(node.x, node.y, this.texture); float f = 256.0F; float g = 256.0F; float h = 0.01F; @@ -67,8 +60,10 @@ public class FontTexture extends AbstractTexture implements Dumpable { @Override public void dumpContents(ResourceLocation resourceLocation, Path path) { - String string = resourceLocation.toDebugFileName(); - TextureUtil.writeAsPNG(path, string, this.getId(), 0, 256, 256, i -> (i & 0xFF000000) == 0 ? -16777216 : i); + if (this.texture != null) { + String string = resourceLocation.toDebugFileName(); + TextureUtil.writeAsPNG(path, string, this.texture, 0, i -> (i & 0xFF000000) == 0 ? -16777216 : i); + } } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/gui/font/glyphs/BakedGlyph.java b/net/minecraft/client/gui/font/glyphs/BakedGlyph.java index 14db93c2..19070f74 100644 --- a/net/minecraft/client/gui/font/glyphs/BakedGlyph.java +++ b/net/minecraft/client/gui/font/glyphs/BakedGlyph.java @@ -11,6 +11,7 @@ import org.joml.Matrix4f; @Environment(EnvType.CLIENT) public class BakedGlyph { + public static final float Z_FIGHTER = 0.001F; private final GlyphRenderTypes renderTypes; private final float u0; private final float u1; @@ -33,36 +34,77 @@ public class BakedGlyph { this.down = down; } - public void renderChar(BakedGlyph.GlyphInstance glyphInstance, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i) { - Style style = glyphInstance.style(); + public void renderChar(BakedGlyph.GlyphInstance glyph, Matrix4f pose, VertexConsumer buffer, int packedLight) { + Style style = glyph.style(); boolean bl = style.isItalic(); - float f = glyphInstance.x(); - float g = glyphInstance.y(); - int j = glyphInstance.color(); - this.render(bl, f, g, matrix4f, vertexConsumer, j, i); - if (style.isBold()) { - this.render(bl, f + glyphInstance.boldOffset(), g, matrix4f, vertexConsumer, j, i); + float f = glyph.x(); + float g = glyph.y(); + int i = glyph.color(); + int j = glyph.shadowColor(); + boolean bl2 = style.isBold(); + if (glyph.hasShadow()) { + this.render(bl, f + glyph.shadowOffset(), g + glyph.shadowOffset(), pose, buffer, j, bl2, packedLight); + this.render(bl, f, g, 0.03F, pose, buffer, i, bl2, packedLight); + } else { + this.render(bl, f, g, pose, buffer, i, bl2, packedLight); + } + + if (bl2) { + if (glyph.hasShadow()) { + this.render(bl, f + glyph.boldOffset() + glyph.shadowOffset(), g + glyph.shadowOffset(), 0.001F, pose, buffer, j, true, packedLight); + this.render(bl, f + glyph.boldOffset(), g, 0.03F, pose, buffer, i, true, packedLight); + } else { + this.render(bl, f + glyph.boldOffset(), g, pose, buffer, i, true, packedLight); + } } } - private void render(boolean bl, float f, float g, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i, int j) { - float h = f + this.left; - float k = f + this.right; - float l = g + this.up; - float m = g + this.down; - float n = bl ? 1.0F - 0.25F * this.up : 0.0F; - float o = bl ? 1.0F - 0.25F * this.down : 0.0F; - vertexConsumer.addVertex(matrix4f, h + n, l, 0.0F).setColor(i).setUv(this.u0, this.v0).setLight(j); - vertexConsumer.addVertex(matrix4f, h + o, m, 0.0F).setColor(i).setUv(this.u0, this.v1).setLight(j); - vertexConsumer.addVertex(matrix4f, k + o, m, 0.0F).setColor(i).setUv(this.u1, this.v1).setLight(j); - vertexConsumer.addVertex(matrix4f, k + n, l, 0.0F).setColor(i).setUv(this.u1, this.v0).setLight(j); + private void render(boolean italic, float x, float y, Matrix4f pose, VertexConsumer buffer, int color, boolean bold, int packedLight) { + this.render(italic, x, y, 0.0F, pose, buffer, color, bold, packedLight); } - public void renderEffect(BakedGlyph.Effect effect, Matrix4f matrix, VertexConsumer buffer, int packedLight) { - buffer.addVertex(matrix, effect.x0, effect.y0, effect.depth).setColor(effect.color).setUv(this.u0, this.v0).setLight(packedLight); - buffer.addVertex(matrix, effect.x1, effect.y0, effect.depth).setColor(effect.color).setUv(this.u0, this.v1).setLight(packedLight); - buffer.addVertex(matrix, effect.x1, effect.y1, effect.depth).setColor(effect.color).setUv(this.u1, this.v1).setLight(packedLight); - buffer.addVertex(matrix, effect.x0, effect.y1, effect.depth).setColor(effect.color).setUv(this.u1, this.v0).setLight(packedLight); + private void render(boolean italic, float x, float y, float z, Matrix4f pose, VertexConsumer buffer, int color, boolean bold, int packedLight) { + float f = x + this.left; + float g = x + this.right; + float h = y + this.up; + float i = y + this.down; + float j = italic ? 1.0F - 0.25F * this.up : 0.0F; + float k = italic ? 1.0F - 0.25F * this.down : 0.0F; + float l = bold ? 0.1F : 0.0F; + buffer.addVertex(pose, f + j - l, h - l, z).setColor(color).setUv(this.u0, this.v0).setLight(packedLight); + buffer.addVertex(pose, f + k - l, i + l, z).setColor(color).setUv(this.u0, this.v1).setLight(packedLight); + buffer.addVertex(pose, g + k + l, i + l, z).setColor(color).setUv(this.u1, this.v1).setLight(packedLight); + buffer.addVertex(pose, g + j + l, h - l, z).setColor(color).setUv(this.u1, this.v0).setLight(packedLight); + } + + public void renderEffect(BakedGlyph.Effect effect, Matrix4f pose, VertexConsumer buffer, int packedLight) { + if (effect.hasShadow()) { + this.buildEffect(effect, effect.shadowOffset(), 0.0F, effect.shadowColor(), buffer, packedLight, pose); + this.buildEffect(effect, 0.0F, 0.03F, effect.color, buffer, packedLight, pose); + } else { + this.buildEffect(effect, 0.0F, 0.0F, effect.color, buffer, packedLight, pose); + } + } + + private void buildEffect( + BakedGlyph.Effect effect, float shadowOffset, float depthOffset, int shadowColor, VertexConsumer buffer, int packedLight, Matrix4f pose + ) { + buffer.addVertex(pose, effect.x0 + shadowOffset, effect.y0 + shadowOffset, effect.depth + depthOffset) + .setColor(shadowColor) + .setUv(this.u0, this.v0) + .setLight(packedLight); + buffer.addVertex(pose, effect.x1 + shadowOffset, effect.y0 + shadowOffset, effect.depth + depthOffset) + .setColor(shadowColor) + .setUv(this.u0, this.v1) + .setLight(packedLight); + buffer.addVertex(pose, effect.x1 + shadowOffset, effect.y1 + shadowOffset, effect.depth + depthOffset) + .setColor(shadowColor) + .setUv(this.u1, this.v1) + .setLight(packedLight); + buffer.addVertex(pose, effect.x0 + shadowOffset, effect.y1 + shadowOffset, effect.depth + depthOffset) + .setColor(shadowColor) + .setUv(this.u1, this.v0) + .setLight(packedLight); } public RenderType renderType(Font.DisplayMode displayMode) { @@ -70,10 +112,21 @@ public class BakedGlyph { } @Environment(EnvType.CLIENT) - public record Effect(float x0, float y0, float x1, float y1, float depth, int color) { + public record Effect(float x0, float y0, float x1, float y1, float depth, int color, int shadowColor, float shadowOffset) { + + public Effect(float x0, float y0, float x1, float y1, float depth, int color) { + this(x0, y0, x1, y1, depth, color, 0, 0.0F); + } + + boolean hasShadow() { + return this.shadowColor() != 0; + } } @Environment(EnvType.CLIENT) - public record GlyphInstance(float x, float y, int color, BakedGlyph glyph, Style style, float boldOffset) { + public record GlyphInstance(float x, float y, int color, int shadowColor, BakedGlyph glyph, Style style, float boldOffset, float shadowOffset) { + boolean hasShadow() { + return this.shadowColor() != 0; + } } } diff --git a/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java b/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java index 0ddb6f5f..f45ac022 100644 --- a/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java +++ b/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java @@ -16,6 +16,6 @@ public class EmptyGlyph extends BakedGlyph { } @Override - public void renderChar(BakedGlyph.GlyphInstance glyphInstance, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i) { + public void renderChar(BakedGlyph.GlyphInstance glyph, Matrix4f pose, VertexConsumer buffer, int packedLight) { } } diff --git a/net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java b/net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java index 7fdf5aa4..0dddab1e 100644 --- a/net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java +++ b/net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java @@ -3,6 +3,8 @@ package net.minecraft.client.gui.font.glyphs; import com.mojang.blaze3d.font.GlyphInfo; import com.mojang.blaze3d.font.SheetGlyphInfo; import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import java.util.function.Function; import java.util.function.Supplier; import net.fabricmc.api.EnvType; @@ -46,32 +48,36 @@ public enum SpecialGlyphs implements GlyphInfo { @Override public BakedGlyph bake(Function function) { - return (BakedGlyph)function.apply(new SheetGlyphInfo() { - @Override - public int getPixelWidth() { - return SpecialGlyphs.this.image.getWidth(); - } + return (BakedGlyph)function.apply( + new SheetGlyphInfo() { + @Override + public int getPixelWidth() { + return SpecialGlyphs.this.image.getWidth(); + } - @Override - public int getPixelHeight() { - return SpecialGlyphs.this.image.getHeight(); - } + @Override + public int getPixelHeight() { + return SpecialGlyphs.this.image.getHeight(); + } - @Override - public float getOversample() { - return 1.0F; - } + @Override + public float getOversample() { + return 1.0F; + } - @Override - public void upload(int xOffset, int yOffset) { - SpecialGlyphs.this.image.upload(0, xOffset, yOffset, false); - } + @Override + public void upload(int x, int y, GpuTexture texture) { + RenderSystem.getDevice() + .createCommandEncoder() + .writeToTexture(texture, SpecialGlyphs.this.image, 0, x, y, SpecialGlyphs.this.image.getWidth(), SpecialGlyphs.this.image.getHeight(), 0, 0); + } - @Override - public boolean isColored() { - return true; + @Override + public boolean isColored() { + return true; + } } - }); + ); } @FunctionalInterface diff --git a/net/minecraft/client/gui/font/providers/BitmapProvider.java b/net/minecraft/client/gui/font/providers/BitmapProvider.java index 2a3dac3a..2685f233 100644 --- a/net/minecraft/client/gui/font/providers/BitmapProvider.java +++ b/net/minecraft/client/gui/font/providers/BitmapProvider.java @@ -21,6 +21,9 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.font.CodepointMap; import net.minecraft.client.gui.font.glyphs.BakedGlyph; +import net.minecraft.client.gui.font.providers.BitmapProvider.Glyph.1; +import net.minecraft.client.gui.font.providers.GlyphProviderDefinition.Loader; +import net.minecraft.client.gui.font.providers.GlyphProviderDefinition.Reference; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import org.jetbrains.annotations.Nullable; @@ -120,13 +123,13 @@ public class BitmapProvider implements GlyphProvider { } @Override - public Either unpack() { + public Either unpack() { return Either.left(this::load); } - private GlyphProvider load(ResourceManager resoureManager) throws IOException { + private GlyphProvider load(ResourceManager resourceManager) throws IOException { ResourceLocation resourceLocation = this.file.withPrefix("textures/"); - InputStream inputStream = resoureManager.open(resourceLocation); + InputStream inputStream = resourceManager.open(resourceLocation); BitmapProvider var22; try { @@ -200,37 +203,7 @@ public class BitmapProvider implements GlyphProvider { @Override public BakedGlyph bake(Function function) { - return (BakedGlyph)function.apply(new SheetGlyphInfo() { - @Override - public float getOversample() { - return 1.0F / Glyph.this.scale; - } - - @Override - public int getPixelWidth() { - return Glyph.this.width; - } - - @Override - public int getPixelHeight() { - return Glyph.this.height; - } - - @Override - public float getBearingTop() { - return Glyph.this.ascent; - } - - @Override - public void upload(int xOffset, int yOffset) { - Glyph.this.image.upload(0, xOffset, yOffset, Glyph.this.offsetX, Glyph.this.offsetY, Glyph.this.width, Glyph.this.height, false, false); - } - - @Override - public boolean isColored() { - return Glyph.this.image.format().components() > 1; - } - }); + return (BakedGlyph)function.apply(new 1(this)); } } } diff --git a/net/minecraft/client/gui/font/providers/GlyphProviderType.java b/net/minecraft/client/gui/font/providers/GlyphProviderType.java index ad4acc18..87e21f46 100644 --- a/net/minecraft/client/gui/font/providers/GlyphProviderType.java +++ b/net/minecraft/client/gui/font/providers/GlyphProviderType.java @@ -1,18 +1,18 @@ package net.minecraft.client.gui.font.providers; +import com.mojang.blaze3d.font.SpaceProvider.Definition; import com.mojang.serialization.Codec; import com.mojang.serialization.MapCodec; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.gui.font.providers.BitmapProvider.Definition; import net.minecraft.util.StringRepresentable; @Environment(EnvType.CLIENT) public enum GlyphProviderType implements StringRepresentable { - BITMAP("bitmap", Definition.CODEC), + BITMAP("bitmap", BitmapProvider.Definition.CODEC), TTF("ttf", TrueTypeGlyphProviderDefinition.CODEC), - SPACE("space", com.mojang.blaze3d.font.SpaceProvider.Definition.CODEC), - UNIHEX("unihex", net.minecraft.client.gui.font.providers.UnihexProvider.Definition.CODEC), + SPACE("space", Definition.CODEC), + UNIHEX("unihex", UnihexProvider.Definition.CODEC), REFERENCE("reference", ProviderReferenceDefinition.CODEC); public static final Codec CODEC = StringRepresentable.fromEnum(GlyphProviderType::values); diff --git a/net/minecraft/client/gui/font/providers/UnihexProvider.java b/net/minecraft/client/gui/font/providers/UnihexProvider.java index 1f809308..0d8e6939 100644 --- a/net/minecraft/client/gui/font/providers/UnihexProvider.java +++ b/net/minecraft/client/gui/font/providers/UnihexProvider.java @@ -4,8 +4,6 @@ import com.google.common.annotations.VisibleForTesting; import com.mojang.blaze3d.font.GlyphInfo; import com.mojang.blaze3d.font.GlyphProvider; import com.mojang.blaze3d.font.SheetGlyphInfo; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.platform.NativeImage; import com.mojang.datafixers.util.Either; import com.mojang.logging.LogUtils; import com.mojang.serialization.Codec; @@ -26,12 +24,14 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.font.CodepointMap; import net.minecraft.client.gui.font.glyphs.BakedGlyph; +import net.minecraft.client.gui.font.providers.GlyphProviderDefinition.Loader; +import net.minecraft.client.gui.font.providers.GlyphProviderDefinition.Reference; +import net.minecraft.client.gui.font.providers.UnihexProvider.Glyph.1; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.util.ExtraCodecs; import net.minecraft.util.FastBufferedInputStream; import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.MemoryUtil; import org.slf4j.Logger; @Environment(EnvType.CLIENT) @@ -214,7 +214,7 @@ public class UnihexProvider implements GlyphProvider { } @Override - public Either unpack() { + public Either unpack() { return Either.left(this::load); } @@ -347,35 +347,7 @@ public class UnihexProvider implements GlyphProvider { @Override public BakedGlyph bake(Function function) { - return (BakedGlyph)function.apply(new SheetGlyphInfo() { - @Override - public float getOversample() { - return 2.0F; - } - - @Override - public int getPixelWidth() { - return Glyph.this.width(); - } - - @Override - public int getPixelHeight() { - return 16; - } - - @Override - public void upload(int xOffset, int yOffset) { - IntBuffer intBuffer = MemoryUtil.memAllocInt(Glyph.this.width() * 16); - UnihexProvider.unpackBitsToBytes(intBuffer, Glyph.this.contents, Glyph.this.left, Glyph.this.right); - intBuffer.rewind(); - GlStateManager.upload(0, xOffset, yOffset, Glyph.this.width(), 16, NativeImage.Format.RGBA, intBuffer, MemoryUtil::memFree); - } - - @Override - public boolean isColored() { - return true; - } - }); + return (BakedGlyph)function.apply(new 1(this)); } } diff --git a/net/minecraft/client/gui/layouts/FrameLayout.java b/net/minecraft/client/gui/layouts/FrameLayout.java index 8a1ccbdc..695cad12 100644 --- a/net/minecraft/client/gui/layouts/FrameLayout.java +++ b/net/minecraft/client/gui/layouts/FrameLayout.java @@ -6,6 +6,7 @@ import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; +import net.minecraft.client.gui.layouts.AbstractLayout.AbstractChildWrapper; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.util.Mth; @@ -24,9 +25,9 @@ public class FrameLayout extends AbstractLayout { this(0, 0, width, height); } - public FrameLayout(int x, int y, int width, int height) { - super(x, y, width, height); - this.setMinDimensions(width, height); + public FrameLayout(int i, int j, int k, int l) { + super(i, j, k, l); + this.setMinDimensions(k, l); } public FrameLayout setMinDimensions(int minWidth, int minHeight) { @@ -112,7 +113,7 @@ public class FrameLayout extends AbstractLayout { } @Environment(EnvType.CLIENT) - static class ChildContainer extends AbstractLayout.AbstractChildWrapper { + static class ChildContainer extends AbstractChildWrapper { protected ChildContainer(LayoutElement layoutElement, LayoutSettings layoutSettings) { super(layoutElement, layoutSettings); } diff --git a/net/minecraft/client/gui/layouts/LayoutSettings.java b/net/minecraft/client/gui/layouts/LayoutSettings.java index 8af224b8..7b7b78c9 100644 --- a/net/minecraft/client/gui/layouts/LayoutSettings.java +++ b/net/minecraft/client/gui/layouts/LayoutSettings.java @@ -82,59 +82,59 @@ public interface LayoutSettings { this.yAlignment = other.yAlignment; } - public LayoutSettings.LayoutSettingsImpl padding(int padding) { - return this.padding(padding, padding); + public LayoutSettings.LayoutSettingsImpl padding(int i) { + return this.padding(i, i); } - public LayoutSettings.LayoutSettingsImpl padding(int horizontalPadding, int verticalPadding) { - return this.paddingHorizontal(horizontalPadding).paddingVertical(verticalPadding); + public LayoutSettings.LayoutSettingsImpl padding(int i, int j) { + return this.paddingHorizontal(i).paddingVertical(j); } - public LayoutSettings.LayoutSettingsImpl padding(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) { - return this.paddingLeft(paddingLeft).paddingRight(paddingRight).paddingTop(paddingTop).paddingBottom(paddingBottom); + public LayoutSettings.LayoutSettingsImpl padding(int i, int j, int k, int l) { + return this.paddingLeft(i).paddingRight(k).paddingTop(j).paddingBottom(l); } - public LayoutSettings.LayoutSettingsImpl paddingLeft(int paddingLeft) { - this.paddingLeft = paddingLeft; + public LayoutSettings.LayoutSettingsImpl paddingLeft(int i) { + this.paddingLeft = i; return this; } - public LayoutSettings.LayoutSettingsImpl paddingTop(int paddingTop) { - this.paddingTop = paddingTop; + public LayoutSettings.LayoutSettingsImpl paddingTop(int i) { + this.paddingTop = i; return this; } - public LayoutSettings.LayoutSettingsImpl paddingRight(int paddingRight) { - this.paddingRight = paddingRight; + public LayoutSettings.LayoutSettingsImpl paddingRight(int i) { + this.paddingRight = i; return this; } - public LayoutSettings.LayoutSettingsImpl paddingBottom(int paddingBottom) { - this.paddingBottom = paddingBottom; + public LayoutSettings.LayoutSettingsImpl paddingBottom(int i) { + this.paddingBottom = i; return this; } - public LayoutSettings.LayoutSettingsImpl paddingHorizontal(int horizontalPadding) { - return this.paddingLeft(horizontalPadding).paddingRight(horizontalPadding); + public LayoutSettings.LayoutSettingsImpl paddingHorizontal(int i) { + return this.paddingLeft(i).paddingRight(i); } - public LayoutSettings.LayoutSettingsImpl paddingVertical(int verticalPadding) { - return this.paddingTop(verticalPadding).paddingBottom(verticalPadding); + public LayoutSettings.LayoutSettingsImpl paddingVertical(int i) { + return this.paddingTop(i).paddingBottom(i); } - public LayoutSettings.LayoutSettingsImpl align(float xAlignment, float yAlignment) { - this.xAlignment = xAlignment; - this.yAlignment = yAlignment; + public LayoutSettings.LayoutSettingsImpl align(float f, float g) { + this.xAlignment = f; + this.yAlignment = g; return this; } - public LayoutSettings.LayoutSettingsImpl alignHorizontally(float xAlignment) { - this.xAlignment = xAlignment; + public LayoutSettings.LayoutSettingsImpl alignHorizontally(float f) { + this.xAlignment = f; return this; } - public LayoutSettings.LayoutSettingsImpl alignVertically(float yAlignment) { - this.yAlignment = yAlignment; + public LayoutSettings.LayoutSettingsImpl alignVertically(float f) { + this.yAlignment = f; return this; } diff --git a/net/minecraft/client/gui/narration/NarratableEntry.java b/net/minecraft/client/gui/narration/NarratableEntry.java index 61306cbc..4f8d84aa 100644 --- a/net/minecraft/client/gui/narration/NarratableEntry.java +++ b/net/minecraft/client/gui/narration/NarratableEntry.java @@ -1,5 +1,7 @@ package net.minecraft.client.gui.narration; +import java.util.Collection; +import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.components.TabOrderedElement; @@ -21,6 +23,10 @@ public interface NarratableEntry extends TabOrderedElement, NarrationSupplier { return true; } + default Collection getNarratables() { + return List.of(this); + } + /** * The narration priority levels. */ diff --git a/net/minecraft/client/gui/navigation/ScreenRectangle.java b/net/minecraft/client/gui/navigation/ScreenRectangle.java index d3ad7ff5..f32a3145 100644 --- a/net/minecraft/client/gui/navigation/ScreenRectangle.java +++ b/net/minecraft/client/gui/navigation/ScreenRectangle.java @@ -1,8 +1,12 @@ package net.minecraft.client.gui.navigation; +import com.mojang.math.MatrixUtil; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.util.Mth; import org.jetbrains.annotations.Nullable; +import org.joml.Matrix4f; +import org.joml.Vector3f; @Environment(EnvType.CLIENT) public record ScreenRectangle(ScreenPosition position, int width, int height) { @@ -91,4 +95,14 @@ public record ScreenRectangle(ScreenPosition position, int width, int height) { public boolean containsPoint(int x, int y) { return x >= this.left() && x < this.right() && y >= this.top() && y < this.bottom(); } + + public ScreenRectangle transformAxisAligned(Matrix4f pose) { + if (MatrixUtil.isIdentity(pose)) { + return this; + } else { + Vector3f vector3f = pose.transformPosition(this.left(), this.top(), 0.0F, new Vector3f()); + Vector3f vector3f2 = pose.transformPosition(this.right(), this.bottom(), 0.0F, new Vector3f()); + return new ScreenRectangle(Mth.floor(vector3f.x), Mth.floor(vector3f.y), Mth.floor(vector3f2.x - vector3f.x), Mth.floor(vector3f2.y - vector3f.y)); + } + } } diff --git a/net/minecraft/client/gui/screens/AccessibilityOnboardingScreen.java b/net/minecraft/client/gui/screens/AccessibilityOnboardingScreen.java index 488d09f0..f30a34d8 100644 --- a/net/minecraft/client/gui/screens/AccessibilityOnboardingScreen.java +++ b/net/minecraft/client/gui/screens/AccessibilityOnboardingScreen.java @@ -122,7 +122,7 @@ public class AccessibilityOnboardingScreen extends Screen { if (this.timer < 40.0F) { this.timer++; } else if (this.minecraft.isWindowActive()) { - Narrator.getNarrator().say(ONBOARDING_NARRATOR_MESSAGE.getString(), true); + Narrator.getNarrator().say(ONBOARDING_NARRATOR_MESSAGE.getString(), true, 1.0F); this.hasNarrated = true; } } diff --git a/net/minecraft/client/gui/screens/BackupConfirmScreen.java b/net/minecraft/client/gui/screens/BackupConfirmScreen.java index e96975cc..551ca5c6 100644 --- a/net/minecraft/client/gui/screens/BackupConfirmScreen.java +++ b/net/minecraft/client/gui/screens/BackupConfirmScreen.java @@ -27,14 +27,14 @@ public class BackupConfirmScreen extends Screen { } public BackupConfirmScreen( - Runnable runnable, BackupConfirmScreen.Listener listener, Component component, Component component2, Component component3, boolean bl + Runnable onCancel, BackupConfirmScreen.Listener onProceed, Component title, Component description, Component confirmation, boolean promptForCacheErase ) { - super(component); - this.onCancel = runnable; - this.onProceed = listener; - this.description = component2; - this.promptForCacheErase = bl; - this.confirmation = component3; + super(title); + this.onCancel = onCancel; + this.onProceed = onProceed; + this.description = description; + this.promptForCacheErase = promptForCacheErase; + this.confirmation = confirmation; } @Override diff --git a/net/minecraft/client/gui/screens/CreateFlatWorldScreen.java b/net/minecraft/client/gui/screens/CreateFlatWorldScreen.java index cde5e71e..eb47b791 100644 --- a/net/minecraft/client/gui/screens/CreateFlatWorldScreen.java +++ b/net/minecraft/client/gui/screens/CreateFlatWorldScreen.java @@ -4,9 +4,12 @@ import java.util.List; import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.ObjectSelectionList; +import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; +import net.minecraft.client.gui.layouts.LinearLayout; import net.minecraft.client.gui.screens.CreateFlatWorldScreen.DetailsList.Entry; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen; import net.minecraft.network.chat.CommonComponents; @@ -18,6 +21,7 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class CreateFlatWorldScreen extends Screen { + private static final Component TITLE = Component.translatable("createWorld.customize.flat.title"); static final ResourceLocation SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot"); private static final int SLOT_BG_SIZE = 18; private static final int SLOT_STAT_HEIGHT = 20; @@ -25,25 +29,20 @@ public class CreateFlatWorldScreen extends Screen { private static final int SLOT_BG_Y = 1; private static final int SLOT_FG_X = 2; private static final int SLOT_FG_Y = 2; + private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this, 33, 64); protected final CreateWorldScreen parent; private final Consumer applySettings; FlatLevelGeneratorSettings generator; - /** - * The text used to identify the material for a layer - */ - private Component columnType; - /** - * The text used to identify the height of a layer - */ - private Component columnHeight; + @Nullable private CreateFlatWorldScreen.DetailsList list; /** * The remove layer button */ + @Nullable private Button deleteLayerButton; public CreateFlatWorldScreen(CreateWorldScreen parent, Consumer applySettings, FlatLevelGeneratorSettings generator) { - super(Component.translatable("createWorld.customize.flat.title")); + super(TITLE); this.parent = parent; this.applySettings = applySettings; this.generator = generator; @@ -55,14 +54,21 @@ public class CreateFlatWorldScreen extends Screen { public void setConfig(FlatLevelGeneratorSettings generator) { this.generator = generator; + if (this.list != null) { + this.list.resetRows(); + this.updateButtonValidity(); + } } @Override protected void init() { - this.columnType = Component.translatable("createWorld.customize.flat.tile"); - this.columnHeight = Component.translatable("createWorld.customize.flat.height"); - this.list = this.addRenderableWidget(new CreateFlatWorldScreen.DetailsList()); - this.deleteLayerButton = this.addRenderableWidget(Button.builder(Component.translatable("createWorld.customize.flat.removeLayer"), button -> { + this.layout.addTitleHeader(this.title, this.font); + this.list = this.layout.addToContents(new CreateFlatWorldScreen.DetailsList()); + LinearLayout linearLayout = this.layout.addToFooter(LinearLayout.vertical().spacing(4)); + linearLayout.defaultCellSetting().alignVerticallyMiddle(); + LinearLayout linearLayout2 = linearLayout.addChild(LinearLayout.horizontal().spacing(8)); + LinearLayout linearLayout3 = linearLayout.addChild(LinearLayout.horizontal().spacing(8)); + this.deleteLayerButton = linearLayout2.addChild(Button.builder(Component.translatable("createWorld.customize.flat.removeLayer"), button -> { if (this.hasValidSelection()) { List list = this.generator.getLayersInfo(); int i = this.list.children().indexOf(this.list.getSelected()); @@ -73,37 +79,50 @@ public class CreateFlatWorldScreen extends Screen { this.list.resetRows(); this.updateButtonValidity(); } - }).bounds(this.width / 2 - 155, this.height - 52, 150, 20).build()); - this.addRenderableWidget(Button.builder(Component.translatable("createWorld.customize.presets"), button -> { + }).build()); + linearLayout2.addChild(Button.builder(Component.translatable("createWorld.customize.presets"), button -> { this.minecraft.setScreen(new PresetFlatWorldScreen(this)); this.generator.updateLayers(); this.updateButtonValidity(); - }).bounds(this.width / 2 + 5, this.height - 52, 150, 20).build()); - this.addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, button -> { + }).build()); + linearLayout3.addChild(Button.builder(CommonComponents.GUI_DONE, button -> { this.applySettings.accept(this.generator); - this.minecraft.setScreen(this.parent); + this.onClose(); this.generator.updateLayers(); - }).bounds(this.width / 2 - 155, this.height - 28, 150, 20).build()); - this.addRenderableWidget(Button.builder(CommonComponents.GUI_CANCEL, button -> { - this.minecraft.setScreen(this.parent); + }).build()); + linearLayout3.addChild(Button.builder(CommonComponents.GUI_CANCEL, button -> { + this.onClose(); this.generator.updateLayers(); - }).bounds(this.width / 2 + 5, this.height - 28, 150, 20).build()); + }).build()); this.generator.updateLayers(); this.updateButtonValidity(); + this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } + + @Override + protected void repositionElements() { + if (this.list != null) { + this.list.updateSize(this.width, this.layout); + } + + this.layout.arrangeElements(); } /** * Would update whether the edit and remove buttons are enabled, but is currently disabled and always disables the buttons (which are invisible anyway). */ void updateButtonValidity() { - this.deleteLayerButton.active = this.hasValidSelection(); + if (this.deleteLayerButton != null) { + this.deleteLayerButton.active = this.hasValidSelection(); + } } /** * Returns whether there is a valid layer selection */ private boolean hasValidSelection() { - return this.list.getSelected() != null; + return this.list != null && this.list.getSelected() != null; } @Override @@ -111,19 +130,13 @@ public class CreateFlatWorldScreen extends Screen { this.minecraft.setScreen(this.parent); } - @Override - public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { - super.render(guiGraphics, mouseX, mouseY, partialTick); - guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 8, 16777215); - int i = this.width / 2 - 92 - 16; - guiGraphics.drawString(this.font, this.columnType, i, 32, 16777215); - guiGraphics.drawString(this.font, this.columnHeight, i + 2 + 213 - this.font.width(this.columnHeight), 32, 16777215); - } - @Environment(EnvType.CLIENT) class DetailsList extends ObjectSelectionList { + private static final Component LAYER_MATERIAL_TITLE = Component.translatable("createWorld.customize.flat.tile").withStyle(ChatFormatting.UNDERLINE); + private static final Component HEIGHT_TITLE = Component.translatable("createWorld.customize.flat.height").withStyle(ChatFormatting.UNDERLINE); + public DetailsList() { - super(CreateFlatWorldScreen.this.minecraft, CreateFlatWorldScreen.this.width, CreateFlatWorldScreen.this.height - 103, 43, 24); + super(CreateFlatWorldScreen.this.minecraft, CreateFlatWorldScreen.this.width, CreateFlatWorldScreen.this.height - 103, 43, 24, (int)(9.0 * 1.5)); for (int i = 0; i < CreateFlatWorldScreen.this.generator.getLayersInfo().size(); i++) { this.addEntry(new net.minecraft.client.gui.screens.CreateFlatWorldScreen.DetailsList.Entry(this)); @@ -148,5 +161,13 @@ public class CreateFlatWorldScreen extends Screen { this.setSelected((net.minecraft.client.gui.screens.CreateFlatWorldScreen.DetailsList.Entry)list.get(i)); } } + + @Override + protected void renderHeader(GuiGraphics guiGraphics, int x, int y) { + guiGraphics.drawString(CreateFlatWorldScreen.this.font, LAYER_MATERIAL_TITLE, x, y, -1); + guiGraphics.drawString( + CreateFlatWorldScreen.this.font, HEIGHT_TITLE, x + this.getRowWidth() - CreateFlatWorldScreen.this.font.width(HEIGHT_TITLE) - 8, y, -1 + ); + } } } diff --git a/net/minecraft/client/gui/screens/DeathScreen.java b/net/minecraft/client/gui/screens/DeathScreen.java index 8fd39a16..4faafcf2 100644 --- a/net/minecraft/client/gui/screens/DeathScreen.java +++ b/net/minecraft/client/gui/screens/DeathScreen.java @@ -151,7 +151,7 @@ public class DeathScreen extends Screen { public boolean mouseClicked(double mouseX, double mouseY, int button) { if (this.causeOfDeath != null && mouseY > 85.0 && mouseY < 85 + 9) { Style style = this.getClickedComponentStyleAt((int)mouseX); - if (style != null && style.getClickEvent() != null && style.getClickEvent().getAction() == ClickEvent.Action.OPEN_URL) { + if (style != null && style.getClickEvent() != null && style.getClickEvent().action() == ClickEvent.Action.OPEN_URL) { this.handleComponentClicked(style); return false; } diff --git a/net/minecraft/client/gui/screens/FaviconTexture.java b/net/minecraft/client/gui/screens/FaviconTexture.java index e5bd3353..00582f3a 100644 --- a/net/minecraft/client/gui/screens/FaviconTexture.java +++ b/net/minecraft/client/gui/screens/FaviconTexture.java @@ -44,7 +44,7 @@ public class FaviconTexture implements AutoCloseable { try { this.checkOpen(); if (this.texture == null) { - this.texture = new DynamicTexture(image); + this.texture = new DynamicTexture(() -> "Favicon " + this.textureLocation, image); } else { this.texture.setPixels(image); this.texture.upload(); diff --git a/net/minecraft/client/gui/screens/LevelLoadingScreen.java b/net/minecraft/client/gui/screens/LevelLoadingScreen.java index 8b107b00..d6a76277 100644 --- a/net/minecraft/client/gui/screens/LevelLoadingScreen.java +++ b/net/minecraft/client/gui/screens/LevelLoadingScreen.java @@ -87,29 +87,29 @@ public class LevelLoadingScreen extends Screen { guiGraphics.drawCenteredString(this.font, this.getFormattedProgress(), i, j - k, 16777215); } - public static void renderChunks(GuiGraphics guiGraphics, StoringChunkProgressListener progressListener, int x, int y, int i, int j) { - int k = i + j; - int l = progressListener.getFullDiameter(); - int m = l * k - j; - int n = progressListener.getDiameter(); - int o = n * k - j; - int p = x - o / 2; - int q = y - o / 2; - int r = m / 2 + 1; - int s = -16772609; - if (j != 0) { - guiGraphics.fill(x - r, y - r, x - r + 1, y + r, -16772609); - guiGraphics.fill(x + r - 1, y - r, x + r, y + r, -16772609); - guiGraphics.fill(x - r, y - r, x + r, y - r + 1, -16772609); - guiGraphics.fill(x - r, y + r - 1, x + r, y + r, -16772609); + public static void renderChunks(GuiGraphics guiGraphics, StoringChunkProgressListener progressListener, int x, int y, int size, int spacing) { + int i = size + spacing; + int j = progressListener.getFullDiameter(); + int k = j * i - spacing; + int l = progressListener.getDiameter(); + int m = l * i - spacing; + int n = x - m / 2; + int o = y - m / 2; + int p = k / 2 + 1; + int q = -16772609; + if (spacing != 0) { + guiGraphics.fill(x - p, y - p, x - p + 1, y + p, -16772609); + guiGraphics.fill(x + p - 1, y - p, x + p, y + p, -16772609); + guiGraphics.fill(x - p, y - p, x + p, y - p + 1, -16772609); + guiGraphics.fill(x - p, y + p - 1, x + p, y + p, -16772609); } - for (int t = 0; t < n; t++) { - for (int u = 0; u < n; u++) { - ChunkStatus chunkStatus = progressListener.getStatus(t, u); - int v = p + t * k; - int w = q + u * k; - guiGraphics.fill(v, w, v + i, w + i, ARGB.opaque(COLORS.getInt(chunkStatus))); + for (int r = 0; r < l; r++) { + for (int s = 0; s < l; s++) { + ChunkStatus chunkStatus = progressListener.getStatus(r, s); + int t = n + r * i; + int u = o + s * i; + guiGraphics.fill(t, u, t + size, u + size, ARGB.opaque(COLORS.getInt(chunkStatus))); } } } diff --git a/net/minecraft/client/gui/screens/LoadingOverlay.java b/net/minecraft/client/gui/screens/LoadingOverlay.java index b2f8f9db..16d78a24 100644 --- a/net/minecraft/client/gui/screens/LoadingOverlay.java +++ b/net/minecraft/client/gui/screens/LoadingOverlay.java @@ -1,8 +1,7 @@ package net.minecraft.client.gui.screens; -import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.NativeImage; -import java.io.FileNotFoundException; +import com.mojang.blaze3d.systems.RenderSystem; import java.io.IOException; import java.io.InputStream; import java.util.Optional; @@ -14,14 +13,14 @@ import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.texture.SimpleTexture; +import net.minecraft.client.renderer.texture.ReloadableTexture; +import net.minecraft.client.renderer.texture.TextureContents; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.metadata.texture.TextureMetadataSection; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.PackType; -import net.minecraft.server.packs.VanillaPackResources; -import net.minecraft.server.packs.resources.IoSupplier; import net.minecraft.server.packs.resources.ReloadInstance; import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.server.packs.resources.ResourceProvider; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; @@ -56,8 +55,8 @@ public class LoadingOverlay extends Overlay { this.fadeIn = fadeIn; } - public static void registerTextures(Minecraft minecraft) { - minecraft.getTextureManager().register(MOJANG_STUDIOS_LOGO_LOCATION, new LoadingOverlay.LogoTexture()); + public static void registerTextures(TextureManager textureManager) { + textureManager.registerAndLoad(MOJANG_STUDIOS_LOGO_LOCATION, new LoadingOverlay.LogoTexture()); } private static int replaceAlpha(int color, int alpha) { @@ -94,28 +93,24 @@ public class LoadingOverlay extends Overlay { h = Mth.clamp(g, 0.0F, 1.0F); } else { int k = BRAND_BACKGROUND.getAsInt(); - float m = (k >> 16 & 0xFF) / 255.0F; - float n = (k >> 8 & 0xFF) / 255.0F; - float o = (k & 0xFF) / 255.0F; - GlStateManager._clearColor(m, n, o, 1.0F); - GlStateManager._clear(16384); + RenderSystem.getDevice().createCommandEncoder().clearColorTexture(this.minecraft.getMainRenderTarget().getColorTexture(), k); h = 1.0F; } int k = (int)(guiGraphics.guiWidth() * 0.5); - int p = (int)(guiGraphics.guiHeight() * 0.5); + int m = (int)(guiGraphics.guiHeight() * 0.5); double d = Math.min(guiGraphics.guiWidth() * 0.75, guiGraphics.guiHeight()) * 0.25; - int q = (int)(d * 0.5); + int n = (int)(d * 0.5); double e = d * 4.0; - int r = (int)(e * 0.5); - int s = ARGB.white(h); - guiGraphics.blit(resourceLocation -> RenderType.mojangLogo(), MOJANG_STUDIOS_LOGO_LOCATION, k - r, p - q, -0.0625F, 0.0F, r, (int)d, 120, 60, 120, 120, s); - guiGraphics.blit(resourceLocation -> RenderType.mojangLogo(), MOJANG_STUDIOS_LOGO_LOCATION, k, p - q, 0.0625F, 60.0F, r, (int)d, 120, 60, 120, 120, s); - int t = (int)(guiGraphics.guiHeight() * 0.8325); - float u = this.reload.getActualProgress(); - this.currentProgress = Mth.clamp(this.currentProgress * 0.95F + u * 0.050000012F, 0.0F, 1.0F); + int o = (int)(e * 0.5); + int p = ARGB.white(h); + guiGraphics.blit(resourceLocation -> RenderType.mojangLogo(), MOJANG_STUDIOS_LOGO_LOCATION, k - o, m - n, -0.0625F, 0.0F, o, (int)d, 120, 60, 120, 120, p); + guiGraphics.blit(resourceLocation -> RenderType.mojangLogo(), MOJANG_STUDIOS_LOGO_LOCATION, k, m - n, 0.0625F, 60.0F, o, (int)d, 120, 60, 120, 120, p); + int q = (int)(guiGraphics.guiHeight() * 0.8325); + float r = this.reload.getActualProgress(); + this.currentProgress = Mth.clamp(this.currentProgress * 0.95F + r * 0.050000012F, 0.0F, 1.0F); if (f < 1.0F) { - this.drawProgressBar(guiGraphics, i / 2 - r, t - 5, i / 2 + r, t + 5, 1.0F - Mth.clamp(f, 0.0F, 1.0F)); + this.drawProgressBar(guiGraphics, i / 2 - o, q - 5, i / 2 + o, q + 5, 1.0F - Mth.clamp(f, 0.0F, 1.0F)); } if (f >= 2.0F) { @@ -154,45 +149,36 @@ public class LoadingOverlay extends Overlay { } @Environment(EnvType.CLIENT) - static class LogoTexture extends SimpleTexture { + static class LogoTexture extends ReloadableTexture { public LogoTexture() { super(LoadingOverlay.MOJANG_STUDIOS_LOGO_LOCATION); } @Override - protected SimpleTexture.TextureImage getTextureImage(ResourceManager resourceManager) { - VanillaPackResources vanillaPackResources = Minecraft.getInstance().getVanillaPackResources(); - IoSupplier ioSupplier = vanillaPackResources.getResource(PackType.CLIENT_RESOURCES, LoadingOverlay.MOJANG_STUDIOS_LOGO_LOCATION); - if (ioSupplier == null) { - return new SimpleTexture.TextureImage(new FileNotFoundException(LoadingOverlay.MOJANG_STUDIOS_LOGO_LOCATION.toString())); - } else { - try { - InputStream inputStream = ioSupplier.get(); + public TextureContents loadContents(ResourceManager resourceManager) throws IOException { + ResourceProvider resourceProvider = Minecraft.getInstance().getVanillaPackResources().asProvider(); + InputStream inputStream = resourceProvider.open(LoadingOverlay.MOJANG_STUDIOS_LOGO_LOCATION); - SimpleTexture.TextureImage var5; + TextureContents var4; + try { + var4 = new TextureContents(NativeImage.read(inputStream), new TextureMetadataSection(true, true)); + } catch (Throwable var7) { + if (inputStream != null) { try { - var5 = new SimpleTexture.TextureImage(new TextureMetadataSection(true, true), NativeImage.read(inputStream)); - } catch (Throwable var8) { - if (inputStream != null) { - try { - inputStream.close(); - } catch (Throwable var7) { - var8.addSuppressed(var7); - } - } - - throw var8; - } - - if (inputStream != null) { inputStream.close(); + } catch (Throwable var6) { + var7.addSuppressed(var6); } - - return var5; - } catch (IOException var9) { - return new SimpleTexture.TextureImage(var9); } + + throw var7; } + + if (inputStream != null) { + inputStream.close(); + } + + return var4; } } } diff --git a/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java b/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java index daaed80e..958220e6 100644 --- a/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java +++ b/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java @@ -21,6 +21,7 @@ import net.minecraft.client.gui.screens.worldselection.WorldCreationContext; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -90,7 +91,7 @@ public class PresetFlatWorldScreen extends Screen { int j = Math.min(currentHeight + i, DimensionType.Y_SIZE); int k = j - currentHeight; - Optional> optional; + Optional> optional; try { optional = blockGetter.get(ResourceKey.create(Registries.BLOCK, ResourceLocation.parse(string))); } catch (Exception var10) { @@ -102,7 +103,7 @@ public class PresetFlatWorldScreen extends Screen { LOGGER.error("Error while parsing flat world string => Unknown block, {}", string); return null; } else { - return new FlatLayerInfo(k, (Block)((Holder.Reference)optional.get()).value()); + return new FlatLayerInfo(k, (Block)((Reference)optional.get()).value()); } } @@ -140,7 +141,7 @@ public class PresetFlatWorldScreen extends Screen { if (list.isEmpty()) { return FlatLevelGeneratorSettings.getDefault(biomeGetter, structureSetGetter, placedFeatureGetter); } else { - Holder.Reference reference = biomeGetter.getOrThrow(DEFAULT_BIOME); + Reference reference = biomeGetter.getOrThrow(DEFAULT_BIOME); Holder holder = reference; if (iterator.hasNext()) { String string = (String)iterator.next(); diff --git a/net/minecraft/client/gui/screens/Screen.java b/net/minecraft/client/gui/screens/Screen.java index c8b8745b..756de07d 100644 --- a/net/minecraft/client/gui/screens/Screen.java +++ b/net/minecraft/client/gui/screens/Screen.java @@ -4,9 +4,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; import com.mojang.blaze3d.platform.InputConstants; import com.mojang.logging.LogUtils; -import java.io.File; import java.net.URI; -import java.net.URISyntaxException; import java.nio.file.Path; import java.util.Comparator; import java.util.List; @@ -51,7 +49,6 @@ import net.minecraft.network.chat.Style; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.Music; import net.minecraft.util.FormattedCharSequence; -import net.minecraft.util.StringUtil; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag.Default; @@ -261,44 +258,47 @@ public abstract class Screen extends AbstractContainerEventHandler implements Re this.insertText(style.getInsertion(), false); } } else if (clickEvent != null) { - if (clickEvent.getAction() == ClickEvent.Action.OPEN_URL) { - if (!this.minecraft.options.chatLinks().get()) { - return false; - } + switch (clickEvent) { + case ClickEvent.OpenUrl(URI var28): + URI var19 = var28; + if (!this.minecraft.options.chatLinks().get()) { + return false; + } - try { - URI uRI = Util.parseAndValidateUntrustedUri(clickEvent.getValue()); if (this.minecraft.options.chatLinksPrompt().get()) { this.minecraft.setScreen(new ConfirmLinkScreen(bl -> { if (bl) { - Util.getPlatform().openUri(uRI); + Util.getPlatform().openUri(var19); } this.minecraft.setScreen(this); - }, clickEvent.getValue(), false)); + }, var19.toString(), false)); } else { - Util.getPlatform().openUri(uRI); + Util.getPlatform().openUri(var19); } - } catch (URISyntaxException var4) { - LOGGER.error("Can't open url for {}", clickEvent, var4); - } - } else if (clickEvent.getAction() == ClickEvent.Action.OPEN_FILE) { - Util.getPlatform().openFile(new File(clickEvent.getValue())); - } else if (clickEvent.getAction() == ClickEvent.Action.SUGGEST_COMMAND) { - this.insertText(StringUtil.filterText(clickEvent.getValue()), true); - } else if (clickEvent.getAction() == ClickEvent.Action.RUN_COMMAND) { - String string = StringUtil.filterText(clickEvent.getValue()); - if (string.startsWith("/")) { - if (!this.minecraft.player.connection.sendUnsignedCommand(string.substring(1))) { - LOGGER.error("Not allowed to run command with signed argument from click event: '{}'", string); + break; + case ClickEvent.OpenFile openFile: + Util.getPlatform().openFile(openFile.file()); + break; + case ClickEvent.SuggestCommand(String var20): + this.insertText(var20, true); + break; + case ClickEvent.RunCommand(String var24): + String var21 = var24; + String string2 = var21; + if (var21.startsWith("/")) { + string2 = var21.substring(1); } - } else { - LOGGER.error("Failed to run command without '/' prefix from click event: '{}'", string); - } - } else if (clickEvent.getAction() == ClickEvent.Action.COPY_TO_CLIPBOARD) { - this.minecraft.keyboardHandler.setClipboard(clickEvent.getValue()); - } else { - LOGGER.error("Don't know how to handle {}", clickEvent); + + if (!this.minecraft.player.connection.sendUnsignedCommand(string2)) { + LOGGER.error("Not allowed to run command with signed argument from click event: '{}'", string2); + } + break; + case ClickEvent.CopyToClipboard(String var14): + this.minecraft.keyboardHandler.setClipboard(var14); + break; + default: + LOGGER.error("Don't know how to handle {}", clickEvent); } return true; @@ -360,7 +360,6 @@ public abstract class Screen extends AbstractContainerEventHandler implements Re protected void renderBlurredBackground() { this.minecraft.gameRenderer.processBlurEffect(); - this.minecraft.getMainRenderTarget().bindWrite(false); } protected void renderPanorama(GuiGraphics guiGraphics, float partialTick) { @@ -524,8 +523,9 @@ public abstract class Screen extends AbstractContainerEventHandler implements Re } protected void updateNarratedWidget(NarrationElementOutput narrationElementOutput) { - List list = this.narratables + List list = this.narratables .stream() + .flatMap(narratableEntry -> narratableEntry.getNarratables().stream()) .filter(NarratableEntry::isActive) .sorted(Comparator.comparingInt(TabOrderedElement::getTabOrderGroup)) .toList(); diff --git a/net/minecraft/client/gui/screens/TitleScreen.java b/net/minecraft/client/gui/screens/TitleScreen.java index 2157ee44..384761ea 100644 --- a/net/minecraft/client/gui/screens/TitleScreen.java +++ b/net/minecraft/client/gui/screens/TitleScreen.java @@ -6,8 +6,6 @@ import com.mojang.realmsclient.RealmsMainScreen; import com.mojang.realmsclient.gui.screens.RealmsNotificationsScreen; import java.io.IOException; import java.util.Objects; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.SharedConstants; @@ -92,13 +90,11 @@ public class TitleScreen extends Screen { } } - public static CompletableFuture preloadResources(TextureManager texMngr, Executor backgroundExecutor) { - return CompletableFuture.allOf( - texMngr.preload(LogoRenderer.MINECRAFT_LOGO, backgroundExecutor), - texMngr.preload(LogoRenderer.MINECRAFT_EDITION, backgroundExecutor), - texMngr.preload(PanoramaRenderer.PANORAMA_OVERLAY, backgroundExecutor), - CUBE_MAP.preload(texMngr, backgroundExecutor) - ); + public static void registerTextures(TextureManager textureManager) { + textureManager.registerForNextReload(LogoRenderer.MINECRAFT_LOGO); + textureManager.registerForNextReload(LogoRenderer.MINECRAFT_EDITION); + textureManager.registerForNextReload(PanoramaRenderer.PANORAMA_OVERLAY); + CUBE_MAP.registerTextures(textureManager); } @Override @@ -158,22 +154,22 @@ public class TitleScreen extends Screen { } } - private int createTestWorldButton(int i, int j) { + private int createTestWorldButton(int y, int rowHeight) { if (SharedConstants.IS_RUNNING_IN_IDE) { this.addRenderableWidget( Button.builder(Component.literal("Create Test World"), button -> CreateWorldScreen.testWorld(this.minecraft, this)) - .bounds(this.width / 2 - 100, i += j, 200, 20) + .bounds(this.width / 2 - 100, y += rowHeight, 200, 20) .build() ); } - return i; + return y; } - private int createNormalMenuOptions(int i, int j) { + private int createNormalMenuOptions(int y, int rowHeight) { this.addRenderableWidget( Button.builder(Component.translatable("menu.singleplayer"), button -> this.minecraft.setScreen(new SelectWorldScreen(this))) - .bounds(this.width / 2 - 100, i, 200, 20) + .bounds(this.width / 2 - 100, y, 200, 20) .build() ); Component component = this.getMultiplayerDisabledReason(); @@ -183,15 +179,15 @@ public class TitleScreen extends Screen { this.addRenderableWidget(Button.builder(Component.translatable("menu.multiplayer"), button -> { Screen screen = (Screen)(this.minecraft.options.skipMultiplayerWarning ? new JoinMultiplayerScreen(this) : new SafetyScreen(this)); this.minecraft.setScreen(screen); - }).bounds(this.width / 2 - 100, var6 = i + j, 200, 20).tooltip(tooltip).build()).active = bl; + }).bounds(this.width / 2 - 100, var6 = y + rowHeight, 200, 20).tooltip(tooltip).build()).active = bl; this.addRenderableWidget( Button.builder(Component.translatable("menu.online"), button -> this.minecraft.setScreen(new RealmsMainScreen(this))) - .bounds(this.width / 2 - 100, i = var6 + j, 200, 20) + .bounds(this.width / 2 - 100, y = var6 + rowHeight, 200, 20) .tooltip(tooltip) .build() ) .active = bl; - return i; + return y; } @Nullable @@ -212,7 +208,7 @@ public class TitleScreen extends Screen { } } - private int createDemoMenuOptions(int i, int j) { + private int createDemoMenuOptions(int y, int rowHeight) { boolean bl = this.checkDemoWorldPresence(); this.addRenderableWidget( Button.builder( @@ -227,7 +223,7 @@ public class TitleScreen extends Screen { } } ) - .bounds(this.width / 2 - 100, i, 200, 20) + .bounds(this.width / 2 - 100, y, 200, 20) .build() ); int var4; @@ -256,7 +252,7 @@ public class TitleScreen extends Screen { } } ) - .bounds(this.width / 2 - 100, var4 = i + j, 200, 20) + .bounds(this.width / 2 - 100, var4 = y + rowHeight, 200, 20) .build() ); this.resetDemoButton.active = bl; diff --git a/net/minecraft/client/gui/screens/achievement/StatsScreen.java b/net/minecraft/client/gui/screens/achievement/StatsScreen.java index 5820d452..3cb4cb82 100644 --- a/net/minecraft/client/gui/screens/achievement/StatsScreen.java +++ b/net/minecraft/client/gui/screens/achievement/StatsScreen.java @@ -202,11 +202,10 @@ public class StatsScreen extends Screen { protected int sortOrder; public ItemStatisticsList(final Minecraft minecraft) { - super(minecraft, StatsScreen.this.width, StatsScreen.this.height - 33 - 58, 33, 22); + super(minecraft, StatsScreen.this.width, StatsScreen.this.height - 33 - 58, 33, 22, 22); this.blockColumns = Lists.>newArrayList(); this.blockColumns.add(Stats.BLOCK_MINED); this.itemColumns = Lists.>newArrayList(Stats.ITEM_BROKEN, Stats.ITEM_CRAFTED, Stats.ITEM_USED, Stats.ITEM_PICKED_UP, Stats.ITEM_DROPPED); - this.setRenderHeader(true, 22); Set set = Sets.newIdentityHashSet(); for (Item item : BuiltInRegistries.ITEM) { @@ -272,11 +271,16 @@ public class StatsScreen extends Screen { } @Override - public int getRowWidth() { - return 280; + public boolean mouseClicked(double mouseX, double mouseY, int button) { + boolean bl = super.mouseClicked(mouseX, mouseY, button); + return !bl + && this.clickedHeader( + (int)(mouseX - (this.getX() + this.width / 2.0 - this.getRowWidth() / 2.0)), (int)(mouseY - this.getY()) + (int)this.scrollAmount() - 4 + ) + ? true + : bl; } - @Override protected boolean clickedHeader(int x, int y) { this.headerPressed = -1; @@ -293,10 +297,15 @@ public class StatsScreen extends Screen { this.minecraft.getSoundManager().play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK, 1.0F)); return true; } else { - return super.clickedHeader(x, y); + return false; } } + @Override + public int getRowWidth() { + return 280; + } + private StatType getColumn(int index) { return index < this.blockColumns.size() ? (StatType)this.blockColumns.get(index) : (StatType)this.itemColumns.get(index - this.blockColumns.size()); } diff --git a/net/minecraft/client/gui/screens/advancements/AdvancementTab.java b/net/minecraft/client/gui/screens/advancements/AdvancementTab.java index 10f67c0e..2793032e 100644 --- a/net/minecraft/client/gui/screens/advancements/AdvancementTab.java +++ b/net/minecraft/client/gui/screens/advancements/AdvancementTab.java @@ -12,6 +12,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.core.ClientAsset; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; @@ -90,7 +91,10 @@ public class AdvancementTab { guiGraphics.enableScissor(x, y, x + 234, y + 113); guiGraphics.pose().pushPose(); guiGraphics.pose().translate((float)x, (float)y, 0.0F); - ResourceLocation resourceLocation = (ResourceLocation)this.display.getBackground().orElse(TextureManager.INTENTIONAL_MISSING_TEXTURE); + ResourceLocation resourceLocation = (ResourceLocation)this.display + .getBackground() + .map(ClientAsset::texturePath) + .orElse(TextureManager.INTENTIONAL_MISSING_TEXTURE); int i = Mth.floor(this.scrollX); int j = Mth.floor(this.scrollY); int k = i % 16; diff --git a/net/minecraft/client/gui/screens/advancements/AdvancementWidget.java b/net/minecraft/client/gui/screens/advancements/AdvancementWidget.java index 5622970a..fd464e23 100644 --- a/net/minecraft/client/gui/screens/advancements/AdvancementWidget.java +++ b/net/minecraft/client/gui/screens/advancements/AdvancementWidget.java @@ -9,6 +9,7 @@ import net.minecraft.advancements.AdvancementProgress; import net.minecraft.advancements.DisplayInfo; import net.minecraft.client.Minecraft; import net.minecraft.client.StringSplitter; +import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.locale.Language; @@ -34,13 +35,15 @@ public class AdvancementWidget { private static final int TITLE_PADDING_LEFT = 3; private static final int TITLE_PADDING_RIGHT = 5; private static final int TITLE_X = 32; - private static final int TITLE_Y = 9; + private static final int TITLE_PADDING_TOP = 9; + private static final int TITLE_PADDING_BOTTOM = 8; private static final int TITLE_MAX_WIDTH = 163; + private static final int TITLE_MIN_WIDTH = 80; private static final int[] TEST_SPLIT_OFFSETS = new int[]{0, 10, -10, 25, -25}; private final AdvancementTab tab; private final AdvancementNode advancementNode; private final DisplayInfo display; - private final FormattedCharSequence title; + private final List titleLines; private final int width; private final List description; private final Minecraft minecraft; @@ -57,21 +60,22 @@ public class AdvancementWidget { this.advancementNode = advancementNode; this.display = display; this.minecraft = minecraft; - this.title = Language.getInstance().getVisualOrder(minecraft.font.substrByWidth(display.getTitle(), 163)); + this.titleLines = minecraft.font.split(display.getTitle(), 163); this.x = Mth.floor(display.getX() * 28.0F); this.y = Mth.floor(display.getY() * 27.0F); - int i = this.getMaxProgressWidth(); - int j = 29 + minecraft.font.width(this.title) + i; + int i = Math.max(this.titleLines.stream().mapToInt(minecraft.font::width).max().orElse(0), 80); + int j = this.getMaxProgressWidth(); + int k = 29 + i + j; this.description = Language.getInstance() .getVisualOrder( - this.findOptimalLines(ComponentUtils.mergeStyles(display.getDescription().copy(), Style.EMPTY.withColor(display.getType().getChatColor())), j) + this.findOptimalLines(ComponentUtils.mergeStyles(display.getDescription().copy(), Style.EMPTY.withColor(display.getType().getChatColor())), k) ); for (FormattedCharSequence formattedCharSequence : this.description) { - j = Math.max(j, minecraft.font.width(formattedCharSequence)); + k = Math.max(k, minecraft.font.width(formattedCharSequence)); } - this.width = j + 3 + 5; + this.width = k + 3 + 5; } private int getMaxProgressWidth() { @@ -180,27 +184,33 @@ public class AdvancementWidget { } public void drawHover(GuiGraphics guiGraphics, int x, int y, float fade, int width, int height) { + Font font = this.minecraft.font; + int i = 9 * this.titleLines.size() + 9 + 8; + int j = y + this.y + (26 - i) / 2; + int k = j + i; + int l = this.description.size() * 9; + int m = 6 + l; boolean bl = width + x + this.x + this.width + 26 >= this.tab.getScreen().width; Component component = this.progress == null ? null : this.progress.getProgressText(); - int i = component == null ? 0 : this.minecraft.font.width(component); - boolean bl2 = 113 - y - this.y - 26 <= 6 + this.description.size() * 9; + int n = component == null ? 0 : font.width(component); + boolean bl2 = k + m >= 113; float f = this.progress == null ? 0.0F : this.progress.getPercent(); - int j = Mth.floor(f * this.width); + int o = Mth.floor(f * this.width); AdvancementWidgetType advancementWidgetType; AdvancementWidgetType advancementWidgetType2; AdvancementWidgetType advancementWidgetType3; if (f >= 1.0F) { - j = this.width / 2; + o = this.width / 2; advancementWidgetType = AdvancementWidgetType.OBTAINED; advancementWidgetType2 = AdvancementWidgetType.OBTAINED; advancementWidgetType3 = AdvancementWidgetType.OBTAINED; - } else if (j < 2) { - j = this.width / 2; + } else if (o < 2) { + o = this.width / 2; advancementWidgetType = AdvancementWidgetType.UNOBTAINED; advancementWidgetType2 = AdvancementWidgetType.UNOBTAINED; advancementWidgetType3 = AdvancementWidgetType.UNOBTAINED; - } else if (j > this.width - 2) { - j = this.width / 2; + } else if (o > this.width - 2) { + o = this.width / 2; advancementWidgetType = AdvancementWidgetType.OBTAINED; advancementWidgetType2 = AdvancementWidgetType.OBTAINED; advancementWidgetType3 = AdvancementWidgetType.UNOBTAINED; @@ -210,52 +220,61 @@ public class AdvancementWidget { advancementWidgetType3 = AdvancementWidgetType.UNOBTAINED; } - int k = this.width - j; - int l = y + this.y; - int m; + int p = this.width - o; + int q; if (bl) { - m = x + this.x - this.width + 26 + 6; + q = x + this.x - this.width + 26 + 6; } else { - m = x + this.x; + q = x + this.x; } - int n = 32 + this.description.size() * 9; + int r = i + m; if (!this.description.isEmpty()) { if (bl2) { - guiGraphics.blitSprite(RenderType::guiTextured, TITLE_BOX_SPRITE, m, l + 26 - n, this.width, n); + guiGraphics.blitSprite(RenderType::guiTextured, TITLE_BOX_SPRITE, q, k - r, this.width, r); } else { - guiGraphics.blitSprite(RenderType::guiTextured, TITLE_BOX_SPRITE, m, l, this.width, n); + guiGraphics.blitSprite(RenderType::guiTextured, TITLE_BOX_SPRITE, q, j, this.width, r); } } - guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType.boxSprite(), 200, 26, 0, 0, m, l, j, 26); - guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType2.boxSprite(), 200, 26, 200 - k, 0, m + j, l, k, 26); + if (advancementWidgetType != advancementWidgetType2) { + guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType.boxSprite(), 200, i, 0, 0, q, j, o, i); + guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType2.boxSprite(), 200, i, 200 - p, 0, q + o, j, p, i); + } else { + guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType.boxSprite(), q, j, this.width, i); + } + guiGraphics.blitSprite(RenderType::guiTextured, advancementWidgetType3.frameSprite(this.display.getType()), x + this.x + 3, y + this.y, 26, 26); + int s = q + 5; if (bl) { - guiGraphics.drawString(this.minecraft.font, this.title, m + 5, y + this.y + 9, -1); + this.drawMultilineText(guiGraphics, this.titleLines, s, j + 9, -1); if (component != null) { - guiGraphics.drawString(this.minecraft.font, component, x + this.x - i, y + this.y + 9, -1); + guiGraphics.drawString(font, component, x + this.x - n, j + 9, -1); } } else { - guiGraphics.drawString(this.minecraft.font, this.title, x + this.x + 32, y + this.y + 9, -1); + this.drawMultilineText(guiGraphics, this.titleLines, x + this.x + 32, j + 9, -1); if (component != null) { - guiGraphics.drawString(this.minecraft.font, component, x + this.x + this.width - i - 5, y + this.y + 9, -1); + guiGraphics.drawString(font, component, x + this.x + this.width - n - 5, j + 9, -1); } } if (bl2) { - for (int o = 0; o < this.description.size(); o++) { - guiGraphics.drawString(this.minecraft.font, (FormattedCharSequence)this.description.get(o), m + 5, l + 26 - n + 7 + o * 9, -5592406, false); - } + this.drawMultilineText(guiGraphics, this.description, s, j - l + 1, -16711936); } else { - for (int o = 0; o < this.description.size(); o++) { - guiGraphics.drawString(this.minecraft.font, (FormattedCharSequence)this.description.get(o), m + 5, y + this.y + 9 + 17 + o * 9, -5592406, false); - } + this.drawMultilineText(guiGraphics, this.description, s, k, -16711936); } guiGraphics.renderFakeItem(this.display.getIcon(), x + this.x + 8, y + this.y + 5); } + private void drawMultilineText(GuiGraphics guiGraphics, List text, int x, int y, int color) { + Font font = this.minecraft.font; + + for (int i = 0; i < text.size(); i++) { + guiGraphics.drawString(font, (FormattedCharSequence)text.get(i), x, y + i * 9, color); + } + } + public boolean isMouseOver(int x, int y, int mouseX, int mouseY) { if (!this.display.isHidden() || this.progress != null && this.progress.isDone()) { int i = x + this.x; diff --git a/net/minecraft/client/gui/screens/debug/GameModeSwitcherScreen.java b/net/minecraft/client/gui/screens/debug/GameModeSwitcherScreen.java index 5cf46157..0110a3b9 100644 --- a/net/minecraft/client/gui/screens/debug/GameModeSwitcherScreen.java +++ b/net/minecraft/client/gui/screens/debug/GameModeSwitcherScreen.java @@ -194,11 +194,11 @@ public class GameModeSwitcherScreen extends Screen { } @Environment(EnvType.CLIENT) - public class GameModeSlot extends AbstractWidget { + public static class GameModeSlot extends AbstractWidget { final GameModeSwitcherScreen.GameModeIcon icon; private boolean isSelected; - public GameModeSlot(final GameModeSwitcherScreen.GameModeIcon icon, final int x, final int y) { + public GameModeSlot(GameModeSwitcherScreen.GameModeIcon icon, int x, int y) { super(x, y, 26, 26, icon.getName()); this.icon = icon; } diff --git a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java index b2e52353..1fc17150 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java @@ -2,7 +2,6 @@ package net.minecraft.client.gui.screens.inventory; import com.google.common.collect.Sets; import com.mojang.blaze3d.platform.InputConstants; -import com.mojang.datafixers.util.Pair; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -17,7 +16,6 @@ import net.minecraft.client.gui.ItemSlotMouseAction; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.component.DataComponents; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -238,8 +236,8 @@ public abstract class AbstractContainerScreen e } } - private boolean showTooltipWithItemInHand(ItemStack itemStack) { - return (Boolean)itemStack.getTooltipImage().map(ClientTooltipComponent::create).map(ClientTooltipComponent::showTooltipWithItemInHand).orElse(false); + private boolean showTooltipWithItemInHand(ItemStack stack) { + return (Boolean)stack.getTooltipImage().map(ClientTooltipComponent::create).map(ClientTooltipComponent::showTooltipWithItemInHand).orElse(false); } protected List getTooltipFromContainerItem(ItemStack stack) { @@ -296,10 +294,9 @@ public abstract class AbstractContainerScreen e guiGraphics.pose().pushPose(); guiGraphics.pose().translate(0.0F, 0.0F, 100.0F); if (itemStack.isEmpty() && slot.isActive()) { - Pair pair = slot.getNoItemIcon(); - if (pair != null) { - TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)this.minecraft.getTextureAtlas(pair.getFirst()).apply(pair.getSecond()); - guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, i, j, 16, 16); + ResourceLocation resourceLocation = slot.getNoItemIcon(); + if (resourceLocation != null) { + guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, i, j, 16, 16); bl2 = true; } } @@ -342,9 +339,9 @@ public abstract class AbstractContainerScreen e } @Nullable - private Slot getHoveredSlot(double d, double e) { + private Slot getHoveredSlot(double mouseX, double mouseY) { for (Slot slot : this.menu.slots) { - if (slot.isActive() && this.isHovering(slot, d, e)) { + if (slot.isActive() && this.isHovering(slot, mouseX, mouseY)) { return slot; } } @@ -357,7 +354,7 @@ public abstract class AbstractContainerScreen e if (super.mouseClicked(mouseX, mouseY, button)) { return true; } else { - boolean bl = this.minecraft.options.keyPickItem.matchesMouse(button) && this.minecraft.gameMode.hasInfiniteItems(); + boolean bl = this.minecraft.options.keyPickItem.matchesMouse(button) && this.minecraft.player.hasInfiniteMaterials(); Slot slot = this.getHoveredSlot(mouseX, mouseY); long l = Util.getMillis(); this.doubleclick = this.lastClickSlot == slot && l - this.lastClickTime < 250L && this.lastClickButton == button; @@ -645,11 +642,11 @@ public abstract class AbstractContainerScreen e this.minecraft.gameMode.handleInventoryMouseClick(this.menu.containerId, slotId, mouseButton, type, this.minecraft.player); } - void onMouseClickAction(@Nullable Slot slot, ClickType clickType) { + void onMouseClickAction(@Nullable Slot slot, ClickType type) { if (slot != null && slot.hasItem()) { for (ItemSlotMouseAction itemSlotMouseAction : this.itemSlotMouseActions) { if (itemSlotMouseAction.matches(slot)) { - itemSlotMouseAction.onSlotClicked(slot, clickType); + itemSlotMouseAction.onSlotClicked(slot, type); } } } diff --git a/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java index 7721f922..cc44ea20 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java @@ -21,19 +21,19 @@ public abstract class AbstractFurnaceScreen exten private final ResourceLocation burnProgressSprite; public AbstractFurnaceScreen( - T abstractFurnaceMenu, - Inventory inventory, - Component component, - Component component2, - ResourceLocation resourceLocation, - ResourceLocation resourceLocation2, - ResourceLocation resourceLocation3, - List list + T menu, + Inventory playerInventory, + Component title, + Component recipeFilterName, + ResourceLocation texture, + ResourceLocation litProgressSprite, + ResourceLocation burnProgressSprite, + List tabInfos ) { - super(abstractFurnaceMenu, new FurnaceRecipeBookComponent(abstractFurnaceMenu, component2, list), inventory, component); - this.texture = resourceLocation; - this.litProgressSprite = resourceLocation2; - this.burnProgressSprite = resourceLocation3; + super(menu, new FurnaceRecipeBookComponent(menu, recipeFilterName, tabInfos), playerInventory, title); + this.texture = texture; + this.litProgressSprite = litProgressSprite; + this.burnProgressSprite = burnProgressSprite; } @Override diff --git a/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java index cd6ea562..60c8486f 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java @@ -19,8 +19,8 @@ public abstract class AbstractRecipeBookScreen extends private final RecipeBookComponent recipeBookComponent; private boolean widthTooNarrow; - public AbstractRecipeBookScreen(T recipeBookMenu, RecipeBookComponent recipeBookComponent, Inventory inventory, Component component) { - super(recipeBookMenu, inventory, component); + public AbstractRecipeBookScreen(T menu, RecipeBookComponent recipeBookComponent, Inventory playerInventory, Component title) { + super(menu, playerInventory, title); this.recipeBookComponent = recipeBookComponent; } diff --git a/net/minecraft/client/gui/screens/inventory/AbstractSignEditScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractSignEditScreen.java index 8fa494af..322c0021 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractSignEditScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractSignEditScreen.java @@ -10,7 +10,7 @@ import net.minecraft.client.gui.font.TextFieldHelper; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.blockentity.SignRenderer; +import net.minecraft.client.renderer.blockentity.AbstractSignRenderer; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.game.ServerboundSignUpdatePacket; @@ -165,7 +165,7 @@ public abstract class AbstractSignEditScreen extends Screen { guiGraphics.pose().translate(0.0F, 0.0F, 4.0F); Vector3f vector3f = this.getSignTextScale(); guiGraphics.pose().scale(vector3f.x(), vector3f.y(), vector3f.z()); - int i = this.text.hasGlowingText() ? this.text.getColor().getTextColor() : SignRenderer.getDarkColor(this.text); + int i = this.text.hasGlowingText() ? this.text.getColor().getTextColor() : AbstractSignRenderer.getDarkColor(this.text); boolean bl = this.frame / 6 % 2 == 0; int j = this.signField.getCursorPos(); int k = this.signField.getSelectionPos(); diff --git a/net/minecraft/client/gui/screens/inventory/AnvilScreen.java b/net/minecraft/client/gui/screens/inventory/AnvilScreen.java index 7ba548a1..63741e4c 100644 --- a/net/minecraft/client/gui/screens/inventory/AnvilScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AnvilScreen.java @@ -91,7 +91,7 @@ public class AnvilScreen extends ItemCombinerScreen { if (i > 0) { int j = 8453920; Component component; - if (i >= 40 && !this.minecraft.player.getAbilities().instabuild) { + if (i >= 40 && !this.minecraft.player.hasInfiniteMaterials()) { component = TOO_EXPENSIVE_TEXT; j = 16736352; } else if (!this.menu.getSlot(2).hasItem()) { diff --git a/net/minecraft/client/gui/screens/inventory/BookEditScreen.java b/net/minecraft/client/gui/screens/inventory/BookEditScreen.java index d1b9e54c..896cd072 100644 --- a/net/minecraft/client/gui/screens/inventory/BookEditScreen.java +++ b/net/minecraft/client/gui/screens/inventory/BookEditScreen.java @@ -95,17 +95,17 @@ public class BookEditScreen extends Screen { private Component pageMsg = CommonComponents.EMPTY; private final Component ownerText; - public BookEditScreen(Player player, ItemStack itemStack, InteractionHand interactionHand, WritableBookContent writableBookContent) { + public BookEditScreen(Player owner, ItemStack book, InteractionHand hand, WritableBookContent content) { super(GameNarrator.NO_TITLE); - this.owner = player; - this.book = itemStack; - this.hand = interactionHand; - writableBookContent.getPages(Minecraft.getInstance().isTextFilteringEnabled()).forEach(this.pages::add); + this.owner = owner; + this.book = book; + this.hand = hand; + content.getPages(Minecraft.getInstance().isTextFilteringEnabled()).forEach(this.pages::add); if (this.pages.isEmpty()) { this.pages.add(""); } - this.ownerText = Component.translatable("book.byAuthor", player.getName()).withStyle(ChatFormatting.DARK_GRAY); + this.ownerText = Component.translatable("book.byAuthor", owner.getName()).withStyle(ChatFormatting.DARK_GRAY); } private void setClipboard(String clipboardValue) { @@ -216,7 +216,7 @@ public class BookEditScreen extends Screen { if (this.isModified) { this.eraseEmptyTrailingPages(); this.updateLocalCopy(); - int i = this.hand == InteractionHand.MAIN_HAND ? this.owner.getInventory().selected : 40; + int i = this.hand == InteractionHand.MAIN_HAND ? this.owner.getInventory().getSelectedSlot() : 40; this.minecraft.getConnection().send(new ServerboundEditBookPacket(i, this.pages, publish ? Optional.of(this.title.trim()) : Optional.empty())); } } @@ -423,7 +423,7 @@ public class BookEditScreen extends Screen { guiGraphics.drawString(this.font, formattedCharSequence, i + 36 + (114 - l) / 2, 50, 0, false); int m = this.font.width(this.ownerText); guiGraphics.drawString(this.font, this.ownerText, i + 36 + (114 - m) / 2, 60, 0, false); - guiGraphics.drawWordWrap(this.font, FINALIZE_WARNING_LABEL, i + 36, 82, 114, 0); + guiGraphics.drawWordWrap(this.font, FINALIZE_WARNING_LABEL, i + 36, 82, 114, 0, false); } else { int n = this.font.width(this.pageMsg); guiGraphics.drawString(this.font, this.pageMsg, i - n + 192 - 44, 18, 0, false); diff --git a/net/minecraft/client/gui/screens/inventory/BookViewScreen.java b/net/minecraft/client/gui/screens/inventory/BookViewScreen.java index 2abcea1a..b59155b3 100644 --- a/net/minecraft/client/gui/screens/inventory/BookViewScreen.java +++ b/net/minecraft/client/gui/screens/inventory/BookViewScreen.java @@ -212,18 +212,11 @@ public class BookViewScreen extends Screen { ClickEvent clickEvent = style.getClickEvent(); if (clickEvent == null) { return false; - } else if (clickEvent.getAction() == ClickEvent.Action.CHANGE_PAGE) { - String string = clickEvent.getValue(); - - try { - int i = Integer.parseInt(string) - 1; - return this.forcePage(i); - } catch (Exception var5) { - return false; - } + } else if (clickEvent instanceof ClickEvent.ChangePage(int var5)) { + return this.forcePage(var5 - 1); } else { boolean bl = super.handleComponentClicked(style); - if (bl && clickEvent.getAction() == ClickEvent.Action.RUN_COMMAND) { + if (bl && clickEvent.action() == ClickEvent.Action.RUN_COMMAND) { this.closeScreen(); } diff --git a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java index 2145ffbd..1573ae63 100644 --- a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java +++ b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java @@ -3,7 +3,6 @@ package net.minecraft.client.gui.screens.inventory; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.mojang.blaze3d.platform.InputConstants; -import com.mojang.datafixers.util.Pair; import java.util.Collection; import java.util.HashSet; import java.util.List; @@ -25,9 +24,9 @@ import net.minecraft.client.player.inventory.Hotbar; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.searchtree.SearchTree; import net.minecraft.core.HolderLookup; -import net.minecraft.core.HolderSet; import net.minecraft.core.NonNullList; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.component.DataComponents; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.CommonComponents; @@ -191,14 +190,12 @@ public class CreativeModeInventoryScreen extends AbstractContainerScreen resourceLocation.getNamespace().contains(string) && resourceLocation.getPath().contains(string2); } - BuiltInRegistries.ITEM.getTags().map(HolderSet.Named::key).filter(tagKey -> predicate.test(tagKey.location())).forEach(this.visibleTags::add); + BuiltInRegistries.ITEM.getTags().map(Named::key).filter(tagKey -> predicate.test(tagKey.location())).forEach(this.visibleTags::add); } @Override @@ -715,7 +712,9 @@ public class CreativeModeInventoryScreen extends AbstractContainerScreen list = stack.getTooltipLines(Item.TooltipContext.of(this.minecraft.level), this.minecraft.player, tooltipFlag); - if (bl2 && bl) { + if (list.isEmpty()) { + return list; + } else if (bl2 && bl) { return list; } else { List list2 = Lists.newArrayList(list); @@ -862,8 +861,8 @@ public class CreativeModeInventoryScreen extends AbstractContainerScreen getNoItemIcon() { + public ResourceLocation getNoItemIcon() { return this.target.getNoItemIcon(); } diff --git a/net/minecraft/client/gui/screens/inventory/CyclingSlotBackground.java b/net/minecraft/client/gui/screens/inventory/CyclingSlotBackground.java index 476e5595..8dc02de0 100644 --- a/net/minecraft/client/gui/screens/inventory/CyclingSlotBackground.java +++ b/net/minecraft/client/gui/screens/inventory/CyclingSlotBackground.java @@ -3,11 +3,8 @@ package net.minecraft.client.gui.screens.inventory; import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.ARGB; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -53,8 +50,7 @@ public class CyclingSlotBackground { } private void renderIcon(Slot slot, ResourceLocation icon, float alpha, GuiGraphics guiGraphics, int x, int y) { - TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)Minecraft.getInstance().getTextureAtlas(TextureAtlas.LOCATION_BLOCKS).apply(icon); - guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, x + slot.x, y + slot.y, 16, 16, ARGB.white(alpha)); + guiGraphics.blitSprite(RenderType::guiTextured, icon, x + slot.x, y + slot.y, 16, 16, ARGB.white(alpha)); } private float getIconTransitionTransparency(float partialTick) { diff --git a/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java b/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java index 869cbb9c..7b9c77e1 100644 --- a/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java +++ b/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java @@ -27,13 +27,13 @@ public class EffectsInInventory { private final AbstractContainerScreen screen; private final Minecraft minecraft; - public EffectsInInventory(AbstractContainerScreen abstractContainerScreen) { - this.screen = abstractContainerScreen; + public EffectsInInventory(AbstractContainerScreen screen) { + this.screen = screen; this.minecraft = Minecraft.getInstance(); } - public void render(GuiGraphics guiGraphics, int i, int j, float f) { - this.renderEffects(guiGraphics, i, j); + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + this.renderEffects(guiGraphics, mouseX, mouseY); } public boolean canSeeEffects() { @@ -42,86 +42,86 @@ public class EffectsInInventory { return j >= 32; } - private void renderEffects(GuiGraphics guiGraphics, int i, int j) { - int k = this.screen.leftPos + this.screen.imageWidth + 2; - int l = this.screen.width - k; + private void renderEffects(GuiGraphics guiGraphics, int mouseX, int mouseY) { + int i = this.screen.leftPos + this.screen.imageWidth + 2; + int j = this.screen.width - i; Collection collection = this.minecraft.player.getActiveEffects(); - if (!collection.isEmpty() && l >= 32) { - boolean bl = l >= 120; - int m = 33; + if (!collection.isEmpty() && j >= 32) { + boolean bl = j >= 120; + int k = 33; if (collection.size() > 5) { - m = 132 / (collection.size() - 1); + k = 132 / (collection.size() - 1); } Iterable iterable = Ordering.natural().sortedCopy(collection); - this.renderBackgrounds(guiGraphics, k, m, iterable, bl); - this.renderIcons(guiGraphics, k, m, iterable, bl); + this.renderBackgrounds(guiGraphics, i, k, iterable, bl); + this.renderIcons(guiGraphics, i, k, iterable, bl); if (bl) { - this.renderLabels(guiGraphics, k, m, iterable); - } else if (i >= k && i <= k + 33) { - int n = this.screen.topPos; + this.renderLabels(guiGraphics, i, k, iterable); + } else if (mouseX >= i && mouseX <= i + 33) { + int l = this.screen.topPos; MobEffectInstance mobEffectInstance = null; for (MobEffectInstance mobEffectInstance2 : iterable) { - if (j >= n && j <= n + m) { + if (mouseY >= l && mouseY <= l + k) { mobEffectInstance = mobEffectInstance2; } - n += m; + l += k; } if (mobEffectInstance != null) { List list = List.of( this.getEffectName(mobEffectInstance), MobEffectUtil.formatDuration(mobEffectInstance, 1.0F, this.minecraft.level.tickRateManager().tickrate()) ); - guiGraphics.renderTooltip(this.screen.getFont(), list, Optional.empty(), i, j); + guiGraphics.renderTooltip(this.screen.getFont(), list, Optional.empty(), mouseX, mouseY); } } } } - private void renderBackgrounds(GuiGraphics guiGraphics, int i, int j, Iterable iterable, boolean bl) { - int k = this.screen.topPos; + private void renderBackgrounds(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects, boolean large) { + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { - if (bl) { - guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_LARGE_SPRITE, i, k, 120, 32); + for (MobEffectInstance mobEffectInstance : activeEffects) { + if (large) { + guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_LARGE_SPRITE, x, i, 120, 32); } else { - guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_SMALL_SPRITE, i, k, 32, 32); + guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_SMALL_SPRITE, x, i, 32, 32); } - k += j; + i += y; } } - private void renderIcons(GuiGraphics guiGraphics, int i, int j, Iterable iterable, boolean bl) { + private void renderIcons(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects, boolean large) { MobEffectTextureManager mobEffectTextureManager = this.minecraft.getMobEffectTextures(); - int k = this.screen.topPos; + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { + for (MobEffectInstance mobEffectInstance : activeEffects) { Holder holder = mobEffectInstance.getEffect(); TextureAtlasSprite textureAtlasSprite = mobEffectTextureManager.get(holder); - guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, i + (bl ? 6 : 7), k + 7, 18, 18); - k += j; + guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, x + (large ? 6 : 7), i + 7, 18, 18); + i += y; } } - private void renderLabels(GuiGraphics guiGraphics, int i, int j, Iterable iterable) { - int k = this.screen.topPos; + private void renderLabels(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects) { + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { + for (MobEffectInstance mobEffectInstance : activeEffects) { Component component = this.getEffectName(mobEffectInstance); - guiGraphics.drawString(this.screen.getFont(), component, i + 10 + 18, k + 6, 16777215); + guiGraphics.drawString(this.screen.getFont(), component, x + 10 + 18, i + 6, 16777215); Component component2 = MobEffectUtil.formatDuration(mobEffectInstance, 1.0F, this.minecraft.level.tickRateManager().tickrate()); - guiGraphics.drawString(this.screen.getFont(), component2, i + 10 + 18, k + 6 + 10, 8355711); - k += j; + guiGraphics.drawString(this.screen.getFont(), component2, x + 10 + 18, i + 6 + 10, 8355711); + i += y; } } - private Component getEffectName(MobEffectInstance mobEffectInstance) { - MutableComponent mutableComponent = mobEffectInstance.getEffect().value().getDisplayName().copy(); - if (mobEffectInstance.getAmplifier() >= 1 && mobEffectInstance.getAmplifier() <= 9) { - mutableComponent.append(CommonComponents.SPACE).append(Component.translatable("enchantment.level." + (mobEffectInstance.getAmplifier() + 1))); + private Component getEffectName(MobEffectInstance effect) { + MutableComponent mutableComponent = effect.getEffect().value().getDisplayName().copy(); + if (effect.getAmplifier() >= 1 && effect.getAmplifier() <= 9) { + mutableComponent.append(CommonComponents.SPACE).append(Component.translatable("enchantment.level." + (effect.getAmplifier() + 1))); } return mutableComponent; diff --git a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java index 9e653c49..2d4ac5c5 100644 --- a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java +++ b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java @@ -15,6 +15,7 @@ import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.Holder; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -121,10 +122,10 @@ public class EnchantmentScreen extends AbstractContainerScreen int p = 86 - this.font.width(string); FormattedText formattedText = EnchantmentNames.getInstance().getRandomName(this.font, p); int q = 6839882; - if ((k < l + 1 || this.minecraft.player.experienceLevel < o) && !this.minecraft.player.getAbilities().instabuild) { + if ((k < l + 1 || this.minecraft.player.experienceLevel < o) && !this.minecraft.player.hasInfiniteMaterials()) { guiGraphics.blitSprite(RenderType::guiTextured, ENCHANTMENT_SLOT_DISABLED_SPRITE, m, j + 14 + 19 * l, 108, 19); guiGraphics.blitSprite(RenderType::guiTextured, DISABLED_LEVEL_SPRITES[l], m + 1, j + 15 + 19 * l, 16, 16); - guiGraphics.drawWordWrap(this.font, formattedText, n, j + 16 + 19 * l, p, (q & 16711422) >> 1); + guiGraphics.drawWordWrap(this.font, formattedText, n, j + 16 + 19 * l, p, (q & 16711422) >> 1, false); q = 4226832; } else { int r = mouseX - (i + 60); @@ -137,7 +138,7 @@ public class EnchantmentScreen extends AbstractContainerScreen } guiGraphics.blitSprite(RenderType::guiTextured, ENABLED_LEVEL_SPRITES[l], m + 1, j + 15 + 19 * l, 16, 16); - guiGraphics.drawWordWrap(this.font, formattedText, n, j + 16 + 19 * l, p, q); + guiGraphics.drawWordWrap(this.font, formattedText, n, j + 16 + 19 * l, p, q, false); q = 8453920; } @@ -177,12 +178,12 @@ public class EnchantmentScreen extends AbstractContainerScreen float f = this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(false); super.render(guiGraphics, mouseX, mouseY, f); this.renderTooltip(guiGraphics, mouseX, mouseY); - boolean bl = this.minecraft.player.getAbilities().instabuild; + boolean bl = this.minecraft.player.hasInfiniteMaterials(); int i = this.menu.getGoldCount(); for (int j = 0; j < 3; j++) { int k = this.menu.costs[j]; - Optional> optional = this.minecraft.level.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(this.menu.enchantClue[j]); + Optional> optional = this.minecraft.level.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(this.menu.enchantClue[j]); if (!optional.isEmpty()) { int l = this.menu.levelClue[j]; int m = j + 1; diff --git a/net/minecraft/client/gui/screens/inventory/HorseInventoryScreen.java b/net/minecraft/client/gui/screens/inventory/HorseInventoryScreen.java index 15e65117..c51f5107 100644 --- a/net/minecraft/client/gui/screens/inventory/HorseInventoryScreen.java +++ b/net/minecraft/client/gui/screens/inventory/HorseInventoryScreen.java @@ -5,6 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.EntityTypeTags; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.animal.horse.AbstractHorse; import net.minecraft.world.entity.animal.horse.Llama; @@ -13,10 +14,8 @@ import net.minecraft.world.inventory.HorseInventoryMenu; @Environment(EnvType.CLIENT) public class HorseInventoryScreen extends AbstractContainerScreen { + private static final ResourceLocation SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot"); private static final ResourceLocation CHEST_SLOTS_SPRITE = ResourceLocation.withDefaultNamespace("container/horse/chest_slots"); - private static final ResourceLocation SADDLE_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/horse/saddle_slot"); - private static final ResourceLocation LLAMA_ARMOR_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/horse/llama_armor_slot"); - private static final ResourceLocation ARMOR_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/horse/armor_slot"); private static final ResourceLocation HORSE_INVENTORY_LOCATION = ResourceLocation.withDefaultNamespace("textures/gui/container/horse.png"); /** * The EntityHorse whose inventory is currently being accessed. @@ -47,21 +46,22 @@ public class HorseInventoryScreen extends AbstractContainerScreen { @Override public void containerTick() { super.containerTick(); - if (this.minecraft.gameMode.hasInfiniteItems()) { + if (this.minecraft.player.hasInfiniteMaterials()) { this.minecraft .setScreen( new CreativeModeInventoryScreen(this.minecraft.player, this.minecraft.player.connection.enabledFeatures(), this.minecraft.options.operatorItemsTab().get()) @@ -49,7 +49,7 @@ public class InventoryScreen extends AbstractRecipeBookScreen { @Override protected void init() { - if (this.minecraft.gameMode.hasInfiniteItems()) { + if (this.minecraft.player.hasInfiniteMaterials()) { this.minecraft .setScreen( new CreativeModeInventoryScreen(this.minecraft.player, this.minecraft.player.connection.enabledFeatures(), this.minecraft.options.operatorItemsTab().get()) diff --git a/net/minecraft/client/gui/screens/inventory/LoomScreen.java b/net/minecraft/client/gui/screens/inventory/LoomScreen.java index d1cb79b2..4984fa8f 100644 --- a/net/minecraft/client/gui/screens/inventory/LoomScreen.java +++ b/net/minecraft/client/gui/screens/inventory/LoomScreen.java @@ -28,14 +28,13 @@ import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BannerPattern; import net.minecraft.world.level.block.entity.BannerPatternLayers; -import net.minecraft.world.level.block.entity.BannerPatternLayers.Builder; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class LoomScreen extends AbstractContainerScreen { - private static final ResourceLocation BANNER_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/banner_slot"); - private static final ResourceLocation DYE_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/dye_slot"); - private static final ResourceLocation PATTERN_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/pattern_slot"); + private static final ResourceLocation BANNER_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot/banner"); + private static final ResourceLocation DYE_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot/dye"); + private static final ResourceLocation PATTERN_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot/banner_pattern"); private static final ResourceLocation SCROLLER_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/scroller"); private static final ResourceLocation SCROLLER_DISABLED_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/scroller_disabled"); private static final ResourceLocation PATTERN_SELECTED_SPRITE = ResourceLocation.withDefaultNamespace("container/loom/pattern_selected"); @@ -72,7 +71,7 @@ public class LoomScreen extends AbstractContainerScreen { @Override protected void init() { super.init(); - this.flag = this.minecraft.getEntityModels().bakeLayer(ModelLayers.BANNER).getChild("flag"); + this.flag = this.minecraft.getEntityModels().bakeLayer(ModelLayers.STANDING_BANNER_FLAG).getChild("flag"); } @Override @@ -115,11 +114,9 @@ public class LoomScreen extends AbstractContainerScreen { guiGraphics.pose().pushPose(); guiGraphics.pose().translate((float)(i + 139), (float)(j + 52), 0.0F); guiGraphics.pose().scale(24.0F, 24.0F, 1.0F); - guiGraphics.pose().translate(0.5F, -0.5F, 0.5F); + guiGraphics.pose().translate(0.5F, 0.0F, 0.5F); float f = 0.6666667F; guiGraphics.pose().scale(0.6666667F, 0.6666667F, -0.6666667F); - this.flag.xRot = 0.0F; - this.flag.y = -32.0F; DyeColor dyeColor = ((BannerItem)slot4.getItem().getItem()).getColor(); guiGraphics.drawSpecial( multiBufferSource -> BannerRenderer.renderPatterns( @@ -172,13 +169,11 @@ public class LoomScreen extends AbstractContainerScreen { poseStack.pushPose(); poseStack.translate(x + 0.5F, (float)(y + 16), 0.0F); poseStack.scale(6.0F, -6.0F, 1.0F); - poseStack.translate(0.5F, 0.5F, 0.0F); + poseStack.translate(0.5F, 0.0F, 0.0F); poseStack.translate(0.5F, 0.5F, 0.5F); float f = 0.6666667F; poseStack.scale(0.6666667F, -0.6666667F, -0.6666667F); - this.flag.xRot = 0.0F; - this.flag.y = -32.0F; - BannerPatternLayers bannerPatternLayers = new Builder().add(patern, DyeColor.WHITE).build(); + BannerPatternLayers bannerPatternLayers = new BannerPatternLayers.Builder().add(patern, DyeColor.WHITE).build(); guiGraphics.drawSpecial( multiBufferSource -> BannerRenderer.renderPatterns( poseStack, multiBufferSource, 15728880, OverlayTexture.NO_OVERLAY, this.flag, ModelBakery.BANNER_BASE, true, DyeColor.GRAY, bannerPatternLayers diff --git a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java index 46b3d2af..3fd34aef 100644 --- a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java +++ b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java @@ -4,6 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.Button.OnPress; import net.minecraft.client.renderer.RenderType; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -296,7 +297,7 @@ public class MerchantScreen extends AbstractContainerScreen { class TradeOfferButton extends Button { final int index; - public TradeOfferButton(final int x, final int y, final int index, final Button.OnPress onPress) { + public TradeOfferButton(final int x, final int y, final int index, final OnPress onPress) { super(x, y, 88, 20, CommonComponents.EMPTY, onPress, DEFAULT_NARRATION); this.index = index; this.visible = false; diff --git a/net/minecraft/client/gui/screens/inventory/SmithingScreen.java b/net/minecraft/client/gui/screens/inventory/SmithingScreen.java index 279420d1..99f777ee 100644 --- a/net/minecraft/client/gui/screens/inventory/SmithingScreen.java +++ b/net/minecraft/client/gui/screens/inventory/SmithingScreen.java @@ -25,10 +25,10 @@ import org.joml.Vector3f; public class SmithingScreen extends ItemCombinerScreen { private static final ResourceLocation ERROR_SPRITE = ResourceLocation.withDefaultNamespace("container/smithing/error"); private static final ResourceLocation EMPTY_SLOT_SMITHING_TEMPLATE_ARMOR_TRIM = ResourceLocation.withDefaultNamespace( - "item/empty_slot_smithing_template_armor_trim" + "container/slot/smithing_template_armor_trim" ); private static final ResourceLocation EMPTY_SLOT_SMITHING_TEMPLATE_NETHERITE_UPGRADE = ResourceLocation.withDefaultNamespace( - "item/empty_slot_smithing_template_netherite_upgrade" + "container/slot/smithing_template_netherite_upgrade" ); private static final Component MISSING_TEMPLATE_TOOLTIP = Component.translatable("container.upgrade.missing_template_tooltip"); private static final Component ERROR_TOOLTIP = Component.translatable("container.upgrade.error_tooltip"); diff --git a/net/minecraft/client/gui/screens/inventory/StonecutterScreen.java b/net/minecraft/client/gui/screens/inventory/StonecutterScreen.java index caf6d0b9..f5da0b19 100644 --- a/net/minecraft/client/gui/screens/inventory/StonecutterScreen.java +++ b/net/minecraft/client/gui/screens/inventory/StonecutterScreen.java @@ -13,8 +13,9 @@ import net.minecraft.util.Mth; import net.minecraft.util.context.ContextMap; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.StonecutterMenu; -import net.minecraft.world.item.crafting.SelectableRecipe; import net.minecraft.world.item.crafting.StonecutterRecipe; +import net.minecraft.world.item.crafting.SelectableRecipe.SingleInputEntry; +import net.minecraft.world.item.crafting.SelectableRecipe.SingleInputSet; import net.minecraft.world.item.crafting.display.SlotDisplay; import net.minecraft.world.item.crafting.display.SlotDisplayContext; @@ -81,7 +82,7 @@ public class StonecutterScreen extends AbstractContainerScreen int i = this.leftPos + 52; int j = this.topPos + 14; int k = this.startIndex + 12; - SelectableRecipe.SingleInputSet singleInputSet = this.menu.getVisibleRecipes(); + SingleInputSet singleInputSet = this.menu.getVisibleRecipes(); for (int l = this.startIndex; l < k && l < singleInputSet.size(); l++) { int m = l - this.startIndex; @@ -89,7 +90,7 @@ public class StonecutterScreen extends AbstractContainerScreen int o = j + m / 4 * 18 + 2; if (x >= n && x < n + 16 && y >= o && y < o + 18) { ContextMap contextMap = SlotDisplayContext.fromLevel(this.minecraft.level); - SlotDisplay slotDisplay = ((SelectableRecipe.SingleInputEntry)singleInputSet.entries().get(l)).recipe().optionDisplay(); + SlotDisplay slotDisplay = ((SingleInputEntry)singleInputSet.entries().get(l)).recipe().optionDisplay(); guiGraphics.renderTooltip(this.font, slotDisplay.resolveForFirstStack(contextMap), x, y); } } @@ -116,7 +117,7 @@ public class StonecutterScreen extends AbstractContainerScreen } private void renderRecipes(GuiGraphics guiGraphics, int x, int y, int startIndex) { - SelectableRecipe.SingleInputSet singleInputSet = this.menu.getVisibleRecipes(); + SingleInputSet singleInputSet = this.menu.getVisibleRecipes(); ContextMap contextMap = SlotDisplayContext.fromLevel(this.minecraft.level); for (int i = this.startIndex; i < startIndex && i < singleInputSet.size(); i++) { @@ -124,7 +125,7 @@ public class StonecutterScreen extends AbstractContainerScreen int k = x + j % 4 * 16; int l = j / 4; int m = y + l * 18 + 2; - SlotDisplay slotDisplay = ((SelectableRecipe.SingleInputEntry)singleInputSet.entries().get(i)).recipe().optionDisplay(); + SlotDisplay slotDisplay = ((SingleInputEntry)singleInputSet.entries().get(i)).recipe().optionDisplay(); guiGraphics.renderItem(slotDisplay.resolveForFirstStack(contextMap), k, m); } } diff --git a/net/minecraft/client/gui/screens/inventory/StructureBlockEditScreen.java b/net/minecraft/client/gui/screens/inventory/StructureBlockEditScreen.java index 43a3558c..edf270ec 100644 --- a/net/minecraft/client/gui/screens/inventory/StructureBlockEditScreen.java +++ b/net/minecraft/client/gui/screens/inventory/StructureBlockEditScreen.java @@ -31,6 +31,7 @@ public class StructureBlockEditScreen extends Screen { private static final Component INTEGRITY_LABEL = Component.translatable("structure_block.integrity"); private static final Component CUSTOM_DATA_LABEL = Component.translatable("structure_block.custom_data"); private static final Component INCLUDE_ENTITIES_LABEL = Component.translatable("structure_block.include_entities"); + private static final Component STRICT_LABEL = Component.translatable("structure_block.strict"); private static final Component DETECT_SIZE_LABEL = Component.translatable("structure_block.detect_size"); private static final Component SHOW_AIR_LABEL = Component.translatable("structure_block.show_air"); private static final Component SHOW_BOUNDING_BOX_LABEL = Component.translatable("structure_block.show_boundingbox"); @@ -43,6 +44,7 @@ public class StructureBlockEditScreen extends Screen { private Rotation initialRotation = Rotation.NONE; private StructureMode initialMode = StructureMode.DATA; private boolean initialEntityIgnoring; + private boolean initialStrict; private boolean initialShowAir; private boolean initialShowBoundingBox; private EditBox nameEdit; @@ -63,6 +65,7 @@ public class StructureBlockEditScreen extends Screen { private Button rot270Button; private Button detectButton; private CycleButton includeEntitiesButton; + private CycleButton strictButton; private CycleButton mirrorButton; private CycleButton toggleAirButton; private CycleButton toggleBoundingBox; @@ -85,6 +88,7 @@ public class StructureBlockEditScreen extends Screen { this.structure.setRotation(this.initialRotation); this.structure.setMode(this.initialMode); this.structure.setIgnoreEntities(this.initialEntityIgnoring); + this.structure.setStrict(this.initialStrict); this.structure.setShowAir(this.initialShowAir); this.structure.setShowBoundingBox(this.initialShowBoundingBox); this.minecraft.setScreen(null); @@ -98,6 +102,7 @@ public class StructureBlockEditScreen extends Screen { this.initialRotation = this.structure.getRotation(); this.initialMode = this.structure.getMode(); this.initialEntityIgnoring = this.structure.isIgnoreEntities(); + this.initialStrict = this.structure.isStrict(); this.initialShowAir = this.structure.getShowAir(); this.initialShowBoundingBox = this.structure.getShowBoundingBox(); this.saveButton = this.addRenderableWidget(Button.builder(Component.translatable("structure_block.button.save"), button -> { @@ -133,6 +138,11 @@ public class StructureBlockEditScreen extends Screen { .displayOnlyValue() .create(this.width / 2 + 4 + 100, 160, 50, 20, INCLUDE_ENTITIES_LABEL, (cycleButton, boolean_) -> this.structure.setIgnoreEntities(!boolean_)) ); + this.strictButton = this.addRenderableWidget( + CycleButton.onOffBuilder(this.structure.isStrict()) + .displayOnlyValue() + .create(this.width / 2 + 4 + 100, 120, 50, 20, STRICT_LABEL, (cycleButton, boolean_) -> this.structure.setStrict(boolean_)) + ); this.mirrorButton = this.addRenderableWidget( CycleButton.builder(Mirror::symbol) .withValues(Mirror.values()) @@ -289,6 +299,7 @@ public class StructureBlockEditScreen extends Screen { this.loadButton.visible = false; this.detectButton.visible = false; this.includeEntitiesButton.visible = false; + this.strictButton.visible = false; this.mirrorButton.visible = false; this.rot0Button.visible = false; this.rot90Button.visible = false; @@ -308,6 +319,7 @@ public class StructureBlockEditScreen extends Screen { this.saveButton.visible = true; this.detectButton.visible = true; this.includeEntitiesButton.visible = true; + this.strictButton.visible = false; this.toggleAirButton.visible = true; break; case LOAD: @@ -319,6 +331,7 @@ public class StructureBlockEditScreen extends Screen { this.seedEdit.setVisible(true); this.loadButton.visible = true; this.includeEntitiesButton.visible = true; + this.strictButton.visible = true; this.mirrorButton.visible = true; this.rot0Button.visible = true; this.rot90Button.visible = true; @@ -358,6 +371,7 @@ public class StructureBlockEditScreen extends Screen { this.structure.getRotation(), this.dataEdit.getValue(), this.structure.isIgnoreEntities(), + this.structure.isStrict(), this.structure.getShowAir(), this.structure.getShowBoundingBox(), f, @@ -439,6 +453,7 @@ public class StructureBlockEditScreen extends Screen { guiGraphics.drawString(this.font, INTEGRITY_LABEL, this.width / 2 - 153, 110, 10526880); this.integrityEdit.render(guiGraphics, mouseX, mouseY, partialTick); this.seedEdit.render(guiGraphics, mouseX, mouseY, partialTick); + guiGraphics.drawString(this.font, STRICT_LABEL, this.width / 2 + 154 - this.font.width(STRICT_LABEL), 110, 10526880); guiGraphics.drawString(this.font, SHOW_BOUNDING_BOX_LABEL, this.width / 2 + 154 - this.font.width(SHOW_BOUNDING_BOX_LABEL), 70, 10526880); } diff --git a/net/minecraft/client/gui/screens/inventory/TestBlockEditScreen.java b/net/minecraft/client/gui/screens/inventory/TestBlockEditScreen.java new file mode 100644 index 00000000..3536a6b1 --- /dev/null +++ b/net/minecraft/client/gui/screens/inventory/TestBlockEditScreen.java @@ -0,0 +1,97 @@ +package net.minecraft.client.gui.screens.inventory; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.CycleButton; +import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.CommonComponents; +import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.game.ServerboundSetTestBlockPacket; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.TestBlockEntity; +import net.minecraft.world.level.block.state.properties.TestBlockMode; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class TestBlockEditScreen extends Screen { + private static final List MODES = List.of(TestBlockMode.values()); + private static final Component TITLE = Component.translatable(Blocks.TEST_BLOCK.getDescriptionId()); + private static final Component MESSAGE_LABEL = Component.translatable("test_block.message"); + private final BlockPos position; + private TestBlockMode mode; + private String message; + @Nullable + private EditBox messageEdit; + + public TestBlockEditScreen(TestBlockEntity blockEntity) { + super(TITLE); + this.position = blockEntity.getBlockPos(); + this.mode = blockEntity.getMode(); + this.message = blockEntity.getMessage(); + } + + @Override + public void init() { + this.messageEdit = new EditBox(this.font, this.width / 2 - 152, 80, 240, 20, Component.translatable("test_block.message")); + this.messageEdit.setMaxLength(128); + this.messageEdit.setValue(this.message); + this.addRenderableWidget(this.messageEdit); + this.setInitialFocus(this.messageEdit); + this.updateMode(this.mode); + this.addRenderableWidget( + CycleButton.builder(TestBlockMode::getDisplayName) + .withValues(MODES) + .displayOnlyValue() + .withInitialValue(this.mode) + .create(this.width / 2 - 4 - 150, 185, 50, 20, TITLE, (cycleButton, testBlockMode) -> this.updateMode(testBlockMode)) + ); + this.addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, button -> this.onDone()).bounds(this.width / 2 - 4 - 150, 210, 150, 20).build()); + this.addRenderableWidget(Button.builder(CommonComponents.GUI_CANCEL, button -> this.onCancel()).bounds(this.width / 2 + 4, 210, 150, 20).build()); + } + + @Override + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + super.render(guiGraphics, mouseX, mouseY, partialTick); + guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 10, 16777215); + if (this.mode != TestBlockMode.START) { + guiGraphics.drawString(this.font, MESSAGE_LABEL, this.width / 2 - 153, 70, 10526880); + } + + guiGraphics.drawString(this.font, this.mode.getDetailedMessage(), this.width / 2 - 153, 174, 10526880); + } + + @Override + public boolean isPauseScreen() { + return false; + } + + private void onDone() { + this.message = this.messageEdit.getValue(); + this.minecraft.getConnection().send(new ServerboundSetTestBlockPacket(this.position, this.mode, this.message)); + this.onClose(); + } + + @Override + public void onClose() { + this.onCancel(); + } + + private void onCancel() { + this.minecraft.setScreen(null); + } + + private void updateMode(TestBlockMode mode) { + this.mode = mode; + this.messageEdit.visible = mode != TestBlockMode.START; + } + + @Override + public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + this.renderTransparentBackground(guiGraphics); + } +} diff --git a/net/minecraft/client/gui/screens/inventory/TestInstanceBlockEditScreen.java b/net/minecraft/client/gui/screens/inventory/TestInstanceBlockEditScreen.java new file mode 100644 index 00000000..abfff3f4 --- /dev/null +++ b/net/minecraft/client/gui/screens/inventory/TestInstanceBlockEditScreen.java @@ -0,0 +1,229 @@ +package net.minecraft.client.gui.screens.inventory; + +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.ChatFormatting; +import net.minecraft.SharedConstants; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.CycleButton; +import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.components.FittingMultiLineTextWidget; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.core.Vec3i; +import net.minecraft.core.registries.Registries; +import net.minecraft.gametest.framework.GameTestInstance; +import net.minecraft.network.chat.CommonComponents; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.protocol.game.ServerboundTestInstanceBlockActionPacket; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.entity.TestInstanceBlockEntity; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class TestInstanceBlockEditScreen extends Screen { + private static final Component ID_LABEL = Component.translatable("test_instance_block.test_id"); + private static final Component SIZE_LABEL = Component.translatable("test_instance_block.size"); + private static final Component INCLUDE_ENTITIES_LABEL = Component.translatable("test_instance_block.entities"); + private static final Component ROTATION_LABEL = Component.translatable("test_instance_block.rotation"); + private static final int BUTTON_PADDING = 8; + private static final int WIDTH = 316; + private final TestInstanceBlockEntity blockEntity; + @Nullable + private EditBox idEdit; + @Nullable + private EditBox sizeXEdit; + @Nullable + private EditBox sizeYEdit; + @Nullable + private EditBox sizeZEdit; + @Nullable + private FittingMultiLineTextWidget infoWidget; + @Nullable + private Button saveButton; + @Nullable + private Button exportButton; + @Nullable + private CycleButton includeEntitiesButton; + @Nullable + private CycleButton rotationButton; + + public TestInstanceBlockEditScreen(TestInstanceBlockEntity blockEntity) { + super(blockEntity.getBlockState().getBlock().getName()); + this.blockEntity = blockEntity; + } + + @Override + protected void init() { + int i = this.width / 2 - 158; + boolean bl = SharedConstants.IS_RUNNING_IN_IDE; + int j = bl ? 3 : 2; + int k = widgetSize(j); + this.idEdit = new EditBox(this.font, i, 40, 316, 20, Component.translatable("test_instance_block.test_id")); + this.idEdit.setMaxLength(128); + Optional> optional = this.blockEntity.test(); + if (optional.isPresent()) { + this.idEdit.setValue(((ResourceKey)optional.get()).location().toString()); + } + + this.idEdit.setResponder(string -> this.updateTestInfo(false)); + this.addRenderableWidget(this.idEdit); + this.infoWidget = new FittingMultiLineTextWidget(i, 70, 316, 8 * 9, Component.literal(""), this.font); + this.addRenderableWidget(this.infoWidget); + Vec3i vec3i = this.blockEntity.getSize(); + int l = 0; + this.sizeXEdit = new EditBox(this.font, this.widgetX(l++, 5), 160, widgetSize(5), 20, Component.translatable("structure_block.size.x")); + this.sizeXEdit.setMaxLength(15); + this.addRenderableWidget(this.sizeXEdit); + this.sizeYEdit = new EditBox(this.font, this.widgetX(l++, 5), 160, widgetSize(5), 20, Component.translatable("structure_block.size.y")); + this.sizeYEdit.setMaxLength(15); + this.addRenderableWidget(this.sizeYEdit); + this.sizeZEdit = new EditBox(this.font, this.widgetX(l++, 5), 160, widgetSize(5), 20, Component.translatable("structure_block.size.z")); + this.sizeZEdit.setMaxLength(15); + this.addRenderableWidget(this.sizeZEdit); + this.setSize(vec3i); + this.rotationButton = this.addRenderableWidget( + CycleButton.builder(TestInstanceBlockEditScreen::rotationDisplay) + .withValues(Rotation.values()) + .withInitialValue(this.blockEntity.getRotation()) + .displayOnlyValue() + .create(this.widgetX(l++, 5), 160, widgetSize(5), 20, ROTATION_LABEL, (cycleButton, rotation) -> this.updateSaveState()) + ); + this.includeEntitiesButton = this.addRenderableWidget( + CycleButton.onOffBuilder(!this.blockEntity.ignoreEntities()).displayOnlyValue().create(this.widgetX(l++, 5), 160, widgetSize(5), 20, INCLUDE_ENTITIES_LABEL) + ); + l = 0; + this.addRenderableWidget(Button.builder(Component.translatable("test_instance.action.reset"), button -> { + this.sendToServer(ServerboundTestInstanceBlockActionPacket.Action.RESET); + this.minecraft.setScreen(null); + }).bounds(this.widgetX(l++, j), 185, k, 20).build()); + this.saveButton = this.addRenderableWidget(Button.builder(Component.translatable("test_instance.action.save"), button -> { + this.sendToServer(ServerboundTestInstanceBlockActionPacket.Action.SAVE); + this.minecraft.setScreen(null); + }).bounds(this.widgetX(l++, j), 185, k, 20).build()); + if (bl) { + this.exportButton = this.addRenderableWidget(Button.builder(Component.literal("Export Structure"), button -> { + this.sendToServer(ServerboundTestInstanceBlockActionPacket.Action.EXPORT); + this.minecraft.setScreen(null); + }).bounds(this.widgetX(l++, j), 185, k, 20).build()); + } + + this.addRenderableWidget(Button.builder(Component.translatable("test_instance.action.run"), button -> { + this.sendToServer(ServerboundTestInstanceBlockActionPacket.Action.RUN); + this.minecraft.setScreen(null); + }).bounds(this.widgetX(0, 3), 210, widgetSize(3), 20).build()); + this.addRenderableWidget(Button.builder(CommonComponents.GUI_DONE, button -> this.onDone()).bounds(this.widgetX(1, 3), 210, widgetSize(3), 20).build()); + this.addRenderableWidget(Button.builder(CommonComponents.GUI_CANCEL, button -> this.onCancel()).bounds(this.widgetX(2, 3), 210, widgetSize(3), 20).build()); + this.updateTestInfo(true); + } + + private void updateSaveState() { + boolean bl = this.rotationButton.getValue() == Rotation.NONE && ResourceLocation.tryParse(this.idEdit.getValue()) != null; + this.saveButton.active = bl; + if (this.exportButton != null) { + this.exportButton.active = bl; + } + } + + private static Component rotationDisplay(Rotation rotation) { + return Component.literal(switch (rotation) { + case NONE -> "0"; + case CLOCKWISE_90 -> "90"; + case CLOCKWISE_180 -> "180"; + case COUNTERCLOCKWISE_90 -> "270"; + }); + } + + private void setSize(Vec3i size) { + this.sizeXEdit.setValue(Integer.toString(size.getX())); + this.sizeYEdit.setValue(Integer.toString(size.getY())); + this.sizeZEdit.setValue(Integer.toString(size.getZ())); + } + + private int widgetX(int index, int widgetsInRow) { + int i = this.width / 2 - 158; + float f = exactWidgetSize(widgetsInRow); + return (int)(i + index * (8.0F + f)); + } + + private static int widgetSize(int widgetsInRow) { + return (int)exactWidgetSize(widgetsInRow); + } + + private static float exactWidgetSize(int widgetsInRow) { + return (float)(316 - (widgetsInRow - 1) * 8) / widgetsInRow; + } + + @Override + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + super.render(guiGraphics, mouseX, mouseY, partialTick); + int i = this.width / 2 - 158; + guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 10, 16777215); + guiGraphics.drawString(this.font, ID_LABEL, i, 30, 12632256); + guiGraphics.drawString(this.font, SIZE_LABEL, i, 150, 12632256); + guiGraphics.drawString(this.font, ROTATION_LABEL, this.rotationButton.getX(), 150, 12632256); + guiGraphics.drawString(this.font, INCLUDE_ENTITIES_LABEL, this.includeEntitiesButton.getX(), 150, 12632256); + } + + private void updateTestInfo(boolean load) { + boolean bl = this.sendToServer(load ? ServerboundTestInstanceBlockActionPacket.Action.INIT : ServerboundTestInstanceBlockActionPacket.Action.QUERY); + if (!bl) { + this.infoWidget.setMessage(Component.translatable("test_instance.description.invalid_id").withStyle(ChatFormatting.RED)); + } + + this.updateSaveState(); + } + + private void onDone() { + this.sendToServer(ServerboundTestInstanceBlockActionPacket.Action.SET); + this.onClose(); + } + + private boolean sendToServer(ServerboundTestInstanceBlockActionPacket.Action action) { + Optional optional = Optional.ofNullable(ResourceLocation.tryParse(this.idEdit.getValue())); + Optional> optional2 = optional.map(resourceLocation -> ResourceKey.create(Registries.TEST_INSTANCE, resourceLocation)); + Vec3i vec3i = new Vec3i(parseSize(this.sizeXEdit.getValue()), parseSize(this.sizeYEdit.getValue()), parseSize(this.sizeZEdit.getValue())); + boolean bl = !this.includeEntitiesButton.getValue(); + this.minecraft + .getConnection() + .send(new ServerboundTestInstanceBlockActionPacket(this.blockEntity.getBlockPos(), action, optional2, vec3i, this.rotationButton.getValue(), bl)); + return optional.isPresent(); + } + + public void setStatus(Component status, Optional size) { + MutableComponent mutableComponent = Component.empty(); + this.blockEntity + .errorMessage() + .ifPresent( + component -> mutableComponent.append( + Component.translatable("test_instance.description.failed", Component.empty().withStyle(ChatFormatting.RED).append(component)) + ) + .append("\n\n") + ); + mutableComponent.append(status); + this.infoWidget.setMessage(mutableComponent); + size.ifPresent(this::setSize); + } + + private void onCancel() { + this.onClose(); + } + + private static int parseSize(String size) { + try { + return Mth.clamp(Integer.parseInt(size), 1, 48); + } catch (NumberFormatException var2) { + return 1; + } + } + + @Override + public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + this.renderTransparentBackground(guiGraphics); + } +} diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java index 3da1768e..2f454199 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java @@ -40,12 +40,12 @@ public class ClientActivePlayersTooltip implements ClientTooltipComponent { } @Override - public void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { - for (int m = 0; m < this.activePlayers.size(); m++) { - ProfileResult profileResult = (ProfileResult)this.activePlayers.get(m); - int n = j + 2 + m * 12; - PlayerFaceRenderer.draw(guiGraphics, Minecraft.getInstance().getSkinManager().getInsecureSkin(profileResult.profile()), i + 2, n, 10); - guiGraphics.drawString(font, profileResult.profile().getName(), i + 10 + 4, n + 2, -1); + public void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { + for (int i = 0; i < this.activePlayers.size(); i++) { + ProfileResult profileResult = (ProfileResult)this.activePlayers.get(i); + int j = y + 2 + i * 12; + PlayerFaceRenderer.draw(guiGraphics, Minecraft.getInstance().getSkinManager().getInsecureSkin(profileResult.profile()), x + 2, j, 10); + guiGraphics.drawString(font, profileResult.profile().getName(), x + 10 + 4, j + 2, -1); } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java index 3aa631b6..5e7111c8 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java @@ -67,8 +67,8 @@ public class ClientBundleTooltip implements ClientTooltipComponent { return this.gridSizeY() * 24; } - private int getContentXOffset(int i) { - return (i - 96) / 2; + private int getContentXOffset(int width) { + return (width - 96) / 2; } private int gridSizeY() { @@ -80,102 +80,102 @@ public class ClientBundleTooltip implements ClientTooltipComponent { } @Override - public void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + public void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { if (this.contents.isEmpty()) { - this.renderEmptyBundleTooltip(font, i, j, k, l, guiGraphics); + this.renderEmptyBundleTooltip(font, x, y, width, height, guiGraphics); } else { - this.renderBundleWithItemsTooltip(font, i, j, k, l, guiGraphics); + this.renderBundleWithItemsTooltip(font, x, y, width, height, guiGraphics); } } - private void renderEmptyBundleTooltip(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { - drawEmptyBundleDescriptionText(i + this.getContentXOffset(k), j, font, guiGraphics); - this.drawProgressbar(i + this.getContentXOffset(k), j + getEmptyBundleDescriptionTextHeight(font) + 4, font, guiGraphics); + private void renderEmptyBundleTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { + drawEmptyBundleDescriptionText(x + this.getContentXOffset(width), y, font, guiGraphics); + this.drawProgressbar(x + this.getContentXOffset(width), y + getEmptyBundleDescriptionTextHeight(font) + 4, font, guiGraphics); } - private void renderBundleWithItemsTooltip(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + private void renderBundleWithItemsTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { boolean bl = this.contents.size() > 12; List list = this.getShownItems(this.contents.getNumberOfItemsToShow()); - int m = i + this.getContentXOffset(k) + 96; - int n = j + this.gridSizeY() * 24; - int o = 1; + int i = x + this.getContentXOffset(width) + 96; + int j = y + this.gridSizeY() * 24; + int k = 1; - for (int p = 1; p <= this.gridSizeY(); p++) { - for (int q = 1; q <= 4; q++) { - int r = m - q * 24; - int s = n - p * 24; - if (shouldRenderSurplusText(bl, q, p)) { - renderCount(r, s, this.getAmountOfHiddenItems(list), font, guiGraphics); - } else if (shouldRenderItemSlot(list, o)) { - this.renderSlot(o, r, s, list, o, font, guiGraphics); - o++; + for (int l = 1; l <= this.gridSizeY(); l++) { + for (int m = 1; m <= 4; m++) { + int n = i - m * 24; + int o = j - l * 24; + if (shouldRenderSurplusText(bl, m, l)) { + renderCount(n, o, this.getAmountOfHiddenItems(list), font, guiGraphics); + } else if (shouldRenderItemSlot(list, k)) { + this.renderSlot(k, n, o, list, k, font, guiGraphics); + k++; } } } - this.drawSelectedItemTooltip(font, guiGraphics, i, j, k); - this.drawProgressbar(i + this.getContentXOffset(k), j + this.itemGridHeight() + 4, font, guiGraphics); + this.drawSelectedItemTooltip(font, guiGraphics, x, y, width); + this.drawProgressbar(x + this.getContentXOffset(width), y + this.itemGridHeight() + 4, font, guiGraphics); } - private List getShownItems(int i) { - int j = Math.min(this.contents.size(), i); - return this.contents.itemCopyStream().toList().subList(0, j); + private List getShownItems(int itemsToShow) { + int i = Math.min(this.contents.size(), itemsToShow); + return this.contents.itemCopyStream().toList().subList(0, i); } - private static boolean shouldRenderSurplusText(boolean bl, int i, int j) { - return bl && i * j == 1; + private static boolean shouldRenderSurplusText(boolean hasEnoughItems, int cellX, int cellY) { + return hasEnoughItems && cellX * cellY == 1; } - private static boolean shouldRenderItemSlot(List list, int i) { - return list.size() >= i; + private static boolean shouldRenderItemSlot(List shownItems, int slotIndex) { + return shownItems.size() >= slotIndex; } - private int getAmountOfHiddenItems(List list) { - return this.contents.itemCopyStream().skip(list.size()).mapToInt(ItemStack::getCount).sum(); + private int getAmountOfHiddenItems(List shownItems) { + return this.contents.itemCopyStream().skip(shownItems.size()).mapToInt(ItemStack::getCount).sum(); } - private void renderSlot(int i, int j, int k, List list, int l, Font font, GuiGraphics guiGraphics) { - int m = list.size() - i; - boolean bl = m == this.contents.getSelectedItem(); - ItemStack itemStack = (ItemStack)list.get(m); + private void renderSlot(int slotIndex, int x, int y, List shownItems, int seed, Font font, GuiGraphics guiGraphics) { + int i = shownItems.size() - slotIndex; + boolean bl = i == this.contents.getSelectedItem(); + ItemStack itemStack = (ItemStack)shownItems.get(i); if (bl) { - guiGraphics.blitSprite(RenderType::guiTextured, SLOT_HIGHLIGHT_BACK_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTextured, SLOT_HIGHLIGHT_BACK_SPRITE, x, y, 24, 24); } else { - guiGraphics.blitSprite(RenderType::guiTextured, SLOT_BACKGROUND_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTextured, SLOT_BACKGROUND_SPRITE, x, y, 24, 24); } - guiGraphics.renderItem(itemStack, j + 4, k + 4, l); - guiGraphics.renderItemDecorations(font, itemStack, j + 4, k + 4); + guiGraphics.renderItem(itemStack, x + 4, y + 4, seed); + guiGraphics.renderItemDecorations(font, itemStack, x + 4, y + 4); if (bl) { - guiGraphics.blitSprite(RenderType::guiTexturedOverlay, SLOT_HIGHLIGHT_FRONT_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTexturedOverlay, SLOT_HIGHLIGHT_FRONT_SPRITE, x, y, 24, 24); } } - private static void renderCount(int i, int j, int k, Font font, GuiGraphics guiGraphics) { - guiGraphics.drawCenteredString(font, "+" + k, i + 12, j + 10, 16777215); + private static void renderCount(int slotX, int slotY, int count, Font font, GuiGraphics guiGraphics) { + guiGraphics.drawCenteredString(font, "+" + count, slotX + 12, slotY + 10, 16777215); } - private void drawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int i, int j, int k) { + private void drawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int x, int y, int width) { if (this.contents.hasSelectedItem()) { ItemStack itemStack = this.contents.getItemUnsafe(this.contents.getSelectedItem()); Component component = itemStack.getStyledHoverName(); - int l = font.width(component.getVisualOrderText()); - int m = i + k / 2 - 12; - guiGraphics.renderTooltip(font, component, m - l / 2, j - 15, itemStack.get(DataComponents.TOOLTIP_STYLE)); + int i = font.width(component.getVisualOrderText()); + int j = x + width / 2 - 12; + guiGraphics.renderTooltip(font, component, j - i / 2, y - 15, itemStack.get(DataComponents.TOOLTIP_STYLE)); } } - private void drawProgressbar(int i, int j, Font font, GuiGraphics guiGraphics) { - guiGraphics.blitSprite(RenderType::guiTextured, this.getProgressBarTexture(), i + 1, j, this.getProgressBarFill(), 13); - guiGraphics.blitSprite(RenderType::guiTextured, PROGRESSBAR_BORDER_SPRITE, i, j, 96, 13); + private void drawProgressbar(int x, int y, Font font, GuiGraphics guiGraphics) { + guiGraphics.blitSprite(RenderType::guiTextured, this.getProgressBarTexture(), x + 1, y, this.getProgressBarFill(), 13); + guiGraphics.blitSprite(RenderType::guiTextured, PROGRESSBAR_BORDER_SPRITE, x, y, 96, 13); Component component = this.getProgressBarFillText(); if (component != null) { - guiGraphics.drawCenteredString(font, component, i + 48, j + 3, 16777215); + guiGraphics.drawCenteredString(font, component, x + 48, y + 3, 16777215); } } - private static void drawEmptyBundleDescriptionText(int i, int j, Font font, GuiGraphics guiGraphics) { - guiGraphics.drawWordWrap(font, BUNDLE_EMPTY_DESCRIPTION, i, j, 96, 11184810); + private static void drawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics guiGraphics) { + guiGraphics.drawWordWrap(font, BUNDLE_EMPTY_DESCRIPTION, x, y, 96, 11184810); } private static int getEmptyBundleDescriptionTextHeight(Font font) { diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java index 7ca1ba41..e23bcce8 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java @@ -3,7 +3,7 @@ package net.minecraft.client.gui.screens.inventory.tooltip; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.FormattedCharSequence; import org.joml.Matrix4f; @@ -26,7 +26,7 @@ public class ClientTextTooltip implements ClientTooltipComponent { } @Override - public void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, MultiBufferSource.BufferSource bufferSource) { + public void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, BufferSource bufferSource) { font.drawInBatch(this.text, (float)mouseX, (float)mouseY, -1, true, matrix, bufferSource, Font.DisplayMode.NORMAL, 0, 15728880); } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java index f49f2581..ab659fd5 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java @@ -4,7 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.FormattedCharSequence; import net.minecraft.world.inventory.tooltip.BundleTooltip; import net.minecraft.world.inventory.tooltip.TooltipComponent; @@ -32,9 +32,9 @@ public interface ClientTooltipComponent { return false; } - default void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, MultiBufferSource.BufferSource bufferSource) { + default void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, BufferSource bufferSource) { } - default void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + default void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java b/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java index ed79e697..087b6bf1 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java @@ -20,23 +20,23 @@ public class TooltipRenderUtil { public static final int PADDING_BOTTOM = 3; private static final int MARGIN = 9; - public static void renderTooltipBackground(GuiGraphics guiGraphics, int i, int j, int k, int l, int m, @Nullable ResourceLocation resourceLocation) { - int n = i - 3 - 9; - int o = j - 3 - 9; - int p = k + 3 + 3 + 18; - int q = l + 3 + 3 + 18; + public static void renderTooltipBackground(GuiGraphics guiGraphics, int x, int y, int width, int height, int z, @Nullable ResourceLocation sprite) { + int i = x - 3 - 9; + int j = y - 3 - 9; + int k = width + 3 + 3 + 18; + int l = height + 3 + 3 + 18; guiGraphics.pose().pushPose(); - guiGraphics.pose().translate(0.0F, 0.0F, (float)m); - guiGraphics.blitSprite(RenderType::guiTextured, getBackgroundSprite(resourceLocation), n, o, p, q); - guiGraphics.blitSprite(RenderType::guiTextured, getFrameSprite(resourceLocation), n, o, p, q); + guiGraphics.pose().translate(0.0F, 0.0F, (float)z); + guiGraphics.blitSprite(RenderType::guiTextured, getBackgroundSprite(sprite), i, j, k, l); + guiGraphics.blitSprite(RenderType::guiTextured, getFrameSprite(sprite), i, j, k, l); guiGraphics.pose().popPose(); } - private static ResourceLocation getBackgroundSprite(@Nullable ResourceLocation resourceLocation) { - return resourceLocation == null ? BACKGROUND_SPRITE : resourceLocation.withPath((UnaryOperator)(string -> "tooltip/" + string + "_background")); + private static ResourceLocation getBackgroundSprite(@Nullable ResourceLocation name) { + return name == null ? BACKGROUND_SPRITE : name.withPath((UnaryOperator)(string -> "tooltip/" + string + "_background")); } - private static ResourceLocation getFrameSprite(@Nullable ResourceLocation resourceLocation) { - return resourceLocation == null ? FRAME_SPRITE : resourceLocation.withPath((UnaryOperator)(string -> "tooltip/" + string + "_frame")); + private static ResourceLocation getFrameSprite(@Nullable ResourceLocation name) { + return name == null ? FRAME_SPRITE : name.withPath((UnaryOperator)(string -> "tooltip/" + string + "_frame")); } } diff --git a/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java b/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java index b67ceb95..88fe057f 100644 --- a/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java +++ b/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java @@ -17,6 +17,10 @@ import net.minecraft.client.gui.screens.ConnectScreen; import net.minecraft.client.gui.screens.DirectJoinServerScreen; import net.minecraft.client.gui.screens.EditServerScreen; import net.minecraft.client.gui.screens.Screen; +import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.Entry; +import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.LANHeader; +import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.NetworkServerEntry; +import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList.OnlineServerEntry; import net.minecraft.client.multiplayer.ServerData; import net.minecraft.client.multiplayer.ServerList; import net.minecraft.client.multiplayer.ServerStatusPinger; @@ -89,18 +93,18 @@ public class JoinMultiplayerScreen extends Screen { this.minecraft.setScreen(new EditServerScreen(this, this::addServerCallback, this.editingServer)); }).width(100).build()); this.editButton = this.addRenderableWidget(Button.builder(Component.translatable("selectServer.edit"), buttonx -> { - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (entry instanceof ServerSelectionList.OnlineServerEntry) { - ServerData serverData = ((ServerSelectionList.OnlineServerEntry)entry).getServerData(); + Entry entry = this.serverSelectionList.getSelected(); + if (entry instanceof OnlineServerEntry) { + ServerData serverData = ((OnlineServerEntry)entry).getServerData(); this.editingServer = new ServerData(serverData.name, serverData.ip, ServerData.Type.OTHER); this.editingServer.copyFrom(serverData); this.minecraft.setScreen(new EditServerScreen(this, this::editServerCallback, this.editingServer)); } }).width(74).build()); this.deleteButton = this.addRenderableWidget(Button.builder(Component.translatable("selectServer.delete"), buttonx -> { - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (entry instanceof ServerSelectionList.OnlineServerEntry) { - String string = ((ServerSelectionList.OnlineServerEntry)entry).getServerData().name; + Entry entry = this.serverSelectionList.getSelected(); + if (entry instanceof OnlineServerEntry) { + String string = ((OnlineServerEntry)entry).getServerData().name; if (string != null) { Component component = Component.translatable("selectServer.deleteQuestion"); Component component2 = Component.translatable("selectServer.deleteWarning", string); @@ -162,9 +166,9 @@ public class JoinMultiplayerScreen extends Screen { } private void deleteCallback(boolean confirmed) { - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (confirmed && entry instanceof ServerSelectionList.OnlineServerEntry) { - this.servers.remove(((ServerSelectionList.OnlineServerEntry)entry).getServerData()); + Entry entry = this.serverSelectionList.getSelected(); + if (confirmed && entry instanceof OnlineServerEntry) { + this.servers.remove(((OnlineServerEntry)entry).getServerData()); this.servers.save(); this.serverSelectionList.setSelected(null); this.serverSelectionList.updateOnlineServers(this.servers); @@ -174,9 +178,9 @@ public class JoinMultiplayerScreen extends Screen { } private void editServerCallback(boolean confirmed) { - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (confirmed && entry instanceof ServerSelectionList.OnlineServerEntry) { - ServerData serverData = ((ServerSelectionList.OnlineServerEntry)entry).getServerData(); + Entry entry = this.serverSelectionList.getSelected(); + if (confirmed && entry instanceof OnlineServerEntry) { + ServerData serverData = ((OnlineServerEntry)entry).getServerData(); serverData.name = this.editingServer.name; serverData.ip = this.editingServer.ip; serverData.copyFrom(this.editingServer); @@ -246,11 +250,11 @@ public class JoinMultiplayerScreen extends Screen { } public void joinSelectedServer() { - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (entry instanceof ServerSelectionList.OnlineServerEntry) { - this.join(((ServerSelectionList.OnlineServerEntry)entry).getServerData()); - } else if (entry instanceof ServerSelectionList.NetworkServerEntry) { - LanServer lanServer = ((ServerSelectionList.NetworkServerEntry)entry).getServerData(); + Entry entry = this.serverSelectionList.getSelected(); + if (entry instanceof OnlineServerEntry) { + this.join(((OnlineServerEntry)entry).getServerData()); + } else if (entry instanceof NetworkServerEntry) { + LanServer lanServer = ((NetworkServerEntry)entry).getServerData(); this.join(new ServerData(lanServer.getMotd(), lanServer.getAddress(), ServerData.Type.LAN)); } } @@ -259,7 +263,7 @@ public class JoinMultiplayerScreen extends Screen { ConnectScreen.startConnecting(this, this.minecraft, ServerAddress.parseString(server.ip), server, false, null); } - public void setSelected(ServerSelectionList.Entry selected) { + public void setSelected(Entry selected) { this.serverSelectionList.setSelected(selected); this.onSelectedChange(); } @@ -268,10 +272,10 @@ public class JoinMultiplayerScreen extends Screen { this.selectButton.active = false; this.editButton.active = false; this.deleteButton.active = false; - ServerSelectionList.Entry entry = this.serverSelectionList.getSelected(); - if (entry != null && !(entry instanceof ServerSelectionList.LANHeader)) { + Entry entry = this.serverSelectionList.getSelected(); + if (entry != null && !(entry instanceof LANHeader)) { this.selectButton.active = true; - if (entry instanceof ServerSelectionList.OnlineServerEntry) { + if (entry instanceof OnlineServerEntry) { this.editButton.active = true; this.deleteButton.active = true; } diff --git a/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java b/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java index 6641b498..d3c80d91 100644 --- a/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java +++ b/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java @@ -23,6 +23,7 @@ import net.minecraft.client.gui.screens.LoadingDotsText; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.multiplayer.ServerData; import net.minecraft.client.multiplayer.ServerList; +import net.minecraft.client.multiplayer.ServerData.State; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.server.LanServer; import net.minecraft.network.chat.CommonComponents; @@ -155,11 +156,10 @@ public class ServerSelectionList extends ObjectSelectionList { - try { - this.screen - .getPinger() - .pingServer( - this.serverData, - () -> this.minecraft.execute(this::updateServerList), - () -> { - this.serverData - .setState( - this.serverData.protocol == SharedConstants.getCurrentVersion().getProtocolVersion() ? ServerData.State.SUCCESSFUL : ServerData.State.INCOMPATIBLE - ); - this.minecraft.execute(this::refreshStatus); - } - ); - } catch (UnknownHostException var2) { - this.serverData.setState(ServerData.State.UNREACHABLE); - this.serverData.motd = ServerSelectionList.CANT_RESOLVE_TEXT; - this.minecraft.execute(this::refreshStatus); - } catch (Exception var3) { - this.serverData.setState(ServerData.State.UNREACHABLE); - this.serverData.motd = ServerSelectionList.CANT_CONNECT_TEXT; - this.minecraft.execute(this::refreshStatus); - } - } - ); + ServerSelectionList.THREAD_POOL.submit(() -> { + try { + this.screen.getPinger().pingServer(this.serverData, () -> this.minecraft.execute(this::updateServerList), () -> { + this.serverData.setState(this.serverData.protocol == SharedConstants.getCurrentVersion().getProtocolVersion() ? State.SUCCESSFUL : State.INCOMPATIBLE); + this.minecraft.execute(this::refreshStatus); + }); + } catch (UnknownHostException var2) { + this.serverData.setState(State.UNREACHABLE); + this.serverData.motd = ServerSelectionList.CANT_RESOLVE_TEXT; + this.minecraft.execute(this::refreshStatus); + } catch (Exception var3) { + this.serverData.setState(State.UNREACHABLE); + this.serverData.motd = ServerSelectionList.CANT_CONNECT_TEXT; + this.minecraft.execute(this::refreshStatus); + } + }); } - guiGraphics.drawString(this.minecraft.font, this.serverData.name, left + 32 + 3, top + 1, 16777215, false); + guiGraphics.drawString(this.minecraft.font, this.serverData.name, left + 32 + 3, top + 1, -1); List list = this.minecraft.font.split(this.serverData.motd, width - 32 - 2); for (int i = 0; i < Math.min(list.size(), 2); i++) { - guiGraphics.drawString(this.minecraft.font, (FormattedCharSequence)list.get(i), left + 32 + 3, top + 12 + 9 * i, -8355712, false); + guiGraphics.drawString(this.minecraft.font, (FormattedCharSequence)list.get(i), left + 32 + 3, top + 12 + 9 * i, -8355712); } this.drawIcon(guiGraphics, left, top, this.icon.textureLocation()); - if (this.serverData.state() == ServerData.State.PINGING) { + if (this.serverData.state() == State.PINGING) { int i = (int)(Util.getMillis() / 100L + index * 2 & 7L); if (i > 4) { i = 8 - i; @@ -322,12 +310,12 @@ public class ServerSelectionList extends ObjectSelectionList= i && mouseX <= i + 10 && mouseY >= top && mouseY <= top + 8) { this.screen.setTooltipForNextRenderPass(this.statusIconTooltip); } else if (this.onlinePlayersTooltip != null && mouseX >= k && mouseX <= k + j && mouseY >= top && mouseY <= top - 1 + 9) { diff --git a/net/minecraft/client/gui/screens/options/LanguageSelectScreen.java b/net/minecraft/client/gui/screens/options/LanguageSelectScreen.java index fd519f32..4adf4933 100644 --- a/net/minecraft/client/gui/screens/options/LanguageSelectScreen.java +++ b/net/minecraft/client/gui/screens/options/LanguageSelectScreen.java @@ -2,17 +2,14 @@ package net.minecraft.client.gui.screens.options; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.Options; -import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.ObjectSelectionList; import net.minecraft.client.gui.components.StringWidget; import net.minecraft.client.gui.layouts.LinearLayout; -import net.minecraft.client.gui.navigation.CommonInputs; import net.minecraft.client.gui.screens.Screen; -import net.minecraft.client.resources.language.LanguageInfo; +import net.minecraft.client.gui.screens.options.LanguageSelectScreen.LanguageSelectionList.Entry; import net.minecraft.client.resources.language.LanguageManager; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -58,7 +55,7 @@ public class LanguageSelectScreen extends OptionsSubScreen { } void onDone() { - LanguageSelectScreen.LanguageSelectionList.Entry entry = this.languageSelectionList.getSelected(); + Entry entry = this.languageSelectionList.getSelected(); if (entry != null && !entry.code.equals(this.languageManager.getSelected())) { this.languageManager.setSelected(entry.code); this.options.languageCode = entry.code; @@ -69,17 +66,23 @@ public class LanguageSelectScreen extends OptionsSubScreen { } @Environment(EnvType.CLIENT) - class LanguageSelectionList extends ObjectSelectionList { + class LanguageSelectionList extends ObjectSelectionList { public LanguageSelectionList(final Minecraft minecraft) { super(minecraft, LanguageSelectScreen.this.width, LanguageSelectScreen.this.height - 33 - 53, 33, 18); String string = LanguageSelectScreen.this.languageManager.getSelected(); - LanguageSelectScreen.this.languageManager.getLanguages().forEach((string2, languageInfo) -> { - LanguageSelectScreen.LanguageSelectionList.Entry entry = new LanguageSelectScreen.LanguageSelectionList.Entry(string2, languageInfo); - this.addEntry(entry); - if (string.equals(string2)) { - this.setSelected(entry); - } - }); + LanguageSelectScreen.this.languageManager + .getLanguages() + .forEach( + (string2, languageInfo) -> { + net.minecraft.client.gui.screens.options.LanguageSelectScreen.LanguageSelectionList.Entry entry = new net.minecraft.client.gui.screens.options.LanguageSelectScreen.LanguageSelectionList.Entry( + this, string2, languageInfo + ); + this.addEntry(entry); + if (string.equals(string2)) { + this.setSelected(entry); + } + } + ); if (this.getSelected() != null) { this.centerScrollOn(this.getSelected()); } @@ -89,53 +92,5 @@ public class LanguageSelectScreen extends OptionsSubScreen { public int getRowWidth() { return super.getRowWidth() + 50; } - - @Environment(EnvType.CLIENT) - public class Entry extends ObjectSelectionList.Entry { - final String code; - private final Component language; - private long lastClickTime; - - public Entry(final String code, final LanguageInfo languageInfo) { - this.code = code; - this.language = languageInfo.toComponent(); - } - - @Override - public void render(GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) { - guiGraphics.drawCenteredString(LanguageSelectScreen.this.font, this.language, LanguageSelectionList.this.width / 2, top + height / 2 - 9 / 2, -1); - } - - @Override - public boolean keyPressed(int keyCode, int scanCode, int modifiers) { - if (CommonInputs.selected(keyCode)) { - this.select(); - LanguageSelectScreen.this.onDone(); - return true; - } else { - return super.keyPressed(keyCode, scanCode, modifiers); - } - } - - @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - this.select(); - if (Util.getMillis() - this.lastClickTime < 250L) { - LanguageSelectScreen.this.onDone(); - } - - this.lastClickTime = Util.getMillis(); - return super.mouseClicked(mouseX, mouseY, button); - } - - private void select() { - LanguageSelectionList.this.setSelected(this); - } - - @Override - public Component getNarration() { - return Component.translatable("narrator.select", this.language); - } - } } } diff --git a/net/minecraft/client/gui/screens/options/UnsupportedGraphicsWarningScreen.java b/net/minecraft/client/gui/screens/options/UnsupportedGraphicsWarningScreen.java index d5cfa095..3b09361e 100644 --- a/net/minecraft/client/gui/screens/options/UnsupportedGraphicsWarningScreen.java +++ b/net/minecraft/client/gui/screens/options/UnsupportedGraphicsWarningScreen.java @@ -7,6 +7,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.MultiLineLabel; +import net.minecraft.client.gui.components.Button.OnPress; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -73,9 +74,9 @@ public class UnsupportedGraphicsWarningScreen extends Screen { @Environment(EnvType.CLIENT) public static final class ButtonOption { final Component message; - final Button.OnPress onPress; + final OnPress onPress; - public ButtonOption(Component message, Button.OnPress onPress) { + public ButtonOption(Component message, OnPress onPress) { this.message = message; this.onPress = onPress; } diff --git a/net/minecraft/client/gui/screens/options/VideoSettingsScreen.java b/net/minecraft/client/gui/screens/options/VideoSettingsScreen.java index c9db6a25..41cfc733 100644 --- a/net/minecraft/client/gui/screens/options/VideoSettingsScreen.java +++ b/net/minecraft/client/gui/screens/options/VideoSettingsScreen.java @@ -14,6 +14,9 @@ import net.minecraft.client.GraphicsStatus; import net.minecraft.client.Minecraft; import net.minecraft.client.OptionInstance; import net.minecraft.client.Options; +import net.minecraft.client.OptionInstance.ClampingLazyMaxIntRange; +import net.minecraft.client.OptionInstance.IntRange; +import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.components.CycleButton; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.renderer.GpuWarnlistManager; @@ -106,7 +109,7 @@ public class VideoSettingsScreen extends OptionsSubScreen { ); } }, - new OptionInstance.IntRange(-1, monitor != null ? monitor.getModeCount() - 1 : -1), + new IntRange(-1, monitor != null ? monitor.getModeCount() - 1 : -1), j, integer -> { if (monitor != null) { @@ -182,7 +185,7 @@ public class VideoSettingsScreen extends OptionsSubScreen { public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) { if (Screen.hasControlDown()) { OptionInstance optionInstance = this.options.guiScale(); - if (optionInstance.values() instanceof OptionInstance.ClampingLazyMaxIntRange clampingLazyMaxIntRange) { + if (optionInstance.values() instanceof ClampingLazyMaxIntRange clampingLazyMaxIntRange) { int i = optionInstance.get(); int j = i == 0 ? clampingLazyMaxIntRange.maxInclusive() + 1 : i; int k = j + (int)Math.signum(scrollY); @@ -202,4 +205,14 @@ public class VideoSettingsScreen extends OptionsSubScreen { return super.mouseScrolled(mouseX, mouseY, scrollX, scrollY); } } + + public void updateFullscreenButton(boolean isFullscreen) { + if (this.list != null) { + AbstractWidget abstractWidget = this.list.findOption(this.options.fullscreen()); + if (abstractWidget != null) { + CycleButton cycleButton = (CycleButton)abstractWidget; + cycleButton.setValue(isFullscreen); + } + } + } } diff --git a/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java b/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java index 6bb1602c..a1313e1a 100644 --- a/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java +++ b/net/minecraft/client/gui/screens/options/controls/KeyBindsList.java @@ -79,7 +79,7 @@ public class KeyBindsList extends ContainerObjectSelectionList models) { selection.children().clear(); - TransferableSelectionList.PackEntry packEntry = selection.getSelected(); + PackEntry packEntry = selection.getSelected(); String string = packEntry == null ? "" : packEntry.getPackId(); selection.setSelected(null); models.forEach(entry -> { - TransferableSelectionList.PackEntry packEntryx = new TransferableSelectionList.PackEntry(this.minecraft, selection, entry); + PackEntry packEntryx = new PackEntry(this.minecraft, selection, entry); selection.children().add(packEntryx); if (entry.getId().equals(string)) { selection.setSelected(packEntryx); @@ -313,7 +314,7 @@ public class PackSelectionScreen extends Screen { try { NativeImage nativeImage = NativeImage.read(inputStream); - textureManager.register(resourceLocation, new DynamicTexture(nativeImage)); + textureManager.register(resourceLocation, new DynamicTexture(resourceLocation::toString, nativeImage)); var9 = resourceLocation; } catch (Throwable var12) { if (inputStream != null) { diff --git a/net/minecraft/client/gui/screens/packs/TransferableSelectionList.java b/net/minecraft/client/gui/screens/packs/TransferableSelectionList.java index eba3bb67..099fbce1 100644 --- a/net/minecraft/client/gui/screens/packs/TransferableSelectionList.java +++ b/net/minecraft/client/gui/screens/packs/TransferableSelectionList.java @@ -33,17 +33,16 @@ public class TransferableSelectionList extends ObjectSelectionList list) { - super(abstractFurnaceMenu, list); - this.recipeFilterName = component; + public FurnaceRecipeBookComponent(AbstractFurnaceMenu menu, Component recipeFilterName, List tabInfos) { + super(menu, tabInfos); + this.recipeFilterName = recipeFilterName; } @Override @@ -59,7 +59,7 @@ public class FurnaceRecipeBookComponent extends RecipeBookComponent recipeDisplay instanceof FurnaceRecipeDisplay); + protected void selectMatchingRecipes(RecipeCollection possibleRecipes, StackedItemContents stackedItemContents) { + possibleRecipes.selectRecipes(stackedItemContents, recipeDisplay -> recipeDisplay instanceof FurnaceRecipeDisplay); } } diff --git a/net/minecraft/client/gui/screens/recipebook/GhostSlots.java b/net/minecraft/client/gui/screens/recipebook/GhostSlots.java index a4c713ef..ab656d52 100644 --- a/net/minecraft/client/gui/screens/recipebook/GhostSlots.java +++ b/net/minecraft/client/gui/screens/recipebook/GhostSlots.java @@ -29,10 +29,10 @@ public class GhostSlots { this.ingredients.clear(); } - private void setSlot(Slot slot, ContextMap contextMap, SlotDisplay slotDisplay, boolean bl) { + private void setSlot(Slot slot, ContextMap contextMap, SlotDisplay slotDisplay, boolean isResultSlot) { List list = slotDisplay.resolveForStacks(contextMap); if (!list.isEmpty()) { - this.ingredients.put(slot, new GhostSlots.GhostSlot(list, bl)); + this.ingredients.put(slot, new GhostSlots.GhostSlot(list, isResultSlot)); } } @@ -44,11 +44,11 @@ public class GhostSlots { this.setSlot(slot, contextMap, slotDisplay, true); } - public void render(GuiGraphics guiGraphics, Minecraft minecraft, boolean bl) { + public void render(GuiGraphics guiGraphics, Minecraft minecraft, boolean isBiggerResultSlot) { this.ingredients.forEach((slot, ghostSlot) -> { int i = slot.x; int j = slot.y; - if (ghostSlot.isResultSlot && bl) { + if (ghostSlot.isResultSlot && isBiggerResultSlot) { guiGraphics.fill(i - 4, j - 4, i + 20, j + 20, 822018048); } else { guiGraphics.fill(i, j, i + 16, j + 16, 822018048); @@ -63,12 +63,14 @@ public class GhostSlots { }); } - public void renderTooltip(GuiGraphics guiGraphics, Minecraft minecraft, int i, int j, @Nullable Slot slot) { + public void renderTooltip(GuiGraphics guiGraphics, Minecraft minecraft, int mouseX, int mouseY, @Nullable Slot slot) { if (slot != null) { GhostSlots.GhostSlot ghostSlot = this.ingredients.get(slot); if (ghostSlot != null) { ItemStack itemStack = ghostSlot.getItem(this.slotSelectTime.currentIndex()); - guiGraphics.renderComponentTooltip(minecraft.font, Screen.getTooltipFromItem(minecraft, itemStack), i, j, itemStack.get(DataComponents.TOOLTIP_STYLE)); + guiGraphics.renderComponentTooltip( + minecraft.font, Screen.getTooltipFromItem(minecraft, itemStack), mouseX, mouseY, itemStack.get(DataComponents.TOOLTIP_STYLE) + ); } } } @@ -76,9 +78,9 @@ public class GhostSlots { @Environment(EnvType.CLIENT) record GhostSlot(List items, boolean isResultSlot) { - public ItemStack getItem(int i) { - int j = this.items.size(); - return j == 0 ? ItemStack.EMPTY : (ItemStack)this.items.get(i % j); + public ItemStack getItem(int index) { + int i = this.items.size(); + return i == 0 ? ItemStack.EMPTY : (ItemStack)this.items.get(index % i); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java index 0d3fde2a..96668e20 100644 --- a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java +++ b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java @@ -39,59 +39,57 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private boolean isVisible; private int x; private int y; - private RecipeCollection collection; + private RecipeCollection collection = RecipeCollection.EMPTY; @Nullable private RecipeDisplayId lastRecipeClicked; final SlotSelectTime slotSelectTime; private final boolean isFurnaceMenu; - public OverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean bl) { + public OverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean isFurnaceMenu) { this.slotSelectTime = slotSelectTime; - this.isFurnaceMenu = bl; + this.isFurnaceMenu = isFurnaceMenu; } - public void init(RecipeCollection recipeCollection, ContextMap contextMap, boolean bl, int i, int j, int k, int l, float f) { - this.collection = recipeCollection; - List list = recipeCollection.getSelectedRecipes(RecipeCollection.CraftableStatus.CRAFTABLE); - List list2 = bl ? Collections.emptyList() : recipeCollection.getSelectedRecipes(RecipeCollection.CraftableStatus.NOT_CRAFTABLE); - int m = list.size(); - int n = m + list2.size(); - int o = n <= 16 ? 4 : 5; - int p = (int)Math.ceil((float)n / o); - this.x = i; - this.y = j; - float g = this.x + Math.min(n, o) * 25; - float h = k + 50; - if (g > h) { - this.x = (int)(this.x - f * (int)((g - h) / f)); + public void init(RecipeCollection collection, ContextMap contextMap, boolean isFiltering, int x, int y, int overlayX, int overlayY, float width) { + this.collection = collection; + List list = collection.getSelectedRecipes(RecipeCollection.CraftableStatus.CRAFTABLE); + List list2 = isFiltering ? Collections.emptyList() : collection.getSelectedRecipes(RecipeCollection.CraftableStatus.NOT_CRAFTABLE); + int i = list.size(); + int j = i + list2.size(); + int k = j <= 16 ? 4 : 5; + int l = (int)Math.ceil((float)j / k); + this.x = x; + this.y = y; + float f = this.x + Math.min(j, k) * 25; + float g = overlayX + 50; + if (f > g) { + this.x = (int)(this.x - width * (int)((f - g) / width)); } - float q = this.y + p * 25; - float r = l + 50; - if (q > r) { - this.y = (int)(this.y - f * Mth.ceil((q - r) / f)); + float h = this.y + l * 25; + float m = overlayY + 50; + if (h > m) { + this.y = (int)(this.y - width * Mth.ceil((h - m) / width)); } - float s = this.y; - float t = l - 100; - if (s < t) { - this.y = (int)(this.y - f * Mth.ceil((s - t) / f)); + float n = this.y; + float o = overlayY - 100; + if (n < o) { + this.y = (int)(this.y - width * Mth.ceil((n - o) / width)); } this.isVisible = true; this.recipeButtons.clear(); - for (int u = 0; u < n; u++) { - boolean bl2 = u < m; - RecipeDisplayEntry recipeDisplayEntry = bl2 ? (RecipeDisplayEntry)list.get(u) : (RecipeDisplayEntry)list2.get(u - m); - int v = this.x + 4 + 25 * (u % o); - int w = this.y + 5 + 25 * (u / o); + for (int p = 0; p < j; p++) { + boolean bl = p < i; + RecipeDisplayEntry recipeDisplayEntry = bl ? (RecipeDisplayEntry)list.get(p) : (RecipeDisplayEntry)list2.get(p - i); + int q = this.x + 4 + 25 * (p % k); + int r = this.y + 5 + 25 * (p / k); if (this.isFurnaceMenu) { - this.recipeButtons - .add(new OverlayRecipeComponent.OverlaySmeltingRecipeButton(v, w, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl2)); + this.recipeButtons.add(new OverlayRecipeComponent.OverlaySmeltingRecipeButton(q, r, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl)); } else { - this.recipeButtons - .add(new OverlayRecipeComponent.OverlayCraftingRecipeButton(v, w, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl2)); + this.recipeButtons.add(new OverlayRecipeComponent.OverlayCraftingRecipeButton(q, r, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl)); } } @@ -174,9 +172,9 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private static final int GRID_HEIGHT = 3; public OverlayCraftingRecipeButton( - final int i, final int j, final RecipeDisplayId recipeDisplayId, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean bl + final int x, final int y, final RecipeDisplayId recipe, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean isCraftable ) { - super(i, j, recipeDisplayId, bl, calculateIngredientsPositions(recipeDisplay, contextMap)); + super(x, y, recipe, isCraftable, calculateIngredientsPositions(recipeDisplay, contextMap)); } private static List calculateIngredientsPositions(RecipeDisplay recipeDisplay, ContextMap contextMap) { @@ -211,8 +209,8 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { } @Override - protected ResourceLocation getSprite(boolean bl) { - if (bl) { + protected ResourceLocation getSprite(boolean enabled) { + if (enabled) { return this.isHoveredOrFocused() ? HIGHLIGHTED_ENABLED_SPRITE : ENABLED_SPRITE; } else { return this.isHoveredOrFocused() ? HIGHLIGHTED_DISABLED_SPRITE : DISABLED_SPRITE; @@ -226,18 +224,18 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private final boolean isCraftable; private final List slots; - public OverlayRecipeButton(final int i, final int j, final RecipeDisplayId recipeDisplayId, final boolean bl, final List list) { - super(i, j, 24, 24, CommonComponents.EMPTY); - this.slots = list; - this.recipe = recipeDisplayId; - this.isCraftable = bl; + public OverlayRecipeButton(final int x, final int y, final RecipeDisplayId recipe, final boolean isCraftable, final List slots) { + super(x, y, 24, 24, CommonComponents.EMPTY); + this.slots = slots; + this.recipe = recipe; + this.isCraftable = isCraftable; } - protected static Pos createGridPos(int i, int j, List list) { - return new Pos(3 + i * 7, 3 + j * 7, list); + protected static Pos createGridPos(int x, int y, List possibleItems) { + return new Pos(3 + x * 7, 3 + y * 7, possibleItems); } - protected abstract ResourceLocation getSprite(boolean bl); + protected abstract ResourceLocation getSprite(boolean enabled); @Override public void updateWidgetNarration(NarrationElementOutput narrationElementOutput) { @@ -270,9 +268,9 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private static final ResourceLocation HIGHLIGHTED_DISABLED_SPRITE = ResourceLocation.withDefaultNamespace("recipe_book/furnace_overlay_disabled_highlighted"); public OverlaySmeltingRecipeButton( - final int i, final int j, final RecipeDisplayId recipeDisplayId, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean bl + final int x, final int y, final RecipeDisplayId recipe, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean isCraftable ) { - super(i, j, recipeDisplayId, bl, calculateIngredientsPositions(recipeDisplay, contextMap)); + super(x, y, recipe, isCraftable, calculateIngredientsPositions(recipeDisplay, contextMap)); } private static List calculateIngredientsPositions(RecipeDisplay recipeDisplay, ContextMap contextMap) { @@ -287,8 +285,8 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { } @Override - protected ResourceLocation getSprite(boolean bl) { - if (bl) { + protected ResourceLocation getSprite(boolean enabled) { + if (enabled) { return this.isHoveredOrFocused() ? HIGHLIGHTED_ENABLED_SPRITE : ENABLED_SPRITE; } else { return this.isHoveredOrFocused() ? HIGHLIGHTED_DISABLED_SPRITE : DISABLED_SPRITE; diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java index 9e9f577f..58431ba7 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java @@ -22,7 +22,6 @@ import net.minecraft.client.gui.components.WidgetSprites; import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.narration.NarrationElementOutput; -import net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority; import net.minecraft.client.gui.navigation.CommonInputs; import net.minecraft.client.gui.navigation.ScreenAxis; import net.minecraft.client.gui.navigation.ScreenRectangle; @@ -100,19 +99,19 @@ public abstract class RecipeBookComponent implements R @Nullable private ScreenRectangle magnifierIconPlacement; - public RecipeBookComponent(T recipeBookMenu, List list) { - this.menu = recipeBookMenu; - this.tabInfos = list; + public RecipeBookComponent(T menu, List tabInfos) { + this.menu = menu; + this.tabInfos = tabInfos; SlotSelectTime slotSelectTime = () -> Mth.floor(this.time / 30.0F); this.ghostSlots = new GhostSlots(slotSelectTime); - this.recipeBookPage = new RecipeBookPage(this, slotSelectTime, recipeBookMenu instanceof AbstractFurnaceMenu); + this.recipeBookPage = new RecipeBookPage(this, slotSelectTime, menu instanceof AbstractFurnaceMenu); } - public void init(int i, int j, Minecraft minecraft, boolean bl) { + public void init(int width, int height, Minecraft minecraft, boolean widthTooNarrow) { this.minecraft = minecraft; - this.width = i; - this.height = j; - this.widthTooNarrow = bl; + this.width = width; + this.height = height; + this.widthTooNarrow = widthTooNarrow; this.book = minecraft.player.getRecipeBook(); this.timesInventoryChanged = minecraft.player.getInventory().getTimesChanged(); this.visible = this.isVisibleAccordingToBookData(); @@ -238,9 +237,9 @@ public abstract class RecipeBookComponent implements R } } - protected abstract void selectMatchingRecipes(RecipeCollection recipeCollection, StackedItemContents stackedItemContents); + protected abstract void selectMatchingRecipes(RecipeCollection possibleRecipes, StackedItemContents stackedItemContents); - private void updateCollections(boolean bl, boolean bl2) { + private void updateCollections(boolean resetPageNumber, boolean isFiltering) { List list = this.book.getCollection(this.selectedTab.getCategory()); List list2 = Lists.newArrayList(list); list2.removeIf(recipeCollection -> !recipeCollection.hasAnySelected()); @@ -253,14 +252,14 @@ public abstract class RecipeBookComponent implements R } } - if (bl2) { + if (isFiltering) { list2.removeIf(recipeCollection -> !recipeCollection.hasCraftable()); } - this.recipeBookPage.updateCollections(list2, bl, bl2); + this.recipeBookPage.updateCollections(list2, resetPageNumber, isFiltering); } - private void updateTabs(boolean bl) { + private void updateTabs(boolean isFiltering) { int i = (this.width - 147) / 2 - this.xOffset - 30; int j = (this.height - 166) / 2 + 3; int k = 27; @@ -273,7 +272,7 @@ public abstract class RecipeBookComponent implements R recipeBookTabButton.setPosition(i, j + 27 * l++); } else if (recipeBookTabButton.updateVisibility(this.book)) { recipeBookTabButton.setPosition(i, j + 27 * l++); - recipeBookTabButton.startAnimation(this.book, bl); + recipeBookTabButton.startAnimation(this.book, isFiltering); } } } @@ -328,17 +327,17 @@ public abstract class RecipeBookComponent implements R } } - public void renderTooltip(GuiGraphics guiGraphics, int i, int j, @Nullable Slot slot) { + public void renderTooltip(GuiGraphics guiGraphics, int mouseX, int mouseY, @Nullable Slot slot) { if (this.isVisible()) { - this.recipeBookPage.renderTooltip(guiGraphics, i, j); - this.ghostSlots.renderTooltip(guiGraphics, this.minecraft, i, j, slot); + this.recipeBookPage.renderTooltip(guiGraphics, mouseX, mouseY); + this.ghostSlots.renderTooltip(guiGraphics, this.minecraft, mouseX, mouseY, slot); } } protected abstract Component getRecipeFilterName(); - public void renderGhostRecipe(GuiGraphics guiGraphics, boolean bl) { - this.ghostSlots.render(guiGraphics, this.minecraft, bl); + public void renderGhostRecipe(GuiGraphics guiGraphics, boolean isBiggerResultSlot) { + this.ghostSlots.render(guiGraphics, this.minecraft, isBiggerResultSlot); } @Override @@ -403,13 +402,13 @@ public abstract class RecipeBookComponent implements R } } - private boolean tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipeDisplayId) { - if (!recipeCollection.isCraftable(recipeDisplayId) && recipeDisplayId.equals(this.lastPlacedRecipe)) { + private boolean tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipe) { + if (!recipeCollection.isCraftable(recipe) && recipe.equals(this.lastPlacedRecipe)) { return false; } else { - this.lastPlacedRecipe = recipeDisplayId; + this.lastPlacedRecipe = recipe; this.ghostSlots.clear(); - this.minecraft.gameMode.handlePlaceRecipe(this.minecraft.player.containerMenu.containerId, recipeDisplayId, Screen.hasShiftDown()); + this.minecraft.gameMode.handlePlaceRecipe(this.minecraft.player.containerMenu.containerId, recipe, Screen.hasShiftDown()); return true; } } @@ -421,7 +420,7 @@ public abstract class RecipeBookComponent implements R return bl; } - public boolean hasClickedOutside(double mouseX, double mouseY, int x, int y, int width, int height, int i) { + public boolean hasClickedOutside(double mouseX, double mouseY, int x, int y, int width, int height, int mouseButton) { if (!this.isVisible()) { return true; } else { @@ -530,8 +529,8 @@ public abstract class RecipeBookComponent implements R } } - public void recipeShown(RecipeDisplayId recipeDisplayId) { - this.minecraft.player.removeRecipeHighlight(recipeDisplayId); + public void recipeShown(RecipeDisplayId recipe) { + this.minecraft.player.removeRecipeHighlight(recipe); } public void fillGhostRecipe(RecipeDisplay recipeDisplay) { @@ -552,8 +551,8 @@ public abstract class RecipeBookComponent implements R } @Override - public NarrationPriority narrationPriority() { - return this.visible ? NarrationPriority.HOVERED : NarrationPriority.NONE; + public NarratableEntry.NarrationPriority narrationPriority() { + return this.visible ? NarratableEntry.NarrationPriority.HOVERED : NarratableEntry.NarrationPriority.NONE; } @Override @@ -575,16 +574,16 @@ public abstract class RecipeBookComponent implements R @Environment(EnvType.CLIENT) public record TabInfo(ItemStack primaryIcon, Optional secondaryIcon, ExtendedRecipeBookCategory category) { - public TabInfo(SearchRecipeBookCategory searchRecipeBookCategory) { - this(new ItemStack(Items.COMPASS), Optional.empty(), searchRecipeBookCategory); + public TabInfo(SearchRecipeBookCategory category) { + this(new ItemStack(Items.COMPASS), Optional.empty(), category); } - public TabInfo(Item item, RecipeBookCategory recipeBookCategory) { - this(new ItemStack(item), Optional.empty(), recipeBookCategory); + public TabInfo(Item primaryIcon, RecipeBookCategory category) { + this(new ItemStack(primaryIcon), Optional.empty(), category); } - public TabInfo(Item item, Item item2, RecipeBookCategory recipeBookCategory) { - this(new ItemStack(item), Optional.of(new ItemStack(item2)), recipeBookCategory); + public TabInfo(Item primaryIcon, Item secondaryIcon, RecipeBookCategory category) { + this(new ItemStack(primaryIcon), Optional.of(new ItemStack(secondaryIcon)), category); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java index de1849c0..cb1ae95d 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java @@ -48,9 +48,9 @@ public class RecipeBookPage { private RecipeCollection lastClickedRecipeCollection; private boolean isFiltering; - public RecipeBookPage(RecipeBookComponent recipeBookComponent, SlotSelectTime slotSelectTime, boolean bl) { - this.parent = recipeBookComponent; - this.overlay = new OverlayRecipeComponent(slotSelectTime, bl); + public RecipeBookPage(RecipeBookComponent parent, SlotSelectTime slotSelectTime, boolean isFurnaceMenu) { + this.parent = parent; + this.overlay = new OverlayRecipeComponent(slotSelectTime, isFurnaceMenu); for (int i = 0; i < 20; i++) { this.buttons.add(new RecipeButton(slotSelectTime)); @@ -71,11 +71,11 @@ public class RecipeBookPage { this.backButton.initTextureValues(PAGE_BACKWARD_SPRITES); } - public void updateCollections(List list, boolean bl, boolean bl2) { - this.recipeCollections = list; - this.isFiltering = bl2; - this.totalPages = (int)Math.ceil(list.size() / 20.0); - if (this.totalPages <= this.currentPage || bl) { + public void updateCollections(List recipeCollections, boolean resetPageNumber, boolean isFiltering) { + this.recipeCollections = recipeCollections; + this.isFiltering = isFiltering; + this.totalPages = (int)Math.ceil(recipeCollections.size() / 20.0); + if (this.totalPages <= this.currentPage || resetPageNumber) { this.currentPage = 0; } @@ -109,7 +109,7 @@ public class RecipeBookPage { if (this.totalPages > 1) { Component component = Component.translatable("gui.recipebook.page", this.currentPage + 1, this.totalPages); int i = this.minecraft.font.width(component); - guiGraphics.drawString(this.minecraft.font, component, x - i / 2 + 73, y + 141, -1, false); + guiGraphics.drawString(this.minecraft.font, component, x - i / 2 + 73, y + 141, -1); } this.hoveredButton = null; @@ -148,7 +148,7 @@ public class RecipeBookPage { this.overlay.setVisible(false); } - public boolean mouseClicked(double mouseX, double mouseY, int button, int i, int j, int k, int l) { + public boolean mouseClicked(double mouseX, double mouseY, int button, int x, int y, int width, int height) { this.lastClickedRecipe = null; this.lastClickedRecipeCollection = null; if (this.overlay.isVisible()) { @@ -184,8 +184,8 @@ public class RecipeBookPage { this.isFiltering, recipeButton.getX(), recipeButton.getY(), - i + k / 2, - j + 13 + l / 2, + x + width / 2, + y + 13 + height / 2, recipeButton.getWidth() ); } @@ -198,8 +198,8 @@ public class RecipeBookPage { } } - public void recipeShown(RecipeDisplayId recipeDisplayId) { - this.parent.recipeShown(recipeDisplayId); + public void recipeShown(RecipeDisplayId recipe) { + this.parent.recipeShown(recipe); } public ClientRecipeBook getRecipeBook() { diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java index 8829b607..1d233ce5 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java @@ -28,12 +28,12 @@ public class RecipeBookTabButton extends StateSwitchingButton { this.initTextureValues(SPRITES); } - public void startAnimation(ClientRecipeBook clientRecipeBook, boolean bl) { - RecipeCollection.CraftableStatus craftableStatus = bl ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY; + public void startAnimation(ClientRecipeBook recipeBook, boolean isFiltering) { + RecipeCollection.CraftableStatus craftableStatus = isFiltering ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY; - for (RecipeCollection recipeCollection : clientRecipeBook.getCollection(this.tabInfo.category())) { + for (RecipeCollection recipeCollection : recipeBook.getCollection(this.tabInfo.category())) { for (RecipeDisplayEntry recipeDisplayEntry : recipeCollection.getSelectedRecipes(craftableStatus)) { - if (clientRecipeBook.willHighlight(recipeDisplayEntry.id())) { + if (recipeBook.willHighlight(recipeDisplayEntry.id())) { this.animationTime = 15.0F; return; } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeButton.java b/net/minecraft/client/gui/screens/recipebook/RecipeButton.java index d5d244e8..2efcc225 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeButton.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeButton.java @@ -1,6 +1,7 @@ package net.minecraft.client.gui.screens.recipebook; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -28,8 +29,9 @@ public class RecipeButton extends AbstractWidget { private static final float ANIMATION_TIME = 15.0F; private static final int BACKGROUND_SIZE = 25; private static final Component MORE_RECIPES_TOOLTIP = Component.translatable("gui.recipebook.moreRecipes"); - private RecipeCollection collection; + private RecipeCollection collection = RecipeCollection.EMPTY; private List selectedEntries = List.of(); + private boolean allRecipesHaveSameResultDisplay; private final SlotSelectTime slotSelectTime; private float animationTime; @@ -38,19 +40,38 @@ public class RecipeButton extends AbstractWidget { this.slotSelectTime = slotSelectTime; } - public void init(RecipeCollection recipeCollection, boolean bl, RecipeBookPage recipeBookPage, ContextMap contextMap) { - this.collection = recipeCollection; - List list = recipeCollection.getSelectedRecipes(bl ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY); + public void init(RecipeCollection collection, boolean isFiltering, RecipeBookPage page, ContextMap contextMap) { + this.collection = collection; + List list = collection.getSelectedRecipes(isFiltering ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY); this.selectedEntries = list.stream() .map(recipeDisplayEntry -> new RecipeButton.ResolvedEntry(recipeDisplayEntry.id(), recipeDisplayEntry.resultItems(contextMap))) .toList(); - List list2 = list.stream().map(RecipeDisplayEntry::id).filter(recipeBookPage.getRecipeBook()::willHighlight).toList(); + this.allRecipesHaveSameResultDisplay = allRecipesHaveSameResultDisplay(this.selectedEntries); + List list2 = list.stream().map(RecipeDisplayEntry::id).filter(page.getRecipeBook()::willHighlight).toList(); if (!list2.isEmpty()) { - list2.forEach(recipeBookPage::recipeShown); + list2.forEach(page::recipeShown); this.animationTime = 15.0F; } } + private static boolean allRecipesHaveSameResultDisplay(List entries) { + Iterator iterator = entries.stream().flatMap(resolvedEntry -> resolvedEntry.displayItems().stream()).iterator(); + if (!iterator.hasNext()) { + return true; + } else { + ItemStack itemStack = (ItemStack)iterator.next(); + + while (iterator.hasNext()) { + ItemStack itemStack2 = (ItemStack)iterator.next(); + if (!ItemStack.isSameItemSameComponents(itemStack, itemStack2)) { + return false; + } + } + + return true; + } + } + public RecipeCollection getCollection() { return this.collection; } @@ -83,7 +104,7 @@ public class RecipeButton extends AbstractWidget { guiGraphics.blitSprite(RenderType::guiTextured, resourceLocation, this.getX(), this.getY(), this.width, this.height); ItemStack itemStack = this.getDisplayStack(); int i = 4; - if (this.collection.hasSingleResultItem() && this.hasMultipleRecipes()) { + if (this.hasMultipleRecipes() && this.allRecipesHaveSameResultDisplay) { guiGraphics.renderItem(itemStack, this.getX() + i + 1, this.getY() + i + 1, 0, 10); i--; } @@ -115,8 +136,8 @@ public class RecipeButton extends AbstractWidget { return ((RecipeButton.ResolvedEntry)this.selectedEntries.get(l)).selectItem(k); } - public List getTooltipText(ItemStack itemStack) { - List list = new ArrayList(Screen.getTooltipFromItem(Minecraft.getInstance(), itemStack)); + public List getTooltipText(ItemStack stack) { + List list = new ArrayList(Screen.getTooltipFromItem(Minecraft.getInstance(), stack)); if (this.hasMultipleRecipes()) { list.add(MORE_RECIPES_TOOLTIP); } @@ -149,12 +170,12 @@ public class RecipeButton extends AbstractWidget { @Environment(EnvType.CLIENT) record ResolvedEntry(RecipeDisplayId id, List displayItems) { - public ItemStack selectItem(int i) { + public ItemStack selectItem(int index) { if (this.displayItems.isEmpty()) { return ItemStack.EMPTY; } else { - int j = i % this.displayItems.size(); - return (ItemStack)this.displayItems.get(j); + int i = index % this.displayItems.size(); + return (ItemStack)this.displayItems.get(i); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java b/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java index dad3941b..78bcab22 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java @@ -11,41 +11,21 @@ import net.minecraft.world.entity.player.StackedItemContents; import net.minecraft.world.item.crafting.display.RecipeDisplay; import net.minecraft.world.item.crafting.display.RecipeDisplayEntry; import net.minecraft.world.item.crafting.display.RecipeDisplayId; -import net.minecraft.world.item.crafting.display.SlotDisplay; @Environment(EnvType.CLIENT) public class RecipeCollection { + public static final RecipeCollection EMPTY = new RecipeCollection(List.of()); private final List entries; - private final boolean singleResultItem; private final Set craftable = new HashSet(); private final Set selected = new HashSet(); - public RecipeCollection(List list) { - this.entries = list; - if (list.size() <= 1) { - this.singleResultItem = true; - } else { - this.singleResultItem = allRecipesHaveSameResult(this.entries); - } + public RecipeCollection(List entries) { + this.entries = entries; } - private static boolean allRecipesHaveSameResult(List list) { - int i = list.size(); - SlotDisplay slotDisplay = ((RecipeDisplayEntry)list.getFirst()).display().result(); - - for (int j = 1; j < i; j++) { - SlotDisplay slotDisplay2 = ((RecipeDisplayEntry)list.get(j)).display().result(); - if (!slotDisplay2.equals(slotDisplay)) { - return false; - } - } - - return true; - } - - public void selectRecipes(StackedItemContents stackedItemContents, Predicate predicate) { + public void selectRecipes(StackedItemContents stackedItemContents, Predicate filter) { for (RecipeDisplayEntry recipeDisplayEntry : this.entries) { - boolean bl = predicate.test(recipeDisplayEntry.display()); + boolean bl = filter.test(recipeDisplayEntry.display()); if (bl) { this.selected.add(recipeDisplayEntry.id()); } else { @@ -60,8 +40,8 @@ public class RecipeCollection { } } - public boolean isCraftable(RecipeDisplayId recipeDisplayId) { - return this.craftable.contains(recipeDisplayId); + public boolean isCraftable(RecipeDisplayId recipe) { + return this.craftable.contains(recipe); } public boolean hasCraftable() { @@ -93,10 +73,6 @@ public class RecipeCollection { return list; } - public boolean hasSingleResultItem() { - return this.singleResultItem; - } - @Environment(EnvType.CLIENT) public static enum CraftableStatus { ANY, diff --git a/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java b/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java index dd34ae4d..f2eb86fb 100644 --- a/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java +++ b/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java @@ -21,8 +21,8 @@ public enum SearchRecipeBookCategory implements ExtendedRecipeBookCategory { private final List includedCategories; - private SearchRecipeBookCategory(final RecipeBookCategory... recipeBookCategorys) { - this.includedCategories = List.of(recipeBookCategorys); + private SearchRecipeBookCategory(final RecipeBookCategory... includedCategories) { + this.includedCategories = List.of(includedCategories); } public List includedCategories() { diff --git a/net/minecraft/client/gui/screens/reporting/ChatSelectionScreen.java b/net/minecraft/client/gui/screens/reporting/ChatSelectionScreen.java index 242531ae..2a32112a 100644 --- a/net/minecraft/client/gui/screens/reporting/ChatSelectionScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ChatSelectionScreen.java @@ -65,7 +65,7 @@ public class ChatSelectionScreen extends Screen { }).bounds(this.width / 2 - 155 + 160, this.height - 32, 150, 20).build()); this.updateConfirmSelectedButton(); this.extendLog(); - this.chatSelectionList.setScrollAmount(this.chatSelectionList.getMaxScroll()); + this.chatSelectionList.setScrollAmount(this.chatSelectionList.maxScrollAmount()); } private boolean canReport(LoggedChatMessage message) { @@ -88,12 +88,12 @@ public class ChatSelectionScreen extends Screen { @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { super.render(guiGraphics, mouseX, mouseY, partialTick); - guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 10, 16777215); + guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 10, -1); AbuseReportLimits abuseReportLimits = this.reportingContext.sender().reportLimits(); int i = this.report.reportedMessages().size(); int j = abuseReportLimits.maxReportedMessageCount(); Component component = Component.translatable("gui.chatSelection.selected", i, j); - guiGraphics.drawCenteredString(this.font, component, this.width / 2, 16 + 9 * 3 / 2, -1); + guiGraphics.drawCenteredString(this.font, component, this.width / 2, 26, -1); this.contextInfoLabel.renderCentered(guiGraphics, this.width / 2, this.chatSelectionList.getFooterTop()); } @@ -119,10 +119,10 @@ public class ChatSelectionScreen extends Screen { } @Override - public void setScrollAmount(double scroll) { - double d = this.getScrollAmount(); - super.setScrollAmount(scroll); - if (this.getMaxScroll() > 1.0E-5F && scroll <= 1.0E-5F && !Mth.equal(scroll, d)) { + public void setScrollAmount(double scrollAmount) { + double d = this.scrollAmount(); + super.setScrollAmount(scrollAmount); + if (this.maxScrollAmount() > 1.0E-5F && scrollAmount <= 1.0E-5F && !Mth.equal(scrollAmount, d)) { ChatSelectionScreen.this.onReachedScrollTop(); } } @@ -154,9 +154,9 @@ public class ChatSelectionScreen extends Screen { @Override public void acceptDivider(Component text) { - this.addEntryToTop(new PaddingEntry(this)); + this.addEntryToTop(new PaddingEntry()); this.addEntryToTop(new DividerEntry(this, text)); - this.addEntryToTop(new PaddingEntry(this)); + this.addEntryToTop(new PaddingEntry()); this.previousHeading = null; } @@ -193,14 +193,14 @@ public class ChatSelectionScreen extends Screen { } @Nullable - protected net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry nextEntry(ScreenDirection direction) { - return this.nextEntry(direction, net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry::canSelect); + protected net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry nextEntry(ScreenDirection screenDirection) { + return this.nextEntry(screenDirection, net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry::canSelect); } - public void setSelected(@Nullable net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry selected) { - super.setSelected(selected); - net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry entry = this.nextEntry(ScreenDirection.UP); - if (entry == null) { + public void setSelected(@Nullable net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry entry) { + super.setSelected(entry); + net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry entry2 = this.nextEntry(ScreenDirection.UP); + if (entry2 == null) { ChatSelectionScreen.this.onReachedScrollTop(); } } diff --git a/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java b/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java index 42190354..742bc067 100644 --- a/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java @@ -40,11 +40,13 @@ public class ReportReasonSelectionScreen extends Screen { final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this); final ReportType reportType; - public ReportReasonSelectionScreen(@Nullable Screen screen, @Nullable ReportReason reportReason, ReportType reportType, Consumer consumer) { + public ReportReasonSelectionScreen( + @Nullable Screen lastScreen, @Nullable ReportReason currentlySelectedReason, ReportType reportType, Consumer onSelectedReason + ) { super(REASON_TITLE); - this.lastScreen = screen; - this.currentlySelectedReason = reportReason; - this.onSelectedReason = consumer; + this.lastScreen = lastScreen; + this.currentlySelectedReason = currentlySelectedReason; + this.onSelectedReason = onSelectedReason; this.reportType = reportType; } @@ -164,9 +166,9 @@ public class ReportReasonSelectionScreen extends Screen { return 320; } - public void setSelected(@Nullable net.minecraft.client.gui.screens.reporting.ReportReasonSelectionScreen.ReasonSelectionList.Entry selected) { - super.setSelected(selected); - ReportReasonSelectionScreen.this.currentlySelectedReason = selected != null ? selected.getReason() : null; + public void setSelected(@Nullable net.minecraft.client.gui.screens.reporting.ReportReasonSelectionScreen.ReasonSelectionList.Entry entry) { + super.setSelected(entry); + ReportReasonSelectionScreen.this.currentlySelectedReason = entry != null ? entry.getReason() : null; } } } diff --git a/net/minecraft/client/gui/screens/social/PlayerEntry.java b/net/minecraft/client/gui/screens/social/PlayerEntry.java index 6acdb050..099e9bf5 100644 --- a/net/minecraft/client/gui/screens/social/PlayerEntry.java +++ b/net/minecraft/client/gui/screens/social/PlayerEntry.java @@ -169,11 +169,11 @@ public class PlayerEntry extends ContainerObjectSelectionList.Entry } else { guiGraphics.fill(left, top, left + width, top + height, BG_FILL_REMOVED); l = top + (height - (9 + 9)) / 2; - guiGraphics.drawString(this.minecraft.font, component, k, l + 12, PLAYER_STATUS_COLOR, false); + guiGraphics.drawString(this.minecraft.font, component, k, l + 12, PLAYER_STATUS_COLOR); } PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.skinGetter.get(), i, j, 24); - guiGraphics.drawString(this.minecraft.font, this.playerName, k, l, PLAYERNAME_COLOR, false); + guiGraphics.drawString(this.minecraft.font, this.playerName, k, l, PLAYERNAME_COLOR); if (this.isRemoved) { guiGraphics.fill(i, j, i + 24, j + 24, SKIN_SHADE); } diff --git a/net/minecraft/client/gui/screens/social/SocialInteractionsPlayerList.java b/net/minecraft/client/gui/screens/social/SocialInteractionsPlayerList.java index dcfb02ac..74b04002 100644 --- a/net/minecraft/client/gui/screens/social/SocialInteractionsPlayerList.java +++ b/net/minecraft/client/gui/screens/social/SocialInteractionsPlayerList.java @@ -20,7 +20,7 @@ import net.minecraft.client.gui.components.ContainerObjectSelectionList; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.multiplayer.PlayerInfo; import net.minecraft.client.multiplayer.chat.ChatLog; -import net.minecraft.client.multiplayer.chat.LoggedChatMessage; +import net.minecraft.client.multiplayer.chat.LoggedChatMessage.Player; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -101,7 +101,7 @@ public class SocialInteractionsPlayerList extends ContainerObjectSelectionList

set = new ObjectLinkedOpenHashSet<>(); for (int i = chatLog.end(); i >= chatLog.start(); i--) { - if (chatLog.lookup(i) instanceof LoggedChatMessage.Player player && player.message().hasSignature()) { + if (chatLog.lookup(i) instanceof Player player && player.message().hasSignature()) { set.add(player.profile()); } } diff --git a/net/minecraft/client/gui/screens/social/SocialInteractionsScreen.java b/net/minecraft/client/gui/screens/social/SocialInteractionsScreen.java index 3efe6186..547b1670 100644 --- a/net/minecraft/client/gui/screens/social/SocialInteractionsScreen.java +++ b/net/minecraft/client/gui/screens/social/SocialInteractionsScreen.java @@ -174,13 +174,13 @@ public class SocialInteractionsScreen extends Screen { case ALL: this.allButton.setMessage(TAB_ALL_SELECTED); Collection collection = this.minecraft.player.connection.getOnlinePlayerIds(); - this.socialInteractionsPlayerList.updatePlayerList(collection, this.socialInteractionsPlayerList.getScrollAmount(), true); + this.socialInteractionsPlayerList.updatePlayerList(collection, this.socialInteractionsPlayerList.scrollAmount(), true); break; case HIDDEN: this.hiddenButton.setMessage(TAB_HIDDEN_SELECTED); Set set = this.minecraft.getPlayerSocialManager().getHiddenPlayers(); bl = set.isEmpty(); - this.socialInteractionsPlayerList.updatePlayerList(set, this.socialInteractionsPlayerList.getScrollAmount(), false); + this.socialInteractionsPlayerList.updatePlayerList(set, this.socialInteractionsPlayerList.scrollAmount(), false); break; case BLOCKED: this.blockedButton.setMessage(TAB_BLOCKED_SELECTED); @@ -193,7 +193,7 @@ public class SocialInteractionsScreen extends Screen { .filter(playerSocialManager::isBlocked) .collect(Collectors.toSet()); bl = set2.isEmpty(); - this.socialInteractionsPlayerList.updatePlayerList(set2, this.socialInteractionsPlayerList.getScrollAmount(), false); + this.socialInteractionsPlayerList.updatePlayerList(set2, this.socialInteractionsPlayerList.scrollAmount(), false); } GameNarrator gameNarrator = this.minecraft.getNarrator(); diff --git a/net/minecraft/client/gui/screens/telemetry/TelemetryEventWidget.java b/net/minecraft/client/gui/screens/telemetry/TelemetryEventWidget.java index cdf4b862..f7253b69 100644 --- a/net/minecraft/client/gui/screens/telemetry/TelemetryEventWidget.java +++ b/net/minecraft/client/gui/screens/telemetry/TelemetryEventWidget.java @@ -10,7 +10,7 @@ import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.gui.components.AbstractScrollWidget; +import net.minecraft.client.gui.components.AbstractTextAreaWidget; import net.minecraft.client.gui.components.MultiLineTextWidget; import net.minecraft.client.gui.layouts.Layout; import net.minecraft.client.gui.layouts.LinearLayout; @@ -24,7 +24,7 @@ import net.minecraft.network.chat.MutableComponent; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class TelemetryEventWidget extends AbstractScrollWidget { +public class TelemetryEventWidget extends AbstractTextAreaWidget { private static final int HEADER_HORIZONTAL_PADDING = 32; private static final String TELEMETRY_REQUIRED_TRANSLATION_KEY = "telemetry.event.required"; private static final String TELEMETRY_OPTIONAL_TRANSLATION_KEY = "telemetry.event.optional"; @@ -43,12 +43,12 @@ public class TelemetryEventWidget extends AbstractScrollWidget { public void onOptInChanged(boolean optIn) { this.content = this.buildContent(optIn); - this.setScrollAmount(this.scrollAmount()); + this.refreshScrollAmount(); } public void updateLayout() { this.content = this.buildContent(Minecraft.getInstance().telemetryOptInExtra()); - this.setScrollAmount(this.scrollAmount()); + this.refreshScrollAmount(); } private TelemetryEventWidget.Content buildContent(boolean optIn) { @@ -73,7 +73,7 @@ public class TelemetryEventWidget extends AbstractScrollWidget { } @Override - protected void setScrollAmount(double scrollAmount) { + public void setScrollAmount(double scrollAmount) { super.setScrollAmount(scrollAmount); if (this.onScrolledListener != null) { this.onScrolledListener.accept(this.scrollAmount()); @@ -92,8 +92,8 @@ public class TelemetryEventWidget extends AbstractScrollWidget { @Override protected void renderContents(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { - int i = this.getY() + this.innerPadding(); - int j = this.getX() + this.innerPadding(); + int i = this.getInnerTop(); + int j = this.getInnerLeft(); guiGraphics.pose().pushPose(); guiGraphics.pose().translate((double)j, (double)i, 0.0); this.content.container().visitWidgets(abstractWidget -> abstractWidget.render(guiGraphics, mouseX, mouseY, partialTick)); diff --git a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java index 12835789..9f78f30f 100644 --- a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java @@ -30,12 +30,12 @@ import net.minecraft.SharedConstants; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.CycleButton; import net.minecraft.client.gui.components.EditBox; -import net.minecraft.client.gui.components.Renderable; import net.minecraft.client.gui.components.Tooltip; -import net.minecraft.client.gui.components.events.GuiEventListener; +import net.minecraft.client.gui.components.CycleButton.ValueListSupplier; import net.minecraft.client.gui.components.tabs.GridLayoutTab; import net.minecraft.client.gui.components.tabs.TabManager; import net.minecraft.client.gui.components.tabs.TabNavigationBar; @@ -45,7 +45,6 @@ import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; import net.minecraft.client.gui.layouts.LayoutSettings; import net.minecraft.client.gui.layouts.LinearLayout; import net.minecraft.client.gui.layouts.GridLayout.RowHelper; -import net.minecraft.client.gui.narration.NarratableEntry; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.screens.ConfirmScreen; import net.minecraft.client.gui.screens.GenericMessageScreen; @@ -54,6 +53,8 @@ import net.minecraft.client.gui.screens.packs.PackSelectionScreen; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.WorldTab.1; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.WorldTab.2; import net.minecraft.client.gui.screens.worldselection.SwitchGrid.Builder; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.SelectedGameMode; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.WorldTypeEntry; import net.minecraft.client.renderer.RenderType; import net.minecraft.commands.Commands; import net.minecraft.core.LayeredRegistryAccess; @@ -65,6 +66,10 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.RegistryLayer; import net.minecraft.server.WorldLoader; +import net.minecraft.server.WorldLoader.DataLoadContext; +import net.minecraft.server.WorldLoader.DataLoadOutput; +import net.minecraft.server.WorldLoader.InitConfig; +import net.minecraft.server.WorldLoader.PackConfig; import net.minecraft.server.packs.repository.PackRepository; import net.minecraft.server.packs.repository.ServerPacksSource; import net.minecraft.world.Difficulty; @@ -75,9 +80,9 @@ import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GameType; import net.minecraft.world.level.LevelSettings; import net.minecraft.world.level.WorldDataConfiguration; -import net.minecraft.world.level.levelgen.WorldDimensions; import net.minecraft.world.level.levelgen.WorldGenSettings; import net.minecraft.world.level.levelgen.WorldOptions; +import net.minecraft.world.level.levelgen.WorldDimensions.Complete; import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorPresets; import net.minecraft.world.level.levelgen.presets.WorldPreset; import net.minecraft.world.level.levelgen.presets.WorldPresets; @@ -106,7 +111,9 @@ public class CreateWorldScreen extends Screen { public static final ResourceLocation TAB_HEADER_BACKGROUND = ResourceLocation.withDefaultNamespace("textures/gui/tab_header_background.png"); private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this); final WorldCreationUiState uiState; - private final TabManager tabManager = new TabManager(this::addRenderableWidget, guiEventListener -> this.removeWidget(guiEventListener)); + private final TabManager tabManager = new TabManager(guiEventListener -> { + AbstractWidget var10000 = this.addRenderableWidget(guiEventListener); + }, guiEventListener -> this.removeWidget(guiEventListener)); private boolean recreated; private final DirectoryValidator packValidator; private final CreateWorldCallback createWorldCallback; @@ -127,17 +134,17 @@ public class CreateWorldScreen extends Screen { ); } - public static void openFresh(Minecraft minecraft, @Nullable Screen screen, CreateWorldCallback createWorldCallback) { + public static void openFresh(Minecraft minecraft, @Nullable Screen lastScreen, CreateWorldCallback callback) { WorldCreationContextMapper worldCreationContextMapper = (reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> new WorldCreationContext( dataPackReloadCookie.worldGenSettings(), layeredRegistryAccess, reloadableServerResources, dataPackReloadCookie.dataConfiguration() ); - Function function = dataLoadContext -> new WorldGenSettings( + Function function = dataLoadContext -> new WorldGenSettings( WorldOptions.defaultWithRandomSeed(), WorldPresets.createNormalWorldDimensions(dataLoadContext.datapackWorldgen()) ); - openCreateWorldScreen(minecraft, screen, function, worldCreationContextMapper, WorldPresets.NORMAL, createWorldCallback); + openCreateWorldScreen(minecraft, lastScreen, function, worldCreationContextMapper, WorldPresets.NORMAL, callback); } - public static void testWorld(Minecraft minecraft, @Nullable Screen screen) { + public static void testWorld(Minecraft minecraft, @Nullable Screen lastScreen) { WorldCreationContextMapper worldCreationContextMapper = (reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> new WorldCreationContext( dataPackReloadCookie.worldGenSettings().options(), dataPackReloadCookie.worldGenSettings().dimensions(), @@ -145,17 +152,17 @@ public class CreateWorldScreen extends Screen { reloadableServerResources, dataPackReloadCookie.dataConfiguration(), new InitialWorldCreationOptions( - WorldCreationUiState.SelectedGameMode.CREATIVE, + SelectedGameMode.CREATIVE, Set.of(GameRules.RULE_DAYLIGHT, GameRules.RULE_WEATHER_CYCLE, GameRules.RULE_DOMOBSPAWNING), FlatLevelGeneratorPresets.REDSTONE_READY ) ); - Function function = dataLoadContext -> new WorldGenSettings( + Function function = dataLoadContext -> new WorldGenSettings( WorldOptions.testWorldWithRandomSeed(), WorldPresets.createFlatWorldDimensions(dataLoadContext.datapackWorldgen()) ); openCreateWorldScreen( minecraft, - screen, + lastScreen, function, worldCreationContextMapper, WorldPresets.FLAT, @@ -165,42 +172,46 @@ public class CreateWorldScreen extends Screen { private static void openCreateWorldScreen( Minecraft minecraft, - @Nullable Screen screen, - Function function, - WorldCreationContextMapper worldCreationContextMapper, - ResourceKey resourceKey, + @Nullable Screen lastScreen, + Function worldGenSettingsGetter, + WorldCreationContextMapper creationContextMapper, + ResourceKey preset, CreateWorldCallback createWorldCallback ) { queueLoadScreen(minecraft, PREPARING_WORLD_DATA); PackRepository packRepository = new PackRepository(new ServerPacksSource(minecraft.directoryValidator())); - WorldLoader.InitConfig initConfig = createDefaultLoadConfig(packRepository, WorldDataConfiguration.DEFAULT); + WorldDataConfiguration worldDataConfiguration = SharedConstants.IS_RUNNING_IN_IDE + ? new WorldDataConfiguration(new DataPackConfig(List.of("vanilla", "tests"), List.of()), FeatureFlags.DEFAULT_FLAGS) + : WorldDataConfiguration.DEFAULT; + InitConfig initConfig = createDefaultLoadConfig(packRepository, worldDataConfiguration); CompletableFuture completableFuture = WorldLoader.load( initConfig, - dataLoadContext -> new WorldLoader.DataLoadOutput<>( - new DataPackReloadCookie((WorldGenSettings)function.apply(dataLoadContext), dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions() + dataLoadContext -> new DataLoadOutput<>( + new DataPackReloadCookie((WorldGenSettings)worldGenSettingsGetter.apply(dataLoadContext), dataLoadContext.dataConfiguration()), + dataLoadContext.datapackDimensions() ), (closeableResourceManager, reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> { closeableResourceManager.close(); - return worldCreationContextMapper.apply(reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie); + return creationContextMapper.apply(reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie); }, Util.backgroundExecutor(), minecraft ); minecraft.managedBlock(completableFuture::isDone); minecraft.setScreen( - new CreateWorldScreen(minecraft, screen, (WorldCreationContext)completableFuture.join(), Optional.of(resourceKey), OptionalLong.empty(), createWorldCallback) + new CreateWorldScreen(minecraft, lastScreen, (WorldCreationContext)completableFuture.join(), Optional.of(preset), OptionalLong.empty(), createWorldCallback) ); } public static CreateWorldScreen createFromExisting( - Minecraft minecraft, @Nullable Screen lastScreen, LevelSettings levelSettings, WorldCreationContext settings, @Nullable Path tempDataPackDir + Minecraft minecraft, @Nullable Screen lastScreen, LevelSettings levelSettings, WorldCreationContext context, @Nullable Path tempDataPackDir ) { CreateWorldScreen createWorldScreen = new CreateWorldScreen( minecraft, lastScreen, - settings, - WorldPresets.fromSettings(settings.selectedDimensions()), - OptionalLong.of(settings.options().seed()), + context, + WorldPresets.fromSettings(context.selectedDimensions()), + OptionalLong.of(context.options().seed()), (createWorldScreenx, layeredRegistryAccess, primaryLevelData, path) -> createWorldScreenx.createNewWorld(layeredRegistryAccess, primaryLevelData) ); createWorldScreen.recreated = true; @@ -209,11 +220,11 @@ public class CreateWorldScreen extends Screen { createWorldScreen.uiState.setDifficulty(levelSettings.difficulty()); createWorldScreen.uiState.getGameRules().assignFrom(levelSettings.gameRules(), null); if (levelSettings.hardcore()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.HARDCORE); + createWorldScreen.uiState.setGameMode(SelectedGameMode.HARDCORE); } else if (levelSettings.gameType().isSurvival()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.SURVIVAL); + createWorldScreen.uiState.setGameMode(SelectedGameMode.SURVIVAL); } else if (levelSettings.gameType().isCreative()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.CREATIVE); + createWorldScreen.uiState.setGameMode(SelectedGameMode.CREATIVE); } createWorldScreen.tempDataPackDir = tempDataPackDir; @@ -222,17 +233,17 @@ public class CreateWorldScreen extends Screen { private CreateWorldScreen( Minecraft minecraft, - @Nullable Screen screen, - WorldCreationContext worldCreationContext, - Optional> optional, - OptionalLong optionalLong, + @Nullable Screen lastScreen, + WorldCreationContext context, + Optional> preset, + OptionalLong seed, CreateWorldCallback createWorldCallback ) { super(Component.translatable("selectWorld.create")); - this.lastScreen = screen; + this.lastScreen = lastScreen; this.packValidator = minecraft.directoryValidator(); this.createWorldCallback = createWorldCallback; - this.uiState = new WorldCreationUiState(minecraft.getLevelSource().getBaseDir(), worldCreationContext, optional, optionalLong); + this.uiState = new WorldCreationUiState(minecraft.getLevelSource().getBaseDir(), context, preset, seed); } public WorldCreationUiState getUiState() { @@ -280,7 +291,7 @@ public class CreateWorldScreen extends Screen { private void onCreate() { WorldCreationContext worldCreationContext = this.uiState.getSettings(); - WorldDimensions.Complete complete = worldCreationContext.selectedDimensions().bake(worldCreationContext.datapackDimensions()); + Complete complete = worldCreationContext.selectedDimensions().bake(worldCreationContext.datapackDimensions()); LayeredRegistryAccess layeredRegistryAccess = worldCreationContext.worldgenRegistries() .replaceFrom(RegistryLayer.DIMENSIONS, complete.dimensionsRegistryAccess()); Lifecycle lifecycle = FeatureFlags.isExperimental(worldCreationContext.dataConfiguration().enabledFeatures()) ? Lifecycle.experimental() : Lifecycle.stable(); @@ -292,15 +303,15 @@ public class CreateWorldScreen extends Screen { WorldOpenFlows.confirmWorldCreation(this.minecraft, this, lifecycle3, () -> this.createWorldAndCleanup(layeredRegistryAccess, primaryLevelData), bl); } - private void createWorldAndCleanup(LayeredRegistryAccess layeredRegistryAccess, PrimaryLevelData primaryLevelData) { - boolean bl = this.createWorldCallback.create(this, layeredRegistryAccess, primaryLevelData, this.tempDataPackDir); + private void createWorldAndCleanup(LayeredRegistryAccess registryAccess, PrimaryLevelData levelData) { + boolean bl = this.createWorldCallback.create(this, registryAccess, levelData, this.tempDataPackDir); this.removeTempDataPackDir(); if (!bl) { this.popScreen(); } } - private boolean createNewWorld(LayeredRegistryAccess layeredRegistryAccess, WorldData worldData) { + private boolean createNewWorld(LayeredRegistryAccess registryAccess, WorldData worldData) { String string = this.uiState.getTargetFolder(); WorldCreationContext worldCreationContext = this.uiState.getSettings(); queueLoadScreen(this.minecraft, PREPARING_WORLD_DATA); @@ -311,9 +322,7 @@ public class CreateWorldScreen extends Screen { } else { this.minecraft .createWorldOpenFlows() - .createLevelFromExistingSettings( - (LevelStorageSource.LevelStorageAccess)optional.get(), worldCreationContext.dataPackResources(), layeredRegistryAccess, worldData - ); + .createLevelFromExistingSettings((LevelStorageSource.LevelStorageAccess)optional.get(), worldCreationContext.dataPackResources(), registryAccess, worldData); return true; } } @@ -373,16 +382,6 @@ public class CreateWorldScreen extends Screen { this.renderMenuBackground(partialTick, 0, this.layout.getHeaderHeight(), this.width, this.height); } - @Override - protected T addWidget(T listener) { - return super.addWidget(listener); - } - - @Override - protected T addRenderableWidget(T widget) { - return super.addRenderableWidget(widget); - } - @Nullable private Path getOrCreateTempDataPackDir() { if (this.tempDataPackDir == null) { @@ -421,7 +420,7 @@ public class CreateWorldScreen extends Screen { } } - private void tryApplyNewDataPacks(PackRepository packRepository, boolean shouldConfirm, Consumer consumer) { + private void tryApplyNewDataPacks(PackRepository packRepository, boolean shouldConfirm, Consumer callback) { List list = ImmutableList.copyOf(packRepository.getSelectedIds()); List list2 = (List)packRepository.getAvailableIds() .stream() @@ -437,20 +436,20 @@ public class CreateWorldScreen extends Screen { if (FeatureFlags.isExperimental(featureFlagSet) && shouldConfirm) { this.minecraft.setScreen(new ConfirmExperimentalFeaturesScreen(packRepository.getSelectedPacks(), bl -> { if (bl) { - this.applyNewPackConfig(packRepository, worldDataConfiguration, consumer); + this.applyNewPackConfig(packRepository, worldDataConfiguration, callback); } else { - consumer.accept(this.uiState.getSettings().dataConfiguration()); + callback.accept(this.uiState.getSettings().dataConfiguration()); } })); } else { - this.applyNewPackConfig(packRepository, worldDataConfiguration, consumer); + this.applyNewPackConfig(packRepository, worldDataConfiguration, callback); } } } - private void applyNewPackConfig(PackRepository packRepository, WorldDataConfiguration worldDataConfiguration, Consumer consumer) { + private void applyNewPackConfig(PackRepository packRepository, WorldDataConfiguration worldDataConfiguration, Consumer callback) { this.minecraft.forceSetScreen(new GenericMessageScreen(Component.translatable("dataPack.validation.working"))); - WorldLoader.InitConfig initConfig = createDefaultLoadConfig(packRepository, worldDataConfiguration); + InitConfig initConfig = createDefaultLoadConfig(packRepository, worldDataConfiguration); WorldLoader.load( initConfig, dataLoadContext -> { @@ -466,9 +465,7 @@ public class CreateWorldScreen extends Screen { DynamicOps dynamicOps2 = dataLoadContext.datapackWorldgen().createSerializationContext(JsonOps.INSTANCE); WorldGenSettings worldGenSettings = dataResult.flatMap(jsonElement -> WorldGenSettings.CODEC.parse(dynamicOps2, jsonElement)) .getOrThrow(string -> new IllegalStateException("Error parsing worldgen settings after loading data packs: " + string)); - return new WorldLoader.DataLoadOutput<>( - new DataPackReloadCookie(worldGenSettings, dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions() - ); + return new DataLoadOutput<>(new DataPackReloadCookie(worldGenSettings, dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions()); } }, (closeableResourceManager, reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> { @@ -494,9 +491,9 @@ public class CreateWorldScreen extends Screen { new ConfirmScreen( bl -> { if (bl) { - consumer.accept(this.uiState.getSettings().dataConfiguration()); + callback.accept(this.uiState.getSettings().dataConfiguration()); } else { - consumer.accept(WorldDataConfiguration.DEFAULT); + callback.accept(WorldDataConfiguration.DEFAULT); } }, Component.translatable("dataPack.validation.failed"), @@ -515,9 +512,9 @@ public class CreateWorldScreen extends Screen { ); } - private static WorldLoader.InitConfig createDefaultLoadConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig) { - WorldLoader.PackConfig packConfig = new WorldLoader.PackConfig(packRepository, initialDataConfig, false, true); - return new WorldLoader.InitConfig(packConfig, Commands.CommandSelection.INTEGRATED, 2); + private static InitConfig createDefaultLoadConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig) { + PackConfig packConfig = new PackConfig(packRepository, initialDataConfig, false, true); + return new InitConfig(packConfig, Commands.CommandSelection.INTEGRATED, 2); } private void removeTempDataPackDir() { @@ -565,21 +562,21 @@ public class CreateWorldScreen extends Screen { } } - private static Optional createNewWorldDirectory(Minecraft minecraft, String string, @Nullable Path path) { + private static Optional createNewWorldDirectory(Minecraft minecraft, String saveName, @Nullable Path tempDataPackDir) { try { - LevelStorageSource.LevelStorageAccess levelStorageAccess = minecraft.getLevelSource().createAccess(string); - if (path == null) { + LevelStorageSource.LevelStorageAccess levelStorageAccess = minecraft.getLevelSource().createAccess(saveName); + if (tempDataPackDir == null) { return Optional.of(levelStorageAccess); } try { - Stream stream = Files.walk(path); + Stream stream = Files.walk(tempDataPackDir); Optional var6; try { - Path path2 = levelStorageAccess.getLevelPath(LevelResource.DATAPACK_DIR); - FileUtil.createDirectoriesSafe(path2); - stream.filter(path2x -> !path2x.equals(path)).forEach(path3 -> copyBetweenDirs(path, path2, path3)); + Path path = levelStorageAccess.getLevelPath(LevelResource.DATAPACK_DIR); + FileUtil.createDirectoriesSafe(path); + stream.filter(path2 -> !path2.equals(tempDataPackDir)).forEach(path3 -> copyBetweenDirs(tempDataPackDir, path, path3)); var6 = Optional.of(levelStorageAccess); } catch (Throwable var8) { if (stream != null) { @@ -599,11 +596,11 @@ public class CreateWorldScreen extends Screen { return var6; } catch (UncheckedIOException | IOException var9) { - LOGGER.warn("Failed to copy datapacks to world {}", string, var9); + LOGGER.warn("Failed to copy datapacks to world {}", saveName, var9); levelStorageAccess.close(); } } catch (UncheckedIOException | IOException var10) { - LOGGER.warn("Failed to create access for {}", string, var10); + LOGGER.warn("Failed to create access for {}", saveName, var10); } return Optional.empty(); @@ -699,9 +696,9 @@ public class CreateWorldScreen extends Screen { CommonLayouts.labeledElement(CreateWorldScreen.this.font, this.nameEdit, CreateWorldScreen.NAME_LABEL), rowHelper.newCellSettings().alignHorizontallyCenter() ); - CycleButton cycleButton = rowHelper.addChild( - CycleButton.builder(selectedGameMode -> selectedGameMode.displayName) - .withValues(WorldCreationUiState.SelectedGameMode.SURVIVAL, WorldCreationUiState.SelectedGameMode.HARDCORE, WorldCreationUiState.SelectedGameMode.CREATIVE) + CycleButton cycleButton = rowHelper.addChild( + CycleButton.builder(selectedGameMode -> selectedGameMode.displayName) + .withValues(SelectedGameMode.SURVIVAL, SelectedGameMode.HARDCORE, SelectedGameMode.CREATIVE) .create( 0, 0, 210, 20, CreateWorldScreen.GAME_MODEL_LABEL, (cycleButtonx, selectedGameMode) -> CreateWorldScreen.this.uiState.setGameMode(selectedGameMode) ), @@ -803,8 +800,8 @@ public class CreateWorldScreen extends Screen { WorldTab() { super(TITLE); RowHelper rowHelper = this.layout.columnSpacing(10).rowSpacing(8).createRowHelper(2); - CycleButton cycleButton = rowHelper.addChild( - CycleButton.builder(WorldCreationUiState.WorldTypeEntry::describePreset) + CycleButton cycleButton = rowHelper.addChild( + CycleButton.builder(WorldTypeEntry::describePreset) .withValues(this.createWorldTypeValueSupplier()) .withCustomNarration(CreateWorldScreen.WorldTab::createTypeButtonNarration) .create( @@ -818,7 +815,7 @@ public class CreateWorldScreen extends Screen { ); cycleButton.setValue(CreateWorldScreen.this.uiState.getWorldType()); CreateWorldScreen.this.uiState.addListener(worldCreationUiState -> { - WorldCreationUiState.WorldTypeEntry worldTypeEntry = worldCreationUiState.getWorldType(); + WorldTypeEntry worldTypeEntry = worldCreationUiState.getWorldType(); cycleButton.setValue(worldTypeEntry); if (worldTypeEntry.isAmplified()) { cycleButton.setTooltip(Tooltip.create(AMPLIFIED_HELP_TEXT)); @@ -842,7 +839,8 @@ public class CreateWorldScreen extends Screen { .withInfo(GENERATE_STRUCTURES_INFO); builder.addSwitch(BONUS_CHEST, CreateWorldScreen.this.uiState::isBonusChest, CreateWorldScreen.this.uiState::setBonusChest) .withIsActiveCondition(() -> !CreateWorldScreen.this.uiState.isHardcore() && !CreateWorldScreen.this.uiState.isDebug()); - SwitchGrid switchGrid = builder.build(layoutElement -> rowHelper.addChild(layoutElement, 2)); + SwitchGrid switchGrid = builder.build(); + rowHelper.addChild(switchGrid.layout(), 2); CreateWorldScreen.this.uiState.addListener(worldCreationUiState -> switchGrid.refreshStates()); } @@ -853,11 +851,11 @@ public class CreateWorldScreen extends Screen { } } - private CycleButton.ValueListSupplier createWorldTypeValueSupplier() { + private ValueListSupplier createWorldTypeValueSupplier() { return new 2(this); } - private static MutableComponent createTypeButtonNarration(CycleButton button) { + private static MutableComponent createTypeButtonNarration(CycleButton button) { return button.getValue().isAmplified() ? CommonComponents.joinForNarration(button.createDefaultNarrationMessage(), AMPLIFIED_HELP_TEXT) : button.createDefaultNarrationMessage(); diff --git a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java index f71e0f04..faa9ad57 100644 --- a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java @@ -97,11 +97,11 @@ public class EditGameRulesScreen extends Screen { public class BooleanRuleEntry extends EditGameRulesScreen.GameRuleEntry { private final CycleButton checkbox; - public BooleanRuleEntry(final Component label, final List tooltip, final String string, final GameRules.BooleanValue value) { + public BooleanRuleEntry(final Component label, final List tooltip, final String description, final GameRules.BooleanValue value) { super(tooltip, label); this.checkbox = CycleButton.onOffBuilder(value.get()) .displayOnlyValue() - .withCustomNarration(cycleButton -> cycleButton.createDefaultNarrationMessage().append("\n").append(string)) + .withCustomNarration(cycleButton -> cycleButton.createDefaultNarrationMessage().append("\n").append(description)) .create(10, 5, 44, 20, label, (cycleButton, boolean_) -> value.set(boolean_, null)); this.children.add(this.checkbox); } @@ -168,10 +168,10 @@ public class EditGameRulesScreen extends Screen { protected void renderLabel(GuiGraphics guiGraphics, int x, int y) { if (this.label.size() == 1) { - guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(0), y, x + 5, -1, false); + guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(0), y, x + 5, -1); } else if (this.label.size() >= 2) { - guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(0), y, x, -1, false); - guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(1), y, x + 10, -1, false); + guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(0), y, x, -1); + guiGraphics.drawString(EditGameRulesScreen.this.minecraft.font, (FormattedCharSequence)this.label.get(1), y, x + 10, -1); } } } @@ -180,12 +180,12 @@ public class EditGameRulesScreen extends Screen { public class IntegerRuleEntry extends EditGameRulesScreen.GameRuleEntry { private final EditBox input; - public IntegerRuleEntry(final Component label, final List tooltip, final String string, final GameRules.IntegerValue value) { + public IntegerRuleEntry(final Component label, final List tooltip, final String description, final GameRules.IntegerValue value) { super(tooltip, label); - this.input = new EditBox(EditGameRulesScreen.this.minecraft.font, 10, 5, 44, 20, label.copy().append("\n").append(string).append("\n")); + this.input = new EditBox(EditGameRulesScreen.this.minecraft.font, 10, 5, 44, 20, label.copy().append("\n").append(description).append("\n")); this.input.setValue(Integer.toString(value.get())); - this.input.setResponder(stringx -> { - if (value.tryDeserialize(stringx)) { + this.input.setResponder(string -> { + if (value.tryDeserialize(string)) { this.input.setTextColor(14737632); EditGameRulesScreen.this.clearInvalid(this); } else { diff --git a/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java b/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java index 2419ff38..55852bb9 100644 --- a/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java @@ -4,16 +4,25 @@ import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.objects.Object2BooleanLinkedOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2BooleanMap; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.AbstractContainerWidget; import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.MultiLineTextWidget; +import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; +import net.minecraft.client.gui.layouts.Layout; import net.minecraft.client.gui.layouts.LinearLayout; +import net.minecraft.client.gui.narration.NarratableEntry; +import net.minecraft.client.gui.narration.NarrationElementOutput; +import net.minecraft.client.gui.navigation.ScreenDirection; +import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.worldselection.SwitchGrid.Builder; import net.minecraft.client.resources.language.I18n; @@ -22,17 +31,21 @@ import net.minecraft.network.chat.Component; import net.minecraft.server.packs.repository.Pack; import net.minecraft.server.packs.repository.PackRepository; import net.minecraft.server.packs.repository.PackSource; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ExperimentsScreen extends Screen { private static final Component TITLE = Component.translatable("selectWorld.experiments"); private static final Component INFO = Component.translatable("selectWorld.experiments.info").withStyle(ChatFormatting.RED); private static final int MAIN_CONTENT_WIDTH = 310; + private static final int SCROLL_AREA_MIN_HEIGHT = 130; private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this); private final Screen parent; private final PackRepository packRepository; private final Consumer output; private final Object2BooleanMap packs = new Object2BooleanLinkedOpenHashMap<>(); + @Nullable + private ExperimentsScreen.ScrollArea scrollArea; public ExperimentsScreen(Screen parent, PackRepository packRepository, Consumer output) { super(TITLE); @@ -52,7 +65,7 @@ public class ExperimentsScreen extends Screen { this.layout.addTitleHeader(TITLE, this.font); LinearLayout linearLayout = this.layout.addToContents(LinearLayout.vertical()); linearLayout.addChild(new MultiLineTextWidget(INFO, this.font).setMaxWidth(310), layoutSettings -> layoutSettings.paddingBottom(15)); - Builder builder = SwitchGrid.builder(310).withInfoUnderneath(2, true).withRowSpacing(4); + Builder builder = SwitchGrid.builder(299).withInfoUnderneath(2, true).withRowSpacing(4); this.packs .forEach( (pack, boolean_) -> builder.addSwitch( @@ -60,7 +73,9 @@ public class ExperimentsScreen extends Screen { ) .withInfo(pack.getDescription()) ); - builder.build(linearLayout::addChild); + Layout layout = builder.build().layout(); + this.scrollArea = new ExperimentsScreen.ScrollArea(layout, 310, 130); + linearLayout.addChild(this.scrollArea); LinearLayout linearLayout2 = this.layout.addToFooter(LinearLayout.horizontal().spacing(8)); linearLayout2.addChild(Button.builder(CommonComponents.GUI_DONE, button -> this.onDone()).build()); linearLayout2.addChild(Button.builder(CommonComponents.GUI_CANCEL, button -> this.onClose()).build()); @@ -77,7 +92,11 @@ public class ExperimentsScreen extends Screen { @Override protected void repositionElements() { + this.scrollArea.setHeight(130); this.layout.arrangeElements(); + int i = this.height - this.layout.getFooterHeight() - this.scrollArea.getRectangle().bottom(); + this.scrollArea.setHeight(this.scrollArea.getHeight() + i); + this.scrollArea.refreshScrollAmount(); } @Override @@ -103,4 +122,94 @@ public class ExperimentsScreen extends Screen { this.packRepository.setSelected(list.stream().map(Pack::getId).toList()); this.output.accept(this.packRepository); } + + @Environment(EnvType.CLIENT) + public class ScrollArea extends AbstractContainerWidget { + private final List children = new ArrayList(); + private final Layout layout; + + public ScrollArea(final Layout layout, final int width, final int height) { + super(0, 0, width, height, CommonComponents.EMPTY); + this.layout = layout; + layout.visitWidgets(this::addWidget); + } + + public void addWidget(AbstractWidget widget) { + this.children.add(widget); + } + + @Override + protected int contentHeight() { + return this.layout.getHeight(); + } + + @Override + protected double scrollRate() { + return 10.0; + } + + @Override + protected void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + guiGraphics.enableScissor(this.getX(), this.getY(), this.getX() + this.width, this.getY() + this.height); + guiGraphics.pose().pushPose(); + guiGraphics.pose().translate(0.0, -this.scrollAmount(), 0.0); + + for (AbstractWidget abstractWidget : this.children) { + abstractWidget.render(guiGraphics, mouseX, mouseY, partialTick); + } + + guiGraphics.pose().popPose(); + guiGraphics.disableScissor(); + this.renderScrollbar(guiGraphics); + } + + @Override + protected void updateWidgetNarration(NarrationElementOutput narrationElementOutput) { + } + + @Override + public ScreenRectangle getBorderForArrowNavigation(ScreenDirection direction) { + return new ScreenRectangle(this.getX(), this.getY(), this.width, this.contentHeight()); + } + + @Override + public void setFocused(@Nullable GuiEventListener focused) { + super.setFocused(focused); + if (focused != null) { + ScreenRectangle screenRectangle = this.getRectangle(); + ScreenRectangle screenRectangle2 = focused.getRectangle(); + int i = (int)(screenRectangle2.top() - this.scrollAmount() - screenRectangle.top()); + int j = (int)(screenRectangle2.bottom() - this.scrollAmount() - screenRectangle.bottom()); + if (i < 0) { + this.setScrollAmount(this.scrollAmount() + i - 14.0); + } else if (j > 0) { + this.setScrollAmount(this.scrollAmount() + j + 14.0); + } + } + } + + @Override + public List children() { + return this.children; + } + + @Override + public void setX(int x) { + super.setX(x); + this.layout.setX(x); + this.layout.arrangeElements(); + } + + @Override + public void setY(int y) { + super.setY(y); + this.layout.setY(y); + this.layout.arrangeElements(); + } + + @Override + public Collection getNarratables() { + return this.children; + } + } } diff --git a/net/minecraft/client/gui/screens/worldselection/OptimizeWorldScreen.java b/net/minecraft/client/gui/screens/worldselection/OptimizeWorldScreen.java index b2cad3a0..3951db9f 100644 --- a/net/minecraft/client/gui/screens/worldselection/OptimizeWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/OptimizeWorldScreen.java @@ -13,6 +13,7 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.Screen; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.RegistryAccess.Frozen; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; @@ -22,7 +23,6 @@ import net.minecraft.server.packs.repository.ServerPacksSource; import net.minecraft.util.Mth; import net.minecraft.util.worldupdate.WorldUpgrader; import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelSettings; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.level.storage.WorldData; import org.jetbrains.annotations.Nullable; @@ -51,9 +51,9 @@ public class OptimizeWorldScreen extends Screen { OptimizeWorldScreen var10; try (WorldStem worldStem = worldOpenFlows.loadWorldStem(levelStorage.getDataTag(), false, packRepository)) { WorldData worldData = worldStem.worldData(); - RegistryAccess.Frozen frozen = worldStem.registries().compositeAccess(); + Frozen frozen = worldStem.registries().compositeAccess(); levelStorage.saveDataTag(frozen, worldData); - var10 = new OptimizeWorldScreen(callback, dataFixer, levelStorage, worldData.getLevelSettings(), eraseCache, frozen); + var10 = new OptimizeWorldScreen(callback, dataFixer, levelStorage, worldData, eraseCache, frozen); } return var10; @@ -67,13 +67,13 @@ public class OptimizeWorldScreen extends Screen { BooleanConsumer callback, DataFixer dataFixer, LevelStorageSource.LevelStorageAccess levelStorage, - LevelSettings levelSettings, + WorldData worldData, boolean eraseCache, RegistryAccess registryAccess ) { - super(Component.translatable("optimizeWorld.title", levelSettings.levelName())); + super(Component.translatable("optimizeWorld.title", worldData.getLevelSettings().levelName())); this.callback = callback; - this.upgrader = new WorldUpgrader(levelStorage, dataFixer, registryAccess, eraseCache, false); + this.upgrader = new WorldUpgrader(levelStorage, dataFixer, worldData, registryAccess, eraseCache, false); } @Override diff --git a/net/minecraft/client/gui/screens/worldselection/SelectWorldScreen.java b/net/minecraft/client/gui/screens/worldselection/SelectWorldScreen.java index 4443e411..56835664 100644 --- a/net/minecraft/client/gui/screens/worldselection/SelectWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/SelectWorldScreen.java @@ -7,6 +7,8 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.gui.screens.Screen; +import net.minecraft.client.gui.screens.worldselection.WorldSelectionList.Entry; +import net.minecraft.client.gui.screens.worldselection.WorldSelectionList.WorldListEntry; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.world.level.levelgen.WorldOptions; @@ -40,7 +42,7 @@ public class SelectWorldScreen extends Screen { new WorldSelectionList(this, this.minecraft, this.width, this.height - 112, 48, 36, this.searchBox.getValue(), this.list) ); this.selectButton = this.addRenderableWidget( - Button.builder(LevelSummary.PLAY_WORLD, button -> this.list.getSelectedOpt().ifPresent(WorldSelectionList.WorldListEntry::joinWorld)) + Button.builder(LevelSummary.PLAY_WORLD, button -> this.list.getSelectedOpt().ifPresent(WorldListEntry::joinWorld)) .bounds(this.width / 2 - 154, this.height - 52, 150, 20) .build() ); @@ -50,19 +52,17 @@ public class SelectWorldScreen extends Screen { .build() ); this.renameButton = this.addRenderableWidget( - Button.builder(Component.translatable("selectWorld.edit"), button -> this.list.getSelectedOpt().ifPresent(WorldSelectionList.WorldListEntry::editWorld)) + Button.builder(Component.translatable("selectWorld.edit"), button -> this.list.getSelectedOpt().ifPresent(WorldListEntry::editWorld)) .bounds(this.width / 2 - 154, this.height - 28, 72, 20) .build() ); this.deleteButton = this.addRenderableWidget( - Button.builder(Component.translatable("selectWorld.delete"), button -> this.list.getSelectedOpt().ifPresent(WorldSelectionList.WorldListEntry::deleteWorld)) + Button.builder(Component.translatable("selectWorld.delete"), button -> this.list.getSelectedOpt().ifPresent(WorldListEntry::deleteWorld)) .bounds(this.width / 2 - 76, this.height - 28, 72, 20) .build() ); this.copyButton = this.addRenderableWidget( - Button.builder( - Component.translatable("selectWorld.recreate"), button -> this.list.getSelectedOpt().ifPresent(WorldSelectionList.WorldListEntry::recreateWorld) - ) + Button.builder(Component.translatable("selectWorld.recreate"), button -> this.list.getSelectedOpt().ifPresent(WorldListEntry::recreateWorld)) .bounds(this.width / 2 + 4, this.height - 28, 72, 20) .build() ); @@ -108,7 +108,7 @@ public class SelectWorldScreen extends Screen { @Override public void removed() { if (this.list != null) { - this.list.children().forEach(WorldSelectionList.Entry::close); + this.list.children().forEach(Entry::close); } } } diff --git a/net/minecraft/client/gui/screens/worldselection/SwitchGrid.java b/net/minecraft/client/gui/screens/worldselection/SwitchGrid.java index 70bd2738..25cec495 100644 --- a/net/minecraft/client/gui/screens/worldselection/SwitchGrid.java +++ b/net/minecraft/client/gui/screens/worldselection/SwitchGrid.java @@ -15,7 +15,7 @@ import net.minecraft.client.gui.components.MultiLineTextWidget; import net.minecraft.client.gui.components.StringWidget; import net.minecraft.client.gui.components.Tooltip; import net.minecraft.client.gui.layouts.GridLayout; -import net.minecraft.client.gui.layouts.LayoutElement; +import net.minecraft.client.gui.layouts.Layout; import net.minecraft.client.gui.layouts.SpacerElement; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -25,9 +25,15 @@ import org.jetbrains.annotations.Nullable; class SwitchGrid { private static final int DEFAULT_SWITCH_BUTTON_WIDTH = 44; private final List switches; + private final Layout layout; - SwitchGrid(List switches) { + SwitchGrid(List switches, Layout layout) { this.switches = switches; + this.layout = layout; + } + + public Layout layout() { + return this.layout; } public void refreshStates() { @@ -71,7 +77,7 @@ class SwitchGrid { return this; } - public SwitchGrid build(Consumer consumer) { + public SwitchGrid build() { GridLayout gridLayout = new GridLayout().rowSpacing(this.rowSpacing); gridLayout.addChild(SpacerElement.width(this.width - 44), 0, 0); gridLayout.addChild(SpacerElement.width(44), 0, 1); @@ -83,8 +89,7 @@ class SwitchGrid { } gridLayout.arrangeElements(); - consumer.accept(gridLayout); - SwitchGrid switchGrid = new SwitchGrid(list); + SwitchGrid switchGrid = new SwitchGrid(list, gridLayout); switchGrid.refreshStates(); return switchGrid; } diff --git a/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java b/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java index 866c8b7b..3dbcb498 100644 --- a/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java @@ -5,6 +5,7 @@ import java.util.function.BiFunction; import java.util.function.UnaryOperator; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.SelectedGameMode; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; @@ -39,25 +40,25 @@ public record WorldCreationContext( worldGenRegistries, dataPackResources, dataConfiguration, - new InitialWorldCreationOptions(WorldCreationUiState.SelectedGameMode.SURVIVAL, Set.of(), null) + new InitialWorldCreationOptions(SelectedGameMode.SURVIVAL, Set.of(), null) ); } public WorldCreationContext( WorldOptions worldOptions, WorldDimensions worldDimensions, - LayeredRegistryAccess layeredRegistryAccess, - ReloadableServerResources reloadableServerResources, - WorldDataConfiguration worldDataConfiguration, + LayeredRegistryAccess worldGenRegistries, + ReloadableServerResources dataPackResources, + WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions ) { this( worldOptions, - layeredRegistryAccess.getLayer(RegistryLayer.DIMENSIONS).lookupOrThrow(Registries.LEVEL_STEM), + worldGenRegistries.getLayer(RegistryLayer.DIMENSIONS).lookupOrThrow(Registries.LEVEL_STEM), worldDimensions, - layeredRegistryAccess.replaceFrom(RegistryLayer.DIMENSIONS), - reloadableServerResources, - worldDataConfiguration, + worldGenRegistries.replaceFrom(RegistryLayer.DIMENSIONS), + dataPackResources, + dataConfiguration, initialWorldCreationOptions ); } diff --git a/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java b/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java index a41d09db..0f0cabbe 100644 --- a/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java @@ -57,6 +57,8 @@ import net.minecraft.world.level.storage.LevelResource; import net.minecraft.world.level.storage.LevelStorageException; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.level.storage.LevelSummary; +import net.minecraft.world.level.storage.LevelStorageSource.LevelCandidates; +import net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess; import net.minecraft.world.level.storage.LevelSummary.CorruptedLevelSummary; import net.minecraft.world.level.storage.LevelSummary.SymlinkLevelSummary; import net.minecraft.world.level.validation.ContentValidationException; @@ -173,7 +175,7 @@ public class WorldSelectionList extends ObjectSelectionList> loadLevels() { - LevelStorageSource.LevelCandidates levelCandidates; + LevelCandidates levelCandidates; try { levelCandidates = this.minecraft.getLevelSource().findLevelCandidates(); } catch (LevelStorageException var3) { @@ -217,7 +219,7 @@ public class WorldSelectionList extends ObjectSelectionList getSelectedOpt() { @@ -272,11 +274,11 @@ public class WorldSelectionList extends ObjectSelectionList pair = this.minecraft.createWorldOpenFlows().recreateWorldData(levelStorageAccess); LevelSettings levelSettings = pair.getFirst(); WorldCreationContext worldCreationContext = pair.getSecond(); diff --git a/net/minecraft/client/gui/spectator/PlayerMenuItem.java b/net/minecraft/client/gui/spectator/PlayerMenuItem.java index fa13374e..344c93c9 100644 --- a/net/minecraft/client/gui/spectator/PlayerMenuItem.java +++ b/net/minecraft/client/gui/spectator/PlayerMenuItem.java @@ -35,8 +35,8 @@ public class PlayerMenuItem implements SpectatorMenuItem { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.skin.get(), 2, 2, 12, ARGB.white(g)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.skin.get(), 2, 2, 12, ARGB.white(alpha)); } @Override diff --git a/net/minecraft/client/gui/spectator/SpectatorMenu.java b/net/minecraft/client/gui/spectator/SpectatorMenu.java index b3e75afa..c5460afe 100644 --- a/net/minecraft/client/gui/spectator/SpectatorMenu.java +++ b/net/minecraft/client/gui/spectator/SpectatorMenu.java @@ -37,7 +37,7 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { } @Override @@ -128,8 +128,8 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.CLOSE_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.CLOSE_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override @@ -159,8 +159,8 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - int i = ARGB.colorFromFloat(g, f, f, f); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + int i = ARGB.colorFromFloat(alpha, brightness, brightness, brightness); if (this.direction < 0) { guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.SCROLL_LEFT_SPRITE, 0, 0, 16, 16, i); } else { diff --git a/net/minecraft/client/gui/spectator/SpectatorMenuItem.java b/net/minecraft/client/gui/spectator/SpectatorMenuItem.java index 6c1a5467..18c2ade9 100644 --- a/net/minecraft/client/gui/spectator/SpectatorMenuItem.java +++ b/net/minecraft/client/gui/spectator/SpectatorMenuItem.java @@ -11,7 +11,7 @@ public interface SpectatorMenuItem { Component getName(); - void renderIcon(GuiGraphics guiGraphics, float f, float g); + void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha); boolean isEnabled(); } diff --git a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java index dd9404a1..5e3adb01 100644 --- a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java @@ -59,8 +59,8 @@ public class TeleportToPlayerMenuCategory implements SpectatorMenuCategory, Spec } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_PLAYER_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_PLAYER_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override diff --git a/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java b/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java index d5849a05..0f59e874 100644 --- a/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java @@ -64,8 +64,8 @@ public class TeleportToTeamMenuCategory implements SpectatorMenuCategory, Specta } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_TEAM_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_TEAM_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override @@ -115,16 +115,16 @@ public class TeleportToTeamMenuCategory implements SpectatorMenuCategory, Specta } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { Integer integer = this.team.getColor().getColor(); if (integer != null) { - float h = (integer >> 16 & 0xFF) / 255.0F; - float i = (integer >> 8 & 0xFF) / 255.0F; - float j = (integer & 0xFF) / 255.0F; - guiGraphics.fill(1, 1, 15, 15, ARGB.colorFromFloat(g, h * f, i * f, j * f)); + float f = (integer >> 16 & 0xFF) / 255.0F; + float g = (integer >> 8 & 0xFF) / 255.0F; + float h = (integer & 0xFF) / 255.0F; + guiGraphics.fill(1, 1, 15, 15, ARGB.colorFromFloat(alpha, f * brightness, g * brightness, h * brightness)); } - PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.iconSkin.get(), 2, 2, 12, ARGB.colorFromFloat(g, f, f, f)); + PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.iconSkin.get(), 2, 2, 12, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override diff --git a/net/minecraft/client/main/GameConfig.java b/net/minecraft/client/main/GameConfig.java index 4a0d0f03..f9fbcc27 100644 --- a/net/minecraft/client/main/GameConfig.java +++ b/net/minecraft/client/main/GameConfig.java @@ -56,14 +56,24 @@ public class GameConfig { public final boolean disableMultiplayer; public final boolean disableChat; public final boolean captureTracyImages; + public final boolean renderDebugLabels; - public GameData(boolean bl, String string, String string2, boolean bl2, boolean bl3, boolean bl4) { - this.demo = bl; - this.launchVersion = string; - this.versionType = string2; - this.disableMultiplayer = bl2; - this.disableChat = bl3; - this.captureTracyImages = bl4; + public GameData( + boolean demo, + String launchVersion, + String versionType, + boolean disableMultiplayer, + boolean disableChat, + boolean captureTracyImages, + boolean renderDebugLabels + ) { + this.demo = demo; + this.launchVersion = launchVersion; + this.versionType = versionType; + this.disableMultiplayer = disableMultiplayer; + this.disableChat = disableChat; + this.captureTracyImages = captureTracyImages; + this.renderDebugLabels = renderDebugLabels; } } diff --git a/net/minecraft/client/main/Main.java b/net/minecraft/client/main/Main.java index 80307a53..4ef6f355 100644 --- a/net/minecraft/client/main/Main.java +++ b/net/minecraft/client/main/Main.java @@ -9,7 +9,6 @@ import com.mojang.authlib.properties.PropertyMap.Serializer; import com.mojang.blaze3d.TracyBootstrap; import com.mojang.blaze3d.platform.DisplayData; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferUploader; import com.mojang.jtracy.TracyClient; import com.mojang.logging.LogUtils; import com.mojang.util.UndashedUuid; @@ -34,6 +33,7 @@ import net.minecraft.CrashReportCategory; import net.minecraft.DefaultUncaughtExceptionHandler; import net.minecraft.SharedConstants; import net.minecraft.Util; +import net.minecraft.client.ClientBootstrap; import net.minecraft.client.Minecraft; import net.minecraft.client.User; import net.minecraft.client.User.Type; @@ -63,49 +63,50 @@ public class Main { optionParser.accepts("disableChat"); optionParser.accepts("fullscreen"); optionParser.accepts("checkGlErrors"); - OptionSpec optionSpec = optionParser.accepts("jfrProfile"); - OptionSpec optionSpec2 = optionParser.accepts("tracy"); - OptionSpec optionSpec3 = optionParser.accepts("tracyNoImages"); - OptionSpec optionSpec4 = optionParser.accepts("quickPlayPath").withRequiredArg(); - OptionSpec optionSpec5 = optionParser.accepts("quickPlaySingleplayer").withRequiredArg(); - OptionSpec optionSpec6 = optionParser.accepts("quickPlayMultiplayer").withRequiredArg(); - OptionSpec optionSpec7 = optionParser.accepts("quickPlayRealms").withRequiredArg(); - OptionSpec optionSpec8 = optionParser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File(".")); - OptionSpec optionSpec9 = optionParser.accepts("assetsDir").withRequiredArg().ofType(File.class); - OptionSpec optionSpec10 = optionParser.accepts("resourcePackDir").withRequiredArg().ofType(File.class); - OptionSpec optionSpec11 = optionParser.accepts("proxyHost").withRequiredArg(); - OptionSpec optionSpec12 = optionParser.accepts("proxyPort").withRequiredArg().defaultsTo("8080").ofType(Integer.class); - OptionSpec optionSpec13 = optionParser.accepts("proxyUser").withRequiredArg(); - OptionSpec optionSpec14 = optionParser.accepts("proxyPass").withRequiredArg(); - OptionSpec optionSpec15 = optionParser.accepts("username").withRequiredArg().defaultsTo("Player" + System.currentTimeMillis() % 1000L); - OptionSpec optionSpec16 = optionParser.accepts("uuid").withRequiredArg(); - OptionSpec optionSpec17 = optionParser.accepts("xuid").withOptionalArg().defaultsTo(""); - OptionSpec optionSpec18 = optionParser.accepts("clientId").withOptionalArg().defaultsTo(""); - OptionSpec optionSpec19 = optionParser.accepts("accessToken").withRequiredArg().required(); - OptionSpec optionSpec20 = optionParser.accepts("version").withRequiredArg().required(); - OptionSpec optionSpec21 = optionParser.accepts("width").withRequiredArg().ofType(Integer.class).defaultsTo(854); - OptionSpec optionSpec22 = optionParser.accepts("height").withRequiredArg().ofType(Integer.class).defaultsTo(480); - OptionSpec optionSpec23 = optionParser.accepts("fullscreenWidth").withRequiredArg().ofType(Integer.class); - OptionSpec optionSpec24 = optionParser.accepts("fullscreenHeight").withRequiredArg().ofType(Integer.class); - OptionSpec optionSpec25 = optionParser.accepts("userProperties").withRequiredArg().defaultsTo("{}"); - OptionSpec optionSpec26 = optionParser.accepts("profileProperties").withRequiredArg().defaultsTo("{}"); - OptionSpec optionSpec27 = optionParser.accepts("assetIndex").withRequiredArg(); - OptionSpec optionSpec28 = optionParser.accepts("userType").withRequiredArg().defaultsTo("legacy"); - OptionSpec optionSpec29 = optionParser.accepts("versionType").withRequiredArg().defaultsTo("release"); - OptionSpec optionSpec30 = optionParser.nonOptions(); + OptionSpec optionSpec = optionParser.accepts("renderDebugLabels"); + OptionSpec optionSpec2 = optionParser.accepts("jfrProfile"); + OptionSpec optionSpec3 = optionParser.accepts("tracy"); + OptionSpec optionSpec4 = optionParser.accepts("tracyNoImages"); + OptionSpec optionSpec5 = optionParser.accepts("quickPlayPath").withRequiredArg(); + OptionSpec optionSpec6 = optionParser.accepts("quickPlaySingleplayer").withRequiredArg(); + OptionSpec optionSpec7 = optionParser.accepts("quickPlayMultiplayer").withRequiredArg(); + OptionSpec optionSpec8 = optionParser.accepts("quickPlayRealms").withRequiredArg(); + OptionSpec optionSpec9 = optionParser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File(".")); + OptionSpec optionSpec10 = optionParser.accepts("assetsDir").withRequiredArg().ofType(File.class); + OptionSpec optionSpec11 = optionParser.accepts("resourcePackDir").withRequiredArg().ofType(File.class); + OptionSpec optionSpec12 = optionParser.accepts("proxyHost").withRequiredArg(); + OptionSpec optionSpec13 = optionParser.accepts("proxyPort").withRequiredArg().defaultsTo("8080").ofType(Integer.class); + OptionSpec optionSpec14 = optionParser.accepts("proxyUser").withRequiredArg(); + OptionSpec optionSpec15 = optionParser.accepts("proxyPass").withRequiredArg(); + OptionSpec optionSpec16 = optionParser.accepts("username").withRequiredArg().defaultsTo("Player" + System.currentTimeMillis() % 1000L); + OptionSpec optionSpec17 = optionParser.accepts("uuid").withRequiredArg(); + OptionSpec optionSpec18 = optionParser.accepts("xuid").withOptionalArg().defaultsTo(""); + OptionSpec optionSpec19 = optionParser.accepts("clientId").withOptionalArg().defaultsTo(""); + OptionSpec optionSpec20 = optionParser.accepts("accessToken").withRequiredArg().required(); + OptionSpec optionSpec21 = optionParser.accepts("version").withRequiredArg().required(); + OptionSpec optionSpec22 = optionParser.accepts("width").withRequiredArg().ofType(Integer.class).defaultsTo(854); + OptionSpec optionSpec23 = optionParser.accepts("height").withRequiredArg().ofType(Integer.class).defaultsTo(480); + OptionSpec optionSpec24 = optionParser.accepts("fullscreenWidth").withRequiredArg().ofType(Integer.class); + OptionSpec optionSpec25 = optionParser.accepts("fullscreenHeight").withRequiredArg().ofType(Integer.class); + OptionSpec optionSpec26 = optionParser.accepts("userProperties").withRequiredArg().defaultsTo("{}"); + OptionSpec optionSpec27 = optionParser.accepts("profileProperties").withRequiredArg().defaultsTo("{}"); + OptionSpec optionSpec28 = optionParser.accepts("assetIndex").withRequiredArg(); + OptionSpec optionSpec29 = optionParser.accepts("userType").withRequiredArg().defaultsTo("legacy"); + OptionSpec optionSpec30 = optionParser.accepts("versionType").withRequiredArg().defaultsTo("release"); + OptionSpec optionSpec31 = optionParser.nonOptions(); OptionSet optionSet = optionParser.parse(strings); - File file = parseArgument(optionSet, optionSpec8); - String string = parseArgument(optionSet, optionSpec20); + File file = parseArgument(optionSet, optionSpec9); + String string = parseArgument(optionSet, optionSpec21); String string2 = "Pre-bootstrap"; Logger logger; GameConfig gameConfig; try { - if (optionSet.has(optionSpec)) { + if (optionSet.has(optionSpec2)) { JvmProfiler.INSTANCE.start(net.minecraft.util.profiling.jfr.Environment.CLIENT); } - if (optionSet.has(optionSpec2)) { + if (optionSet.has(optionSpec3)) { TracyBootstrap.setup(); } @@ -120,31 +121,32 @@ public class Main { logger = LogUtils.getLogger(); string2 = "Bootstrap"; Bootstrap.bootStrap(); + ClientBootstrap.bootstrap(); GameLoadTimesEvent.INSTANCE.setBootstrapTime(Bootstrap.bootstrapDuration.get()); Bootstrap.validate(); string2 = "Argument parsing"; - List list = optionSet.valuesOf(optionSpec30); + List list = optionSet.valuesOf(optionSpec31); if (!list.isEmpty()) { logger.info("Completely ignored arguments: {}", list); } - String string3 = optionSpec28.value(optionSet); + String string3 = optionSpec29.value(optionSet); Type type = Type.byName(string3); if (type == null) { logger.warn("Unrecognized user type: {}", string3); } - String string4 = parseArgument(optionSet, optionSpec11); + String string4 = parseArgument(optionSet, optionSpec12); Proxy proxy = Proxy.NO_PROXY; if (string4 != null) { try { - proxy = new Proxy(java.net.Proxy.Type.SOCKS, new InetSocketAddress(string4, parseArgument(optionSet, optionSpec12))); - } catch (Exception var81) { + proxy = new Proxy(java.net.Proxy.Type.SOCKS, new InetSocketAddress(string4, parseArgument(optionSet, optionSpec13))); + } catch (Exception var83) { } } - final String string5 = parseArgument(optionSet, optionSpec13); - final String string6 = parseArgument(optionSet, optionSpec14); + final String string5 = parseArgument(optionSet, optionSpec14); + final String string6 = parseArgument(optionSet, optionSpec15); if (!proxy.equals(Proxy.NO_PROXY) && stringHasValue(string5) && stringHasValue(string6)) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { @@ -153,45 +155,46 @@ public class Main { }); } - int i = parseArgument(optionSet, optionSpec21); - int j = parseArgument(optionSet, optionSpec22); - OptionalInt optionalInt = ofNullable(parseArgument(optionSet, optionSpec23)); - OptionalInt optionalInt2 = ofNullable(parseArgument(optionSet, optionSpec24)); + int i = parseArgument(optionSet, optionSpec22); + int j = parseArgument(optionSet, optionSpec23); + OptionalInt optionalInt = ofNullable(parseArgument(optionSet, optionSpec24)); + OptionalInt optionalInt2 = ofNullable(parseArgument(optionSet, optionSpec25)); boolean bl = optionSet.has("fullscreen"); boolean bl2 = optionSet.has("demo"); boolean bl3 = optionSet.has("disableMultiplayer"); boolean bl4 = optionSet.has("disableChat"); - boolean bl5 = !optionSet.has(optionSpec3); + boolean bl5 = !optionSet.has(optionSpec4); + boolean bl6 = optionSet.has(optionSpec); Gson gson = new GsonBuilder().registerTypeAdapter(PropertyMap.class, new Serializer()).create(); - PropertyMap propertyMap = GsonHelper.fromJson(gson, parseArgument(optionSet, optionSpec25), PropertyMap.class); - PropertyMap propertyMap2 = GsonHelper.fromJson(gson, parseArgument(optionSet, optionSpec26), PropertyMap.class); - String string7 = parseArgument(optionSet, optionSpec29); - File file2 = optionSet.has(optionSpec9) ? parseArgument(optionSet, optionSpec9) : new File(file, "assets/"); - File file3 = optionSet.has(optionSpec10) ? parseArgument(optionSet, optionSpec10) : new File(file, "resourcepacks/"); - UUID uUID = hasValidUuid(optionSpec16, optionSet, logger) - ? UndashedUuid.fromStringLenient(optionSpec16.value(optionSet)) - : UUIDUtil.createOfflinePlayerUUID(optionSpec15.value(optionSet)); - String string8 = optionSet.has(optionSpec27) ? optionSpec27.value(optionSet) : null; - String string9 = optionSet.valueOf(optionSpec17); - String string10 = optionSet.valueOf(optionSpec18); - String string11 = parseArgument(optionSet, optionSpec4); - String string12 = unescapeJavaArgument(parseArgument(optionSet, optionSpec5)); - String string13 = unescapeJavaArgument(parseArgument(optionSet, optionSpec6)); - String string14 = unescapeJavaArgument(parseArgument(optionSet, optionSpec7)); + PropertyMap propertyMap = GsonHelper.fromJson(gson, parseArgument(optionSet, optionSpec26), PropertyMap.class); + PropertyMap propertyMap2 = GsonHelper.fromJson(gson, parseArgument(optionSet, optionSpec27), PropertyMap.class); + String string7 = parseArgument(optionSet, optionSpec30); + File file2 = optionSet.has(optionSpec10) ? parseArgument(optionSet, optionSpec10) : new File(file, "assets/"); + File file3 = optionSet.has(optionSpec11) ? parseArgument(optionSet, optionSpec11) : new File(file, "resourcepacks/"); + UUID uUID = hasValidUuid(optionSpec17, optionSet, logger) + ? UndashedUuid.fromStringLenient(optionSpec17.value(optionSet)) + : UUIDUtil.createOfflinePlayerUUID(optionSpec16.value(optionSet)); + String string8 = optionSet.has(optionSpec28) ? optionSpec28.value(optionSet) : null; + String string9 = optionSet.valueOf(optionSpec18); + String string10 = optionSet.valueOf(optionSpec19); + String string11 = parseArgument(optionSet, optionSpec5); + String string12 = unescapeJavaArgument(parseArgument(optionSet, optionSpec6)); + String string13 = unescapeJavaArgument(parseArgument(optionSet, optionSpec7)); + String string14 = unescapeJavaArgument(parseArgument(optionSet, optionSpec8)); User user = new User( - optionSpec15.value(optionSet), uUID, optionSpec19.value(optionSet), emptyStringToEmptyOptional(string9), emptyStringToEmptyOptional(string10), type + optionSpec16.value(optionSet), uUID, optionSpec20.value(optionSet), emptyStringToEmptyOptional(string9), emptyStringToEmptyOptional(string10), type ); gameConfig = new GameConfig( new GameConfig.UserData(user, propertyMap, propertyMap2, proxy), new DisplayData(i, j, optionalInt, optionalInt2, bl), new GameConfig.FolderData(file, file3, file2, string8), - new GameConfig.GameData(bl2, string, string7, bl3, bl4, bl5), + new GameConfig.GameData(bl2, string, string7, bl3, bl4, bl5, bl6), new GameConfig.QuickPlayData(string11, string12, string13, string14) ); Util.startTimerHackThread(); completableFuture.join(); - } catch (Throwable var82) { - CrashReport crashReport = CrashReport.forThrowable(var82, string2); + } catch (Throwable var84) { + CrashReport crashReport = CrashReport.forThrowable(var84, string2); CrashReportCategory crashReportCategory = crashReport.addCategory("Initialization"); NativeModuleLister.addCrashSection(crashReportCategory); Minecraft.fillReport(null, null, string, null, crashReport); @@ -217,15 +220,13 @@ public class Main { try { Thread.currentThread().setName("Render thread"); RenderSystem.initRenderThread(); - RenderSystem.beginInitialization(); minecraft = new Minecraft(gameConfig); - RenderSystem.finishInitialization(); - } catch (SilentInitException var79) { + } catch (SilentInitException var81) { Util.shutdownExecutors(); - logger.warn("Failed to create window: ", (Throwable)var79); + logger.warn("Failed to create window: ", (Throwable)var81); return; - } catch (Throwable var80) { - CrashReport crashReport2 = CrashReport.forThrowable(var80, "Initializing game"); + } catch (Throwable var82) { + CrashReport crashReport2 = CrashReport.forThrowable(var82, "Initializing game"); CrashReportCategory crashReportCategory2 = crashReport2.addCategory("Initialization"); NativeModuleLister.addCrashSection(crashReportCategory2); Minecraft.fillReport(minecraft, null, gameConfig.game.launchVersion, null, crashReport2); @@ -235,7 +236,6 @@ public class Main { Minecraft minecraft2 = minecraft; minecraft.run(); - BufferUploader.reset(); try { minecraft2.stop(); @@ -283,16 +283,16 @@ public class Main { return str != null && !str.isEmpty(); } - private static boolean hasValidUuid(OptionSpec optionSpec, OptionSet optionSet, Logger logger) { - return optionSet.has(optionSpec) && isUuidValid(optionSpec, optionSet, logger); + private static boolean hasValidUuid(OptionSpec uuidOption, OptionSet options, Logger logger) { + return options.has(uuidOption) && isUuidValid(uuidOption, options, logger); } - private static boolean isUuidValid(OptionSpec optionSpec, OptionSet optionSet, Logger logger) { + private static boolean isUuidValid(OptionSpec uuidOption, OptionSet optionSet, Logger logger) { try { - UndashedUuid.fromStringLenient(optionSpec.value(optionSet)); + UndashedUuid.fromStringLenient(uuidOption.value(optionSet)); return true; } catch (IllegalArgumentException var4) { - logger.warn("Invalid UUID: '{}", optionSpec.value(optionSet)); + logger.warn("Invalid UUID: '{}", uuidOption.value(optionSet)); return false; } } diff --git a/net/minecraft/client/model/AbstractBoatModel.java b/net/minecraft/client/model/AbstractBoatModel.java index 3c66d351..541e1aa4 100644 --- a/net/minecraft/client/model/AbstractBoatModel.java +++ b/net/minecraft/client/model/AbstractBoatModel.java @@ -23,11 +23,11 @@ public abstract class AbstractBoatModel extends EntityModel { animatePaddle(boatRenderState.rowingTimeRight, 1, this.rightPaddle); } - private static void animatePaddle(float f, int i, ModelPart modelPart) { - modelPart.xRot = Mth.clampedLerp((float) (-Math.PI / 3), (float) (-Math.PI / 12), (Mth.sin(-f) + 1.0F) / 2.0F); - modelPart.yRot = Mth.clampedLerp((float) (-Math.PI / 4), (float) (Math.PI / 4), (Mth.sin(-f + 1.0F) + 1.0F) / 2.0F); - if (i == 1) { - modelPart.yRot = (float) Math.PI - modelPart.yRot; + private static void animatePaddle(float rowingTime, int side, ModelPart part) { + part.xRot = Mth.clampedLerp((float) (-Math.PI / 3), (float) (-Math.PI / 12), (Mth.sin(-rowingTime) + 1.0F) / 2.0F); + part.yRot = Mth.clampedLerp((float) (-Math.PI / 4), (float) (Math.PI / 4), (Mth.sin(-rowingTime + 1.0F) + 1.0F) / 2.0F); + if (side == 1) { + part.yRot = (float) Math.PI - part.yRot; } } } diff --git a/net/minecraft/client/model/AbstractEquineModel.java b/net/minecraft/client/model/AbstractEquineModel.java index b73688ef..332796bd 100644 --- a/net/minecraft/client/model/AbstractEquineModel.java +++ b/net/minecraft/client/model/AbstractEquineModel.java @@ -21,13 +21,6 @@ public abstract class AbstractEquineModel extends E private static final float DEG_30 = (float) (Math.PI / 6); private static final float DEG_15 = (float) (Math.PI / 12); protected static final String HEAD_PARTS = "head_parts"; - private static final String SADDLE = "saddle"; - private static final String LEFT_SADDLE_MOUTH = "left_saddle_mouth"; - private static final String LEFT_SADDLE_LINE = "left_saddle_line"; - private static final String RIGHT_SADDLE_MOUTH = "right_saddle_mouth"; - private static final String RIGHT_SADDLE_LINE = "right_saddle_line"; - private static final String HEAD_SADDLE = "head_saddle"; - private static final String MOUTH_SADDLE_WRAP = "mouth_saddle_wrap"; protected static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(true, 16.2F, 1.36F, 2.7272F, 2.0F, 20.0F, Set.of("head_parts")); protected final ModelPart body; protected final ModelPart headParts; @@ -36,27 +29,16 @@ public abstract class AbstractEquineModel extends E private final ModelPart rightFrontLeg; private final ModelPart leftFrontLeg; private final ModelPart tail; - private final ModelPart[] saddleParts; - private final ModelPart[] ridingParts; - public AbstractEquineModel(ModelPart modelPart) { - super(modelPart); - this.body = modelPart.getChild("body"); - this.headParts = modelPart.getChild("head_parts"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); + public AbstractEquineModel(ModelPart root) { + super(root); + this.body = root.getChild("body"); + this.headParts = root.getChild("head_parts"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); this.tail = this.body.getChild("tail"); - ModelPart modelPart2 = this.body.getChild("saddle"); - ModelPart modelPart3 = this.headParts.getChild("left_saddle_mouth"); - ModelPart modelPart4 = this.headParts.getChild("right_saddle_mouth"); - ModelPart modelPart5 = this.headParts.getChild("left_saddle_line"); - ModelPart modelPart6 = this.headParts.getChild("right_saddle_line"); - ModelPart modelPart7 = this.headParts.getChild("head_saddle"); - ModelPart modelPart8 = this.headParts.getChild("mouth_saddle_wrap"); - this.saddleParts = new ModelPart[]{modelPart2, modelPart3, modelPart4, modelPart7, modelPart8}; - this.ridingParts = new ModelPart[]{modelPart5, modelPart6}; } public static MeshDefinition createBodyMesh(CubeDeformation cubeDeformation) { @@ -106,31 +88,6 @@ public abstract class AbstractEquineModel extends E CubeListBuilder.create().texOffs(42, 36).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 14.0F, 4.0F, cubeDeformation), PartPose.offsetAndRotation(0.0F, -5.0F, 2.0F, (float) (Math.PI / 6), 0.0F, 0.0F) ); - partDefinition2.addOrReplaceChild( - "saddle", CubeListBuilder.create().texOffs(26, 0).addBox(-5.0F, -8.0F, -9.0F, 10.0F, 9.0F, 9.0F, new CubeDeformation(0.5F)), PartPose.ZERO - ); - partDefinition3.addOrReplaceChild( - "left_saddle_mouth", CubeListBuilder.create().texOffs(29, 5).addBox(2.0F, -9.0F, -6.0F, 1.0F, 2.0F, 2.0F, cubeDeformation), PartPose.ZERO - ); - partDefinition3.addOrReplaceChild( - "right_saddle_mouth", CubeListBuilder.create().texOffs(29, 5).addBox(-3.0F, -9.0F, -6.0F, 1.0F, 2.0F, 2.0F, cubeDeformation), PartPose.ZERO - ); - partDefinition3.addOrReplaceChild( - "left_saddle_line", - CubeListBuilder.create().texOffs(32, 2).addBox(3.1F, -6.0F, -8.0F, 0.0F, 3.0F, 16.0F), - PartPose.rotation((float) (-Math.PI / 6), 0.0F, 0.0F) - ); - partDefinition3.addOrReplaceChild( - "right_saddle_line", - CubeListBuilder.create().texOffs(32, 2).addBox(-3.1F, -6.0F, -8.0F, 0.0F, 3.0F, 16.0F), - PartPose.rotation((float) (-Math.PI / 6), 0.0F, 0.0F) - ); - partDefinition3.addOrReplaceChild( - "head_saddle", CubeListBuilder.create().texOffs(1, 1).addBox(-3.0F, -11.0F, -1.9F, 6.0F, 5.0F, 6.0F, new CubeDeformation(0.22F)), PartPose.ZERO - ); - partDefinition3.addOrReplaceChild( - "mouth_saddle_wrap", CubeListBuilder.create().texOffs(19, 0).addBox(-2.0F, -11.0F, -4.0F, 4.0F, 5.0F, 2.0F, new CubeDeformation(0.2F)), PartPose.ZERO - ); partDefinition4.addOrReplaceChild( "left_ear", CubeListBuilder.create().texOffs(19, 16).addBox(0.55F, -13.0F, 4.0F, 2.0F, 3.0F, 1.0F, new CubeDeformation(-0.001F)), PartPose.ZERO ); @@ -173,15 +130,6 @@ public abstract class AbstractEquineModel extends E public void setupAnim(T equineRenderState) { super.setupAnim(equineRenderState); - - for (ModelPart modelPart : this.saddleParts) { - modelPart.visible = equineRenderState.isSaddled; - } - - for (ModelPart modelPart : this.ridingParts) { - modelPart.visible = equineRenderState.isRidden && equineRenderState.isSaddled; - } - float f = Mth.clamp(equineRenderState.yRot, -20.0F, 20.0F); float g = equineRenderState.xRot * (float) (Math.PI / 180.0); float h = equineRenderState.walkAnimationSpeed; diff --git a/net/minecraft/client/model/AbstractPiglinModel.java b/net/minecraft/client/model/AbstractPiglinModel.java index bb345a6c..db221d67 100644 --- a/net/minecraft/client/model/AbstractPiglinModel.java +++ b/net/minecraft/client/model/AbstractPiglinModel.java @@ -41,8 +41,8 @@ public class AbstractPiglinModel extends Humanoid return meshDefinition; } - public static PartDefinition addHead(CubeDeformation cubeDeformation, MeshDefinition meshDefinition) { - PartDefinition partDefinition = meshDefinition.getRoot(); + public static PartDefinition addHead(CubeDeformation cubeDeformation, MeshDefinition mesh) { + PartDefinition partDefinition = mesh.getRoot(); PartDefinition partDefinition2 = partDefinition.addOrReplaceChild( "head", CubeListBuilder.create() diff --git a/net/minecraft/client/model/AbstractZombieModel.java b/net/minecraft/client/model/AbstractZombieModel.java index 588c9d0e..29a07202 100644 --- a/net/minecraft/client/model/AbstractZombieModel.java +++ b/net/minecraft/client/model/AbstractZombieModel.java @@ -7,8 +7,8 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public abstract class AbstractZombieModel extends HumanoidModel { - protected AbstractZombieModel(ModelPart root) { - super(root); + protected AbstractZombieModel(ModelPart modelPart) { + super(modelPart); } public void setupAnim(S zombieRenderState) { diff --git a/net/minecraft/client/model/AdultAndBabyModelPair.java b/net/minecraft/client/model/AdultAndBabyModelPair.java new file mode 100644 index 00000000..eb0bc7b5 --- /dev/null +++ b/net/minecraft/client/model/AdultAndBabyModelPair.java @@ -0,0 +1,11 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public record AdultAndBabyModelPair(T adultModel, T babyModel) { + public T getModel(boolean isBaby) { + return isBaby ? this.babyModel : this.adultModel; + } +} diff --git a/net/minecraft/client/model/AnimationUtils.java b/net/minecraft/client/model/AnimationUtils.java index eb6685cb..1e2477e7 100644 --- a/net/minecraft/client/model/AnimationUtils.java +++ b/net/minecraft/client/model/AnimationUtils.java @@ -17,38 +17,38 @@ public class AnimationUtils { modelPart2.xRot = -1.5F + head.xRot; } - public static void animateCrossbowCharge(ModelPart modelPart, ModelPart modelPart2, float f, int i, boolean bl) { - ModelPart modelPart3 = bl ? modelPart : modelPart2; - ModelPart modelPart4 = bl ? modelPart2 : modelPart; - modelPart3.yRot = bl ? -0.8F : 0.8F; - modelPart3.xRot = -0.97079635F; - modelPart4.xRot = modelPart3.xRot; - float g = Mth.clamp((float)i, 0.0F, f); - float h = g / f; - modelPart4.yRot = Mth.lerp(h, 0.4F, 0.85F) * (bl ? 1 : -1); - modelPart4.xRot = Mth.lerp(h, modelPart4.xRot, (float) (-Math.PI / 2)); + public static void animateCrossbowCharge(ModelPart rightArm, ModelPart leftArm, float maxCrossbowChargeDuration, int ticksUsingItem, boolean isRightHand) { + ModelPart modelPart = isRightHand ? rightArm : leftArm; + ModelPart modelPart2 = isRightHand ? leftArm : rightArm; + modelPart.yRot = isRightHand ? -0.8F : 0.8F; + modelPart.xRot = -0.97079635F; + modelPart2.xRot = modelPart.xRot; + float f = Mth.clamp((float)ticksUsingItem, 0.0F, maxCrossbowChargeDuration); + float g = f / maxCrossbowChargeDuration; + modelPart2.yRot = Mth.lerp(g, 0.4F, 0.85F) * (isRightHand ? 1 : -1); + modelPart2.xRot = Mth.lerp(g, modelPart2.xRot, (float) (-Math.PI / 2)); } - public static void swingWeaponDown(ModelPart modelPart, ModelPart modelPart2, HumanoidArm humanoidArm, float f, float g) { - float h = Mth.sin(f * (float) Math.PI); - float i = Mth.sin((1.0F - (1.0F - f) * (1.0F - f)) * (float) Math.PI); - modelPart.zRot = 0.0F; - modelPart2.zRot = 0.0F; - modelPart.yRot = (float) (Math.PI / 20); - modelPart2.yRot = (float) (-Math.PI / 20); - if (humanoidArm == HumanoidArm.RIGHT) { - modelPart.xRot = -1.8849558F + Mth.cos(g * 0.09F) * 0.15F; - modelPart2.xRot = -0.0F + Mth.cos(g * 0.19F) * 0.5F; - modelPart.xRot += h * 2.2F - i * 0.4F; - modelPart2.xRot += h * 1.2F - i * 0.4F; + public static void swingWeaponDown(ModelPart rightArm, ModelPart leftArm, HumanoidArm mainArm, float attackTime, float ageInTicks) { + float f = Mth.sin(attackTime * (float) Math.PI); + float g = Mth.sin((1.0F - (1.0F - attackTime) * (1.0F - attackTime)) * (float) Math.PI); + rightArm.zRot = 0.0F; + leftArm.zRot = 0.0F; + rightArm.yRot = (float) (Math.PI / 20); + leftArm.yRot = (float) (-Math.PI / 20); + if (mainArm == HumanoidArm.RIGHT) { + rightArm.xRot = -1.8849558F + Mth.cos(ageInTicks * 0.09F) * 0.15F; + leftArm.xRot = -0.0F + Mth.cos(ageInTicks * 0.19F) * 0.5F; + rightArm.xRot += f * 2.2F - g * 0.4F; + leftArm.xRot += f * 1.2F - g * 0.4F; } else { - modelPart.xRot = -0.0F + Mth.cos(g * 0.19F) * 0.5F; - modelPart2.xRot = -1.8849558F + Mth.cos(g * 0.09F) * 0.15F; - modelPart.xRot += h * 1.2F - i * 0.4F; - modelPart2.xRot += h * 2.2F - i * 0.4F; + rightArm.xRot = -0.0F + Mth.cos(ageInTicks * 0.19F) * 0.5F; + leftArm.xRot = -1.8849558F + Mth.cos(ageInTicks * 0.09F) * 0.15F; + rightArm.xRot += f * 1.2F - g * 0.4F; + leftArm.xRot += f * 2.2F - g * 0.4F; } - bobArms(modelPart, modelPart2, g); + bobArms(rightArm, leftArm, ageInTicks); } public static void bobModelPart(ModelPart modelPart, float ageInTicks, float multiplier) { diff --git a/net/minecraft/client/model/ArmorStandArmorModel.java b/net/minecraft/client/model/ArmorStandArmorModel.java index edc0ab44..8cd07000 100644 --- a/net/minecraft/client/model/ArmorStandArmorModel.java +++ b/net/minecraft/client/model/ArmorStandArmorModel.java @@ -13,8 +13,8 @@ import net.minecraft.client.renderer.entity.state.ArmorStandRenderState; @Environment(EnvType.CLIENT) public class ArmorStandArmorModel extends HumanoidModel { - public ArmorStandArmorModel(ModelPart root) { - super(root); + public ArmorStandArmorModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer(CubeDeformation cubeDeformation) { @@ -41,23 +41,23 @@ public class ArmorStandArmorModel extends HumanoidModel { public void setupAnim(ArmorStandRenderState armorStandRenderState) { super.setupAnim(armorStandRenderState); - this.head.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getX(); - this.head.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getY(); - this.head.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getZ(); - this.body.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.body.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.body.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.leftArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getX(); - this.leftArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getY(); - this.leftArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getZ(); - this.rightArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getX(); - this.rightArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getY(); - this.rightArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getZ(); - this.leftLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getX(); - this.leftLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getY(); - this.leftLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getZ(); - this.rightLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getX(); - this.rightLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getY(); - this.rightLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getZ(); + this.head.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.x(); + this.head.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.y(); + this.head.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.z(); + this.body.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.x(); + this.body.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.y(); + this.body.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.z(); + this.leftArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.x(); + this.leftArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.y(); + this.leftArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.z(); + this.rightArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.x(); + this.rightArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.y(); + this.rightArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.z(); + this.leftLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.x(); + this.leftLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.y(); + this.leftLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.z(); + this.rightLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.x(); + this.rightLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.y(); + this.rightLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.z(); } } diff --git a/net/minecraft/client/model/ArmorStandModel.java b/net/minecraft/client/model/ArmorStandModel.java index 8266450a..dd177ccb 100644 --- a/net/minecraft/client/model/ArmorStandModel.java +++ b/net/minecraft/client/model/ArmorStandModel.java @@ -24,12 +24,12 @@ public class ArmorStandModel extends ArmorStandArmorModel { private final ModelPart shoulderStick; private final ModelPart basePlate; - public ArmorStandModel(ModelPart root) { - super(root); - this.rightBodyStick = root.getChild("right_body_stick"); - this.leftBodyStick = root.getChild("left_body_stick"); - this.shoulderStick = root.getChild("shoulder_stick"); - this.basePlate = root.getChild("base_plate"); + public ArmorStandModel(ModelPart modelPart) { + super(modelPart); + this.rightBodyStick = modelPart.getChild("right_body_stick"); + this.leftBodyStick = modelPart.getChild("left_body_stick"); + this.shoulderStick = modelPart.getChild("shoulder_stick"); + this.basePlate = modelPart.getChild("base_plate"); this.hat.visible = false; } @@ -68,15 +68,15 @@ public class ArmorStandModel extends ArmorStandArmorModel { this.leftArm.visible = armorStandRenderState.showArms; this.rightArm.visible = armorStandRenderState.showArms; this.basePlate.visible = armorStandRenderState.showBasePlate; - this.rightBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.rightBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.rightBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.leftBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.leftBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.leftBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.shoulderStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.shoulderStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.shoulderStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); + this.rightBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.x(); + this.rightBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.y(); + this.rightBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.z(); + this.leftBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.x(); + this.leftBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.y(); + this.leftBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.z(); + this.shoulderStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.x(); + this.shoulderStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.y(); + this.shoulderStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.z(); } @Override diff --git a/net/minecraft/client/model/ArrowModel.java b/net/minecraft/client/model/ArrowModel.java index 7343ca7f..79c989a2 100644 --- a/net/minecraft/client/model/ArrowModel.java +++ b/net/minecraft/client/model/ArrowModel.java @@ -15,8 +15,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class ArrowModel extends EntityModel { - public ArrowModel(ModelPart modelPart) { - super(modelPart, RenderType::entityCutout); + public ArrowModel(ModelPart root) { + super(root, RenderType::entityCutout); } public static LayerDefinition createBodyLayer() { diff --git a/net/minecraft/client/model/AxolotlModel.java b/net/minecraft/client/model/AxolotlModel.java index cbab8fca..3bf95b2b 100644 --- a/net/minecraft/client/model/AxolotlModel.java +++ b/net/minecraft/client/model/AxolotlModel.java @@ -138,75 +138,75 @@ public class AxolotlModel extends EntityModel { } } - private void setupWaterHoveringAnimation(float f, float g) { - if (!(g <= 1.0E-5F)) { - float h = f * 0.075F; - float i = Mth.cos(h); - float j = Mth.sin(h) * 0.15F; - float k = (-0.15F + 0.075F * i) * g; - this.body.xRot += k; - this.body.y -= j * g; - this.head.xRot -= k; - this.topGills.xRot += 0.2F * i * g; - float l = (-0.3F * i - 0.19F) * g; - this.leftGills.yRot += l; - this.rightGills.yRot -= l; - this.leftHindLeg.xRot += ((float) (Math.PI * 3.0 / 4.0) - i * 0.11F) * g; - this.leftHindLeg.yRot += 0.47123894F * g; - this.leftHindLeg.zRot += 1.7278761F * g; - this.leftFrontLeg.xRot += ((float) (Math.PI / 4) - i * 0.2F) * g; - this.leftFrontLeg.yRot += 2.042035F * g; - this.tail.yRot += 0.5F * i * g; + private void setupWaterHoveringAnimation(float ageInTicks, float swimmingFactor) { + if (!(swimmingFactor <= 1.0E-5F)) { + float f = ageInTicks * 0.075F; + float g = Mth.cos(f); + float h = Mth.sin(f) * 0.15F; + float i = (-0.15F + 0.075F * g) * swimmingFactor; + this.body.xRot += i; + this.body.y -= h * swimmingFactor; + this.head.xRot -= i; + this.topGills.xRot += 0.2F * g * swimmingFactor; + float j = (-0.3F * g - 0.19F) * swimmingFactor; + this.leftGills.yRot += j; + this.rightGills.yRot -= j; + this.leftHindLeg.xRot += ((float) (Math.PI * 3.0 / 4.0) - g * 0.11F) * swimmingFactor; + this.leftHindLeg.yRot += 0.47123894F * swimmingFactor; + this.leftHindLeg.zRot += 1.7278761F * swimmingFactor; + this.leftFrontLeg.xRot += ((float) (Math.PI / 4) - g * 0.2F) * swimmingFactor; + this.leftFrontLeg.yRot += 2.042035F * swimmingFactor; + this.tail.yRot += 0.5F * g * swimmingFactor; } } - private void setupSwimmingAnimation(float f, float g, float h) { - if (!(h <= 1.0E-5F)) { - float i = f * 0.33F; - float j = Mth.sin(i); - float k = Mth.cos(i); - float l = 0.13F * j; - this.body.xRot += (g * (float) (Math.PI / 180.0) + l) * h; - this.head.xRot -= l * 1.8F * h; - this.body.y -= 0.45F * k * h; - this.topGills.xRot += (-0.5F * j - 0.8F) * h; - float m = (0.3F * j + 0.9F) * h; - this.leftGills.yRot += m; - this.rightGills.yRot -= m; - this.tail.yRot = this.tail.yRot + 0.3F * Mth.cos(i * 0.9F) * h; - this.leftHindLeg.xRot += 1.8849558F * h; - this.leftHindLeg.yRot += -0.4F * j * h; - this.leftHindLeg.zRot += (float) (Math.PI / 2) * h; - this.leftFrontLeg.xRot += 1.8849558F * h; - this.leftFrontLeg.yRot += (-0.2F * k - 0.1F) * h; - this.leftFrontLeg.zRot += (float) (Math.PI / 2) * h; + private void setupSwimmingAnimation(float ageInTicks, float xRot, float movingFactor) { + if (!(movingFactor <= 1.0E-5F)) { + float f = ageInTicks * 0.33F; + float g = Mth.sin(f); + float h = Mth.cos(f); + float i = 0.13F * g; + this.body.xRot += (xRot * (float) (Math.PI / 180.0) + i) * movingFactor; + this.head.xRot -= i * 1.8F * movingFactor; + this.body.y -= 0.45F * h * movingFactor; + this.topGills.xRot += (-0.5F * g - 0.8F) * movingFactor; + float j = (0.3F * g + 0.9F) * movingFactor; + this.leftGills.yRot += j; + this.rightGills.yRot -= j; + this.tail.yRot = this.tail.yRot + 0.3F * Mth.cos(f * 0.9F) * movingFactor; + this.leftHindLeg.xRot += 1.8849558F * movingFactor; + this.leftHindLeg.yRot += -0.4F * g * movingFactor; + this.leftHindLeg.zRot += (float) (Math.PI / 2) * movingFactor; + this.leftFrontLeg.xRot += 1.8849558F * movingFactor; + this.leftFrontLeg.yRot += (-0.2F * h - 0.1F) * movingFactor; + this.leftFrontLeg.zRot += (float) (Math.PI / 2) * movingFactor; } } - private void setupPlayDeadAnimation(float netHeadYaw) { - if (!(netHeadYaw <= 1.0E-5F)) { - this.leftHindLeg.xRot += 1.4137167F * netHeadYaw; - this.leftHindLeg.yRot += 1.0995574F * netHeadYaw; - this.leftHindLeg.zRot += (float) (Math.PI / 4) * netHeadYaw; - this.leftFrontLeg.xRot += (float) (Math.PI / 4) * netHeadYaw; - this.leftFrontLeg.yRot += 2.042035F * netHeadYaw; - this.body.xRot += -0.15F * netHeadYaw; - this.body.zRot += 0.35F * netHeadYaw; + private void setupPlayDeadAnimation(float playingDeadFactor) { + if (!(playingDeadFactor <= 1.0E-5F)) { + this.leftHindLeg.xRot += 1.4137167F * playingDeadFactor; + this.leftHindLeg.yRot += 1.0995574F * playingDeadFactor; + this.leftHindLeg.zRot += (float) (Math.PI / 4) * playingDeadFactor; + this.leftFrontLeg.xRot += (float) (Math.PI / 4) * playingDeadFactor; + this.leftFrontLeg.yRot += 2.042035F * playingDeadFactor; + this.body.xRot += -0.15F * playingDeadFactor; + this.body.zRot += 0.35F * playingDeadFactor; } } - private void applyMirrorLegRotations(float f) { - if (!(f <= 1.0E-5F)) { - this.rightHindLeg.xRot = this.rightHindLeg.xRot + this.leftHindLeg.xRot * f; + private void applyMirrorLegRotations(float factor) { + if (!(factor <= 1.0E-5F)) { + this.rightHindLeg.xRot = this.rightHindLeg.xRot + this.leftHindLeg.xRot * factor; ModelPart var2 = this.rightHindLeg; - var2.yRot = var2.yRot + -this.leftHindLeg.yRot * f; + var2.yRot = var2.yRot + -this.leftHindLeg.yRot * factor; var2 = this.rightHindLeg; - var2.zRot = var2.zRot + -this.leftHindLeg.zRot * f; - this.rightFrontLeg.xRot = this.rightFrontLeg.xRot + this.leftFrontLeg.xRot * f; + var2.zRot = var2.zRot + -this.leftHindLeg.zRot * factor; + this.rightFrontLeg.xRot = this.rightFrontLeg.xRot + this.leftFrontLeg.xRot * factor; var2 = this.rightFrontLeg; - var2.yRot = var2.yRot + -this.leftFrontLeg.yRot * f; + var2.yRot = var2.yRot + -this.leftFrontLeg.yRot * factor; var2 = this.rightFrontLeg; - var2.zRot = var2.zRot + -this.leftFrontLeg.zRot * f; + var2.zRot = var2.zRot + -this.leftFrontLeg.zRot * factor; } } } diff --git a/net/minecraft/client/model/BabyModelTransform.java b/net/minecraft/client/model/BabyModelTransform.java index 6e31eb30..33629067 100644 --- a/net/minecraft/client/model/BabyModelTransform.java +++ b/net/minecraft/client/model/BabyModelTransform.java @@ -14,12 +14,12 @@ import net.minecraft.client.model.geom.builders.PartDefinition; public record BabyModelTransform( boolean scaleHead, float babyYHeadOffset, float babyZHeadOffset, float babyHeadScale, float babyBodyScale, float bodyYOffset, Set headParts ) implements MeshTransformer { - public BabyModelTransform(Set set) { - this(false, 5.0F, 2.0F, set); + public BabyModelTransform(Set headParts) { + this(false, 5.0F, 2.0F, headParts); } - public BabyModelTransform(boolean bl, float f, float g, Set set) { - this(bl, f, g, 2.0F, 2.0F, 24.0F, set); + public BabyModelTransform(boolean scaleHead, float babyYHeadOffset, float babyZHeadOffset, Set headParts) { + this(scaleHead, babyYHeadOffset, babyZHeadOffset, 2.0F, 2.0F, 24.0F, headParts); } @Override diff --git a/net/minecraft/client/model/BannerFlagModel.java b/net/minecraft/client/model/BannerFlagModel.java new file mode 100644 index 00000000..36dc57cd --- /dev/null +++ b/net/minecraft/client/model/BannerFlagModel.java @@ -0,0 +1,37 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.util.Mth; + +@Environment(EnvType.CLIENT) +public class BannerFlagModel extends Model { + private final ModelPart flag; + + public BannerFlagModel(ModelPart root) { + super(root, RenderType::entitySolid); + this.flag = root.getChild("flag"); + } + + public static LayerDefinition createFlagLayer(boolean isStanding) { + MeshDefinition meshDefinition = new MeshDefinition(); + PartDefinition partDefinition = meshDefinition.getRoot(); + partDefinition.addOrReplaceChild( + "flag", + CubeListBuilder.create().texOffs(0, 0).addBox(-10.0F, 0.0F, -2.0F, 20.0F, 40.0F, 1.0F), + PartPose.offset(0.0F, isStanding ? -44.0F : -20.5F, isStanding ? 0.0F : 10.5F) + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } + + public void setupAnim(float angle) { + this.flag.xRot = (-0.0125F + 0.01F * Mth.cos((float) (Math.PI * 2) * angle)) * (float) Math.PI; + } +} diff --git a/net/minecraft/client/model/BannerModel.java b/net/minecraft/client/model/BannerModel.java new file mode 100644 index 00000000..1ccee3ea --- /dev/null +++ b/net/minecraft/client/model/BannerModel.java @@ -0,0 +1,37 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.RenderType; + +@Environment(EnvType.CLIENT) +public class BannerModel extends Model { + public static final int BANNER_WIDTH = 20; + public static final int BANNER_HEIGHT = 40; + public static final String FLAG = "flag"; + private static final String POLE = "pole"; + private static final String BAR = "bar"; + + public BannerModel(ModelPart root) { + super(root, RenderType::entitySolid); + } + + public static LayerDefinition createBodyLayer(boolean isStanding) { + MeshDefinition meshDefinition = new MeshDefinition(); + PartDefinition partDefinition = meshDefinition.getRoot(); + if (isStanding) { + partDefinition.addOrReplaceChild("pole", CubeListBuilder.create().texOffs(44, 0).addBox(-1.0F, -42.0F, -1.0F, 2.0F, 42.0F, 2.0F), PartPose.ZERO); + } + + partDefinition.addOrReplaceChild( + "bar", CubeListBuilder.create().texOffs(0, 42).addBox(-10.0F, isStanding ? -44.0F : -20.5F, isStanding ? -1.0F : 9.5F, 20.0F, 2.0F, 2.0F), PartPose.ZERO + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } +} diff --git a/net/minecraft/client/model/BeeStingerModel.java b/net/minecraft/client/model/BeeStingerModel.java index 4f9fdb1e..1ffdc92e 100644 --- a/net/minecraft/client/model/BeeStingerModel.java +++ b/net/minecraft/client/model/BeeStingerModel.java @@ -12,8 +12,8 @@ import net.minecraft.client.renderer.RenderType; @Environment(EnvType.CLIENT) public class BeeStingerModel extends Model { - public BeeStingerModel(ModelPart modelPart) { - super(modelPart, RenderType::entityCutout); + public BeeStingerModel(ModelPart root) { + super(root, RenderType::entityCutout); } public static LayerDefinition createBodyLayer() { diff --git a/net/minecraft/client/model/BellModel.java b/net/minecraft/client/model/BellModel.java index ed131256..e5df8578 100644 --- a/net/minecraft/client/model/BellModel.java +++ b/net/minecraft/client/model/BellModel.java @@ -18,9 +18,9 @@ public class BellModel extends Model { private static final String BELL_BODY = "bell_body"; private final ModelPart bellBody; - public BellModel(ModelPart modelPart) { - super(modelPart, RenderType::entitySolid); - this.bellBody = modelPart.getChild("bell_body"); + public BellModel(ModelPart root) { + super(root, RenderType::entitySolid); + this.bellBody = root.getChild("bell_body"); } public static LayerDefinition createBodyLayer() { @@ -35,24 +35,24 @@ public class BellModel extends Model { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(BellBlockEntity bellBlockEntity, float f) { - float g = bellBlockEntity.ticks + f; + public void setupAnim(BellBlockEntity bell, float partialTick) { + float f = bell.ticks + partialTick; + float g = 0.0F; float h = 0.0F; - float i = 0.0F; - if (bellBlockEntity.shaking) { - float j = Mth.sin(g / (float) Math.PI) / (4.0F + g / 3.0F); - if (bellBlockEntity.clickDirection == Direction.NORTH) { - h = -j; - } else if (bellBlockEntity.clickDirection == Direction.SOUTH) { - h = j; - } else if (bellBlockEntity.clickDirection == Direction.EAST) { - i = -j; - } else if (bellBlockEntity.clickDirection == Direction.WEST) { - i = j; + if (bell.shaking) { + float i = Mth.sin(f / (float) Math.PI) / (4.0F + f / 3.0F); + if (bell.clickDirection == Direction.NORTH) { + g = -i; + } else if (bell.clickDirection == Direction.SOUTH) { + g = i; + } else if (bell.clickDirection == Direction.EAST) { + h = -i; + } else if (bell.clickDirection == Direction.WEST) { + h = i; } } - this.bellBody.xRot = h; - this.bellBody.zRot = i; + this.bellBody.xRot = g; + this.bellBody.zRot = h; } } diff --git a/net/minecraft/client/model/BoggedModel.java b/net/minecraft/client/model/BoggedModel.java index fea7e58d..4ab4520b 100644 --- a/net/minecraft/client/model/BoggedModel.java +++ b/net/minecraft/client/model/BoggedModel.java @@ -24,7 +24,7 @@ public class BoggedModel extends SkeletonModel { MeshDefinition meshDefinition = HumanoidModel.createMesh(CubeDeformation.NONE, 0.0F); PartDefinition partDefinition = meshDefinition.getRoot(); SkeletonModel.createDefaultSkeletonMesh(partDefinition); - PartDefinition partDefinition2 = partDefinition.getChild("head").clearChild("mushrooms"); + PartDefinition partDefinition2 = partDefinition.getChild("head").addOrReplaceChild("mushrooms", CubeListBuilder.create(), PartPose.ZERO); partDefinition2.addOrReplaceChild( "red_mushroom_1", CubeListBuilder.create().texOffs(50, 16).addBox(-3.0F, -3.0F, 0.0F, 6.0F, 4.0F, 0.0F), diff --git a/net/minecraft/client/model/CamelModel.java b/net/minecraft/client/model/CamelModel.java index 71f4806e..c66273f6 100644 --- a/net/minecraft/client/model/CamelModel.java +++ b/net/minecraft/client/model/CamelModel.java @@ -5,7 +5,6 @@ import net.fabricmc.api.Environment; import net.minecraft.client.animation.definitions.CamelAnimation; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; -import net.minecraft.client.model.geom.builders.CubeDeformation; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; @@ -19,25 +18,21 @@ public class CamelModel extends EntityModel { private static final float MAX_WALK_ANIMATION_SPEED = 2.0F; private static final float WALK_ANIMATION_SCALE_FACTOR = 2.5F; public static final MeshTransformer BABY_TRANSFORMER = MeshTransformer.scaling(0.45F); - private static final String SADDLE = "saddle"; - private static final String BRIDLE = "bridle"; - private static final String REINS = "reins"; - private final ModelPart head; - private final ModelPart[] saddleParts; - private final ModelPart[] ridingParts; + protected final ModelPart head; public CamelModel(ModelPart root) { super(root); ModelPart modelPart = root.getChild("body"); this.head = modelPart.getChild("head"); - this.saddleParts = new ModelPart[]{modelPart.getChild("saddle"), this.head.getChild("bridle")}; - this.ridingParts = new ModelPart[]{this.head.getChild("reins")}; } public static LayerDefinition createBodyLayer() { + return LayerDefinition.create(createBodyMesh(), 128, 128); + } + + protected static MeshDefinition createBodyMesh() { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); - CubeDeformation cubeDeformation = new CubeDeformation(0.05F); PartDefinition partDefinition2 = partDefinition.addOrReplaceChild( "body", CubeListBuilder.create().texOffs(0, 25).addBox(-7.5F, -12.0F, -23.5F, 15.0F, 12.0F, 27.0F), PartPose.offset(0.0F, 4.0F, 9.5F) ); @@ -76,51 +71,12 @@ public class CamelModel extends EntityModel { partDefinition.addOrReplaceChild( "right_front_leg", CubeListBuilder.create().texOffs(0, 26).addBox(-2.5F, 2.0F, -2.5F, 5.0F, 21.0F, 5.0F), PartPose.offset(-4.9F, 1.0F, -10.5F) ); - partDefinition2.addOrReplaceChild( - "saddle", - CubeListBuilder.create() - .texOffs(74, 64) - .addBox(-4.5F, -17.0F, -15.5F, 9.0F, 5.0F, 11.0F, cubeDeformation) - .texOffs(92, 114) - .addBox(-3.5F, -20.0F, -15.5F, 7.0F, 3.0F, 11.0F, cubeDeformation) - .texOffs(0, 89) - .addBox(-7.5F, -12.0F, -23.5F, 15.0F, 12.0F, 27.0F, cubeDeformation), - PartPose.offset(0.0F, 0.0F, 0.0F) - ); - partDefinition3.addOrReplaceChild( - "reins", - CubeListBuilder.create() - .texOffs(98, 42) - .addBox(3.51F, -18.0F, -17.0F, 0.0F, 7.0F, 15.0F) - .texOffs(84, 57) - .addBox(-3.5F, -18.0F, -2.0F, 7.0F, 7.0F, 0.0F) - .texOffs(98, 42) - .addBox(-3.51F, -18.0F, -17.0F, 0.0F, 7.0F, 15.0F), - PartPose.offset(0.0F, 0.0F, 0.0F) - ); - partDefinition3.addOrReplaceChild( - "bridle", - CubeListBuilder.create() - .texOffs(60, 87) - .addBox(-3.5F, -7.0F, -15.0F, 7.0F, 8.0F, 19.0F, cubeDeformation) - .texOffs(21, 64) - .addBox(-3.5F, -21.0F, -15.0F, 7.0F, 14.0F, 7.0F, cubeDeformation) - .texOffs(50, 64) - .addBox(-2.5F, -21.0F, -21.0F, 5.0F, 5.0F, 6.0F, cubeDeformation) - .texOffs(74, 70) - .addBox(2.5F, -19.0F, -18.0F, 1.0F, 2.0F, 2.0F) - .texOffs(74, 70) - .mirror() - .addBox(-3.5F, -19.0F, -18.0F, 1.0F, 2.0F, 2.0F), - PartPose.offset(0.0F, 0.0F, 0.0F) - ); - return LayerDefinition.create(meshDefinition, 128, 128); + return meshDefinition; } public void setupAnim(CamelRenderState camelRenderState) { super.setupAnim(camelRenderState); this.applyHeadRotation(camelRenderState, camelRenderState.yRot, camelRenderState.xRot); - this.toggleInvisibleParts(camelRenderState); this.animateWalk(CamelAnimation.CAMEL_WALK, camelRenderState.walkAnimationPos, camelRenderState.walkAnimationSpeed, 2.0F, 2.5F); this.animate(camelRenderState.sitAnimationState, CamelAnimation.CAMEL_SIT, camelRenderState.ageInTicks, 1.0F); this.animate(camelRenderState.sitPoseAnimationState, CamelAnimation.CAMEL_SIT_POSE, camelRenderState.ageInTicks, 1.0F); @@ -129,28 +85,15 @@ public class CamelModel extends EntityModel { this.animate(camelRenderState.dashAnimationState, CamelAnimation.CAMEL_DASH, camelRenderState.ageInTicks, 1.0F); } - private void applyHeadRotation(CamelRenderState camelRenderState, float f, float g) { - f = Mth.clamp(f, -30.0F, 30.0F); - g = Mth.clamp(g, -25.0F, 45.0F); - if (camelRenderState.jumpCooldown > 0.0F) { - float h = 45.0F * camelRenderState.jumpCooldown / 55.0F; - g = Mth.clamp(g + h, -25.0F, 70.0F); + private void applyHeadRotation(CamelRenderState renderState, float yRot, float xRot) { + yRot = Mth.clamp(yRot, -30.0F, 30.0F); + xRot = Mth.clamp(xRot, -25.0F, 45.0F); + if (renderState.jumpCooldown > 0.0F) { + float f = 45.0F * renderState.jumpCooldown / 55.0F; + xRot = Mth.clamp(xRot + f, -25.0F, 70.0F); } - this.head.yRot = f * (float) (Math.PI / 180.0); - this.head.xRot = g * (float) (Math.PI / 180.0); - } - - private void toggleInvisibleParts(CamelRenderState camelRenderState) { - boolean bl = camelRenderState.isSaddled; - boolean bl2 = camelRenderState.isRidden; - - for (ModelPart modelPart : this.saddleParts) { - modelPart.visible = bl; - } - - for (ModelPart modelPart : this.ridingParts) { - modelPart.visible = bl2 && bl; - } + this.head.yRot = yRot * (float) (Math.PI / 180.0); + this.head.xRot = xRot * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/CamelSaddleModel.java b/net/minecraft/client/model/CamelSaddleModel.java new file mode 100644 index 00000000..0d2d49a2 --- /dev/null +++ b/net/minecraft/client/model/CamelSaddleModel.java @@ -0,0 +1,77 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeDeformation; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.entity.state.CamelRenderState; + +@Environment(EnvType.CLIENT) +public class CamelSaddleModel extends CamelModel { + private static final String SADDLE = "saddle"; + private static final String BRIDLE = "bridle"; + private static final String REINS = "reins"; + private final ModelPart reins = this.head.getChild("reins"); + + public CamelSaddleModel(ModelPart modelPart) { + super(modelPart); + } + + public static LayerDefinition createSaddleLayer() { + MeshDefinition meshDefinition = createBodyMesh(); + PartDefinition partDefinition = meshDefinition.getRoot(); + PartDefinition partDefinition2 = partDefinition.getChild("body"); + PartDefinition partDefinition3 = partDefinition2.getChild("head"); + CubeDeformation cubeDeformation = new CubeDeformation(0.05F); + partDefinition2.addOrReplaceChild( + "saddle", + CubeListBuilder.create() + .texOffs(74, 64) + .addBox(-4.5F, -17.0F, -15.5F, 9.0F, 5.0F, 11.0F, cubeDeformation) + .texOffs(92, 114) + .addBox(-3.5F, -20.0F, -15.5F, 7.0F, 3.0F, 11.0F, cubeDeformation) + .texOffs(0, 89) + .addBox(-7.5F, -12.0F, -23.5F, 15.0F, 12.0F, 27.0F, cubeDeformation), + PartPose.offset(0.0F, 0.0F, 0.0F) + ); + partDefinition3.addOrReplaceChild( + "reins", + CubeListBuilder.create() + .texOffs(98, 42) + .addBox(3.51F, -18.0F, -17.0F, 0.0F, 7.0F, 15.0F) + .texOffs(84, 57) + .addBox(-3.5F, -18.0F, -2.0F, 7.0F, 7.0F, 0.0F) + .texOffs(98, 42) + .addBox(-3.51F, -18.0F, -17.0F, 0.0F, 7.0F, 15.0F), + PartPose.offset(0.0F, 0.0F, 0.0F) + ); + partDefinition3.addOrReplaceChild( + "bridle", + CubeListBuilder.create() + .texOffs(60, 87) + .addBox(-3.5F, -7.0F, -15.0F, 7.0F, 8.0F, 19.0F, cubeDeformation) + .texOffs(21, 64) + .addBox(-3.5F, -21.0F, -15.0F, 7.0F, 14.0F, 7.0F, cubeDeformation) + .texOffs(50, 64) + .addBox(-2.5F, -21.0F, -21.0F, 5.0F, 5.0F, 6.0F, cubeDeformation) + .texOffs(74, 70) + .addBox(2.5F, -19.0F, -18.0F, 1.0F, 2.0F, 2.0F) + .texOffs(74, 70) + .mirror() + .addBox(-3.5F, -19.0F, -18.0F, 1.0F, 2.0F, 2.0F), + PartPose.offset(0.0F, 0.0F, 0.0F) + ); + return LayerDefinition.create(meshDefinition, 128, 128); + } + + @Override + public void setupAnim(CamelRenderState camelRenderState) { + super.setupAnim(camelRenderState); + this.reins.visible = camelRenderState.isRidden; + } +} diff --git a/net/minecraft/client/model/CatModel.java b/net/minecraft/client/model/CatModel.java index 2b014eff..ec2ac53c 100644 --- a/net/minecraft/client/model/CatModel.java +++ b/net/minecraft/client/model/CatModel.java @@ -10,7 +10,7 @@ import net.minecraft.client.renderer.entity.state.CatRenderState; public class CatModel extends FelineModel { public static final MeshTransformer CAT_TRANSFORMER = MeshTransformer.scaling(0.8F); - public CatModel(ModelPart root) { - super(root); + public CatModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/ChestModel.java b/net/minecraft/client/model/ChestModel.java index b3679847..3c180924 100644 --- a/net/minecraft/client/model/ChestModel.java +++ b/net/minecraft/client/model/ChestModel.java @@ -18,10 +18,10 @@ public class ChestModel extends Model { private final ModelPart lid; private final ModelPart lock; - public ChestModel(ModelPart modelPart) { - super(modelPart, RenderType::entitySolid); - this.lid = modelPart.getChild("lid"); - this.lock = modelPart.getChild("lock"); + public ChestModel(ModelPart root) { + super(root, RenderType::entitySolid); + this.lid = root.getChild("lid"); + this.lock = root.getChild("lock"); } public static LayerDefinition createSingleBodyLayer() { @@ -63,8 +63,8 @@ public class ChestModel extends Model { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(float f) { - this.lid.xRot = -(f * (float) (Math.PI / 2)); + public void setupAnim(float openness) { + this.lid.xRot = -(openness * (float) (Math.PI / 2)); this.lock.xRot = this.lid.xRot; } } diff --git a/net/minecraft/client/model/ChickenModel.java b/net/minecraft/client/model/ChickenModel.java index cc893f70..7658f938 100644 --- a/net/minecraft/client/model/ChickenModel.java +++ b/net/minecraft/client/model/ChickenModel.java @@ -16,20 +16,17 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class ChickenModel extends EntityModel { public static final String RED_THING = "red_thing"; - public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(Set.of("head", "beak", "red_thing")); + public static final float Y_OFFSET = 16.0F; + public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(false, 5.0F, 2.0F, 2.0F, 1.99F, 24.0F, Set.of("head", "beak", "red_thing")); private final ModelPart head; private final ModelPart rightLeg; private final ModelPart leftLeg; private final ModelPart rightWing; private final ModelPart leftWing; - private final ModelPart beak; - private final ModelPart redThing; public ChickenModel(ModelPart root) { super(root); this.head = root.getChild("head"); - this.beak = root.getChild("beak"); - this.redThing = root.getChild("red_thing"); this.rightLeg = root.getChild("right_leg"); this.leftLeg = root.getChild("left_leg"); this.rightWing = root.getChild("right_wing"); @@ -37,18 +34,18 @@ public class ChickenModel extends EntityModel { } public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = createBaseChickenModel(); + return LayerDefinition.create(meshDefinition, 64, 32); + } + + protected static MeshDefinition createBaseChickenModel() { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); - int i = 16; - partDefinition.addOrReplaceChild( + PartDefinition partDefinition2 = partDefinition.addOrReplaceChild( "head", CubeListBuilder.create().texOffs(0, 0).addBox(-2.0F, -6.0F, -2.0F, 4.0F, 6.0F, 3.0F), PartPose.offset(0.0F, 15.0F, -4.0F) ); - partDefinition.addOrReplaceChild( - "beak", CubeListBuilder.create().texOffs(14, 0).addBox(-2.0F, -4.0F, -4.0F, 4.0F, 2.0F, 2.0F), PartPose.offset(0.0F, 15.0F, -4.0F) - ); - partDefinition.addOrReplaceChild( - "red_thing", CubeListBuilder.create().texOffs(14, 4).addBox(-1.0F, -2.0F, -3.0F, 2.0F, 2.0F, 2.0F), PartPose.offset(0.0F, 15.0F, -4.0F) - ); + partDefinition2.addOrReplaceChild("beak", CubeListBuilder.create().texOffs(14, 0).addBox(-2.0F, -4.0F, -4.0F, 4.0F, 2.0F, 2.0F), PartPose.ZERO); + partDefinition2.addOrReplaceChild("red_thing", CubeListBuilder.create().texOffs(14, 4).addBox(-1.0F, -2.0F, -3.0F, 2.0F, 2.0F, 2.0F), PartPose.ZERO); partDefinition.addOrReplaceChild( "body", CubeListBuilder.create().texOffs(0, 9).addBox(-3.0F, -4.0F, -3.0F, 6.0F, 8.0F, 6.0F), @@ -63,7 +60,7 @@ public class ChickenModel extends EntityModel { partDefinition.addOrReplaceChild( "left_wing", CubeListBuilder.create().texOffs(24, 13).addBox(-1.0F, 0.0F, -3.0F, 1.0F, 4.0F, 6.0F), PartPose.offset(4.0F, 13.0F, 0.0F) ); - return LayerDefinition.create(meshDefinition, 64, 32); + return meshDefinition; } public void setupAnim(ChickenRenderState chickenRenderState) { @@ -71,10 +68,6 @@ public class ChickenModel extends EntityModel { float f = (Mth.sin(chickenRenderState.flap) + 1.0F) * chickenRenderState.flapSpeed; this.head.xRot = chickenRenderState.xRot * (float) (Math.PI / 180.0); this.head.yRot = chickenRenderState.yRot * (float) (Math.PI / 180.0); - this.beak.xRot = this.head.xRot; - this.beak.yRot = this.head.yRot; - this.redThing.xRot = this.head.xRot; - this.redThing.yRot = this.head.yRot; float g = chickenRenderState.walkAnimationSpeed; float h = chickenRenderState.walkAnimationPos; this.rightLeg.xRot = Mth.cos(h * 0.6662F) * 1.4F * g; diff --git a/net/minecraft/client/model/ColdChickenModel.java b/net/minecraft/client/model/ColdChickenModel.java new file mode 100644 index 00000000..c1af9c4f --- /dev/null +++ b/net/minecraft/client/model/ColdChickenModel.java @@ -0,0 +1,33 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; + +@Environment(EnvType.CLIENT) +public class ColdChickenModel extends ChickenModel { + public ColdChickenModel(ModelPart modelPart) { + super(modelPart); + } + + public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = createBaseChickenModel(); + meshDefinition.getRoot() + .addOrReplaceChild( + "body", + CubeListBuilder.create().texOffs(0, 9).addBox(-3.0F, -4.0F, -3.0F, 6.0F, 8.0F, 6.0F).texOffs(38, 9).addBox(0.0F, 3.0F, -1.0F, 0.0F, 3.0F, 5.0F), + PartPose.offsetAndRotation(0.0F, 16.0F, 0.0F, (float) (Math.PI / 2), 0.0F, 0.0F) + ); + meshDefinition.getRoot() + .addOrReplaceChild( + "head", + CubeListBuilder.create().texOffs(0, 0).addBox(-2.0F, -6.0F, -2.0F, 4.0F, 6.0F, 3.0F).texOffs(44, 0).addBox(-3.0F, -7.0F, -2.015F, 6.0F, 3.0F, 4.0F), + PartPose.offset(0.0F, 15.0F, -4.0F) + ); + return LayerDefinition.create(meshDefinition, 64, 32); + } +} diff --git a/net/minecraft/client/model/ColdCowModel.java b/net/minecraft/client/model/ColdCowModel.java new file mode 100644 index 00000000..e37f0e49 --- /dev/null +++ b/net/minecraft/client/model/ColdCowModel.java @@ -0,0 +1,51 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeDeformation; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; + +@Environment(EnvType.CLIENT) +public class ColdCowModel extends CowModel { + public ColdCowModel(ModelPart modelPart) { + super(modelPart); + } + + public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = createBaseCowModel(); + meshDefinition.getRoot() + .addOrReplaceChild( + "body", + CubeListBuilder.create() + .texOffs(20, 32) + .addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F, new CubeDeformation(0.5F)) + .texOffs(18, 4) + .addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F) + .texOffs(52, 0) + .addBox(-2.0F, 2.0F, -8.0F, 4.0F, 6.0F, 1.0F), + PartPose.offsetAndRotation(0.0F, 5.0F, 2.0F, (float) (Math.PI / 2), 0.0F, 0.0F) + ); + PartDefinition partDefinition = meshDefinition.getRoot() + .addOrReplaceChild( + "head", + CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, -6.0F, 8.0F, 8.0F, 6.0F).texOffs(9, 33).addBox(-3.0F, 1.0F, -7.0F, 6.0F, 3.0F, 1.0F), + PartPose.offset(0.0F, 4.0F, -8.0F) + ); + partDefinition.addOrReplaceChild( + "right_horn", + CubeListBuilder.create().texOffs(0, 40).addBox(-1.5F, -4.5F, -0.5F, 2.0F, 6.0F, 2.0F), + PartPose.offsetAndRotation(-4.5F, -2.5F, -3.5F, 1.5708F, 0.0F, 0.0F) + ); + partDefinition.addOrReplaceChild( + "left_horn", + CubeListBuilder.create().texOffs(0, 32).addBox(-1.5F, -3.0F, -0.5F, 2.0F, 6.0F, 2.0F), + PartPose.offsetAndRotation(5.5F, -2.5F, -5.0F, 1.5708F, 0.0F, 0.0F) + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } +} diff --git a/net/minecraft/client/model/ColdPigModel.java b/net/minecraft/client/model/ColdPigModel.java new file mode 100644 index 00000000..81790e68 --- /dev/null +++ b/net/minecraft/client/model/ColdPigModel.java @@ -0,0 +1,33 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeDeformation; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; + +@Environment(EnvType.CLIENT) +public class ColdPigModel extends PigModel { + public ColdPigModel(ModelPart modelPart) { + super(modelPart); + } + + public static LayerDefinition createBodyLayer(CubeDeformation cubeDeformation) { + MeshDefinition meshDefinition = createBasePigModel(cubeDeformation); + PartDefinition partDefinition = meshDefinition.getRoot(); + partDefinition.addOrReplaceChild( + "body", + CubeListBuilder.create() + .texOffs(28, 8) + .addBox(-5.0F, -10.0F, -7.0F, 10.0F, 16.0F, 8.0F) + .texOffs(28, 32) + .addBox(-5.0F, -10.0F, -7.0F, 10.0F, 16.0F, 8.0F, new CubeDeformation(0.5F)), + PartPose.offsetAndRotation(0.0F, 11.0F, 2.0F, (float) (Math.PI / 2), 0.0F, 0.0F) + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } +} diff --git a/net/minecraft/client/model/CowModel.java b/net/minecraft/client/model/CowModel.java index 7a2fe91a..c8eed884 100644 --- a/net/minecraft/client/model/CowModel.java +++ b/net/minecraft/client/model/CowModel.java @@ -14,25 +14,32 @@ import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; @Environment(EnvType.CLIENT) public class CowModel extends QuadrupedModel { - public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(false, 10.0F, 4.0F, Set.of("head")); + public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(false, 8.0F, 6.0F, Set.of("head")); + private static final int LEG_SIZE = 12; public CowModel(ModelPart root) { super(root); } public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = createBaseCowModel(); + return LayerDefinition.create(meshDefinition, 64, 64); + } + + static MeshDefinition createBaseCowModel() { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); - int i = 12; partDefinition.addOrReplaceChild( "head", CubeListBuilder.create() .texOffs(0, 0) .addBox(-4.0F, -4.0F, -6.0F, 8.0F, 8.0F, 6.0F) + .texOffs(1, 33) + .addBox(-3.0F, 1.0F, -7.0F, 6.0F, 3.0F, 1.0F) .texOffs(22, 0) - .addBox("right_horn", -5.0F, -5.0F, -4.0F, 1.0F, 3.0F, 1.0F) + .addBox("right_horn", -5.0F, -5.0F, -5.0F, 1.0F, 3.0F, 1.0F) .texOffs(22, 0) - .addBox("left_horn", 4.0F, -5.0F, -4.0F, 1.0F, 3.0F, 1.0F), + .addBox("left_horn", 4.0F, -5.0F, -5.0F, 1.0F, 3.0F, 1.0F), PartPose.offset(0.0F, 4.0F, -8.0F) ); partDefinition.addOrReplaceChild( @@ -40,12 +47,13 @@ public class CowModel extends QuadrupedModel { CubeListBuilder.create().texOffs(18, 4).addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F).texOffs(52, 0).addBox(-2.0F, 2.0F, -8.0F, 4.0F, 6.0F, 1.0F), PartPose.offsetAndRotation(0.0F, 5.0F, 2.0F, (float) (Math.PI / 2), 0.0F, 0.0F) ); - CubeListBuilder cubeListBuilder = CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F); - partDefinition.addOrReplaceChild("right_hind_leg", cubeListBuilder, PartPose.offset(-4.0F, 12.0F, 7.0F)); + CubeListBuilder cubeListBuilder = CubeListBuilder.create().mirror().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F); + CubeListBuilder cubeListBuilder2 = CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F); + partDefinition.addOrReplaceChild("right_hind_leg", cubeListBuilder2, PartPose.offset(-4.0F, 12.0F, 7.0F)); partDefinition.addOrReplaceChild("left_hind_leg", cubeListBuilder, PartPose.offset(4.0F, 12.0F, 7.0F)); - partDefinition.addOrReplaceChild("right_front_leg", cubeListBuilder, PartPose.offset(-4.0F, 12.0F, -6.0F)); - partDefinition.addOrReplaceChild("left_front_leg", cubeListBuilder, PartPose.offset(4.0F, 12.0F, -6.0F)); - return LayerDefinition.create(meshDefinition, 64, 32); + partDefinition.addOrReplaceChild("right_front_leg", cubeListBuilder2, PartPose.offset(-4.0F, 12.0F, -5.0F)); + partDefinition.addOrReplaceChild("left_front_leg", cubeListBuilder, PartPose.offset(4.0F, 12.0F, -5.0F)); + return meshDefinition; } public ModelPart getHead() { diff --git a/net/minecraft/client/model/CreakingModel.java b/net/minecraft/client/model/CreakingModel.java index 3774eed6..1cef29c0 100644 --- a/net/minecraft/client/model/CreakingModel.java +++ b/net/minecraft/client/model/CreakingModel.java @@ -90,16 +90,19 @@ public class CreakingModel extends EntityModel { } public void setupAnim(CreakingRenderState creakingRenderState) { - this.root().getAllParts().forEach(ModelPart::resetPose); + super.setupAnim(creakingRenderState); + this.head.xRot = creakingRenderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = creakingRenderState.yRot * (float) (Math.PI / 180.0); if (creakingRenderState.canMove) { - this.animateWalk(CreakingAnimation.CREAKING_WALK, creakingRenderState.walkAnimationPos, creakingRenderState.walkAnimationSpeed, 5.5F, 3.0F); + this.animateWalk(CreakingAnimation.CREAKING_WALK, creakingRenderState.walkAnimationPos, creakingRenderState.walkAnimationSpeed, 1.0F, 1.0F); } this.animate(creakingRenderState.attackAnimationState, CreakingAnimation.CREAKING_ATTACK, creakingRenderState.ageInTicks); this.animate(creakingRenderState.invulnerabilityAnimationState, CreakingAnimation.CREAKING_INVULNERABLE, creakingRenderState.ageInTicks); + this.animate(creakingRenderState.deathAnimationState, CreakingAnimation.CREAKING_DEATH, creakingRenderState.ageInTicks); } - public List getHeadModelParts(CreakingRenderState creakingRenderState) { - return !creakingRenderState.isActive ? NO_PARTS : this.headParts; + public List getHeadModelParts(CreakingRenderState renderState) { + return !renderState.eyesGlowing ? NO_PARTS : this.headParts; } } diff --git a/net/minecraft/client/model/DonkeyModel.java b/net/minecraft/client/model/DonkeyModel.java index 24fa0c94..7c47776c 100644 --- a/net/minecraft/client/model/DonkeyModel.java +++ b/net/minecraft/client/model/DonkeyModel.java @@ -7,12 +7,18 @@ import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeDeformation; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; -import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.MeshTransformer; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.DonkeyRenderState; @Environment(EnvType.CLIENT) public class DonkeyModel extends AbstractEquineModel { + public static final float DONKEY_SCALE = 0.87F; + public static final float MULE_SCALE = 0.92F; + private static final MeshTransformer DONKEY_TRANSFORMER = meshDefinition -> { + modifyMesh(meshDefinition.getRoot()); + return meshDefinition; + }; private final ModelPart leftChest = this.body.getChild("left_chest"); private final ModelPart rightChest = this.body.getChild("right_chest"); @@ -20,16 +26,24 @@ public class DonkeyModel extends AbstractEquineModel { super(modelPart); } - public static LayerDefinition createBodyLayer() { - MeshDefinition meshDefinition = AbstractEquineModel.createBodyMesh(CubeDeformation.NONE); - modifyMesh(meshDefinition.getRoot()); - return LayerDefinition.create(meshDefinition, 64, 64); + public static LayerDefinition createBodyLayer(float scale) { + return LayerDefinition.create(AbstractEquineModel.createBodyMesh(CubeDeformation.NONE), 64, 64) + .apply(DONKEY_TRANSFORMER) + .apply(MeshTransformer.scaling(scale)); } - public static LayerDefinition createBabyLayer() { - MeshDefinition meshDefinition = AbstractEquineModel.createFullScaleBabyMesh(CubeDeformation.NONE); - modifyMesh(meshDefinition.getRoot()); - return LayerDefinition.create(AbstractEquineModel.BABY_TRANSFORMER.apply(meshDefinition), 64, 64); + public static LayerDefinition createBabyLayer(float scale) { + return LayerDefinition.create(AbstractEquineModel.createFullScaleBabyMesh(CubeDeformation.NONE), 64, 64) + .apply(DONKEY_TRANSFORMER) + .apply(BABY_TRANSFORMER) + .apply(MeshTransformer.scaling(scale)); + } + + public static LayerDefinition createSaddleLayer(float scale, boolean isBaby) { + return EquineSaddleModel.createFullScaleSaddleLayer(isBaby) + .apply(DONKEY_TRANSFORMER) + .apply(isBaby ? AbstractEquineModel.BABY_TRANSFORMER : MeshTransformer.IDENTITY) + .apply(MeshTransformer.scaling(scale)); } private static void modifyMesh(PartDefinition partDefinition) { diff --git a/net/minecraft/client/model/DrownedModel.java b/net/minecraft/client/model/DrownedModel.java index 2c47b3a1..fbb9f978 100644 --- a/net/minecraft/client/model/DrownedModel.java +++ b/net/minecraft/client/model/DrownedModel.java @@ -11,14 +11,11 @@ import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.ZombieRenderState; import net.minecraft.util.Mth; -import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; @Environment(EnvType.CLIENT) public class DrownedModel extends ZombieModel { - public DrownedModel(ModelPart root) { - super(root); + public DrownedModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer(CubeDeformation cubeDeformation) { @@ -33,22 +30,15 @@ public class DrownedModel extends ZombieModel { return LayerDefinition.create(meshDefinition, 64, 64); } - protected HumanoidModel.ArmPose getArmPose(ZombieRenderState zombieRenderState, HumanoidArm humanoidArm) { - ItemStack itemStack = humanoidArm == HumanoidArm.RIGHT ? zombieRenderState.rightHandItem : zombieRenderState.leftHandItem; - return itemStack.is(Items.TRIDENT) && zombieRenderState.isAggressive && zombieRenderState.mainArm == humanoidArm - ? HumanoidModel.ArmPose.THROW_SPEAR - : HumanoidModel.ArmPose.EMPTY; - } - @Override public void setupAnim(ZombieRenderState zombieRenderState) { super.setupAnim(zombieRenderState); - if (this.getArmPose(zombieRenderState, HumanoidArm.LEFT) == HumanoidModel.ArmPose.THROW_SPEAR) { + if (zombieRenderState.leftArmPose == HumanoidModel.ArmPose.THROW_SPEAR) { this.leftArm.xRot = this.leftArm.xRot * 0.5F - (float) Math.PI; this.leftArm.yRot = 0.0F; } - if (this.getArmPose(zombieRenderState, HumanoidArm.RIGHT) == HumanoidModel.ArmPose.THROW_SPEAR) { + if (zombieRenderState.rightArmPose == HumanoidModel.ArmPose.THROW_SPEAR) { this.rightArm.xRot = this.rightArm.xRot * 0.5F - (float) Math.PI; this.rightArm.yRot = 0.0F; } diff --git a/net/minecraft/client/model/EndCrystalModel.java b/net/minecraft/client/model/EndCrystalModel.java index ff0e39d6..61e3d772 100644 --- a/net/minecraft/client/model/EndCrystalModel.java +++ b/net/minecraft/client/model/EndCrystalModel.java @@ -24,10 +24,10 @@ public class EndCrystalModel extends EntityModel { public final ModelPart innerGlass; public final ModelPart cube; - public EndCrystalModel(ModelPart modelPart) { - super(modelPart); - this.base = modelPart.getChild("base"); - this.outerGlass = modelPart.getChild("outer_glass"); + public EndCrystalModel(ModelPart root) { + super(root); + this.base = root.getChild("base"); + this.outerGlass = root.getChild("outer_glass"); this.innerGlass = this.outerGlass.getChild("inner_glass"); this.cube = this.innerGlass.getChild("cube"); } diff --git a/net/minecraft/client/model/EndermanModel.java b/net/minecraft/client/model/EndermanModel.java index be7bb210..c5d40fd7 100644 --- a/net/minecraft/client/model/EndermanModel.java +++ b/net/minecraft/client/model/EndermanModel.java @@ -14,8 +14,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class EndermanModel extends HumanoidModel { - public EndermanModel(ModelPart root) { - super(root); + public EndermanModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer() { diff --git a/net/minecraft/client/model/EndermiteModel.java b/net/minecraft/client/model/EndermiteModel.java index 42032934..ced152d9 100644 --- a/net/minecraft/client/model/EndermiteModel.java +++ b/net/minecraft/client/model/EndermiteModel.java @@ -52,12 +52,12 @@ public class EndermiteModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.bodyParts.length; i++) { - this.bodyParts[i].yRot = Mth.cos(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.01F * (1 + Math.abs(i - 2)); - this.bodyParts[i].x = Mth.sin(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.1F * Math.abs(i - 2); + this.bodyParts[i].yRot = Mth.cos(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.01F * (1 + Math.abs(i - 2)); + this.bodyParts[i].x = Mth.sin(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.1F * Math.abs(i - 2); } } } diff --git a/net/minecraft/client/model/EntityModel.java b/net/minecraft/client/model/EntityModel.java index bd4f44e1..2401a995 100644 --- a/net/minecraft/client/model/EntityModel.java +++ b/net/minecraft/client/model/EntityModel.java @@ -12,15 +12,15 @@ import net.minecraft.resources.ResourceLocation; public abstract class EntityModel extends Model { public static final float MODEL_Y_OFFSET = -1.501F; - protected EntityModel(ModelPart modelPart) { - this(modelPart, RenderType::entityCutoutNoCull); + protected EntityModel(ModelPart root) { + this(root, RenderType::entityCutoutNoCull); } protected EntityModel(ModelPart modelPart, Function function) { super(modelPart, function); } - public void setupAnim(T entityRenderState) { + public void setupAnim(T renderState) { this.resetPose(); } } diff --git a/net/minecraft/client/model/EquineSaddleModel.java b/net/minecraft/client/model/EquineSaddleModel.java new file mode 100644 index 00000000..b4d1c90c --- /dev/null +++ b/net/minecraft/client/model/EquineSaddleModel.java @@ -0,0 +1,74 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeDeformation; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.MeshTransformer; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.entity.state.EquineRenderState; + +@Environment(EnvType.CLIENT) +public class EquineSaddleModel extends AbstractEquineModel { + private static final String SADDLE = "saddle"; + private static final String LEFT_SADDLE_MOUTH = "left_saddle_mouth"; + private static final String LEFT_SADDLE_LINE = "left_saddle_line"; + private static final String RIGHT_SADDLE_MOUTH = "right_saddle_mouth"; + private static final String RIGHT_SADDLE_LINE = "right_saddle_line"; + private static final String HEAD_SADDLE = "head_saddle"; + private static final String MOUTH_SADDLE_WRAP = "mouth_saddle_wrap"; + private final ModelPart[] ridingParts; + + public EquineSaddleModel(ModelPart modelPart) { + super(modelPart); + ModelPart modelPart2 = this.headParts.getChild("left_saddle_line"); + ModelPart modelPart3 = this.headParts.getChild("right_saddle_line"); + this.ridingParts = new ModelPart[]{modelPart2, modelPart3}; + } + + public static LayerDefinition createSaddleLayer(boolean isBaby) { + return createFullScaleSaddleLayer(isBaby).apply(isBaby ? BABY_TRANSFORMER : MeshTransformer.IDENTITY); + } + + public static LayerDefinition createFullScaleSaddleLayer(boolean isBaby) { + MeshDefinition meshDefinition = isBaby ? createFullScaleBabyMesh(CubeDeformation.NONE) : createBodyMesh(CubeDeformation.NONE); + PartDefinition partDefinition = meshDefinition.getRoot(); + PartDefinition partDefinition2 = partDefinition.getChild("body"); + PartDefinition partDefinition3 = partDefinition.getChild("head_parts"); + partDefinition2.addOrReplaceChild( + "saddle", CubeListBuilder.create().texOffs(26, 0).addBox(-5.0F, -8.0F, -9.0F, 10.0F, 9.0F, 9.0F, new CubeDeformation(0.5F)), PartPose.ZERO + ); + partDefinition3.addOrReplaceChild("left_saddle_mouth", CubeListBuilder.create().texOffs(29, 5).addBox(2.0F, -9.0F, -6.0F, 1.0F, 2.0F, 2.0F), PartPose.ZERO); + partDefinition3.addOrReplaceChild("right_saddle_mouth", CubeListBuilder.create().texOffs(29, 5).addBox(-3.0F, -9.0F, -6.0F, 1.0F, 2.0F, 2.0F), PartPose.ZERO); + partDefinition3.addOrReplaceChild( + "left_saddle_line", + CubeListBuilder.create().texOffs(32, 2).addBox(3.1F, -6.0F, -8.0F, 0.0F, 3.0F, 16.0F), + PartPose.rotation((float) (-Math.PI / 6), 0.0F, 0.0F) + ); + partDefinition3.addOrReplaceChild( + "right_saddle_line", + CubeListBuilder.create().texOffs(32, 2).addBox(-3.1F, -6.0F, -8.0F, 0.0F, 3.0F, 16.0F), + PartPose.rotation((float) (-Math.PI / 6), 0.0F, 0.0F) + ); + partDefinition3.addOrReplaceChild( + "head_saddle", CubeListBuilder.create().texOffs(1, 1).addBox(-3.0F, -11.0F, -1.9F, 6.0F, 5.0F, 6.0F, new CubeDeformation(0.22F)), PartPose.ZERO + ); + partDefinition3.addOrReplaceChild( + "mouth_saddle_wrap", CubeListBuilder.create().texOffs(19, 0).addBox(-2.0F, -11.0F, -4.0F, 4.0F, 5.0F, 2.0F, new CubeDeformation(0.2F)), PartPose.ZERO + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } + + @Override + public void setupAnim(EquineRenderState equineRenderState) { + super.setupAnim(equineRenderState); + + for (ModelPart modelPart : this.ridingParts) { + modelPart.visible = equineRenderState.isRidden; + } + } +} diff --git a/net/minecraft/client/model/FelineModel.java b/net/minecraft/client/model/FelineModel.java index c925f93c..98fd0b42 100644 --- a/net/minecraft/client/model/FelineModel.java +++ b/net/minecraft/client/model/FelineModel.java @@ -16,7 +16,6 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class FelineModel extends EntityModel { public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(true, 10.0F, 4.0F, Set.of("head")); - public static final MeshTransformer CAT_TRANSFORMER = MeshTransformer.scaling(0.8F); private static final float XO = 0.0F; private static final float YO = 16.0F; private static final float ZO = -9.0F; @@ -35,16 +34,16 @@ public class FelineModel extends EntityModel { protected final ModelPart head; protected final ModelPart body; - public FelineModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); - this.body = modelPart.getChild("body"); - this.tail1 = modelPart.getChild("tail1"); - this.tail2 = modelPart.getChild("tail2"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); + public FelineModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); + this.body = root.getChild("body"); + this.tail1 = root.getChild("tail1"); + this.tail2 = root.getChild("tail2"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); } public static MeshDefinition createBodyMesh(CubeDeformation cubeDeformation) { @@ -84,17 +83,18 @@ public class FelineModel extends EntityModel { public void setupAnim(T felineRenderState) { super.setupAnim(felineRenderState); + float f = felineRenderState.ageScale; if (felineRenderState.isCrouching) { - this.body.y++; - this.head.y += 2.0F; - this.tail1.y++; - this.tail2.y += -4.0F; - this.tail2.z += 2.0F; + this.body.y += 1.0F * f; + this.head.y += 2.0F * f; + this.tail1.y += 1.0F * f; + this.tail2.y += -4.0F * f; + this.tail2.z += 2.0F * f; this.tail1.xRot = (float) (Math.PI / 2); this.tail2.xRot = (float) (Math.PI / 2); } else if (felineRenderState.isSprinting) { this.tail2.y = this.tail1.y; - this.tail2.z += 2.0F; + this.tail2.z += 2.0F * f; this.tail1.xRot = (float) (Math.PI / 2); this.tail2.xRot = (float) (Math.PI / 2); } @@ -103,28 +103,27 @@ public class FelineModel extends EntityModel { this.head.yRot = felineRenderState.yRot * (float) (Math.PI / 180.0); if (!felineRenderState.isSitting) { this.body.xRot = (float) (Math.PI / 2); - float f = felineRenderState.walkAnimationSpeed; - float g = felineRenderState.walkAnimationPos; + float g = felineRenderState.walkAnimationSpeed; + float h = felineRenderState.walkAnimationPos; if (felineRenderState.isSprinting) { - this.leftHindLeg.xRot = Mth.cos(g * 0.6662F) * f; - this.rightHindLeg.xRot = Mth.cos(g * 0.6662F + 0.3F) * f; - this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI + 0.3F) * f; - this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * f; - this.tail2.xRot = 1.7278761F + (float) (Math.PI / 10) * Mth.cos(g) * f; + this.leftHindLeg.xRot = Mth.cos(h * 0.6662F) * g; + this.rightHindLeg.xRot = Mth.cos(h * 0.6662F + 0.3F) * g; + this.leftFrontLeg.xRot = Mth.cos(h * 0.6662F + (float) Math.PI + 0.3F) * g; + this.rightFrontLeg.xRot = Mth.cos(h * 0.6662F + (float) Math.PI) * g; + this.tail2.xRot = 1.7278761F + (float) (Math.PI / 10) * Mth.cos(h) * g; } else { - this.leftHindLeg.xRot = Mth.cos(g * 0.6662F) * f; - this.rightHindLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * f; - this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * f; - this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F) * f; + this.leftHindLeg.xRot = Mth.cos(h * 0.6662F) * g; + this.rightHindLeg.xRot = Mth.cos(h * 0.6662F + (float) Math.PI) * g; + this.leftFrontLeg.xRot = Mth.cos(h * 0.6662F + (float) Math.PI) * g; + this.rightFrontLeg.xRot = Mth.cos(h * 0.6662F) * g; if (!felineRenderState.isCrouching) { - this.tail2.xRot = 1.7278761F + (float) (Math.PI / 4) * Mth.cos(g) * f; + this.tail2.xRot = 1.7278761F + (float) (Math.PI / 4) * Mth.cos(h) * g; } else { - this.tail2.xRot = 1.7278761F + 0.47123894F * Mth.cos(g) * f; + this.tail2.xRot = 1.7278761F + 0.47123894F * Mth.cos(h) * g; } } } - float f = felineRenderState.ageScale; if (felineRenderState.isSitting) { this.body.xRot = (float) (Math.PI / 4); this.body.y += -4.0F * f; diff --git a/net/minecraft/client/model/GiantZombieModel.java b/net/minecraft/client/model/GiantZombieModel.java index 5db8714f..1478bf00 100644 --- a/net/minecraft/client/model/GiantZombieModel.java +++ b/net/minecraft/client/model/GiantZombieModel.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public class GiantZombieModel extends AbstractZombieModel { - public GiantZombieModel(ModelPart root) { - super(root); + public GiantZombieModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/GuardianModel.java b/net/minecraft/client/model/GuardianModel.java index 89f0b5f4..a0ee328e 100644 --- a/net/minecraft/client/model/GuardianModel.java +++ b/net/minecraft/client/model/GuardianModel.java @@ -133,27 +133,27 @@ public class GuardianModel extends EntityModel { this.tailParts[2].yRot = Mth.sin(g) * (float) Math.PI * 0.15F; } - private void setupSpikes(float ageInTicks, float f) { + private void setupSpikes(float ageInTicks, float spikeAnimation) { for (int i = 0; i < 12; i++) { - this.spikeParts[i].x = getSpikeX(i, ageInTicks, f); - this.spikeParts[i].y = getSpikeY(i, ageInTicks, f); - this.spikeParts[i].z = getSpikeZ(i, ageInTicks, f); + this.spikeParts[i].x = getSpikeX(i, ageInTicks, spikeAnimation); + this.spikeParts[i].y = getSpikeY(i, ageInTicks, spikeAnimation); + this.spikeParts[i].z = getSpikeZ(i, ageInTicks, spikeAnimation); } } - private static float getSpikeOffset(int index, float ageInTicks, float f) { - return 1.0F + Mth.cos(ageInTicks * 1.5F + index) * 0.01F - f; + private static float getSpikeOffset(int index, float ageInTicks, float spikeAnimation) { + return 1.0F + Mth.cos(ageInTicks * 1.5F + index) * 0.01F - spikeAnimation; } - private static float getSpikeX(int index, float ageInTicks, float f) { - return SPIKE_X[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeX(int index, float ageInTicks, float spikeAnimation) { + return SPIKE_X[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } - private static float getSpikeY(int index, float ageInTicks, float f) { - return 16.0F + SPIKE_Y[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeY(int index, float ageInTicks, float spikeAnimation) { + return 16.0F + SPIKE_Y[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } - private static float getSpikeZ(int index, float ageInTicks, float f) { - return SPIKE_Z[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeZ(int index, float ageInTicks, float spikeAnimation) { + return SPIKE_Z[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } } diff --git a/net/minecraft/client/model/HumanoidArmorModel.java b/net/minecraft/client/model/HumanoidArmorModel.java index ba1371a3..a8d0fd2f 100644 --- a/net/minecraft/client/model/HumanoidArmorModel.java +++ b/net/minecraft/client/model/HumanoidArmorModel.java @@ -12,8 +12,8 @@ import net.minecraft.client.renderer.entity.state.HumanoidRenderState; @Environment(EnvType.CLIENT) public class HumanoidArmorModel extends HumanoidModel { - public HumanoidArmorModel(ModelPart root) { - super(root); + public HumanoidArmorModel(ModelPart modelPart) { + super(modelPart); } public static MeshDefinition createBodyLayer(CubeDeformation cubeDeformation) { diff --git a/net/minecraft/client/model/HumanoidModel.java b/net/minecraft/client/model/HumanoidModel.java index 05bfcd94..9ff58fe7 100644 --- a/net/minecraft/client/model/HumanoidModel.java +++ b/net/minecraft/client/model/HumanoidModel.java @@ -107,14 +107,10 @@ public class HumanoidModel extends EntityModel return meshDefinition; } - protected HumanoidModel.ArmPose getArmPose(T humanoidRenderState, HumanoidArm humanoidArm) { - return HumanoidModel.ArmPose.EMPTY; - } - public void setupAnim(T humanoidRenderState) { super.setupAnim(humanoidRenderState); - HumanoidModel.ArmPose armPose = this.getArmPose(humanoidRenderState, HumanoidArm.LEFT); - HumanoidModel.ArmPose armPose2 = this.getArmPose(humanoidRenderState, HumanoidArm.RIGHT); + HumanoidModel.ArmPose armPose = humanoidRenderState.leftArmPose; + HumanoidModel.ArmPose armPose2 = humanoidRenderState.rightArmPose; float f = humanoidRenderState.swimAmount; boolean bl = humanoidRenderState.isFallFlying; this.head.xRot = humanoidRenderState.xRot * (float) (Math.PI / 180.0); @@ -225,8 +221,8 @@ public class HumanoidModel extends EntityModel } } - private void poseRightArm(T humanoidRenderState, HumanoidModel.ArmPose armPose) { - switch (armPose) { + private void poseRightArm(T renderState, HumanoidModel.ArmPose pose) { + switch (pose) { case EMPTY: this.rightArm.yRot = 0.0F; break; @@ -248,13 +244,13 @@ public class HumanoidModel extends EntityModel this.rightArm.yRot = 0.0F; break; case CROSSBOW_CHARGE: - AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, humanoidRenderState.maxCrossbowChargeDuration, humanoidRenderState.ticksUsingItem, true); + AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, renderState.maxCrossbowChargeDuration, renderState.ticksUsingItem, true); break; case CROSSBOW_HOLD: AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, true); break; case SPYGLASS: - this.rightArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (humanoidRenderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); + this.rightArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (renderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); this.rightArm.yRot = this.head.yRot - (float) (Math.PI / 12); break; case TOOT_HORN: @@ -267,8 +263,8 @@ public class HumanoidModel extends EntityModel } } - private void poseLeftArm(T humanoidRenderState, HumanoidModel.ArmPose armPose) { - switch (armPose) { + private void poseLeftArm(T renderState, HumanoidModel.ArmPose pose) { + switch (pose) { case EMPTY: this.leftArm.yRot = 0.0F; break; @@ -290,13 +286,13 @@ public class HumanoidModel extends EntityModel this.leftArm.yRot = 0.0F; break; case CROSSBOW_CHARGE: - AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, humanoidRenderState.maxCrossbowChargeDuration, humanoidRenderState.ticksUsingItem, false); + AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, renderState.maxCrossbowChargeDuration, renderState.ticksUsingItem, false); break; case CROSSBOW_HOLD: AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, false); break; case SPYGLASS: - this.leftArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (humanoidRenderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); + this.leftArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (renderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); this.leftArm.yRot = this.head.yRot + (float) (Math.PI / 12); break; case TOOT_HORN: @@ -314,33 +310,33 @@ public class HumanoidModel extends EntityModel arm.yRot = (isRightArm ? -30.0F : 30.0F) * (float) (Math.PI / 180.0) + Mth.clamp(this.head.yRot, (float) (-Math.PI / 6), (float) (Math.PI / 6)); } - protected void setupAttackAnimation(T humanoidRenderState, float f) { - float g = humanoidRenderState.attackTime; - if (!(g <= 0.0F)) { - HumanoidArm humanoidArm = humanoidRenderState.attackArm; + protected void setupAttackAnimation(T renderState, float ageInTicks) { + float f = renderState.attackTime; + if (!(f <= 0.0F)) { + HumanoidArm humanoidArm = renderState.attackArm; ModelPart modelPart = this.getArm(humanoidArm); - this.body.yRot = Mth.sin(Mth.sqrt(g) * (float) (Math.PI * 2)) * 0.2F; + this.body.yRot = Mth.sin(Mth.sqrt(f) * (float) (Math.PI * 2)) * 0.2F; if (humanoidArm == HumanoidArm.LEFT) { this.body.yRot *= -1.0F; } - float i = humanoidRenderState.ageScale; - this.rightArm.z = Mth.sin(this.body.yRot) * 5.0F * i; - this.rightArm.x = -Mth.cos(this.body.yRot) * 5.0F * i; - this.leftArm.z = -Mth.sin(this.body.yRot) * 5.0F * i; - this.leftArm.x = Mth.cos(this.body.yRot) * 5.0F * i; + float h = renderState.ageScale; + this.rightArm.z = Mth.sin(this.body.yRot) * 5.0F * h; + this.rightArm.x = -Mth.cos(this.body.yRot) * 5.0F * h; + this.leftArm.z = -Mth.sin(this.body.yRot) * 5.0F * h; + this.leftArm.x = Mth.cos(this.body.yRot) * 5.0F * h; this.rightArm.yRot = this.rightArm.yRot + this.body.yRot; this.leftArm.yRot = this.leftArm.yRot + this.body.yRot; this.leftArm.xRot = this.leftArm.xRot + this.body.yRot; - float h = 1.0F - g; - h *= h; - h *= h; - h = 1.0F - h; - float j = Mth.sin(h * (float) Math.PI); - float k = Mth.sin(g * (float) Math.PI) * -(this.head.xRot - 0.7F) * 0.75F; - modelPart.xRot -= j * 1.2F + k; + float g = 1.0F - f; + g *= g; + g *= g; + g = 1.0F - g; + float i = Mth.sin(g * (float) Math.PI); + float j = Mth.sin(f * (float) Math.PI) * -(this.head.xRot - 0.7F) * 0.75F; + modelPart.xRot -= i * 1.2F + j; modelPart.yRot = modelPart.yRot + this.body.yRot * 2.0F; - modelPart.zRot = modelPart.zRot + Mth.sin(g * (float) Math.PI) * -0.4F; + modelPart.zRot = modelPart.zRot + Mth.sin(f * (float) Math.PI) * -0.4F; } } diff --git a/net/minecraft/client/model/LavaSlimeModel.java b/net/minecraft/client/model/LavaSlimeModel.java index 82333009..f86a32eb 100644 --- a/net/minecraft/client/model/LavaSlimeModel.java +++ b/net/minecraft/client/model/LavaSlimeModel.java @@ -31,20 +31,19 @@ public class LavaSlimeModel extends EntityModel { for (int i = 0; i < 8; i++) { int j = 0; - int k = i; - if (i == 2) { - j = 24; - k = 10; - } else if (i == 3) { - j = 24; - k = 19; + int k = 0; + if (i > 0 && i < 4) { + k += 9 * i; + } else if (i > 3) { + j = 32; + k += 9 * i - 36; } partDefinition.addOrReplaceChild(getSegmentName(i), CubeListBuilder.create().texOffs(j, k).addBox(-4.0F, 16 + i, -4.0F, 8.0F, 1.0F, 8.0F), PartPose.ZERO); } - partDefinition.addOrReplaceChild("inside_cube", CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 18.0F, -2.0F, 4.0F, 4.0F, 4.0F), PartPose.ZERO); - return LayerDefinition.create(meshDefinition, 64, 32); + partDefinition.addOrReplaceChild("inside_cube", CubeListBuilder.create().texOffs(24, 40).addBox(-2.0F, 18.0F, -2.0F, 4.0F, 4.0F, 4.0F), PartPose.ZERO); + return LayerDefinition.create(meshDefinition, 64, 64); } public void setupAnim(SlimeRenderState slimeRenderState) { diff --git a/net/minecraft/client/model/LlamaModel.java b/net/minecraft/client/model/LlamaModel.java index 9af7e318..41b54e17 100644 --- a/net/minecraft/client/model/LlamaModel.java +++ b/net/minecraft/client/model/LlamaModel.java @@ -78,16 +78,16 @@ public class LlamaModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 64); } - private static MeshDefinition transformToBaby(MeshDefinition meshDefinition) { + private static MeshDefinition transformToBaby(MeshDefinition mesh) { float f = 2.0F; float g = 0.7F; float h = 1.1F; UnaryOperator unaryOperator = partPose -> partPose.translated(0.0F, 21.0F, 3.52F).scaled(0.71428573F, 0.64935064F, 0.7936508F); UnaryOperator unaryOperator2 = partPose -> partPose.translated(0.0F, 33.0F, 0.0F).scaled(0.625F, 0.45454544F, 0.45454544F); UnaryOperator unaryOperator3 = partPose -> partPose.translated(0.0F, 33.0F, 0.0F).scaled(0.45454544F, 0.41322312F, 0.45454544F); - MeshDefinition meshDefinition2 = new MeshDefinition(); + MeshDefinition meshDefinition = new MeshDefinition(); - for (Entry entry : meshDefinition.getRoot().getChildren()) { + for (Entry entry : mesh.getRoot().getChildren()) { String string = (String)entry.getKey(); PartDefinition partDefinition = (PartDefinition)entry.getValue(); @@ -96,10 +96,10 @@ public class LlamaModel extends EntityModel { case "body" -> unaryOperator2; default -> unaryOperator3; }; - meshDefinition2.getRoot().addOrReplaceChild(string, partDefinition.transformed(unaryOperator4)); + meshDefinition.getRoot().addOrReplaceChild(string, partDefinition.transformed(unaryOperator4)); } - return meshDefinition2; + return meshDefinition; } public void setupAnim(LlamaRenderState llamaRenderState) { diff --git a/net/minecraft/client/model/Model.java b/net/minecraft/client/model/Model.java index ba674e45..a633acde 100644 --- a/net/minecraft/client/model/Model.java +++ b/net/minecraft/client/model/Model.java @@ -22,10 +22,10 @@ public abstract class Model { protected final Function renderType; private final List allParts; - public Model(ModelPart modelPart, Function function) { - this.root = modelPart; - this.renderType = function; - this.allParts = modelPart.getAllParts().toList(); + public Model(ModelPart root, Function renderType) { + this.root = root; + this.renderType = renderType; + this.allParts = root.getAllParts().toList(); } public final RenderType renderType(ResourceLocation location) { @@ -36,18 +36,18 @@ public abstract class Model { this.root().render(poseStack, buffer, packedLight, packedOverlay, color); } - public final void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay) { - this.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay, -1); + public final void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay) { + this.renderToBuffer(poseStack, buffer, packedLight, packedOverlay, -1); } public final ModelPart root() { return this.root; } - public Optional getAnyDescendantWithName(String string) { - return string.equals("root") + public Optional getAnyDescendantWithName(String name) { + return name.equals("root") ? Optional.of(this.root()) - : this.root().getAllParts().filter(modelPart -> modelPart.hasChild(string)).findFirst().map(modelPart -> modelPart.getChild(string)); + : this.root().getAllParts().filter(modelPart -> modelPart.hasChild(name)).findFirst().map(modelPart -> modelPart.getChild(name)); } public final List allParts() { @@ -60,19 +60,21 @@ public abstract class Model { } } - protected void animate(AnimationState animationState, AnimationDefinition animationDefinition, float f) { - this.animate(animationState, animationDefinition, f, 1.0F); + protected void animate(AnimationState state, AnimationDefinition definition, float ageInTicks) { + this.animate(state, definition, ageInTicks, 1.0F); } - protected void animateWalk(AnimationDefinition animationDefinition, float f, float g, float h, float i) { - long l = (long)(f * 50.0F * h); - float j = Math.min(g * i, 1.0F); - KeyframeAnimations.animate(this, animationDefinition, l, j, ANIMATION_VECTOR_CACHE); + protected void animateWalk(AnimationDefinition definition, float walkAnimationPos, float walkAnimationSpeed, float timeMultiplier, float speedMultiplier) { + long l = (long)(walkAnimationPos * 50.0F * timeMultiplier); + float f = Math.min(walkAnimationSpeed * speedMultiplier, 1.0F); + KeyframeAnimations.animate(this, definition, l, f, ANIMATION_VECTOR_CACHE); } - protected void animate(AnimationState animationState, AnimationDefinition animationDefinition, float f, float g) { - animationState.ifStarted( - animationStatex -> KeyframeAnimations.animate(this, animationDefinition, (long)((float)animationStatex.getTimeInMillis(f) * g), 1.0F, ANIMATION_VECTOR_CACHE) + protected void animate(AnimationState state, AnimationDefinition definition, float ageInTicks, float speed) { + state.ifStarted( + animationState -> KeyframeAnimations.animate( + this, definition, (long)((float)animationState.getTimeInMillis(ageInTicks) * speed), 1.0F, ANIMATION_VECTOR_CACHE + ) ); } @@ -82,8 +84,8 @@ public abstract class Model { @Environment(EnvType.CLIENT) public static class Simple extends Model { - public Simple(ModelPart modelPart, Function function) { - super(modelPart, function); + public Simple(ModelPart root, Function renderType) { + super(root, renderType); } } } diff --git a/net/minecraft/client/model/PigModel.java b/net/minecraft/client/model/PigModel.java index 6f31cedc..6c65b433 100644 --- a/net/minecraft/client/model/PigModel.java +++ b/net/minecraft/client/model/PigModel.java @@ -22,6 +22,10 @@ public class PigModel extends QuadrupedModel { } public static LayerDefinition createBodyLayer(CubeDeformation cubeDeformation) { + return LayerDefinition.create(createBasePigModel(cubeDeformation), 64, 64); + } + + protected static MeshDefinition createBasePigModel(CubeDeformation cubeDeformation) { MeshDefinition meshDefinition = QuadrupedModel.createBodyMesh(6, cubeDeformation); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild( @@ -33,6 +37,6 @@ public class PigModel extends QuadrupedModel { .addBox(-2.0F, 0.0F, -9.0F, 4.0F, 3.0F, 1.0F, cubeDeformation), PartPose.offset(0.0F, 12.0F, -6.0F) ); - return LayerDefinition.create(meshDefinition, 64, 32); + return meshDefinition; } } diff --git a/net/minecraft/client/model/PiglinModel.java b/net/minecraft/client/model/PiglinModel.java index 659ea170..893e44eb 100644 --- a/net/minecraft/client/model/PiglinModel.java +++ b/net/minecraft/client/model/PiglinModel.java @@ -60,8 +60,8 @@ public class PiglinModel extends AbstractPiglinModel { } } - private void holdWeaponHigh(PiglinRenderState piglinRenderState) { - if (piglinRenderState.mainArm == HumanoidArm.LEFT) { + private void holdWeaponHigh(PiglinRenderState renderState) { + if (renderState.mainArm == HumanoidArm.LEFT) { this.leftArm.xRot = -1.8F; } else { this.rightArm.xRot = -1.8F; diff --git a/net/minecraft/client/model/PlayerModel.java b/net/minecraft/client/model/PlayerModel.java index 06018491..546d2074 100644 --- a/net/minecraft/client/model/PlayerModel.java +++ b/net/minecraft/client/model/PlayerModel.java @@ -12,7 +12,6 @@ import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.player.PlayerRenderer; import net.minecraft.client.renderer.entity.state.PlayerRenderState; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.HumanoidArm; @@ -129,11 +128,7 @@ public class PlayerModel extends HumanoidModel { } } - public ModelPart getRandomBodyPart(RandomSource randomSource) { - return Util.getRandom(this.bodyParts, randomSource); - } - - protected HumanoidModel.ArmPose getArmPose(PlayerRenderState playerRenderState, HumanoidArm humanoidArm) { - return PlayerRenderer.getArmPose(playerRenderState, humanoidArm); + public ModelPart getRandomBodyPart(RandomSource random) { + return Util.getRandom(this.bodyParts, random); } } diff --git a/net/minecraft/client/model/PolarBearModel.java b/net/minecraft/client/model/PolarBearModel.java index 7677c108..9f6de027 100644 --- a/net/minecraft/client/model/PolarBearModel.java +++ b/net/minecraft/client/model/PolarBearModel.java @@ -15,13 +15,13 @@ import net.minecraft.client.renderer.entity.state.PolarBearRenderState; @Environment(EnvType.CLIENT) public class PolarBearModel extends QuadrupedModel { private static final float BABY_HEAD_SCALE = 2.25F; - public static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(true, 16.0F, 4.0F, 2.25F, 2.0F, 24.0F, Set.of("head")); + private static final MeshTransformer BABY_TRANSFORMER = new BabyModelTransform(true, 16.0F, 4.0F, 2.25F, 2.0F, 24.0F, Set.of("head")); public PolarBearModel(ModelPart root) { super(root); } - public static LayerDefinition createBodyLayer() { + public static LayerDefinition createBodyLayer(boolean isBaby) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild( @@ -50,7 +50,7 @@ public class PolarBearModel extends QuadrupedModel { CubeListBuilder cubeListBuilder2 = CubeListBuilder.create().texOffs(50, 40).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 10.0F, 6.0F); partDefinition.addOrReplaceChild("right_front_leg", cubeListBuilder2, PartPose.offset(-3.5F, 14.0F, -8.0F)); partDefinition.addOrReplaceChild("left_front_leg", cubeListBuilder2, PartPose.offset(3.5F, 14.0F, -8.0F)); - return LayerDefinition.create(meshDefinition, 128, 64).apply(MeshTransformer.scaling(1.2F)); + return LayerDefinition.create(meshDefinition, 128, 64).apply(isBaby ? BABY_TRANSFORMER : MeshTransformer.IDENTITY).apply(MeshTransformer.scaling(1.2F)); } public void setupAnim(PolarBearRenderState polarBearRenderState) { diff --git a/net/minecraft/client/model/PufferfishBigModel.java b/net/minecraft/client/model/PufferfishBigModel.java index 6445f09a..d2b61a36 100644 --- a/net/minecraft/client/model/PufferfishBigModel.java +++ b/net/minecraft/client/model/PufferfishBigModel.java @@ -85,9 +85,9 @@ public class PufferfishBigModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/PufferfishMidModel.java b/net/minecraft/client/model/PufferfishMidModel.java index ac17dd90..4a752d8f 100644 --- a/net/minecraft/client/model/PufferfishMidModel.java +++ b/net/minecraft/client/model/PufferfishMidModel.java @@ -79,9 +79,9 @@ public class PufferfishMidModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/PufferfishSmallModel.java b/net/minecraft/client/model/PufferfishSmallModel.java index c8db6195..d595d494 100644 --- a/net/minecraft/client/model/PufferfishSmallModel.java +++ b/net/minecraft/client/model/PufferfishSmallModel.java @@ -48,9 +48,9 @@ public class PufferfishSmallModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/QuadrupedModel.java b/net/minecraft/client/model/QuadrupedModel.java index 53a65ed1..212c440b 100644 --- a/net/minecraft/client/model/QuadrupedModel.java +++ b/net/minecraft/client/model/QuadrupedModel.java @@ -20,14 +20,14 @@ public class QuadrupedModel extends EntityMod protected final ModelPart rightFrontLeg; protected final ModelPart leftFrontLeg; - protected QuadrupedModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); - this.body = modelPart.getChild("body"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); + protected QuadrupedModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); + this.body = root.getChild("body"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); } public static MeshDefinition createBodyMesh(int yOffset, CubeDeformation cubeDeformation) { diff --git a/net/minecraft/client/model/RabbitModel.java b/net/minecraft/client/model/RabbitModel.java index a3ab586f..d4914f3a 100644 --- a/net/minecraft/client/model/RabbitModel.java +++ b/net/minecraft/client/model/RabbitModel.java @@ -24,8 +24,6 @@ public class RabbitModel extends EntityModel { ); private static final String LEFT_HAUNCH = "left_haunch"; private static final String RIGHT_HAUNCH = "right_haunch"; - private final ModelPart leftRearFoot; - private final ModelPart rightRearFoot; private final ModelPart leftHaunch; private final ModelPart rightHaunch; private final ModelPart leftFrontLeg; @@ -34,45 +32,34 @@ public class RabbitModel extends EntityModel { * The Rabbit's Head */ private final ModelPart head; - private final ModelPart rightEar; - private final ModelPart leftEar; - /** - * The Rabbit's Nose - */ - private final ModelPart nose; public RabbitModel(ModelPart root) { super(root); - this.leftRearFoot = root.getChild("left_hind_foot"); - this.rightRearFoot = root.getChild("right_hind_foot"); this.leftHaunch = root.getChild("left_haunch"); this.rightHaunch = root.getChild("right_haunch"); this.leftFrontLeg = root.getChild("left_front_leg"); this.rightFrontLeg = root.getChild("right_front_leg"); this.head = root.getChild("head"); - this.rightEar = root.getChild("right_ear"); - this.leftEar = root.getChild("left_ear"); - this.nose = root.getChild("nose"); } - public static LayerDefinition createBodyLayer(boolean bl) { + public static LayerDefinition createBodyLayer(boolean baby) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); - partDefinition.addOrReplaceChild( - "left_hind_foot", CubeListBuilder.create().texOffs(26, 24).addBox(-1.0F, 5.5F, -3.7F, 2.0F, 1.0F, 7.0F), PartPose.offset(3.0F, 17.5F, 3.7F) - ); - partDefinition.addOrReplaceChild( - "right_hind_foot", CubeListBuilder.create().texOffs(8, 24).addBox(-1.0F, 5.5F, -3.7F, 2.0F, 1.0F, 7.0F), PartPose.offset(-3.0F, 17.5F, 3.7F) - ); - partDefinition.addOrReplaceChild( + PartDefinition partDefinition2 = partDefinition.addOrReplaceChild( "left_haunch", CubeListBuilder.create().texOffs(30, 15).addBox(-1.0F, 0.0F, 0.0F, 2.0F, 4.0F, 5.0F), - PartPose.offsetAndRotation(3.0F, 17.5F, 3.7F, (float) (-Math.PI / 9), 0.0F, 0.0F) + PartPose.offsetAndRotation(3.0F, 17.5F, 3.7F, -0.36651915F, 0.0F, 0.0F) ); - partDefinition.addOrReplaceChild( + PartDefinition partDefinition3 = partDefinition.addOrReplaceChild( "right_haunch", CubeListBuilder.create().texOffs(16, 15).addBox(-1.0F, 0.0F, 0.0F, 2.0F, 4.0F, 5.0F), - PartPose.offsetAndRotation(-3.0F, 17.5F, 3.7F, (float) (-Math.PI / 9), 0.0F, 0.0F) + PartPose.offsetAndRotation(-3.0F, 17.5F, 3.7F, -0.36651915F, 0.0F, 0.0F) + ); + partDefinition2.addOrReplaceChild( + "left_hind_foot", CubeListBuilder.create().texOffs(26, 24).addBox(-1.0F, 5.5F, -3.7F, 2.0F, 1.0F, 7.0F), PartPose.rotation(0.36651915F, 0.0F, 0.0F) + ); + partDefinition3.addOrReplaceChild( + "right_hind_foot", CubeListBuilder.create().texOffs(8, 24).addBox(-1.0F, 5.5F, -3.7F, 2.0F, 1.0F, 7.0F), PartPose.rotation(0.36651915F, 0.0F, 0.0F) ); partDefinition.addOrReplaceChild( "body", @@ -82,53 +69,43 @@ public class RabbitModel extends EntityModel { partDefinition.addOrReplaceChild( "left_front_leg", CubeListBuilder.create().texOffs(8, 15).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 7.0F, 2.0F), - PartPose.offsetAndRotation(3.0F, 17.0F, -1.0F, (float) (-Math.PI / 18), 0.0F, 0.0F) + PartPose.offsetAndRotation(3.0F, 17.0F, -1.0F, -0.19198622F, 0.0F, 0.0F) ); partDefinition.addOrReplaceChild( "right_front_leg", CubeListBuilder.create().texOffs(0, 15).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 7.0F, 2.0F), - PartPose.offsetAndRotation(-3.0F, 17.0F, -1.0F, (float) (-Math.PI / 18), 0.0F, 0.0F) + PartPose.offsetAndRotation(-3.0F, 17.0F, -1.0F, -0.19198622F, 0.0F, 0.0F) ); - partDefinition.addOrReplaceChild( + PartDefinition partDefinition4 = partDefinition.addOrReplaceChild( "head", CubeListBuilder.create().texOffs(32, 0).addBox(-2.5F, -4.0F, -5.0F, 5.0F, 4.0F, 5.0F), PartPose.offset(0.0F, 16.0F, -1.0F) ); - partDefinition.addOrReplaceChild( + partDefinition4.addOrReplaceChild( "right_ear", CubeListBuilder.create().texOffs(52, 0).addBox(-2.5F, -9.0F, -1.0F, 2.0F, 5.0F, 1.0F), - PartPose.offsetAndRotation(0.0F, 16.0F, -1.0F, 0.0F, (float) (-Math.PI / 12), 0.0F) + PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, (float) (-Math.PI / 12), 0.0F) ); - partDefinition.addOrReplaceChild( + partDefinition4.addOrReplaceChild( "left_ear", CubeListBuilder.create().texOffs(58, 0).addBox(0.5F, -9.0F, -1.0F, 2.0F, 5.0F, 1.0F), - PartPose.offsetAndRotation(0.0F, 16.0F, -1.0F, 0.0F, (float) (Math.PI / 12), 0.0F) + PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, (float) (Math.PI / 12), 0.0F) ); partDefinition.addOrReplaceChild( "tail", CubeListBuilder.create().texOffs(52, 6).addBox(-1.5F, -1.5F, 0.0F, 3.0F, 3.0F, 2.0F), PartPose.offsetAndRotation(0.0F, 20.0F, 7.0F, -0.3490659F, 0.0F, 0.0F) ); - partDefinition.addOrReplaceChild( - "nose", CubeListBuilder.create().texOffs(32, 9).addBox(-0.5F, -2.5F, -5.5F, 1.0F, 1.0F, 1.0F), PartPose.offset(0.0F, 16.0F, -1.0F) - ); - return LayerDefinition.create(meshDefinition, 64, 32).apply(bl ? BABY_TRANSFORMER : ADULT_TRANSFORMER); + partDefinition4.addOrReplaceChild("nose", CubeListBuilder.create().texOffs(32, 9).addBox(-0.5F, -2.5F, -5.5F, 1.0F, 1.0F, 1.0F), PartPose.ZERO); + return LayerDefinition.create(meshDefinition, 64, 32).apply(baby ? BABY_TRANSFORMER : ADULT_TRANSFORMER); } public void setupAnim(RabbitRenderState rabbitRenderState) { super.setupAnim(rabbitRenderState); - this.nose.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); this.head.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.rightEar.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.leftEar.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.nose.yRot = rabbitRenderState.yRot * (float) (Math.PI / 180.0); this.head.yRot = rabbitRenderState.yRot * (float) (Math.PI / 180.0); - this.rightEar.yRot = this.nose.yRot - (float) (Math.PI / 12); - this.leftEar.yRot = this.nose.yRot + (float) (Math.PI / 12); float f = Mth.sin(rabbitRenderState.jumpCompletion * (float) Math.PI); - this.leftHaunch.xRot = (f * 50.0F - 21.0F) * (float) (Math.PI / 180.0); - this.rightHaunch.xRot = (f * 50.0F - 21.0F) * (float) (Math.PI / 180.0); - this.leftRearFoot.xRot = f * 50.0F * (float) (Math.PI / 180.0); - this.rightRearFoot.xRot = f * 50.0F * (float) (Math.PI / 180.0); - this.leftFrontLeg.xRot = (f * -40.0F - 11.0F) * (float) (Math.PI / 180.0); - this.rightFrontLeg.xRot = (f * -40.0F - 11.0F) * (float) (Math.PI / 180.0); + this.leftHaunch.xRot += f * 50.0F * (float) (Math.PI / 180.0); + this.rightHaunch.xRot += f * 50.0F * (float) (Math.PI / 180.0); + this.leftFrontLeg.xRot += f * -40.0F * (float) (Math.PI / 180.0); + this.rightFrontLeg.xRot += f * -40.0F * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/SilverfishModel.java b/net/minecraft/client/model/SilverfishModel.java index 3c11b9f6..27f0f524 100644 --- a/net/minecraft/client/model/SilverfishModel.java +++ b/net/minecraft/client/model/SilverfishModel.java @@ -73,12 +73,12 @@ public class SilverfishModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.bodyParts.length; i++) { - this.bodyParts[i].yRot = Mth.cos(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.05F * (1 + Math.abs(i - 2)); - this.bodyParts[i].x = Mth.sin(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.2F * Math.abs(i - 2); + this.bodyParts[i].yRot = Mth.cos(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.05F * (1 + Math.abs(i - 2)); + this.bodyParts[i].x = Mth.sin(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.2F * Math.abs(i - 2); } this.bodyLayers[0].yRot = this.bodyParts[2].yRot; diff --git a/net/minecraft/client/model/SkeletonModel.java b/net/minecraft/client/model/SkeletonModel.java index c06d3640..1df76346 100644 --- a/net/minecraft/client/model/SkeletonModel.java +++ b/net/minecraft/client/model/SkeletonModel.java @@ -13,13 +13,11 @@ import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.SkeletonRenderState; import net.minecraft.util.Mth; import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; @Environment(EnvType.CLIENT) public class SkeletonModel extends HumanoidModel { - public SkeletonModel(ModelPart root) { - super(root); + public SkeletonModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer() { @@ -44,16 +42,9 @@ public class SkeletonModel extends HumanoidModel< ); } - protected HumanoidModel.ArmPose getArmPose(S skeletonRenderState, HumanoidArm humanoidArm) { - return skeletonRenderState.getMainHandItem().is(Items.BOW) && skeletonRenderState.isAggressive && skeletonRenderState.mainArm == humanoidArm - ? HumanoidModel.ArmPose.BOW_AND_ARROW - : HumanoidModel.ArmPose.EMPTY; - } - public void setupAnim(S skeletonRenderState) { super.setupAnim(skeletonRenderState); - ItemStack itemStack = skeletonRenderState.getMainHandItem(); - if (skeletonRenderState.isAggressive && !itemStack.is(Items.BOW)) { + if (skeletonRenderState.isAggressive && !skeletonRenderState.isHoldingBow) { float f = skeletonRenderState.attackTime; float g = Mth.sin(f * (float) Math.PI); float h = Mth.sin((1.0F - (1.0F - f) * (1.0F - f)) * (float) Math.PI); diff --git a/net/minecraft/client/model/SkullModelBase.java b/net/minecraft/client/model/SkullModelBase.java index 732a3544..ba62fb6d 100644 --- a/net/minecraft/client/model/SkullModelBase.java +++ b/net/minecraft/client/model/SkullModelBase.java @@ -7,8 +7,8 @@ import net.minecraft.client.renderer.RenderType; @Environment(EnvType.CLIENT) public abstract class SkullModelBase extends Model { - public SkullModelBase(ModelPart modelPart) { - super(modelPart, RenderType::entityTranslucent); + public SkullModelBase(ModelPart root) { + super(root, RenderType::entityTranslucent); } public abstract void setupAnim(float mouthAnimation, float yRot, float xRot); diff --git a/net/minecraft/client/model/SpinAttackEffectModel.java b/net/minecraft/client/model/SpinAttackEffectModel.java index efcd7780..65717650 100644 --- a/net/minecraft/client/model/SpinAttackEffectModel.java +++ b/net/minecraft/client/model/SpinAttackEffectModel.java @@ -24,8 +24,8 @@ public class SpinAttackEffectModel extends EntityModel { } } - private static String boxName(int i) { - return "box" + i; + private static String boxName(int index) { + return "box" + index; } public static LayerDefinition createLayer() { diff --git a/net/minecraft/client/model/StriderModel.java b/net/minecraft/client/model/StriderModel.java index a274122a..2bc99bbe 100644 --- a/net/minecraft/client/model/StriderModel.java +++ b/net/minecraft/client/model/StriderModel.java @@ -7,12 +7,14 @@ import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.MeshTransformer; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.StriderRenderState; import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class StriderModel extends EntityModel { + public static final MeshTransformer BABY_TRANSFORMER = MeshTransformer.scaling(0.5F); private static final String RIGHT_BOTTOM_BRISTLE = "right_bottom_bristle"; private static final String RIGHT_MIDDLE_BRISTLE = "right_middle_bristle"; private static final String RIGHT_TOP_BRISTLE = "right_top_bristle"; diff --git a/net/minecraft/client/model/VexModel.java b/net/minecraft/client/model/VexModel.java index 6b21d7eb..2e35a658 100644 --- a/net/minecraft/client/model/VexModel.java +++ b/net/minecraft/client/model/VexModel.java @@ -89,25 +89,25 @@ public class VexModel extends EntityModel implements ArmedModel this.rightWing.zRot = 0.47123888F; } - private void setArmsCharging(boolean bl, boolean bl2, float f) { - if (!bl && !bl2) { + private void setArmsCharging(boolean rightArm, boolean leftArm, float chargeAmount) { + if (!rightArm && !leftArm) { this.rightArm.xRot = -1.2217305F; this.rightArm.yRot = (float) (Math.PI / 12); - this.rightArm.zRot = -0.47123888F - f; + this.rightArm.zRot = -0.47123888F - chargeAmount; this.leftArm.xRot = -1.2217305F; this.leftArm.yRot = (float) (-Math.PI / 12); - this.leftArm.zRot = 0.47123888F + f; + this.leftArm.zRot = 0.47123888F + chargeAmount; } else { - if (bl) { + if (rightArm) { this.rightArm.xRot = (float) (Math.PI * 7.0 / 6.0); this.rightArm.yRot = (float) (Math.PI / 12); - this.rightArm.zRot = -0.47123888F - f; + this.rightArm.zRot = -0.47123888F - chargeAmount; } - if (bl2) { + if (leftArm) { this.leftArm.xRot = (float) (Math.PI * 7.0 / 6.0); this.leftArm.yRot = (float) (-Math.PI / 12); - this.leftArm.zRot = 0.47123888F + f; + this.leftArm.zRot = 0.47123888F + chargeAmount; } } } diff --git a/net/minecraft/client/model/VillagerHeadModel.java b/net/minecraft/client/model/VillagerHeadModel.java deleted file mode 100644 index 75d48974..00000000 --- a/net/minecraft/client/model/VillagerHeadModel.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.minecraft.client.model; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -public interface VillagerHeadModel { - void hatVisible(boolean visible); -} diff --git a/net/minecraft/client/model/VillagerLikeModel.java b/net/minecraft/client/model/VillagerLikeModel.java new file mode 100644 index 00000000..37b73da7 --- /dev/null +++ b/net/minecraft/client/model/VillagerLikeModel.java @@ -0,0 +1,12 @@ +package net.minecraft.client.model; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public interface VillagerLikeModel { + void hatVisible(boolean hatVisible); + + void translateToArms(PoseStack poseStack); +} diff --git a/net/minecraft/client/model/VillagerModel.java b/net/minecraft/client/model/VillagerModel.java index cbc4d305..b4fe6ed6 100644 --- a/net/minecraft/client/model/VillagerModel.java +++ b/net/minecraft/client/model/VillagerModel.java @@ -1,5 +1,6 @@ package net.minecraft.client.model; +import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.geom.ModelPart; @@ -7,17 +8,20 @@ import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeDeformation; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.MeshTransformer; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.VillagerRenderState; import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) -public class VillagerModel extends EntityModel implements HeadedModel, VillagerHeadModel { +public class VillagerModel extends EntityModel implements HeadedModel, VillagerLikeModel { + public static final MeshTransformer BABY_TRANSFORMER = MeshTransformer.scaling(0.5F); private final ModelPart head; private final ModelPart hat; private final ModelPart hatRim; private final ModelPart rightLeg; private final ModelPart leftLeg; + private final ModelPart arms; public VillagerModel(ModelPart root) { super(root); @@ -26,6 +30,7 @@ public class VillagerModel extends EntityModel implements H this.hatRim = this.hat.getChild("hat_rim"); this.rightLeg = root.getChild("right_leg"); this.leftLeg = root.getChild("left_leg"); + this.arms = root.getChild("arms"); } public static MeshDefinition createBodyModel() { @@ -93,9 +98,15 @@ public class VillagerModel extends EntityModel implements H } @Override - public void hatVisible(boolean visible) { - this.head.visible = visible; - this.hat.visible = visible; - this.hatRim.visible = visible; + public void hatVisible(boolean hatVisible) { + this.head.visible = hatVisible; + this.hat.visible = hatVisible; + this.hatRim.visible = hatVisible; + } + + @Override + public void translateToArms(PoseStack poseStack) { + this.root.translateAndRotate(poseStack); + this.arms.translateAndRotate(poseStack); } } diff --git a/net/minecraft/client/model/WardenModel.java b/net/minecraft/client/model/WardenModel.java index 90dd0da2..33fc8d46 100644 --- a/net/minecraft/client/model/WardenModel.java +++ b/net/minecraft/client/model/WardenModel.java @@ -152,25 +152,25 @@ public class WardenModel extends EntityModel { this.rightArm.y = -13.0F; } - private void animateTendrils(WardenRenderState wardenRenderState, float f) { - float g = wardenRenderState.tendrilAnimation * (float)(Math.cos(f * 2.25) * Math.PI * 0.1F); - this.leftTendril.xRot = g; - this.rightTendril.xRot = -g; + private void animateTendrils(WardenRenderState renderState, float ageInTicks) { + float f = renderState.tendrilAnimation * (float)(Math.cos(ageInTicks * 2.25) * Math.PI * 0.1F); + this.leftTendril.xRot = f; + this.rightTendril.xRot = -f; } - public List getTendrilsLayerModelParts(WardenRenderState wardenRenderState) { + public List getTendrilsLayerModelParts(WardenRenderState renderState) { return this.tendrilsLayerModelParts; } - public List getHeartLayerModelParts(WardenRenderState wardenRenderState) { + public List getHeartLayerModelParts(WardenRenderState renderState) { return this.heartLayerModelParts; } - public List getBioluminescentLayerModelParts(WardenRenderState wardenRenderState) { + public List getBioluminescentLayerModelParts(WardenRenderState renderState) { return this.bioluminescentLayerModelParts; } - public List getPulsatingSpotsLayerModelParts(WardenRenderState wardenRenderState) { + public List getPulsatingSpotsLayerModelParts(WardenRenderState renderState) { return this.pulsatingSpotsLayerModelParts; } } diff --git a/net/minecraft/client/model/WarmCowModel.java b/net/minecraft/client/model/WarmCowModel.java new file mode 100644 index 00000000..c8f6a462 --- /dev/null +++ b/net/minecraft/client/model/WarmCowModel.java @@ -0,0 +1,43 @@ +package net.minecraft.client.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; + +@Environment(EnvType.CLIENT) +public class WarmCowModel extends CowModel { + public WarmCowModel(ModelPart modelPart) { + super(modelPart); + } + + public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = createBaseCowModel(); + meshDefinition.getRoot() + .addOrReplaceChild( + "head", + CubeListBuilder.create() + .texOffs(0, 0) + .addBox(-4.0F, -4.0F, -6.0F, 8.0F, 8.0F, 6.0F) + .texOffs(1, 33) + .addBox(-3.0F, 1.0F, -7.0F, 6.0F, 3.0F, 1.0F) + .texOffs(27, 0) + .addBox(-8.0F, -3.0F, -5.0F, 4.0F, 2.0F, 2.0F) + .texOffs(39, 0) + .addBox(-8.0F, -5.0F, -5.0F, 2.0F, 2.0F, 2.0F) + .texOffs(27, 0) + .mirror() + .addBox(4.0F, -3.0F, -5.0F, 4.0F, 2.0F, 2.0F) + .mirror(false) + .texOffs(39, 0) + .mirror() + .addBox(6.0F, -5.0F, -5.0F, 2.0F, 2.0F, 2.0F) + .mirror(false), + PartPose.offset(0.0F, 4.0F, -8.0F) + ); + return LayerDefinition.create(meshDefinition, 64, 64); + } +} diff --git a/net/minecraft/client/model/WindChargeModel.java b/net/minecraft/client/model/WindChargeModel.java index 4bf7bfb4..4e0b0bbf 100644 --- a/net/minecraft/client/model/WindChargeModel.java +++ b/net/minecraft/client/model/WindChargeModel.java @@ -48,9 +48,9 @@ public class WindChargeModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.windCharge.yRot = -entityRenderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); - this.wind.yRot = entityRenderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.windCharge.yRot = -renderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); + this.wind.yRot = renderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/WitchModel.java b/net/minecraft/client/model/WitchModel.java index 7ec16d47..23b591d1 100644 --- a/net/minecraft/client/model/WitchModel.java +++ b/net/minecraft/client/model/WitchModel.java @@ -1,5 +1,6 @@ package net.minecraft.client.model; +import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.geom.ModelPart; @@ -13,13 +14,14 @@ import net.minecraft.client.renderer.entity.state.WitchRenderState; import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) -public class WitchModel extends EntityModel implements HeadedModel, VillagerHeadModel { +public class WitchModel extends EntityModel implements HeadedModel, VillagerLikeModel { protected final ModelPart nose; private final ModelPart head; private final ModelPart hat; private final ModelPart hatRim; private final ModelPart rightLeg; private final ModelPart leftLeg; + private final ModelPart arms; public WitchModel(ModelPart root) { super(root); @@ -29,6 +31,7 @@ public class WitchModel extends EntityModel implements HeadedM this.nose = this.head.getChild("nose"); this.rightLeg = root.getChild("right_leg"); this.leftLeg = root.getChild("left_leg"); + this.arms = root.getChild("arms"); } public static LayerDefinition createBodyLayer() { @@ -87,9 +90,15 @@ public class WitchModel extends EntityModel implements HeadedM } @Override - public void hatVisible(boolean visible) { - this.head.visible = visible; - this.hat.visible = visible; - this.hatRim.visible = visible; + public void hatVisible(boolean hatVisible) { + this.head.visible = hatVisible; + this.hat.visible = hatVisible; + this.hatRim.visible = hatVisible; + } + + @Override + public void translateToArms(PoseStack poseStack) { + this.root.translateAndRotate(poseStack); + this.arms.translateAndRotate(poseStack); } } diff --git a/net/minecraft/client/model/WitherBossModel.java b/net/minecraft/client/model/WitherBossModel.java index f2b4e795..0dcdeed0 100644 --- a/net/minecraft/client/model/WitherBossModel.java +++ b/net/minecraft/client/model/WitherBossModel.java @@ -81,8 +81,8 @@ public class WitherBossModel extends EntityModel { this.centerHead.xRot = witherRenderState.xRot * (float) (Math.PI / 180.0); } - private static void setupHeadRotation(WitherRenderState witherRenderState, ModelPart modelPart, int i) { - modelPart.yRot = (witherRenderState.yHeadRots[i] - witherRenderState.bodyRot) * (float) (Math.PI / 180.0); - modelPart.xRot = witherRenderState.xHeadRots[i] * (float) (Math.PI / 180.0); + private static void setupHeadRotation(WitherRenderState renderState, ModelPart head, int headIndex) { + head.yRot = (renderState.yHeadRots[headIndex] - renderState.bodyRot) * (float) (Math.PI / 180.0); + head.xRot = renderState.xHeadRots[headIndex] * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/ZombieModel.java b/net/minecraft/client/model/ZombieModel.java index 3eb67567..dc5d65c9 100644 --- a/net/minecraft/client/model/ZombieModel.java +++ b/net/minecraft/client/model/ZombieModel.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public class ZombieModel extends AbstractZombieModel { - public ZombieModel(ModelPart root) { - super(root); + public ZombieModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/ZombieVillagerModel.java b/net/minecraft/client/model/ZombieVillagerModel.java index 426272c2..9f709b18 100644 --- a/net/minecraft/client/model/ZombieVillagerModel.java +++ b/net/minecraft/client/model/ZombieVillagerModel.java @@ -1,5 +1,6 @@ package net.minecraft.client.model; +import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.geom.ModelPart; @@ -10,13 +11,14 @@ import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.ZombieVillagerRenderState; +import net.minecraft.world.entity.HumanoidArm; @Environment(EnvType.CLIENT) -public class ZombieVillagerModel extends HumanoidModel implements VillagerHeadModel { +public class ZombieVillagerModel extends HumanoidModel implements VillagerLikeModel { private final ModelPart hatRim = this.hat.getChild("hat_rim"); - public ZombieVillagerModel(ModelPart root) { - super(root); + public ZombieVillagerModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer() { @@ -87,9 +89,14 @@ public class ZombieVillagerModel extends Hu } @Override - public void hatVisible(boolean visible) { - this.head.visible = visible; - this.hat.visible = visible; - this.hatRim.visible = visible; + public void hatVisible(boolean hatVisible) { + this.head.visible = hatVisible; + this.hat.visible = hatVisible; + this.hatRim.visible = hatVisible; + } + + @Override + public void translateToArms(PoseStack poseStack) { + this.translateToHand(HumanoidArm.RIGHT, poseStack); } } diff --git a/net/minecraft/client/model/dragon/EnderDragonModel.java b/net/minecraft/client/model/dragon/EnderDragonModel.java index 10b0bb7b..f9b2843d 100644 --- a/net/minecraft/client/model/dragon/EnderDragonModel.java +++ b/net/minecraft/client/model/dragon/EnderDragonModel.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.entity.state.EnderDragonRenderState; import net.minecraft.util.Mth; -import net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory; +import net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory.Sample; @Environment(EnvType.CLIENT) public class EnderDragonModel extends EntityModel { @@ -39,28 +39,28 @@ public class EnderDragonModel extends EntityModel { private final ModelPart rightRearLegTip; private final ModelPart rightRearFoot; - private static String neckName(int i) { - return "neck" + i; + private static String neckName(int index) { + return "neck" + index; } - private static String tailName(int i) { - return "tail" + i; + private static String tailName(int index) { + return "tail" + index; } - public EnderDragonModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); + public EnderDragonModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); this.jaw = this.head.getChild("jaw"); for (int i = 0; i < this.neckParts.length; i++) { - this.neckParts[i] = modelPart.getChild(neckName(i)); + this.neckParts[i] = root.getChild(neckName(i)); } for (int i = 0; i < this.tailParts.length; i++) { - this.tailParts[i] = modelPart.getChild(tailName(i)); + this.tailParts[i] = root.getChild(tailName(i)); } - this.body = modelPart.getChild("body"); + this.body = root.getChild("body"); this.leftWing = this.body.getChild("left_wing"); this.leftWingTip = this.leftWing.getChild("left_wing_tip"); this.leftFrontLeg = this.body.getChild("left_front_leg"); @@ -214,13 +214,13 @@ public class EnderDragonModel extends EntityModel { float i = this.neckParts[0].y; float j = this.neckParts[0].z; float k = 1.5F; - DragonFlightHistory.Sample sample = enderDragonRenderState.getHistoricalPos(6); + Sample sample = enderDragonRenderState.getHistoricalPos(6); float l = Mth.wrapDegrees(enderDragonRenderState.getHistoricalPos(5).yRot() - enderDragonRenderState.getHistoricalPos(10).yRot()); float m = Mth.wrapDegrees(enderDragonRenderState.getHistoricalPos(5).yRot() + l / 2.0F); for (int n = 0; n < 5; n++) { ModelPart modelPart = this.neckParts[n]; - DragonFlightHistory.Sample sample2 = enderDragonRenderState.getHistoricalPos(5 - n); + Sample sample2 = enderDragonRenderState.getHistoricalPos(5 - n); float o = Mth.cos(n * 0.45F + f) * 0.15F; modelPart.yRot = Mth.wrapDegrees(sample2.yRot() - sample.yRot()) * (float) (Math.PI / 180.0) * 1.5F; modelPart.xRot = o + enderDragonRenderState.getHeadPartYOffset(n, sample, sample2) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; @@ -236,7 +236,7 @@ public class EnderDragonModel extends EntityModel { this.head.y = i; this.head.z = j; this.head.x = h; - DragonFlightHistory.Sample sample3 = enderDragonRenderState.getHistoricalPos(0); + Sample sample3 = enderDragonRenderState.getHistoricalPos(0); this.head.yRot = Mth.wrapDegrees(sample3.yRot() - sample.yRot()) * (float) (Math.PI / 180.0); this.head.xRot = Mth.wrapDegrees(enderDragonRenderState.getHeadPartYOffset(6, sample, sample3)) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; this.head.zRot = -Mth.wrapDegrees(sample3.yRot() - m) * (float) (Math.PI / 180.0); @@ -258,7 +258,7 @@ public class EnderDragonModel extends EntityModel { sample = enderDragonRenderState.getHistoricalPos(11); for (int q = 0; q < 12; q++) { - DragonFlightHistory.Sample sample4 = enderDragonRenderState.getHistoricalPos(12 + q); + Sample sample4 = enderDragonRenderState.getHistoricalPos(12 + q); p += Mth.sin(q * 0.45F + f) * 0.05F; ModelPart modelPart2 = this.tailParts[q]; modelPart2.yRot = (Mth.wrapDegrees(sample4.yRot() - sample.yRot()) * 1.5F + 180.0F) * (float) (Math.PI / 180.0); @@ -274,13 +274,13 @@ public class EnderDragonModel extends EntityModel { } private void poseLimbs( - float f, ModelPart modelPart, ModelPart modelPart2, ModelPart modelPart3, ModelPart modelPart4, ModelPart modelPart5, ModelPart modelPart6 + float flapAngle, ModelPart frontLeg, ModelPart frontLegTip, ModelPart frontFoot, ModelPart rearLeg, ModelPart rearLegTip, ModelPart rearFoot ) { - modelPart4.xRot = 1.0F + f * 0.1F; - modelPart5.xRot = 0.5F + f * 0.1F; - modelPart6.xRot = 0.75F + f * 0.1F; - modelPart.xRot = 1.3F + f * 0.1F; - modelPart2.xRot = -0.5F - f * 0.1F; - modelPart3.xRot = 0.75F + f * 0.1F; + rearLeg.xRot = 1.0F + flapAngle * 0.1F; + rearLegTip.xRot = 0.5F + flapAngle * 0.1F; + rearFoot.xRot = 0.75F + flapAngle * 0.1F; + frontLeg.xRot = 1.3F + flapAngle * 0.1F; + frontLegTip.xRot = -0.5F - flapAngle * 0.1F; + frontFoot.xRot = 0.75F + flapAngle * 0.1F; } } diff --git a/net/minecraft/client/model/geom/EntityModelSet.java b/net/minecraft/client/model/geom/EntityModelSet.java index 7e900bc4..3db62997 100644 --- a/net/minecraft/client/model/geom/EntityModelSet.java +++ b/net/minecraft/client/model/geom/EntityModelSet.java @@ -5,12 +5,15 @@ import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.geom.builders.LayerDefinition; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.server.packs.resources.ResourceManagerReloadListener; @Environment(EnvType.CLIENT) -public class EntityModelSet implements ResourceManagerReloadListener { - private Map roots = ImmutableMap.of(); +public class EntityModelSet { + public static final EntityModelSet EMPTY = new EntityModelSet(Map.of()); + private final Map roots; + + public EntityModelSet(Map roots) { + this.roots = roots; + } public ModelPart bakeLayer(ModelLayerLocation modelLayerLocation) { LayerDefinition layerDefinition = (LayerDefinition)this.roots.get(modelLayerLocation); @@ -21,8 +24,7 @@ public class EntityModelSet implements ResourceManagerReloadListener { } } - @Override - public void onResourceManagerReload(ResourceManager resourceManager) { - this.roots = ImmutableMap.copyOf(LayerDefinitions.createRoots()); + public static EntityModelSet vanilla() { + return new EntityModelSet(ImmutableMap.copyOf(LayerDefinitions.createRoots())); } } diff --git a/net/minecraft/client/model/geom/LayerDefinitions.java b/net/minecraft/client/model/geom/LayerDefinitions.java index d9446c1b..5b539a04 100644 --- a/net/minecraft/client/model/geom/LayerDefinitions.java +++ b/net/minecraft/client/model/geom/LayerDefinitions.java @@ -14,6 +14,8 @@ import net.minecraft.client.model.ArmorStandArmorModel; import net.minecraft.client.model.ArmorStandModel; import net.minecraft.client.model.ArrowModel; import net.minecraft.client.model.AxolotlModel; +import net.minecraft.client.model.BannerFlagModel; +import net.minecraft.client.model.BannerModel; import net.minecraft.client.model.BatModel; import net.minecraft.client.model.BeeModel; import net.minecraft.client.model.BeeStingerModel; @@ -24,10 +26,14 @@ import net.minecraft.client.model.BoggedModel; import net.minecraft.client.model.BookModel; import net.minecraft.client.model.BreezeModel; import net.minecraft.client.model.CamelModel; +import net.minecraft.client.model.CamelSaddleModel; import net.minecraft.client.model.CatModel; import net.minecraft.client.model.ChestModel; import net.minecraft.client.model.ChickenModel; import net.minecraft.client.model.CodModel; +import net.minecraft.client.model.ColdChickenModel; +import net.minecraft.client.model.ColdCowModel; +import net.minecraft.client.model.ColdPigModel; import net.minecraft.client.model.CowModel; import net.minecraft.client.model.CreakingModel; import net.minecraft.client.model.CreeperModel; @@ -38,7 +44,9 @@ import net.minecraft.client.model.ElytraModel; import net.minecraft.client.model.EndCrystalModel; import net.minecraft.client.model.EndermanModel; import net.minecraft.client.model.EndermiteModel; +import net.minecraft.client.model.EquineSaddleModel; import net.minecraft.client.model.EvokerFangsModel; +import net.minecraft.client.model.FelineModel; import net.minecraft.client.model.FoxModel; import net.minecraft.client.model.FrogModel; import net.minecraft.client.model.GhastModel; @@ -54,7 +62,6 @@ import net.minecraft.client.model.LeashKnotModel; import net.minecraft.client.model.LlamaModel; import net.minecraft.client.model.LlamaSpitModel; import net.minecraft.client.model.MinecartModel; -import net.minecraft.client.model.OcelotModel; import net.minecraft.client.model.PandaModel; import net.minecraft.client.model.ParrotModel; import net.minecraft.client.model.PhantomModel; @@ -95,6 +102,7 @@ import net.minecraft.client.model.TurtleModel; import net.minecraft.client.model.VexModel; import net.minecraft.client.model.VillagerModel; import net.minecraft.client.model.WardenModel; +import net.minecraft.client.model.WarmCowModel; import net.minecraft.client.model.WindChargeModel; import net.minecraft.client.model.WitchModel; import net.minecraft.client.model.WitherBossModel; @@ -105,7 +113,6 @@ import net.minecraft.client.model.dragon.EnderDragonModel; import net.minecraft.client.model.geom.builders.CubeDeformation; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshTransformer; -import net.minecraft.client.renderer.blockentity.BannerRenderer; import net.minecraft.client.renderer.blockentity.BedRenderer; import net.minecraft.client.renderer.blockentity.ConduitRenderer; import net.minecraft.client.renderer.blockentity.DecoratedPotRenderer; @@ -130,68 +137,76 @@ public class LayerDefinitions { LayerDefinition layerDefinition6 = SkullModel.createMobHeadLayer(); LayerDefinition layerDefinition7 = LayerDefinition.create(AbstractEquineModel.createBodyMesh(CubeDeformation.NONE), 64, 64); LayerDefinition layerDefinition8 = LayerDefinition.create(AbstractEquineModel.createBabyMesh(CubeDeformation.NONE), 64, 64); + LayerDefinition layerDefinition9 = EquineSaddleModel.createSaddleLayer(false); + LayerDefinition layerDefinition10 = EquineSaddleModel.createSaddleLayer(true); MeshTransformer meshTransformer = MeshTransformer.scaling(0.9375F); - LayerDefinition layerDefinition9 = IllagerModel.createBodyLayer().apply(meshTransformer); - LayerDefinition layerDefinition10 = AxolotlModel.createBodyLayer(); - LayerDefinition layerDefinition11 = BeeModel.createBodyLayer(); - LayerDefinition layerDefinition12 = CowModel.createBodyLayer(); - LayerDefinition layerDefinition13 = layerDefinition12.apply(CowModel.BABY_TRANSFORMER); - LayerDefinition layerDefinition14 = ElytraModel.createLayer(); - LayerDefinition layerDefinition15 = LayerDefinition.create(OcelotModel.createBodyMesh(CubeDeformation.NONE), 64, 32); - LayerDefinition layerDefinition16 = layerDefinition15.apply(CatModel.CAT_TRANSFORMER); - LayerDefinition layerDefinition17 = LayerDefinition.create(OcelotModel.createBodyMesh(new CubeDeformation(0.01F)), 64, 32).apply(CatModel.CAT_TRANSFORMER); - LayerDefinition layerDefinition18 = LayerDefinition.create(PiglinModel.createMesh(CubeDeformation.NONE), 64, 64); - LayerDefinition layerDefinition19 = LayerDefinition.create(PiglinHeadModel.createHeadModel(), 64, 64); - LayerDefinition layerDefinition20 = SkullModel.createHumanoidHeadLayer(); - LayerDefinition layerDefinition21 = LlamaModel.createBodyLayer(CubeDeformation.NONE); - LayerDefinition layerDefinition22 = LlamaModel.createBodyLayer(new CubeDeformation(0.5F)); - LayerDefinition layerDefinition23 = StriderModel.createBodyLayer(); - LayerDefinition layerDefinition24 = HoglinModel.createBodyLayer(); - LayerDefinition layerDefinition25 = HoglinModel.createBabyLayer(); - LayerDefinition layerDefinition26 = SkeletonModel.createBodyLayer(); - LayerDefinition layerDefinition27 = LayerDefinition.create(VillagerModel.createBodyModel(), 64, 64).apply(meshTransformer); - LayerDefinition layerDefinition28 = SpiderModel.createSpiderBodyLayer(); - LayerDefinition layerDefinition29 = ArmadilloModel.createBodyLayer(); - LayerDefinition layerDefinition30 = CamelModel.createBodyLayer(); - LayerDefinition layerDefinition31 = ChickenModel.createBodyLayer(); - LayerDefinition layerDefinition32 = GoatModel.createBodyLayer(); - LayerDefinition layerDefinition33 = PandaModel.createBodyLayer(); - LayerDefinition layerDefinition34 = PigModel.createBodyLayer(CubeDeformation.NONE); - LayerDefinition layerDefinition35 = PigModel.createBodyLayer(new CubeDeformation(0.5F)); - LayerDefinition layerDefinition36 = PolarBearModel.createBodyLayer(); - LayerDefinition layerDefinition37 = SheepModel.createBodyLayer(); - LayerDefinition layerDefinition38 = SheepFurModel.createFurLayer(); - LayerDefinition layerDefinition39 = SnifferModel.createBodyLayer(); - LayerDefinition layerDefinition40 = TurtleModel.createBodyLayer(); - LayerDefinition layerDefinition41 = LayerDefinition.create(WolfModel.createMeshDefinition(CubeDeformation.NONE), 64, 32); - LayerDefinition layerDefinition42 = LayerDefinition.create(WolfModel.createMeshDefinition(new CubeDeformation(0.2F)), 64, 32); - LayerDefinition layerDefinition43 = ZombieVillagerModel.createBodyLayer(); - LayerDefinition layerDefinition44 = ArmorStandModel.createBodyLayer(); - LayerDefinition layerDefinition45 = ArmorStandArmorModel.createBodyLayer(INNER_ARMOR_DEFORMATION); - LayerDefinition layerDefinition46 = ArmorStandArmorModel.createBodyLayer(OUTER_ARMOR_DEFORMATION); - LayerDefinition layerDefinition47 = DrownedModel.createBodyLayer(CubeDeformation.NONE); - LayerDefinition layerDefinition48 = DrownedModel.createBodyLayer(new CubeDeformation(0.25F)); - LayerDefinition layerDefinition49 = SquidModel.createBodyLayer(); - LayerDefinition layerDefinition50 = DolphinModel.createBodyLayer(); - LayerDefinition layerDefinition51 = SalmonModel.createBodyLayer(); + LayerDefinition layerDefinition11 = IllagerModel.createBodyLayer().apply(meshTransformer); + LayerDefinition layerDefinition12 = AxolotlModel.createBodyLayer(); + LayerDefinition layerDefinition13 = BeeModel.createBodyLayer(); + LayerDefinition layerDefinition14 = CowModel.createBodyLayer(); + LayerDefinition layerDefinition15 = ColdChickenModel.createBodyLayer(); + LayerDefinition layerDefinition16 = ColdCowModel.createBodyLayer(); + LayerDefinition layerDefinition17 = ColdPigModel.createBodyLayer(CubeDeformation.NONE); + LayerDefinition layerDefinition18 = ElytraModel.createLayer(); + LayerDefinition layerDefinition19 = LayerDefinition.create(FelineModel.createBodyMesh(CubeDeformation.NONE), 64, 32); + LayerDefinition layerDefinition20 = layerDefinition19.apply(FelineModel.BABY_TRANSFORMER); + LayerDefinition layerDefinition21 = LayerDefinition.create(FelineModel.createBodyMesh(new CubeDeformation(0.01F)), 64, 32); + LayerDefinition layerDefinition22 = LayerDefinition.create(PiglinModel.createMesh(CubeDeformation.NONE), 64, 64); + LayerDefinition layerDefinition23 = LayerDefinition.create(PiglinHeadModel.createHeadModel(), 64, 64); + LayerDefinition layerDefinition24 = SkullModel.createHumanoidHeadLayer(); + LayerDefinition layerDefinition25 = LlamaModel.createBodyLayer(CubeDeformation.NONE); + LayerDefinition layerDefinition26 = LlamaModel.createBodyLayer(new CubeDeformation(0.5F)); + LayerDefinition layerDefinition27 = StriderModel.createBodyLayer(); + LayerDefinition layerDefinition28 = HoglinModel.createBodyLayer(); + LayerDefinition layerDefinition29 = HoglinModel.createBabyLayer(); + LayerDefinition layerDefinition30 = SkeletonModel.createBodyLayer(); + LayerDefinition layerDefinition31 = LayerDefinition.create(VillagerModel.createBodyModel(), 64, 64).apply(meshTransformer); + LayerDefinition layerDefinition32 = SpiderModel.createSpiderBodyLayer(); + LayerDefinition layerDefinition33 = ArmadilloModel.createBodyLayer(); + LayerDefinition layerDefinition34 = CamelModel.createBodyLayer(); + LayerDefinition layerDefinition35 = CamelSaddleModel.createSaddleLayer(); + LayerDefinition layerDefinition36 = ChickenModel.createBodyLayer(); + LayerDefinition layerDefinition37 = GoatModel.createBodyLayer(); + LayerDefinition layerDefinition38 = PandaModel.createBodyLayer(); + LayerDefinition layerDefinition39 = PigModel.createBodyLayer(CubeDeformation.NONE); + LayerDefinition layerDefinition40 = PigModel.createBodyLayer(new CubeDeformation(0.5F)); + LayerDefinition layerDefinition41 = SheepModel.createBodyLayer(); + LayerDefinition layerDefinition42 = SheepFurModel.createFurLayer(); + LayerDefinition layerDefinition43 = SnifferModel.createBodyLayer(); + LayerDefinition layerDefinition44 = TurtleModel.createBodyLayer(); + LayerDefinition layerDefinition45 = WarmCowModel.createBodyLayer(); + LayerDefinition layerDefinition46 = LayerDefinition.create(WolfModel.createMeshDefinition(CubeDeformation.NONE), 64, 32); + LayerDefinition layerDefinition47 = LayerDefinition.create(WolfModel.createMeshDefinition(new CubeDeformation(0.2F)), 64, 32); + LayerDefinition layerDefinition48 = ZombieVillagerModel.createBodyLayer(); + LayerDefinition layerDefinition49 = ArmorStandModel.createBodyLayer(); + LayerDefinition layerDefinition50 = ArmorStandArmorModel.createBodyLayer(INNER_ARMOR_DEFORMATION); + LayerDefinition layerDefinition51 = ArmorStandArmorModel.createBodyLayer(OUTER_ARMOR_DEFORMATION); + LayerDefinition layerDefinition52 = DrownedModel.createBodyLayer(CubeDeformation.NONE); + LayerDefinition layerDefinition53 = DrownedModel.createBodyLayer(new CubeDeformation(0.25F)); + LayerDefinition layerDefinition54 = SquidModel.createBodyLayer(); + LayerDefinition layerDefinition55 = DolphinModel.createBodyLayer(); + LayerDefinition layerDefinition56 = SalmonModel.createBodyLayer(); builder.put(ModelLayers.ALLAY, AllayModel.createBodyLayer()); - builder.put(ModelLayers.ARMADILLO, layerDefinition29); - builder.put(ModelLayers.ARMADILLO_BABY, layerDefinition29.apply(ArmadilloModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ARMOR_STAND, layerDefinition44); - builder.put(ModelLayers.ARMOR_STAND_INNER_ARMOR, layerDefinition45); - builder.put(ModelLayers.ARMOR_STAND_OUTER_ARMOR, layerDefinition46); - builder.put(ModelLayers.ARMOR_STAND_SMALL, layerDefinition44.apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ARMOR_STAND_SMALL_INNER_ARMOR, layerDefinition45.apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ARMOR_STAND_SMALL_OUTER_ARMOR, layerDefinition46.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ARMADILLO, layerDefinition33); + builder.put(ModelLayers.ARMADILLO_BABY, layerDefinition33.apply(ArmadilloModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ARMOR_STAND, layerDefinition49); + builder.put(ModelLayers.ARMOR_STAND_INNER_ARMOR, layerDefinition50); + builder.put(ModelLayers.ARMOR_STAND_OUTER_ARMOR, layerDefinition51); + builder.put(ModelLayers.ARMOR_STAND_SMALL, layerDefinition49.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ARMOR_STAND_SMALL_INNER_ARMOR, layerDefinition50.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ARMOR_STAND_SMALL_OUTER_ARMOR, layerDefinition51.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ARROW, ArrowModel.createBodyLayer()); - builder.put(ModelLayers.AXOLOTL, layerDefinition10); - builder.put(ModelLayers.AXOLOTL_BABY, layerDefinition10.apply(AxolotlModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.BANNER, BannerRenderer.createBodyLayer()); + builder.put(ModelLayers.AXOLOTL, layerDefinition12); + builder.put(ModelLayers.AXOLOTL_BABY, layerDefinition12.apply(AxolotlModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.STANDING_BANNER, BannerModel.createBodyLayer(true)); + builder.put(ModelLayers.WALL_BANNER, BannerModel.createBodyLayer(false)); + builder.put(ModelLayers.STANDING_BANNER_FLAG, BannerFlagModel.createFlagLayer(true)); + builder.put(ModelLayers.WALL_BANNER_FLAG, BannerFlagModel.createFlagLayer(false)); builder.put(ModelLayers.BAT, BatModel.createBodyLayer()); builder.put(ModelLayers.BED_FOOT, BedRenderer.createFootLayer()); builder.put(ModelLayers.BED_HEAD, BedRenderer.createHeadLayer()); - builder.put(ModelLayers.BEE, layerDefinition11); - builder.put(ModelLayers.BEE_BABY, layerDefinition11.apply(BeeModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.BEE, layerDefinition13); + builder.put(ModelLayers.BEE_BABY, layerDefinition13.apply(BeeModel.BABY_TRANSFORMER)); builder.put(ModelLayers.BEE_STINGER, BeeStingerModel.createBodyLayer()); builder.put(ModelLayers.BELL, BellModel.createBodyLayer()); builder.put(ModelLayers.BLAZE, BlazeModel.createBodyLayer()); @@ -203,54 +218,64 @@ public class LayerDefinitions { builder.put(ModelLayers.BOOK, BookModel.createBodyLayer()); builder.put(ModelLayers.BREEZE, BreezeModel.createBodyLayer(32, 32)); builder.put(ModelLayers.BREEZE_WIND, BreezeModel.createBodyLayer(128, 128)); - builder.put(ModelLayers.CAT, layerDefinition16); - builder.put(ModelLayers.CAT_BABY, layerDefinition16.apply(CatModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.CAT_COLLAR, layerDefinition17); - builder.put(ModelLayers.CAT_BABY_COLLAR, layerDefinition17.apply(CatModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.CAMEL, layerDefinition30); - builder.put(ModelLayers.CAMEL_BABY, layerDefinition30.apply(CamelModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.CAVE_SPIDER, layerDefinition28.apply(MeshTransformer.scaling(0.7F))); + builder.put(ModelLayers.CAT, layerDefinition19.apply(CatModel.CAT_TRANSFORMER)); + builder.put(ModelLayers.CAT_BABY, layerDefinition20.apply(CatModel.CAT_TRANSFORMER)); + builder.put(ModelLayers.CAT_COLLAR, layerDefinition21.apply(CatModel.CAT_TRANSFORMER)); + builder.put(ModelLayers.CAT_BABY_COLLAR, layerDefinition21.apply(FelineModel.BABY_TRANSFORMER).apply(CatModel.CAT_TRANSFORMER)); + builder.put(ModelLayers.CAMEL, layerDefinition34); + builder.put(ModelLayers.CAMEL_BABY, layerDefinition34.apply(CamelModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.CAMEL_SADDLE, layerDefinition35); + builder.put(ModelLayers.CAMEL_BABY_SADDLE, layerDefinition35.apply(CamelModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.CAVE_SPIDER, layerDefinition32.apply(MeshTransformer.scaling(0.7F))); builder.put(ModelLayers.CHEST, ChestModel.createSingleBodyLayer()); builder.put(ModelLayers.CHEST_MINECART, layerDefinition5); - builder.put(ModelLayers.CHICKEN, layerDefinition31); - builder.put(ModelLayers.CHICKEN_BABY, layerDefinition31.apply(ChickenModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.CHICKEN, layerDefinition36); + builder.put(ModelLayers.CHICKEN_BABY, layerDefinition36.apply(ChickenModel.BABY_TRANSFORMER)); builder.put(ModelLayers.COD, CodModel.createBodyLayer()); + builder.put(ModelLayers.COLD_CHICKEN, layerDefinition15); + builder.put(ModelLayers.COLD_CHICKEN_BABY, layerDefinition15.apply(ChickenModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.COLD_COW, layerDefinition16); + builder.put(ModelLayers.COLD_COW_BABY, layerDefinition16.apply(CowModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.COLD_PIG, layerDefinition17); + builder.put(ModelLayers.COLD_PIG_BABY, layerDefinition17.apply(PigModel.BABY_TRANSFORMER)); builder.put(ModelLayers.COMMAND_BLOCK_MINECART, layerDefinition5); builder.put(ModelLayers.CONDUIT_EYE, ConduitRenderer.createEyeLayer()); builder.put(ModelLayers.CONDUIT_WIND, ConduitRenderer.createWindLayer()); builder.put(ModelLayers.CONDUIT_SHELL, ConduitRenderer.createShellLayer()); builder.put(ModelLayers.CONDUIT_CAGE, ConduitRenderer.createCageLayer()); - builder.put(ModelLayers.COW, layerDefinition12); - builder.put(ModelLayers.COW_BABY, layerDefinition13); + builder.put(ModelLayers.COW, layerDefinition14); + builder.put(ModelLayers.COW_BABY, layerDefinition14.apply(CowModel.BABY_TRANSFORMER)); builder.put(ModelLayers.CREAKING, CreakingModel.createBodyLayer()); builder.put(ModelLayers.CREEPER, CreeperModel.createBodyLayer(CubeDeformation.NONE)); builder.put(ModelLayers.CREEPER_ARMOR, CreeperModel.createBodyLayer(new CubeDeformation(2.0F))); builder.put(ModelLayers.CREEPER_HEAD, layerDefinition6); builder.put(ModelLayers.DECORATED_POT_BASE, DecoratedPotRenderer.createBaseLayer()); builder.put(ModelLayers.DECORATED_POT_SIDES, DecoratedPotRenderer.createSidesLayer()); - builder.put(ModelLayers.DOLPHIN, layerDefinition50); - builder.put(ModelLayers.DOLPHIN_BABY, layerDefinition50.apply(DolphinModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.DONKEY, DonkeyModel.createBodyLayer()); - builder.put(ModelLayers.DONKEY_BABY, DonkeyModel.createBabyLayer()); + builder.put(ModelLayers.DOLPHIN, layerDefinition55); + builder.put(ModelLayers.DOLPHIN_BABY, layerDefinition55.apply(DolphinModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.DONKEY, DonkeyModel.createBodyLayer(0.87F)); + builder.put(ModelLayers.DONKEY_BABY, DonkeyModel.createBabyLayer(0.87F)); + builder.put(ModelLayers.DONKEY_SADDLE, DonkeyModel.createSaddleLayer(0.87F, false)); + builder.put(ModelLayers.DONKEY_BABY_SADDLE, DonkeyModel.createSaddleLayer(0.87F, true)); builder.put(ModelLayers.DOUBLE_CHEST_LEFT, ChestModel.createDoubleBodyLeftLayer()); builder.put(ModelLayers.DOUBLE_CHEST_RIGHT, ChestModel.createDoubleBodyRightLayer()); builder.put(ModelLayers.DRAGON_SKULL, DragonHeadModel.createHeadLayer()); - builder.put(ModelLayers.DROWNED, layerDefinition47); + builder.put(ModelLayers.DROWNED, layerDefinition52); builder.put(ModelLayers.DROWNED_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.DROWNED_OUTER_ARMOR, layerDefinition4); - builder.put(ModelLayers.DROWNED_OUTER_LAYER, layerDefinition48); - builder.put(ModelLayers.DROWNED_BABY, layerDefinition47.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.DROWNED_OUTER_LAYER, layerDefinition53); + builder.put(ModelLayers.DROWNED_BABY, layerDefinition52.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.DROWNED_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.DROWNED_BABY_OUTER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.DROWNED_BABY_OUTER_LAYER, layerDefinition48.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.DROWNED_BABY_OUTER_LAYER, layerDefinition53.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ELDER_GUARDIAN, GuardianModel.createElderGuardianLayer()); - builder.put(ModelLayers.ELYTRA, layerDefinition14); - builder.put(ModelLayers.ELYTRA_BABY, layerDefinition14.apply(ElytraModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ELYTRA, layerDefinition18); + builder.put(ModelLayers.ELYTRA_BABY, layerDefinition18.apply(ElytraModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ENDERMAN, EndermanModel.createBodyLayer()); builder.put(ModelLayers.ENDERMITE, EndermiteModel.createBodyLayer()); builder.put(ModelLayers.ENDER_DRAGON, EnderDragonModel.createBodyLayer()); builder.put(ModelLayers.END_CRYSTAL, EndCrystalModel.createBodyLayer()); - builder.put(ModelLayers.EVOKER, layerDefinition9); + builder.put(ModelLayers.EVOKER, layerDefinition11); builder.put(ModelLayers.EVOKER_FANGS, EvokerFangsModel.createBodyLayer()); builder.put(ModelLayers.FOX, FoxModel.createBodyLayer()); builder.put(ModelLayers.FOX_BABY, FoxModel.createBodyLayer().apply(FoxModel.BABY_TRANSFORMER)); @@ -261,193 +286,214 @@ public class LayerDefinitions { builder.put(ModelLayers.GIANT, layerDefinition.apply(meshTransformer2)); builder.put(ModelLayers.GIANT_INNER_ARMOR, layerDefinition4.apply(meshTransformer2)); builder.put(ModelLayers.GIANT_OUTER_ARMOR, layerDefinition2.apply(meshTransformer2)); - builder.put(ModelLayers.GLOW_SQUID, layerDefinition49); - builder.put(ModelLayers.GLOW_SQUID_BABY, layerDefinition49.apply(SquidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.GOAT, layerDefinition32); - builder.put(ModelLayers.GOAT_BABY, layerDefinition32.apply(GoatModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.GLOW_SQUID, layerDefinition54); + builder.put(ModelLayers.GLOW_SQUID_BABY, layerDefinition54.apply(SquidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.GOAT, layerDefinition37); + builder.put(ModelLayers.GOAT_BABY, layerDefinition37.apply(GoatModel.BABY_TRANSFORMER)); builder.put(ModelLayers.GUARDIAN, GuardianModel.createBodyLayer()); - builder.put(ModelLayers.HOGLIN, layerDefinition24); - builder.put(ModelLayers.HOGLIN_BABY, layerDefinition25); + builder.put(ModelLayers.HOGLIN, layerDefinition28); + builder.put(ModelLayers.HOGLIN_BABY, layerDefinition29); builder.put(ModelLayers.HOPPER_MINECART, layerDefinition5); - builder.put(ModelLayers.HORSE, layerDefinition7); - builder.put(ModelLayers.HORSE_BABY, layerDefinition8); - builder.put(ModelLayers.HORSE_ARMOR, LayerDefinition.create(AbstractEquineModel.createBodyMesh(new CubeDeformation(0.1F)), 64, 64)); - builder.put(ModelLayers.HORSE_BABY_ARMOR, LayerDefinition.create(AbstractEquineModel.createBabyMesh(new CubeDeformation(0.1F)), 64, 64)); - MeshTransformer meshTransformer3 = MeshTransformer.scaling(1.0625F); - builder.put(ModelLayers.HUSK, layerDefinition.apply(meshTransformer3)); - builder.put(ModelLayers.HUSK_INNER_ARMOR, layerDefinition4.apply(meshTransformer3)); - builder.put(ModelLayers.HUSK_OUTER_ARMOR, layerDefinition2.apply(meshTransformer3)); - builder.put(ModelLayers.HUSK_BABY, layerDefinition.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer3)); - builder.put(ModelLayers.HUSK_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer3)); - builder.put(ModelLayers.HUSK_BABY_OUTER_ARMOR, layerDefinition2.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer3)); - builder.put(ModelLayers.ILLUSIONER, layerDefinition9); + MeshTransformer meshTransformer3 = MeshTransformer.scaling(1.1F); + builder.put(ModelLayers.HORSE, layerDefinition7.apply(meshTransformer3)); + builder.put(ModelLayers.HORSE_BABY, layerDefinition8.apply(meshTransformer3)); + builder.put(ModelLayers.HORSE_ARMOR, LayerDefinition.create(AbstractEquineModel.createBodyMesh(new CubeDeformation(0.1F)), 64, 64).apply(meshTransformer3)); + builder.put( + ModelLayers.HORSE_BABY_ARMOR, LayerDefinition.create(AbstractEquineModel.createBabyMesh(new CubeDeformation(0.1F)), 64, 64).apply(meshTransformer3) + ); + builder.put(ModelLayers.HORSE_SADDLE, layerDefinition9.apply(meshTransformer3)); + builder.put(ModelLayers.HORSE_BABY_SADDLE, layerDefinition10.apply(meshTransformer3)); + MeshTransformer meshTransformer4 = MeshTransformer.scaling(1.0625F); + builder.put(ModelLayers.HUSK, layerDefinition.apply(meshTransformer4)); + builder.put(ModelLayers.HUSK_INNER_ARMOR, layerDefinition4.apply(meshTransformer4)); + builder.put(ModelLayers.HUSK_OUTER_ARMOR, layerDefinition2.apply(meshTransformer4)); + builder.put(ModelLayers.HUSK_BABY, layerDefinition.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer4)); + builder.put(ModelLayers.HUSK_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer4)); + builder.put(ModelLayers.HUSK_BABY_OUTER_ARMOR, layerDefinition2.apply(HumanoidModel.BABY_TRANSFORMER).apply(meshTransformer4)); + builder.put(ModelLayers.ILLUSIONER, layerDefinition11); builder.put(ModelLayers.IRON_GOLEM, IronGolemModel.createBodyLayer()); builder.put(ModelLayers.LEASH_KNOT, LeashKnotModel.createBodyLayer()); - builder.put(ModelLayers.LLAMA, layerDefinition21); - builder.put(ModelLayers.LLAMA_BABY, layerDefinition21.apply(LlamaModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.LLAMA_DECOR, layerDefinition22); - builder.put(ModelLayers.LLAMA_BABY_DECOR, layerDefinition22.apply(LlamaModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.LLAMA, layerDefinition25); + builder.put(ModelLayers.LLAMA_BABY, layerDefinition25.apply(LlamaModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.LLAMA_DECOR, layerDefinition26); + builder.put(ModelLayers.LLAMA_BABY_DECOR, layerDefinition26.apply(LlamaModel.BABY_TRANSFORMER)); builder.put(ModelLayers.LLAMA_SPIT, LlamaSpitModel.createBodyLayer()); builder.put(ModelLayers.MAGMA_CUBE, LavaSlimeModel.createBodyLayer()); builder.put(ModelLayers.MINECART, layerDefinition5); - builder.put(ModelLayers.MOOSHROOM, layerDefinition12); - builder.put(ModelLayers.MOOSHROOM_BABY, layerDefinition13); - builder.put(ModelLayers.MULE, DonkeyModel.createBodyLayer()); - builder.put(ModelLayers.MULE_BABY, DonkeyModel.createBabyLayer()); - builder.put(ModelLayers.OCELOT, layerDefinition15); - builder.put(ModelLayers.OCELOT_BABY, layerDefinition15.apply(OcelotModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.PANDA, layerDefinition33); - builder.put(ModelLayers.PANDA_BABY, layerDefinition33.apply(PandaModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.MOOSHROOM, layerDefinition14); + builder.put(ModelLayers.MOOSHROOM_BABY, layerDefinition14.apply(CowModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.MULE, DonkeyModel.createBodyLayer(0.92F)); + builder.put(ModelLayers.MULE_BABY, DonkeyModel.createBabyLayer(0.92F)); + builder.put(ModelLayers.MULE_SADDLE, DonkeyModel.createSaddleLayer(0.92F, false)); + builder.put(ModelLayers.MULE_BABY_SADDLE, DonkeyModel.createSaddleLayer(0.92F, true)); + builder.put(ModelLayers.OCELOT, layerDefinition19); + builder.put(ModelLayers.OCELOT_BABY, layerDefinition20); + builder.put(ModelLayers.PANDA, layerDefinition38); + builder.put(ModelLayers.PANDA_BABY, layerDefinition38.apply(PandaModel.BABY_TRANSFORMER)); builder.put(ModelLayers.PARROT, ParrotModel.createBodyLayer()); builder.put(ModelLayers.PHANTOM, PhantomModel.createBodyLayer()); - builder.put(ModelLayers.PIG, layerDefinition34); - builder.put(ModelLayers.PIG_BABY, layerDefinition34.apply(PigModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.PIG_SADDLE, layerDefinition35); - builder.put(ModelLayers.PIG_BABY_SADDLE, layerDefinition35.apply(PigModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.PIGLIN, layerDefinition18); + builder.put(ModelLayers.PIG, layerDefinition39); + builder.put(ModelLayers.PIG_BABY, layerDefinition39.apply(PigModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.PIG_SADDLE, layerDefinition40); + builder.put(ModelLayers.PIG_BABY_SADDLE, layerDefinition40.apply(PigModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.PIGLIN, layerDefinition22); builder.put(ModelLayers.PIGLIN_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.PIGLIN_OUTER_ARMOR, layerDefinition3); - builder.put(ModelLayers.PIGLIN_BRUTE, layerDefinition18); + builder.put(ModelLayers.PIGLIN_BRUTE, layerDefinition22); builder.put(ModelLayers.PIGLIN_BRUTE_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.PIGLIN_BRUTE_OUTER_ARMOR, layerDefinition3); - builder.put(ModelLayers.PIGLIN_BABY, layerDefinition18.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.PIGLIN_BABY, layerDefinition22.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.PIGLIN_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.PIGLIN_BABY_OUTER_ARMOR, layerDefinition3.apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.PIGLIN_HEAD, layerDefinition19); - builder.put(ModelLayers.PILLAGER, layerDefinition9); + builder.put(ModelLayers.PIGLIN_HEAD, layerDefinition23); + builder.put(ModelLayers.PILLAGER, layerDefinition11); builder.put(ModelLayers.PLAYER, LayerDefinition.create(PlayerModel.createMesh(CubeDeformation.NONE, false), 64, 64)); builder.put(ModelLayers.PLAYER_EARS, PlayerEarsModel.createEarsLayer()); builder.put(ModelLayers.PLAYER_CAPE, PlayerCapeModel.createCapeLayer()); - builder.put(ModelLayers.PLAYER_HEAD, layerDefinition20); + builder.put(ModelLayers.PLAYER_HEAD, layerDefinition24); builder.put(ModelLayers.PLAYER_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.PLAYER_OUTER_ARMOR, layerDefinition2); builder.put(ModelLayers.PLAYER_SLIM, LayerDefinition.create(PlayerModel.createMesh(CubeDeformation.NONE, true), 64, 64)); builder.put(ModelLayers.PLAYER_SLIM_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.PLAYER_SLIM_OUTER_ARMOR, layerDefinition2); builder.put(ModelLayers.PLAYER_SPIN_ATTACK, SpinAttackEffectModel.createLayer()); - builder.put(ModelLayers.POLAR_BEAR, layerDefinition36); - builder.put(ModelLayers.POLAR_BEAR_BABY, layerDefinition36.apply(PolarBearModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.POLAR_BEAR, PolarBearModel.createBodyLayer(false)); + builder.put(ModelLayers.POLAR_BEAR_BABY, PolarBearModel.createBodyLayer(true)); builder.put(ModelLayers.PUFFERFISH_BIG, PufferfishBigModel.createBodyLayer()); builder.put(ModelLayers.PUFFERFISH_MEDIUM, PufferfishMidModel.createBodyLayer()); builder.put(ModelLayers.PUFFERFISH_SMALL, PufferfishSmallModel.createBodyLayer()); builder.put(ModelLayers.RABBIT, RabbitModel.createBodyLayer(false)); builder.put(ModelLayers.RABBIT_BABY, RabbitModel.createBodyLayer(true)); builder.put(ModelLayers.RAVAGER, RavagerModel.createBodyLayer()); - builder.put(ModelLayers.SALMON, layerDefinition51); - builder.put(ModelLayers.SALMON_SMALL, layerDefinition51.apply(SalmonModel.SMALL_TRANSFORMER)); - builder.put(ModelLayers.SALMON_LARGE, layerDefinition51.apply(SalmonModel.LARGE_TRANSFORMER)); - builder.put(ModelLayers.SHEEP, layerDefinition37); - builder.put(ModelLayers.SHEEP_BABY, layerDefinition37.apply(SheepModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.SHEEP_WOOL, layerDefinition38); - builder.put(ModelLayers.SHEEP_BABY_WOOL, layerDefinition38.apply(SheepModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.SALMON, layerDefinition56); + builder.put(ModelLayers.SALMON_SMALL, layerDefinition56.apply(SalmonModel.SMALL_TRANSFORMER)); + builder.put(ModelLayers.SALMON_LARGE, layerDefinition56.apply(SalmonModel.LARGE_TRANSFORMER)); + builder.put(ModelLayers.SHEEP, layerDefinition41); + builder.put(ModelLayers.SHEEP_BABY, layerDefinition41.apply(SheepModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.SHEEP_WOOL, layerDefinition42); + builder.put(ModelLayers.SHEEP_BABY_WOOL, layerDefinition42.apply(SheepModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.SHEEP_WOOL_UNDERCOAT, layerDefinition41); + builder.put(ModelLayers.SHEEP_BABY_WOOL_UNDERCOAT, layerDefinition41.apply(SheepModel.BABY_TRANSFORMER)); builder.put(ModelLayers.SHIELD, ShieldModel.createLayer()); builder.put(ModelLayers.SHULKER, ShulkerModel.createBodyLayer()); builder.put(ModelLayers.SHULKER_BOX, ShulkerModel.createBoxLayer()); builder.put(ModelLayers.SHULKER_BULLET, ShulkerBulletModel.createBodyLayer()); builder.put(ModelLayers.SILVERFISH, SilverfishModel.createBodyLayer()); - builder.put(ModelLayers.SKELETON, layerDefinition26); + builder.put(ModelLayers.SKELETON, layerDefinition30); builder.put(ModelLayers.SKELETON_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.SKELETON_OUTER_ARMOR, layerDefinition2); builder.put(ModelLayers.SKELETON_HORSE, layerDefinition7); builder.put(ModelLayers.SKELETON_HORSE_BABY, layerDefinition8); + builder.put(ModelLayers.SKELETON_HORSE_SADDLE, layerDefinition9); + builder.put(ModelLayers.SKELETON_HORSE_BABY_SADDLE, layerDefinition10); builder.put(ModelLayers.SKELETON_SKULL, layerDefinition6); builder.put(ModelLayers.SLIME, SlimeModel.createInnerBodyLayer()); builder.put(ModelLayers.SLIME_OUTER, SlimeModel.createOuterBodyLayer()); - builder.put(ModelLayers.SNIFFER, layerDefinition39); - builder.put(ModelLayers.SNIFFER_BABY, layerDefinition39.apply(SnifferModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.SNIFFER, layerDefinition43); + builder.put(ModelLayers.SNIFFER_BABY, layerDefinition43.apply(SnifferModel.BABY_TRANSFORMER)); builder.put(ModelLayers.SNOW_GOLEM, SnowGolemModel.createBodyLayer()); builder.put(ModelLayers.SPAWNER_MINECART, layerDefinition5); - builder.put(ModelLayers.SPIDER, layerDefinition28); - builder.put(ModelLayers.SQUID, layerDefinition49); - builder.put(ModelLayers.SQUID_BABY, layerDefinition49.apply(SquidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.STRAY, layerDefinition26); + builder.put(ModelLayers.SPIDER, layerDefinition32); + builder.put(ModelLayers.SQUID, layerDefinition54); + builder.put(ModelLayers.SQUID_BABY, layerDefinition54.apply(SquidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.STRAY, layerDefinition30); builder.put(ModelLayers.STRAY_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.STRAY_OUTER_ARMOR, layerDefinition2); builder.put(ModelLayers.STRAY_OUTER_LAYER, LayerDefinition.create(HumanoidModel.createMesh(new CubeDeformation(0.25F), 0.0F), 64, 32)); - builder.put(ModelLayers.STRIDER, layerDefinition23); - builder.put(ModelLayers.STRIDER_SADDLE, layerDefinition23); + builder.put(ModelLayers.STRIDER, layerDefinition27); + builder.put(ModelLayers.STRIDER_SADDLE, layerDefinition27); + builder.put(ModelLayers.STRIDER_BABY, layerDefinition27.apply(StriderModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.STRIDER_BABY_SADDLE, layerDefinition27.apply(StriderModel.BABY_TRANSFORMER)); builder.put(ModelLayers.TADPOLE, TadpoleModel.createBodyLayer()); builder.put(ModelLayers.TNT_MINECART, layerDefinition5); - builder.put(ModelLayers.TRADER_LLAMA, layerDefinition21); - builder.put(ModelLayers.TRADER_LLAMA_BABY, layerDefinition21.apply(LlamaModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.TRADER_LLAMA, layerDefinition25); + builder.put(ModelLayers.TRADER_LLAMA_BABY, layerDefinition25.apply(LlamaModel.BABY_TRANSFORMER)); builder.put(ModelLayers.TRIDENT, TridentModel.createLayer()); builder.put(ModelLayers.TROPICAL_FISH_LARGE, TropicalFishModelB.createBodyLayer(CubeDeformation.NONE)); builder.put(ModelLayers.TROPICAL_FISH_LARGE_PATTERN, TropicalFishModelB.createBodyLayer(FISH_PATTERN_DEFORMATION)); builder.put(ModelLayers.TROPICAL_FISH_SMALL, TropicalFishModelA.createBodyLayer(CubeDeformation.NONE)); builder.put(ModelLayers.TROPICAL_FISH_SMALL_PATTERN, TropicalFishModelA.createBodyLayer(FISH_PATTERN_DEFORMATION)); - builder.put(ModelLayers.TURTLE, layerDefinition40); - builder.put(ModelLayers.TURTLE_BABY, layerDefinition40.apply(TurtleModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.TURTLE, layerDefinition44); + builder.put(ModelLayers.TURTLE_BABY, layerDefinition44.apply(TurtleModel.BABY_TRANSFORMER)); builder.put(ModelLayers.VEX, VexModel.createBodyLayer()); - builder.put(ModelLayers.VILLAGER, layerDefinition27); - builder.put(ModelLayers.VINDICATOR, layerDefinition9); + builder.put(ModelLayers.VILLAGER, layerDefinition31); + builder.put(ModelLayers.VILLAGER_BABY, layerDefinition31.apply(VillagerModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.VINDICATOR, layerDefinition11); builder.put(ModelLayers.WARDEN, WardenModel.createBodyLayer()); - builder.put(ModelLayers.WANDERING_TRADER, layerDefinition27); + builder.put(ModelLayers.WARM_COW, layerDefinition45); + builder.put(ModelLayers.WARM_COW_BABY, layerDefinition45.apply(CowModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.WANDERING_TRADER, layerDefinition31); builder.put(ModelLayers.WIND_CHARGE, WindChargeModel.createBodyLayer()); builder.put(ModelLayers.WITCH, WitchModel.createBodyLayer().apply(meshTransformer)); builder.put(ModelLayers.WITHER, WitherBossModel.createBodyLayer(CubeDeformation.NONE)); builder.put(ModelLayers.WITHER_ARMOR, WitherBossModel.createBodyLayer(INNER_ARMOR_DEFORMATION)); builder.put(ModelLayers.WITHER_SKULL, WitherSkullRenderer.createSkullLayer()); - MeshTransformer meshTransformer4 = MeshTransformer.scaling(1.2F); - builder.put(ModelLayers.WITHER_SKELETON, layerDefinition26.apply(meshTransformer4)); - builder.put(ModelLayers.WITHER_SKELETON_INNER_ARMOR, layerDefinition4.apply(meshTransformer4)); - builder.put(ModelLayers.WITHER_SKELETON_OUTER_ARMOR, layerDefinition2.apply(meshTransformer4)); + MeshTransformer meshTransformer5 = MeshTransformer.scaling(1.2F); + builder.put(ModelLayers.WITHER_SKELETON, layerDefinition30.apply(meshTransformer5)); + builder.put(ModelLayers.WITHER_SKELETON_INNER_ARMOR, layerDefinition4.apply(meshTransformer5)); + builder.put(ModelLayers.WITHER_SKELETON_OUTER_ARMOR, layerDefinition2.apply(meshTransformer5)); builder.put(ModelLayers.WITHER_SKELETON_SKULL, layerDefinition6); - builder.put(ModelLayers.WOLF, layerDefinition41); - builder.put(ModelLayers.WOLF_ARMOR, layerDefinition42); - builder.put(ModelLayers.WOLF_BABY, layerDefinition41.apply(WolfModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.WOLF_BABY_ARMOR, layerDefinition42.apply(WolfModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ZOGLIN, layerDefinition24); - builder.put(ModelLayers.ZOGLIN_BABY, layerDefinition25); + builder.put(ModelLayers.WOLF, layerDefinition46); + builder.put(ModelLayers.WOLF_ARMOR, layerDefinition47); + builder.put(ModelLayers.WOLF_BABY, layerDefinition46.apply(WolfModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.WOLF_BABY_ARMOR, layerDefinition47.apply(WolfModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ZOGLIN, layerDefinition28); + builder.put(ModelLayers.ZOGLIN_BABY, layerDefinition29); builder.put(ModelLayers.ZOMBIE, layerDefinition); builder.put(ModelLayers.ZOMBIE_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.ZOMBIE_OUTER_ARMOR, layerDefinition2); builder.put(ModelLayers.ZOMBIE_BABY, layerDefinition.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIE_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIE_BABY_OUTER_ARMOR, layerDefinition2.apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ZOMBIE_HEAD, layerDefinition20); + builder.put(ModelLayers.ZOMBIE_HEAD, layerDefinition24); builder.put(ModelLayers.ZOMBIE_HORSE, layerDefinition7); builder.put(ModelLayers.ZOMBIE_HORSE_BABY, layerDefinition8); - builder.put(ModelLayers.ZOMBIE_VILLAGER, layerDefinition43); + builder.put(ModelLayers.ZOMBIE_HORSE_SADDLE, layerDefinition9); + builder.put(ModelLayers.ZOMBIE_HORSE_BABY_SADDLE, layerDefinition10); + builder.put(ModelLayers.ZOMBIE_VILLAGER, layerDefinition48); builder.put(ModelLayers.ZOMBIE_VILLAGER_INNER_ARMOR, ZombieVillagerModel.createArmorLayer(INNER_ARMOR_DEFORMATION)); builder.put(ModelLayers.ZOMBIE_VILLAGER_OUTER_ARMOR, ZombieVillagerModel.createArmorLayer(OUTER_ARMOR_DEFORMATION)); - builder.put(ModelLayers.ZOMBIE_VILLAGER_BABY, layerDefinition43.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ZOMBIE_VILLAGER_BABY, layerDefinition48.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIE_VILLAGER_BABY_INNER_ARMOR, ZombieVillagerModel.createArmorLayer(INNER_ARMOR_DEFORMATION).apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIE_VILLAGER_BABY_OUTER_ARMOR, ZombieVillagerModel.createArmorLayer(OUTER_ARMOR_DEFORMATION).apply(HumanoidModel.BABY_TRANSFORMER)); - builder.put(ModelLayers.ZOMBIFIED_PIGLIN, layerDefinition18); + builder.put(ModelLayers.ZOMBIFIED_PIGLIN, layerDefinition22); builder.put(ModelLayers.ZOMBIFIED_PIGLIN_INNER_ARMOR, layerDefinition4); builder.put(ModelLayers.ZOMBIFIED_PIGLIN_OUTER_ARMOR, layerDefinition3); - builder.put(ModelLayers.ZOMBIFIED_PIGLIN_BABY, layerDefinition18.apply(HumanoidModel.BABY_TRANSFORMER)); + builder.put(ModelLayers.ZOMBIFIED_PIGLIN_BABY, layerDefinition22.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIFIED_PIGLIN_BABY_INNER_ARMOR, layerDefinition4.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.ZOMBIFIED_PIGLIN_BABY_OUTER_ARMOR, layerDefinition3.apply(HumanoidModel.BABY_TRANSFORMER)); builder.put(ModelLayers.BAMBOO_RAFT, RaftModel.createRaftModel()); builder.put(ModelLayers.BAMBOO_CHEST_RAFT, RaftModel.createChestRaftModel()); - LayerDefinition layerDefinition52 = BoatModel.createBoatModel(); - LayerDefinition layerDefinition53 = BoatModel.createChestBoatModel(); - builder.put(ModelLayers.OAK_BOAT, layerDefinition52); - builder.put(ModelLayers.OAK_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.SPRUCE_BOAT, layerDefinition52); - builder.put(ModelLayers.SPRUCE_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.BIRCH_BOAT, layerDefinition52); - builder.put(ModelLayers.BIRCH_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.JUNGLE_BOAT, layerDefinition52); - builder.put(ModelLayers.JUNGLE_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.ACACIA_BOAT, layerDefinition52); - builder.put(ModelLayers.ACACIA_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.CHERRY_BOAT, layerDefinition52); - builder.put(ModelLayers.CHERRY_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.DARK_OAK_BOAT, layerDefinition52); - builder.put(ModelLayers.DARK_OAK_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.PALE_OAK_BOAT, layerDefinition52); - builder.put(ModelLayers.PALE_OAK_CHEST_BOAT, layerDefinition53); - builder.put(ModelLayers.MANGROVE_BOAT, layerDefinition52); - builder.put(ModelLayers.MANGROVE_CHEST_BOAT, layerDefinition53); - LayerDefinition layerDefinition54 = SignRenderer.createSignLayer(true); - LayerDefinition layerDefinition55 = SignRenderer.createSignLayer(false); - LayerDefinition layerDefinition56 = HangingSignRenderer.createHangingSignLayer(); + LayerDefinition layerDefinition57 = BoatModel.createBoatModel(); + LayerDefinition layerDefinition58 = BoatModel.createChestBoatModel(); + builder.put(ModelLayers.OAK_BOAT, layerDefinition57); + builder.put(ModelLayers.OAK_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.SPRUCE_BOAT, layerDefinition57); + builder.put(ModelLayers.SPRUCE_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.BIRCH_BOAT, layerDefinition57); + builder.put(ModelLayers.BIRCH_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.JUNGLE_BOAT, layerDefinition57); + builder.put(ModelLayers.JUNGLE_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.ACACIA_BOAT, layerDefinition57); + builder.put(ModelLayers.ACACIA_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.CHERRY_BOAT, layerDefinition57); + builder.put(ModelLayers.CHERRY_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.DARK_OAK_BOAT, layerDefinition57); + builder.put(ModelLayers.DARK_OAK_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.PALE_OAK_BOAT, layerDefinition57); + builder.put(ModelLayers.PALE_OAK_CHEST_BOAT, layerDefinition58); + builder.put(ModelLayers.MANGROVE_BOAT, layerDefinition57); + builder.put(ModelLayers.MANGROVE_CHEST_BOAT, layerDefinition58); + LayerDefinition layerDefinition59 = SignRenderer.createSignLayer(true); + LayerDefinition layerDefinition60 = SignRenderer.createSignLayer(false); WoodType.values().forEach(woodType -> { - builder.put(ModelLayers.createStandingSignModelName(woodType), layerDefinition54); - builder.put(ModelLayers.createWallSignModelName(woodType), layerDefinition55); - builder.put(ModelLayers.createHangingSignModelName(woodType), layerDefinition56); + builder.put(ModelLayers.createStandingSignModelName(woodType), layerDefinition59); + builder.put(ModelLayers.createWallSignModelName(woodType), layerDefinition60); + + for (HangingSignRenderer.AttachmentType attachmentType : HangingSignRenderer.AttachmentType.values()) { + LayerDefinition layerDefinition3x = HangingSignRenderer.createHangingSignLayer(attachmentType); + builder.put(ModelLayers.createHangingSignModelName(woodType, attachmentType), layerDefinition3x); + } }); ImmutableMap immutableMap = builder.build(); List list = (List)ModelLayers.getKnownLocations() diff --git a/net/minecraft/client/model/geom/ModelLayers.java b/net/minecraft/client/model/geom/ModelLayers.java index 3ed19654..bb5061e0 100644 --- a/net/minecraft/client/model/geom/ModelLayers.java +++ b/net/minecraft/client/model/geom/ModelLayers.java @@ -5,6 +5,7 @@ import java.util.Set; import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.blockentity.HangingSignRenderer; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.state.properties.WoodType; @@ -28,7 +29,10 @@ public class ModelLayers { public static final ModelLayerLocation AXOLOTL_BABY = register("axolotl_baby"); public static final ModelLayerLocation BAMBOO_CHEST_RAFT = register("chest_boat/bamboo"); public static final ModelLayerLocation BAMBOO_RAFT = register("boat/bamboo"); - public static final ModelLayerLocation BANNER = register("banner"); + public static final ModelLayerLocation STANDING_BANNER = register("standing_banner"); + public static final ModelLayerLocation STANDING_BANNER_FLAG = register("standing_banner", "flag"); + public static final ModelLayerLocation WALL_BANNER = register("wall_banner"); + public static final ModelLayerLocation WALL_BANNER_FLAG = register("wall_banner", "flag"); public static final ModelLayerLocation BAT = register("bat"); public static final ModelLayerLocation BED_FOOT = register("bed_foot"); public static final ModelLayerLocation BED_HEAD = register("bed_head"); @@ -49,6 +53,8 @@ public class ModelLayers { public static final ModelLayerLocation BREEZE_WIND = register("breeze_wind"); public static final ModelLayerLocation CAMEL = register("camel"); public static final ModelLayerLocation CAMEL_BABY = register("camel_baby"); + public static final ModelLayerLocation CAMEL_SADDLE = register("camel", "saddle"); + public static final ModelLayerLocation CAMEL_BABY_SADDLE = register("camel_baby", "saddle"); public static final ModelLayerLocation CAT = register("cat"); public static final ModelLayerLocation CAT_BABY = register("cat_baby"); public static final ModelLayerLocation CAT_BABY_COLLAR = register("cat_baby", "collar"); @@ -61,6 +67,12 @@ public class ModelLayers { public static final ModelLayerLocation CHICKEN = register("chicken"); public static final ModelLayerLocation CHICKEN_BABY = register("chicken_baby"); public static final ModelLayerLocation COD = register("cod"); + public static final ModelLayerLocation COLD_CHICKEN = register("cold_chicken"); + public static final ModelLayerLocation COLD_CHICKEN_BABY = register("cold_chicken_baby"); + public static final ModelLayerLocation COLD_COW = register("cold_cow"); + public static final ModelLayerLocation COLD_COW_BABY = register("cold_cow_baby"); + public static final ModelLayerLocation COLD_PIG = register("cold_pig"); + public static final ModelLayerLocation COLD_PIG_BABY = register("cold_pig_baby"); public static final ModelLayerLocation COMMAND_BLOCK_MINECART = register("command_block_minecart"); public static final ModelLayerLocation CONDUIT_CAGE = register("conduit", "cage"); public static final ModelLayerLocation CONDUIT_EYE = register("conduit", "eye"); @@ -80,6 +92,8 @@ public class ModelLayers { public static final ModelLayerLocation DOLPHIN_BABY = register("dolphin_baby"); public static final ModelLayerLocation DONKEY = register("donkey"); public static final ModelLayerLocation DONKEY_BABY = register("donkey_baby"); + public static final ModelLayerLocation DONKEY_SADDLE = register("donkey", "saddle"); + public static final ModelLayerLocation DONKEY_BABY_SADDLE = register("donkey_baby", "saddle"); public static final ModelLayerLocation DOUBLE_CHEST_LEFT = register("double_chest_left"); public static final ModelLayerLocation DOUBLE_CHEST_RIGHT = register("double_chest_right"); public static final ModelLayerLocation DRAGON_SKULL = register("dragon_skull"); @@ -118,8 +132,10 @@ public class ModelLayers { public static final ModelLayerLocation HOPPER_MINECART = register("hopper_minecart"); public static final ModelLayerLocation HORSE = register("horse"); public static final ModelLayerLocation HORSE_ARMOR = register("horse_armor"); + public static final ModelLayerLocation HORSE_SADDLE = register("horse", "saddle"); public static final ModelLayerLocation HORSE_BABY = register("horse_baby"); public static final ModelLayerLocation HORSE_BABY_ARMOR = register("horse_armor_baby"); + public static final ModelLayerLocation HORSE_BABY_SADDLE = register("horse_baby", "saddle"); public static final ModelLayerLocation HUSK = register("husk"); public static final ModelLayerLocation HUSK_BABY = register("husk_baby"); public static final ModelLayerLocation HUSK_BABY_INNER_ARMOR = registerInnerArmor("husk_baby"); @@ -144,6 +160,8 @@ public class ModelLayers { public static final ModelLayerLocation MOOSHROOM_BABY = register("mooshroom_baby"); public static final ModelLayerLocation MULE = register("mule"); public static final ModelLayerLocation MULE_BABY = register("mule_baby"); + public static final ModelLayerLocation MULE_SADDLE = register("mule", "saddle"); + public static final ModelLayerLocation MULE_BABY_SADDLE = register("mule_baby", "saddle"); public static final ModelLayerLocation OAK_BOAT = register("boat/oak"); public static final ModelLayerLocation OAK_CHEST_BOAT = register("chest_boat/oak"); public static final ModelLayerLocation OCELOT = register("ocelot"); @@ -194,6 +212,8 @@ public class ModelLayers { public static final ModelLayerLocation SHEEP_BABY = register("sheep_baby"); public static final ModelLayerLocation SHEEP_BABY_WOOL = register("sheep_baby", "wool"); public static final ModelLayerLocation SHEEP_WOOL = register("sheep", "wool"); + public static final ModelLayerLocation SHEEP_WOOL_UNDERCOAT = register("sheep", "wool_undercoat"); + public static final ModelLayerLocation SHEEP_BABY_WOOL_UNDERCOAT = register("sheep_baby", "wool_undercoat"); public static final ModelLayerLocation SHIELD = register("shield"); public static final ModelLayerLocation SHULKER = register("shulker"); public static final ModelLayerLocation SHULKER_BOX = register("shulker_box"); @@ -202,6 +222,8 @@ public class ModelLayers { public static final ModelLayerLocation SKELETON = register("skeleton"); public static final ModelLayerLocation SKELETON_HORSE = register("skeleton_horse"); public static final ModelLayerLocation SKELETON_HORSE_BABY = register("skeleton_horse_baby"); + public static final ModelLayerLocation SKELETON_HORSE_SADDLE = register("skeleton_horse", "saddle"); + public static final ModelLayerLocation SKELETON_HORSE_BABY_SADDLE = register("skeleton_horse_baby", "saddle"); public static final ModelLayerLocation SKELETON_INNER_ARMOR = registerInnerArmor("skeleton"); public static final ModelLayerLocation SKELETON_OUTER_ARMOR = registerOuterArmor("skeleton"); public static final ModelLayerLocation SKELETON_SKULL = register("skeleton_skull"); @@ -222,6 +244,8 @@ public class ModelLayers { public static final ModelLayerLocation STRAY_OUTER_LAYER = register("stray", "outer"); public static final ModelLayerLocation STRIDER = register("strider"); public static final ModelLayerLocation STRIDER_SADDLE = register("strider", "saddle"); + public static final ModelLayerLocation STRIDER_BABY = register("strider_baby"); + public static final ModelLayerLocation STRIDER_BABY_SADDLE = register("strider_baby", "saddle"); public static final ModelLayerLocation TADPOLE = register("tadpole"); public static final ModelLayerLocation TNT_MINECART = register("tnt_minecart"); public static final ModelLayerLocation TRADER_LLAMA = register("trader_llama"); @@ -235,9 +259,12 @@ public class ModelLayers { public static final ModelLayerLocation TURTLE_BABY = register("turtle_baby"); public static final ModelLayerLocation VEX = register("vex"); public static final ModelLayerLocation VILLAGER = register("villager"); + public static final ModelLayerLocation VILLAGER_BABY = register("villager_baby"); public static final ModelLayerLocation VINDICATOR = register("vindicator"); public static final ModelLayerLocation WANDERING_TRADER = register("wandering_trader"); public static final ModelLayerLocation WARDEN = register("warden"); + public static final ModelLayerLocation WARM_COW = register("warm_cow"); + public static final ModelLayerLocation WARM_COW_BABY = register("warm_cow_baby"); public static final ModelLayerLocation WIND_CHARGE = register("wind_charge"); public static final ModelLayerLocation WITCH = register("witch"); public static final ModelLayerLocation WITHER = register("wither"); @@ -260,6 +287,8 @@ public class ModelLayers { public static final ModelLayerLocation ZOMBIE_HEAD = register("zombie_head"); public static final ModelLayerLocation ZOMBIE_HORSE = register("zombie_horse"); public static final ModelLayerLocation ZOMBIE_HORSE_BABY = register("zombie_horse_baby"); + public static final ModelLayerLocation ZOMBIE_HORSE_SADDLE = register("zombie_horse", "saddle"); + public static final ModelLayerLocation ZOMBIE_HORSE_BABY_SADDLE = register("zombie_horse_baby", "saddle"); public static final ModelLayerLocation ZOMBIE_INNER_ARMOR = registerInnerArmor("zombie"); public static final ModelLayerLocation ZOMBIE_OUTER_ARMOR = registerOuterArmor("zombie"); public static final ModelLayerLocation ZOMBIE_VILLAGER = register("zombie_villager"); @@ -308,8 +337,8 @@ public class ModelLayers { return createLocation("sign/wall/" + woodType.name(), "main"); } - public static ModelLayerLocation createHangingSignModelName(WoodType woodType) { - return createLocation("hanging_sign/" + woodType.name(), "main"); + public static ModelLayerLocation createHangingSignModelName(WoodType woodType, HangingSignRenderer.AttachmentType attachmentType) { + return createLocation("hanging_sign/" + woodType.name() + "/" + attachmentType.getSerializedName(), "main"); } public static Stream getKnownLocations() { diff --git a/net/minecraft/client/model/geom/ModelPart.java b/net/minecraft/client/model/geom/ModelPart.java index c0576774..50cef141 100644 --- a/net/minecraft/client/model/geom/ModelPart.java +++ b/net/minecraft/client/model/geom/ModelPart.java @@ -126,9 +126,9 @@ public final class ModelPart { } } - public void rotateBy(Quaternionf quaternionf) { + public void rotateBy(Quaternionf quaternion) { Matrix3f matrix3f = new Matrix3f().rotationZYX(this.zRot, this.yRot, this.xRot); - Matrix3f matrix3f2 = matrix3f.rotate(quaternionf); + Matrix3f matrix3f2 = matrix3f.rotate(quaternion); Vector3f vector3f = matrix3f2.getEulerAnglesZYX(new Vector3f()); this.setRotation(vector3f.x, vector3f.y, vector3f.z); } diff --git a/net/minecraft/client/model/geom/PartNames.java b/net/minecraft/client/model/geom/PartNames.java index 53bbdf6d..c1713482 100644 --- a/net/minecraft/client/model/geom/PartNames.java +++ b/net/minecraft/client/model/geom/PartNames.java @@ -57,6 +57,7 @@ public class PartNames { public static final String MANE = "mane"; public static final String NECK = "neck"; public static final String MOUTH = "mouth"; + public static final String UPPER_MOUTH = "upper_mouth"; public static final String HEAD = "head"; public static final String HAT = "hat"; public static final String BODY = "body"; diff --git a/net/minecraft/client/model/geom/PartPose.java b/net/minecraft/client/model/geom/PartPose.java index 4684df6f..a4c03826 100644 --- a/net/minecraft/client/model/geom/PartPose.java +++ b/net/minecraft/client/model/geom/PartPose.java @@ -19,19 +19,19 @@ public record PartPose(float x, float y, float z, float xRot, float yRot, float return new PartPose(x, y, z, xRot, yRot, zRot, 1.0F, 1.0F, 1.0F); } - public PartPose translated(float f, float g, float h) { - return new PartPose(this.x + f, this.y + g, this.z + h, this.xRot, this.yRot, this.zRot, this.xScale, this.yScale, this.zScale); + public PartPose translated(float x, float y, float z) { + return new PartPose(this.x + x, this.y + y, this.z + z, this.xRot, this.yRot, this.zRot, this.xScale, this.yScale, this.zScale); } - public PartPose withScale(float f) { - return new PartPose(this.x, this.y, this.z, this.xRot, this.yRot, this.zRot, f, f, f); + public PartPose withScale(float scale) { + return new PartPose(this.x, this.y, this.z, this.xRot, this.yRot, this.zRot, scale, scale, scale); } - public PartPose scaled(float f) { - return f == 1.0F ? this : this.scaled(f, f, f); + public PartPose scaled(float scale) { + return scale == 1.0F ? this : this.scaled(scale, scale, scale); } - public PartPose scaled(float f, float g, float h) { - return new PartPose(this.x * f, this.y * g, this.z * h, this.xRot, this.yRot, this.zRot, this.xScale * f, this.yScale * g, this.zScale * h); + public PartPose scaled(float x, float y, float z) { + return new PartPose(this.x * x, this.y * y, this.z * z, this.xRot, this.yRot, this.zRot, this.xScale * x, this.yScale * y, this.zScale * z); } } diff --git a/net/minecraft/client/model/geom/builders/LayerDefinition.java b/net/minecraft/client/model/geom/builders/LayerDefinition.java index 089d75ea..28314693 100644 --- a/net/minecraft/client/model/geom/builders/LayerDefinition.java +++ b/net/minecraft/client/model/geom/builders/LayerDefinition.java @@ -14,8 +14,8 @@ public class LayerDefinition { this.material = material; } - public LayerDefinition apply(MeshTransformer meshTransformer) { - return new LayerDefinition(meshTransformer.apply(this.mesh), this.material); + public LayerDefinition apply(MeshTransformer transformer) { + return new LayerDefinition(transformer.apply(this.mesh), this.material); } public ModelPart bakeRoot() { diff --git a/net/minecraft/client/model/geom/builders/MeshDefinition.java b/net/minecraft/client/model/geom/builders/MeshDefinition.java index 6eb1fc52..c6529430 100644 --- a/net/minecraft/client/model/geom/builders/MeshDefinition.java +++ b/net/minecraft/client/model/geom/builders/MeshDefinition.java @@ -14,15 +14,19 @@ public class MeshDefinition { this(new PartDefinition(ImmutableList.of(), PartPose.ZERO)); } - private MeshDefinition(PartDefinition partDefinition) { - this.root = partDefinition; + private MeshDefinition(PartDefinition root) { + this.root = root; } public PartDefinition getRoot() { return this.root; } - public MeshDefinition transformed(UnaryOperator unaryOperator) { - return new MeshDefinition(this.root.transformed(unaryOperator)); + public MeshDefinition transformed(UnaryOperator transformer) { + return new MeshDefinition(this.root.transformed(transformer)); + } + + public MeshDefinition apply(MeshTransformer transformer) { + return transformer.apply(this); } } diff --git a/net/minecraft/client/model/geom/builders/MeshTransformer.java b/net/minecraft/client/model/geom/builders/MeshTransformer.java index 6cb61008..4a811751 100644 --- a/net/minecraft/client/model/geom/builders/MeshTransformer.java +++ b/net/minecraft/client/model/geom/builders/MeshTransformer.java @@ -6,6 +6,8 @@ import net.fabricmc.api.Environment; @FunctionalInterface @Environment(EnvType.CLIENT) public interface MeshTransformer { + MeshTransformer IDENTITY = meshDefinition -> meshDefinition; + static MeshTransformer scaling(float f) { float g = 24.016F * (1.0F - f); return meshDefinition -> meshDefinition.transformed(partPose -> partPose.scaled(f).translated(0.0F, g, 0.0F)); diff --git a/net/minecraft/client/model/geom/builders/PartDefinition.java b/net/minecraft/client/model/geom/builders/PartDefinition.java index 590c0d5d..7816f224 100644 --- a/net/minecraft/client/model/geom/builders/PartDefinition.java +++ b/net/minecraft/client/model/geom/builders/PartDefinition.java @@ -1,6 +1,5 @@ package net.minecraft.client.model.geom.builders; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; import java.util.List; @@ -30,17 +29,22 @@ public class PartDefinition { return this.addOrReplaceChild(name, partDefinition); } - public PartDefinition addOrReplaceChild(String string, PartDefinition partDefinition) { - PartDefinition partDefinition2 = (PartDefinition)this.children.put(string, partDefinition); - if (partDefinition2 != null) { - partDefinition.children.putAll(partDefinition2.children); + public PartDefinition addOrReplaceChild(String name, PartDefinition chuld) { + PartDefinition partDefinition = (PartDefinition)this.children.put(name, chuld); + if (partDefinition != null) { + chuld.children.putAll(partDefinition.children); } - return partDefinition; + return chuld; } - public PartDefinition clearChild(String string) { - return this.addOrReplaceChild(string, CubeListBuilder.create(), PartPose.ZERO); + public PartDefinition clearChild(String name) { + PartDefinition partDefinition = (PartDefinition)this.children.get(name); + if (partDefinition == null) { + throw new IllegalArgumentException("No child with name: " + name); + } else { + return this.addOrReplaceChild(name, CubeListBuilder.create(), partDefinition.partPose); + } } public ModelPart bake(int texWidth, int texHeight) { @@ -52,10 +56,7 @@ public class PartDefinition { Entry::getKey, entry -> ((PartDefinition)entry.getValue()).bake(texWidth, texHeight), (modelPartx, modelPart2) -> modelPartx, Object2ObjectArrayMap::new ) ); - List list = (List)this.cubes - .stream() - .map(cubeDefinition -> cubeDefinition.bake(texWidth, texHeight)) - .collect(ImmutableList.toImmutableList()); + List list = this.cubes.stream().map(cubeDefinition -> cubeDefinition.bake(texWidth, texHeight)).toList(); ModelPart modelPart = new ModelPart(list, object2ObjectArrayMap); modelPart.setInitialPose(this.partPose); modelPart.loadPose(this.partPose); @@ -70,8 +71,8 @@ public class PartDefinition { return this.children.entrySet(); } - public PartDefinition transformed(UnaryOperator unaryOperator) { - PartDefinition partDefinition = new PartDefinition(this.cubes, (PartPose)unaryOperator.apply(this.partPose)); + public PartDefinition transformed(UnaryOperator transformer) { + PartDefinition partDefinition = new PartDefinition(this.cubes, (PartPose)transformer.apply(this.partPose)); partDefinition.children.putAll(this.children); return partDefinition; } diff --git a/net/minecraft/client/multiplayer/CacheSlot.java b/net/minecraft/client/multiplayer/CacheSlot.java new file mode 100644 index 00000000..011519d7 --- /dev/null +++ b/net/minecraft/client/multiplayer/CacheSlot.java @@ -0,0 +1,42 @@ +package net.minecraft.client.multiplayer; + +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CacheSlot, D> { + private final Function operation; + @Nullable + private C context; + @Nullable + private D value; + + public CacheSlot(Function operation) { + this.operation = operation; + } + + public D compute(C context) { + if (context == this.context && this.value != null) { + return this.value; + } else { + D object = (D)this.operation.apply(context); + this.value = object; + this.context = context; + context.registerForCleaning(this); + return object; + } + } + + public void clear() { + this.value = null; + this.context = null; + } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface Cleaner> { + void registerForCleaning(CacheSlot cacheSlot); + } +} diff --git a/net/minecraft/client/multiplayer/ClientAdvancements.java b/net/minecraft/client/multiplayer/ClientAdvancements.java index d5b96f05..66c5460c 100644 --- a/net/minecraft/client/multiplayer/ClientAdvancements.java +++ b/net/minecraft/client/multiplayer/ClientAdvancements.java @@ -63,7 +63,7 @@ public class ClientAdvancements { } Optional optional = advancementNode.advancement().display(); - if (optional.isPresent() && ((DisplayInfo)optional.get()).shouldShowToast()) { + if (packet.shouldShowAdvancements() && optional.isPresent() && ((DisplayInfo)optional.get()).shouldShowToast()) { this.minecraft.getToastManager().addToast(new AdvancementToast(advancementNode.holder())); } } diff --git a/net/minecraft/client/multiplayer/ClientChunkCache.java b/net/minecraft/client/multiplayer/ClientChunkCache.java index ec9d220b..8ebb73c1 100644 --- a/net/minecraft/client/multiplayer/ClientChunkCache.java +++ b/net/minecraft/client/multiplayer/ClientChunkCache.java @@ -5,6 +5,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet; import java.io.FileOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Map; import java.util.concurrent.atomic.AtomicReferenceArray; import java.util.function.BooleanSupplier; import java.util.function.Consumer; @@ -13,9 +14,8 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.core.SectionPos; import net.minecraft.core.registries.Registries; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.BlockEntityTagOutput; +import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.LightLayer; @@ -25,6 +25,7 @@ import net.minecraft.world.level.chunk.EmptyLevelChunk; import net.minecraft.world.level.chunk.LevelChunk; import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.lighting.LevelLightEngine; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -69,15 +70,15 @@ public class ClientChunkCache extends ChunkSource { } @Nullable - public LevelChunk getChunk(int x, int z, ChunkStatus chunkStatus, boolean requireChunk) { - if (this.storage.inRange(x, z)) { - LevelChunk levelChunk = this.storage.getChunk(this.storage.getIndex(x, z)); - if (isValidChunk(levelChunk, x, z)) { + public LevelChunk getChunk(int i, int j, ChunkStatus chunkStatus, boolean bl) { + if (this.storage.inRange(i, j)) { + LevelChunk levelChunk = this.storage.getChunk(this.storage.getIndex(i, j)); + if (isValidChunk(levelChunk, i, j)) { return levelChunk; } } - return requireChunk ? this.emptyChunk : null; + return bl ? this.emptyChunk : null; } @Override @@ -100,7 +101,9 @@ public class ClientChunkCache extends ChunkSource { } @Nullable - public LevelChunk replaceWithPacketData(int x, int z, FriendlyByteBuf buffer, CompoundTag tag, Consumer consumer) { + public LevelChunk replaceWithPacketData( + int x, int z, FriendlyByteBuf readBuffer, Map heightmaps, Consumer consumer + ) { if (!this.storage.inRange(x, z)) { LOGGER.warn("Ignoring chunk since it's not in the view range: {}, {}", x, z); return null; @@ -110,10 +113,11 @@ public class ClientChunkCache extends ChunkSource { ChunkPos chunkPos = new ChunkPos(x, z); if (!isValidChunk(levelChunk, x, z)) { levelChunk = new LevelChunk(this.level, chunkPos); - levelChunk.replaceWithPacketData(buffer, tag, consumer); + levelChunk.replaceWithPacketData(readBuffer, heightmaps, consumer); this.storage.replace(i, levelChunk); } else { - levelChunk.replaceWithPacketData(buffer, tag, consumer); + levelChunk.replaceWithPacketData(readBuffer, heightmaps, consumer); + this.storage.refreshEmptySections(levelChunk); } this.level.onChunkLoaded(chunkPos); @@ -176,8 +180,8 @@ public class ClientChunkCache extends ChunkSource { } @Override - public void onSectionEmptinessChanged(int i, int j, int k, boolean bl) { - this.storage.onSectionEmptinessChanged(i, j, k, bl); + public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) { + this.storage.onSectionEmptinessChanged(x, y, z, isEmpty); } @Environment(EnvType.CLIENT) @@ -214,19 +218,19 @@ public class ClientChunkCache extends ChunkSource { } } - void drop(int i, LevelChunk levelChunk) { - if (this.chunks.compareAndSet(i, levelChunk, null)) { + void drop(int chunkIndex, LevelChunk chunk) { + if (this.chunks.compareAndSet(chunkIndex, chunk, null)) { this.chunkCount--; - this.dropEmptySections(levelChunk); + this.dropEmptySections(chunk); } - ClientChunkCache.this.level.unload(levelChunk); + ClientChunkCache.this.level.unload(chunk); } - public void onSectionEmptinessChanged(int i, int j, int k, boolean bl) { - if (this.inRange(i, k)) { - long l = SectionPos.asLong(i, j, k); - if (bl) { + public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) { + if (this.inRange(x, z)) { + long l = SectionPos.asLong(x, y, z); + if (isEmpty) { this.loadedEmptySections.add(l); } else if (this.loadedEmptySections.remove(l)) { ClientChunkCache.this.level.onSectionBecomingNonEmpty(l); @@ -234,23 +238,38 @@ public class ClientChunkCache extends ChunkSource { } } - private void dropEmptySections(LevelChunk levelChunk) { - LevelChunkSection[] levelChunkSections = levelChunk.getSections(); + private void dropEmptySections(LevelChunk chunk) { + LevelChunkSection[] levelChunkSections = chunk.getSections(); for (int i = 0; i < levelChunkSections.length; i++) { - ChunkPos chunkPos = levelChunk.getPos(); - this.loadedEmptySections.remove(SectionPos.asLong(chunkPos.x, levelChunk.getSectionYFromSectionIndex(i), chunkPos.z)); + ChunkPos chunkPos = chunk.getPos(); + this.loadedEmptySections.remove(SectionPos.asLong(chunkPos.x, chunk.getSectionYFromSectionIndex(i), chunkPos.z)); } } - private void addEmptySections(LevelChunk levelChunk) { - LevelChunkSection[] levelChunkSections = levelChunk.getSections(); + private void addEmptySections(LevelChunk chunk) { + LevelChunkSection[] levelChunkSections = chunk.getSections(); for (int i = 0; i < levelChunkSections.length; i++) { LevelChunkSection levelChunkSection = levelChunkSections[i]; if (levelChunkSection.hasOnlyAir()) { - ChunkPos chunkPos = levelChunk.getPos(); - this.loadedEmptySections.add(SectionPos.asLong(chunkPos.x, levelChunk.getSectionYFromSectionIndex(i), chunkPos.z)); + ChunkPos chunkPos = chunk.getPos(); + this.loadedEmptySections.add(SectionPos.asLong(chunkPos.x, chunk.getSectionYFromSectionIndex(i), chunkPos.z)); + } + } + } + + void refreshEmptySections(LevelChunk chunk) { + ChunkPos chunkPos = chunk.getPos(); + LevelChunkSection[] levelChunkSections = chunk.getSections(); + + for (int i = 0; i < levelChunkSections.length; i++) { + LevelChunkSection levelChunkSection = levelChunkSections[i]; + long l = SectionPos.asLong(chunkPos.x, chunk.getSectionYFromSectionIndex(i), chunkPos.z); + if (levelChunkSection.hasOnlyAir()) { + this.loadedEmptySections.add(l); + } else if (this.loadedEmptySections.remove(l)) { + ClientChunkCache.this.level.onSectionBecomingNonEmpty(l); } } } diff --git a/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java b/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java index 41c8fcda..eccbac7d 100644 --- a/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientConfigurationPacketListenerImpl.java @@ -7,8 +7,8 @@ import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.components.ChatComponent; -import net.minecraft.core.RegistryAccess; +import net.minecraft.client.gui.components.ChatComponent.State; +import net.minecraft.core.RegistryAccess.Frozen; import net.minecraft.network.Connection; import net.minecraft.network.DisconnectionDetails; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -38,12 +38,12 @@ public class ClientConfigurationPacketListenerImpl extends ClientCommonPacketLis private static final Logger LOGGER = LogUtils.getLogger(); private final GameProfile localGameProfile; private FeatureFlagSet enabledFeatures; - private final RegistryAccess.Frozen receivedRegistries; + private final Frozen receivedRegistries; private final RegistryDataCollector registryDataCollector = new RegistryDataCollector(); @Nullable private KnownPacksManager knownPacks; @Nullable - protected ChatComponent.State chatState; + protected State chatState; public ClientConfigurationPacketListenerImpl(Minecraft minecraft, Connection connection, CommonListenerCookie commonListenerCookie) { super(minecraft, connection, commonListenerCookie); @@ -116,7 +116,7 @@ public class ClientConfigurationPacketListenerImpl extends ClientCommonPacketLis @Override public void handleConfigurationFinished(ClientboundFinishConfigurationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - RegistryAccess.Frozen frozen = this.runWithResources( + Frozen frozen = this.runWithResources( resourceProvider -> this.registryDataCollector.collectGameRegistries(resourceProvider, this.receivedRegistries, this.connection.isMemoryConnection()) ); this.connection @@ -141,7 +141,12 @@ public class ClientConfigurationPacketListenerImpl extends ClientCommonPacketLis ) ); this.connection.send(ServerboundFinishConfigurationPacket.INSTANCE); - this.connection.setupOutboundProtocol(GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(frozen))); + this.connection.setupOutboundProtocol(GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(frozen), new GameProtocols.Context() { + @Override + public boolean hasInfiniteMaterials() { + return true; + } + })); } @Override diff --git a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java index af6506d0..d93dbbb7 100644 --- a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java @@ -175,9 +175,9 @@ public class ClientHandshakePacketListenerImpl implements ClientLoginPacketListe } @Override - public void handleLoginFinished(ClientboundLoginFinishedPacket clientboundLoginFinishedPacket) { + public void handleLoginFinished(ClientboundLoginFinishedPacket packet) { this.switchState(ClientHandshakePacketListenerImpl.State.JOINING); - GameProfile gameProfile = clientboundLoginFinishedPacket.gameProfile(); + GameProfile gameProfile = packet.gameProfile(); this.connection .setupInboundProtocol( ConfigurationProtocols.CLIENTBOUND, diff --git a/net/minecraft/client/multiplayer/ClientLevel.java b/net/minecraft/client/multiplayer/ClientLevel.java index da937330..767d696d 100644 --- a/net/minecraft/client/multiplayer/ClientLevel.java +++ b/net/minecraft/client/multiplayer/ClientLevel.java @@ -6,6 +6,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Queues; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; +import java.util.Arrays; import java.util.Deque; import java.util.List; import java.util.Map; @@ -22,8 +23,9 @@ import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.color.block.BlockTintCache; import net.minecraft.client.multiplayer.prediction.BlockStatePredictionHandler; -import net.minecraft.client.particle.FireworkParticles; +import net.minecraft.client.particle.FireworkParticles.Starter; import net.minecraft.client.player.AbstractClientPlayer; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.BiomeColors; import net.minecraft.client.renderer.DimensionSpecialEffects; import net.minecraft.client.renderer.LevelEventHandler; @@ -56,6 +58,9 @@ import net.minecraft.world.Difficulty; import net.minecraft.world.TickRateManager; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntitySelector; +import net.minecraft.world.entity.boss.EnderDragonPart; +import net.minecraft.world.entity.boss.enderdragon.EnderDragon; import net.minecraft.world.entity.player.Player; import net.minecraft.world.flag.FeatureFlagSet; import net.minecraft.world.item.BlockItem; @@ -89,6 +94,7 @@ import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.saveddata.maps.MapId; import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import net.minecraft.world.level.storage.WritableLevelData; +import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.scores.Scoreboard; @@ -98,7 +104,7 @@ import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class ClientLevel extends Level { +public class ClientLevel extends Level implements CacheSlot.Cleaner { private static final Logger LOGGER = LogUtils.getLogger(); private static final double FLUID_PARTICLE_SPAWN_OFFSET = 0.05; private static final int NORMAL_LIGHT_UPDATES_PER_FRAME = 10; @@ -113,6 +119,7 @@ public class ClientLevel extends Level { private final TickRateManager tickRateManager; private final Minecraft minecraft = Minecraft.getInstance(); final List players = Lists.newArrayList(); + final List dragonParts = Lists.newArrayList(); private final Map mapData = Maps.newHashMap(); private static final int CLOUD_COLOR = -1; private int skyFlashTime; @@ -125,6 +132,9 @@ public class ClientLevel extends Level { object2ObjectArrayMap.put( BiomeColors.FOLIAGE_COLOR_RESOLVER, new BlockTintCache(blockPos -> this.calculateBlockTint(blockPos, BiomeColors.FOLIAGE_COLOR_RESOLVER)) ); + object2ObjectArrayMap.put( + BiomeColors.DRY_FOLIAGE_COLOR_RESOLVER, new BlockTintCache(blockPos -> this.calculateBlockTint(blockPos, BiomeColors.DRY_FOLIAGE_COLOR_RESOLVER)) + ); object2ObjectArrayMap.put( BiomeColors.WATER_COLOR_RESOLVER, new BlockTintCache(blockPos -> this.calculateBlockTint(blockPos, BiomeColors.WATER_COLOR_RESOLVER)) ); @@ -154,7 +164,7 @@ public class ClientLevel extends Level { this.setBlock(pos, state, 19); Player player = this.minecraft.player; if (this == player.level() && player.isColliding(pos, state)) { - player.absMoveTo(playerPos.x, playerPos.y, playerPos.z); + player.absSnapTo(playerPos.x, playerPos.y, playerPos.z); } } } @@ -179,28 +189,28 @@ public class ClientLevel extends Level { } public ClientLevel( - ClientPacketListener clientPacketListener, - ClientLevel.ClientLevelData clientLevelData, - ResourceKey resourceKey, - Holder holder, - int i, - int j, + ClientPacketListener connection, + ClientLevel.ClientLevelData levelData, + ResourceKey dimension, + Holder dimensionTypeRegistration, + int viewDistance, + int serverSimulationDistance, LevelRenderer levelRenderer, - boolean bl, - long l, - int k + boolean isDebug, + long biomeZoomSeed, + int seaLevel ) { - super(clientLevelData, resourceKey, clientPacketListener.registryAccess(), holder, true, bl, l, 1000000); - this.connection = clientPacketListener; - this.chunkSource = new ClientChunkCache(this, i); + super(levelData, dimension, connection.registryAccess(), dimensionTypeRegistration, true, isDebug, biomeZoomSeed, 1000000); + this.connection = connection; + this.chunkSource = new ClientChunkCache(this, viewDistance); this.tickRateManager = new TickRateManager(); - this.clientLevelData = clientLevelData; + this.clientLevelData = levelData; this.levelRenderer = levelRenderer; - this.seaLevel = k; + this.seaLevel = seaLevel; this.levelEventHandler = new LevelEventHandler(this.minecraft, this, levelRenderer); - this.effects = DimensionSpecialEffects.forType(holder.value()); + this.effects = DimensionSpecialEffects.forType(dimensionTypeRegistration.value()); this.setDefaultSpawnPos(new BlockPos(8, 64, 8), 0.0F); - this.serverSimulationDistance = j; + this.serverSimulationDistance = serverSimulationDistance; this.updateSkyBrightness(); this.prepareWeather(); } @@ -253,10 +263,10 @@ public class ClientLevel extends Level { } } - public void setTimeFromServer(long l, long m, boolean bl) { - this.clientLevelData.setGameTime(l); - this.clientLevelData.setDayTime(m); - this.tickDayTime = bl; + public void setTimeFromServer(long gameTime, long dayTime, boolean tickDayTime) { + this.clientLevelData.setGameTime(gameTime); + this.clientLevelData.setDayTime(dayTime); + this.tickDayTime = tickDayTime; } public Iterable entitiesForRendering() { @@ -319,11 +329,10 @@ public class ClientLevel extends Level { public void onChunkLoaded(ChunkPos chunkPos) { this.tintCaches.forEach((colorResolver, blockTintCache) -> blockTintCache.invalidateForChunk(chunkPos.x, chunkPos.z)); this.entityStorage.startTicking(chunkPos); - this.levelRenderer.onChunkLoaded(chunkPos); } - public void onSectionBecomingNonEmpty(long l) { - this.levelRenderer.onSectionBecomingNonEmpty(l); + public void onSectionBecomingNonEmpty(long sectionPos) { + this.levelRenderer.onSectionBecomingNonEmpty(sectionPos); } public void clearTintCaches() { @@ -352,6 +361,17 @@ public class ClientLevel extends Level { } } + @Override + public List getPushableEntities(Entity entity, AABB boundingBox) { + LocalPlayer localPlayer = this.minecraft.player; + return localPlayer != null + && localPlayer != entity + && localPlayer.getBoundingBox().intersects(boundingBox) + && EntitySelector.pushableBy(entity).test(localPlayer) + ? List.of(localPlayer) + : List.of(); + } + @Nullable @Override public Entity getEntity(int id) { @@ -486,28 +506,35 @@ public class ClientLevel extends Level { @Override public void playSeededSound( - @Nullable Player player, double x, double y, double z, Holder sound, SoundSource category, float volume, float pitch, long seed + @Nullable Entity entity, double x, double y, double z, Holder sound, SoundSource source, float volume, float pitch, long seed ) { - if (player == this.minecraft.player) { - this.playSound(x, y, z, sound.value(), category, volume, pitch, false, seed); + if (entity == this.minecraft.player) { + this.playSound(x, y, z, sound.value(), source, volume, pitch, false, seed); } } @Override - public void playSeededSound(@Nullable Player player, Entity entity, Holder sound, SoundSource category, float volume, float pitch, long seed) { - if (player == this.minecraft.player) { - this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(sound.value(), category, volume, pitch, entity, seed)); + public void playSeededSound(@Nullable Entity entity, Entity sourceEntity, Holder sound, SoundSource source, float volume, float pitch, long seed) { + if (entity == this.minecraft.player) { + this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(sound.value(), source, volume, pitch, sourceEntity, seed)); } } @Override - public void playLocalSound(Entity entity, SoundEvent sound, SoundSource category, float volume, float pitch) { - this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(sound, category, volume, pitch, entity, this.random.nextLong())); + public void playLocalSound(Entity entity, SoundEvent sound, SoundSource source, float volume, float pitch) { + this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(sound, source, volume, pitch, entity, this.random.nextLong())); } @Override - public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource category, float volume, float pitch, boolean distanceDelay) { - this.playSound(x, y, z, sound, category, volume, pitch, distanceDelay, this.random.nextLong()); + public void playPlayerSound(SoundEvent sound, SoundSource source, float volume, float pitch) { + if (this.minecraft.player != null) { + this.minecraft.getSoundManager().play(new EntityBoundSoundInstance(sound, source, volume, pitch, this.minecraft.player, this.random.nextLong())); + } + } + + @Override + public void playLocalSound(double x, double y, double z, SoundEvent sound, SoundSource source, float volume, float pitch, boolean distanceDelay) { + this.playSound(x, y, z, sound, source, volume, pitch, distanceDelay, this.random.nextLong()); } private void playSound(double x, double y, double z, SoundEvent soundEvent, SoundSource source, float volume, float pitch, boolean distanceDelay, long seed) { @@ -528,7 +555,7 @@ public class ClientLevel extends Level { this.addParticle(ParticleTypes.POOF, x, y, z, this.random.nextGaussian() * 0.05, 0.005, this.random.nextGaussian() * 0.05); } } else { - this.minecraft.particleEngine.add(new FireworkParticles.Starter(this, x, y, z, xSpeed, ySpeed, zSpeed, this.minecraft.particleEngine, explosions)); + this.minecraft.particleEngine.add(new Starter(this, x, y, z, xSpeed, ySpeed, zSpeed, this.minecraft.particleEngine, explosions)); } } @@ -574,15 +601,6 @@ public class ClientLevel extends Level { this.mapData.put(mapId, mapData); } - @Override - public void setMapData(MapId mapId, MapItemSavedData mapData) { - } - - @Override - public MapId getFreeMapId() { - return new MapId(0); - } - @Override public Scoreboard getScoreboard() { return this.connection.scoreboard(); @@ -602,8 +620,8 @@ public class ClientLevel extends Level { this.levelRenderer.setSectionDirtyWithNeighbors(sectionX, sectionY, sectionZ); } - public void setSectionRangeDirty(int i, int j, int k, int l, int m, int n) { - this.levelRenderer.setSectionRangeDirty(i, j, k, l, m, n); + public void setSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) { + this.levelRenderer.setSectionRangeDirty(minY, minX, minZ, maxY, maxX, maxZ); } @Override @@ -617,14 +635,14 @@ public class ClientLevel extends Level { } @Override - public void levelEvent(@Nullable Player player, int type, BlockPos pos, int data) { + public void levelEvent(@Nullable Entity entity, int type, BlockPos pos, int data) { try { this.levelEventHandler.levelEvent(type, pos, data); } catch (Throwable var8) { CrashReport crashReport = CrashReport.forThrowable(var8, "Playing level event"); CrashReportCategory crashReportCategory = crashReport.addCategory("Level event being played"); crashReportCategory.setDetail("Block coordinates", CrashReportCategory.formatLocation(this, pos)); - crashReportCategory.setDetail("Event source", player); + crashReportCategory.setDetail("Event source", entity); crashReportCategory.setDetail("Event type", type); crashReportCategory.setDetail("Event data", data); throw new ReportedException(crashReport); @@ -632,25 +650,25 @@ public class ClientLevel extends Level { } @Override - public void addParticle(ParticleOptions particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - this.levelRenderer.addParticle(particleData, particleData.getType().getOverrideLimiter(), x, y, z, xSpeed, ySpeed, zSpeed); + public void addParticle(ParticleOptions particle, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + this.levelRenderer.addParticle(particle, particle.getType().getOverrideLimiter(), x, y, z, xSpeed, ySpeed, zSpeed); } @Override - public void addParticle(ParticleOptions particleData, boolean forceAlwaysRender, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - this.levelRenderer.addParticle(particleData, particleData.getType().getOverrideLimiter() || forceAlwaysRender, x, y, z, xSpeed, ySpeed, zSpeed); - } - - @Override - public void addAlwaysVisibleParticle(ParticleOptions particleData, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - this.levelRenderer.addParticle(particleData, false, true, x, y, z, xSpeed, ySpeed, zSpeed); - } - - @Override - public void addAlwaysVisibleParticle( - ParticleOptions particleData, boolean ignoreRange, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed + public void addParticle( + ParticleOptions particle, boolean overrideLimiter, boolean alwaysShow, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed ) { - this.levelRenderer.addParticle(particleData, particleData.getType().getOverrideLimiter() || ignoreRange, true, x, y, z, xSpeed, ySpeed, zSpeed); + this.levelRenderer.addParticle(particle, particle.getType().getOverrideLimiter() || overrideLimiter, alwaysShow, x, y, z, xSpeed, ySpeed, zSpeed); + } + + @Override + public void addAlwaysVisibleParticle(ParticleOptions particle, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + this.levelRenderer.addParticle(particle, false, true, x, y, z, xSpeed, ySpeed, zSpeed); + } + + @Override + public void addAlwaysVisibleParticle(ParticleOptions particle, boolean ignoreRange, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + this.levelRenderer.addParticle(particle, particle.getType().getOverrideLimiter() || ignoreRange, true, x, y, z, xSpeed, ySpeed, zSpeed); } @Override @@ -658,6 +676,10 @@ public class ClientLevel extends Level { return this.players; } + public List dragonParts() { + return this.dragonParts; + } + @Override public Holder getUncachedNoiseBiome(int x, int y, int z) { return this.registryAccess().lookupOrThrow(Registries.BIOME).getOrThrow(Biomes.PLAINS); @@ -673,58 +695,58 @@ public class ClientLevel extends Level { return g * 0.8F + 0.2F; } - public int getSkyColor(Vec3 vec3, float f) { - float g = this.getTimeOfDay(f); - Vec3 vec32 = vec3.subtract(2.0, 2.0, 2.0).scale(0.25); - Vec3 vec33 = CubicSampler.gaussianSampleVec3( - vec32, (ix, jx, kx) -> Vec3.fromRGB24(this.getBiomeManager().getNoiseBiomeAtQuart(ix, jx, kx).value().getSkyColor()) + public int getSkyColor(Vec3 cameraPosition, float partialTick) { + float f = this.getTimeOfDay(partialTick); + Vec3 vec3 = cameraPosition.subtract(2.0, 2.0, 2.0).scale(0.25); + Vec3 vec32 = CubicSampler.gaussianSampleVec3( + vec3, (ix, jx, k) -> Vec3.fromRGB24(this.getBiomeManager().getNoiseBiomeAtQuart(ix, jx, k).value().getSkyColor()) ); - float h = Mth.cos(g * (float) (Math.PI * 2)) * 2.0F + 0.5F; - h = Mth.clamp(h, 0.0F, 1.0F); - vec33 = vec33.scale(h); - int i = ARGB.color(vec33); - float j = this.getRainLevel(f); + float g = Mth.cos(f * (float) (Math.PI * 2)) * 2.0F + 0.5F; + g = Mth.clamp(g, 0.0F, 1.0F); + vec32 = vec32.scale(g); + int i = ARGB.color(vec32); + float h = this.getRainLevel(partialTick); + if (h > 0.0F) { + float j = 0.6F; + float k = h * 0.75F; + int l = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); + i = ARGB.lerp(k, i, l); + } + + float j = this.getThunderLevel(partialTick); if (j > 0.0F) { - float k = 0.6F; - float l = j * 0.75F; - int m = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); - i = ARGB.lerp(l, i, m); + float k = 0.2F; + float m = j * 0.75F; + int n = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); + i = ARGB.lerp(m, i, n); } - float k = this.getThunderLevel(f); - if (k > 0.0F) { - float l = 0.2F; - float n = k * 0.75F; - int o = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); - i = ARGB.lerp(n, i, o); - } - - int p = this.getSkyFlashTime(); - if (p > 0) { - float n = Math.min(p - f, 1.0F); - n *= 0.45F; - i = ARGB.lerp(n, i, ARGB.color(204, 204, 255)); + int o = this.getSkyFlashTime(); + if (o > 0) { + float m = Math.min(o - partialTick, 1.0F); + m *= 0.45F; + i = ARGB.lerp(m, i, ARGB.color(204, 204, 255)); } return i; } - public int getCloudColor(float f) { + public int getCloudColor(float partialTick) { int i = -1; - float g = this.getRainLevel(f); - if (g > 0.0F) { + float f = this.getRainLevel(partialTick); + if (f > 0.0F) { int j = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); - i = ARGB.lerp(g * 0.95F, i, j); + i = ARGB.lerp(f * 0.95F, i, j); } - float h = this.getTimeOfDay(f); - float k = Mth.cos(h * (float) (Math.PI * 2)) * 2.0F + 0.5F; - k = Mth.clamp(k, 0.0F, 1.0F); - i = ARGB.multiply(i, ARGB.colorFromFloat(1.0F, k * 0.9F + 0.1F, k * 0.9F + 0.1F, k * 0.85F + 0.15F)); - float l = this.getThunderLevel(f); - if (l > 0.0F) { - int m = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); - i = ARGB.lerp(l * 0.95F, i, m); + float g = this.getTimeOfDay(partialTick); + float h = Mth.cos(g * (float) (Math.PI * 2)) * 2.0F + 0.5F; + h = Mth.clamp(h, 0.0F, 1.0F); + i = ARGB.multiply(i, ARGB.colorFromFloat(1.0F, h * 0.9F + 0.1F, h * 0.9F + 0.1F, h * 0.85F + 0.15F)); + float k = this.getThunderLevel(partialTick); + if (k > 0.0F) { + int l = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); + i = ARGB.lerp(k * 0.95F, i, l); } return i; @@ -866,18 +888,18 @@ public class ClientLevel extends Level { @Override public void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - double d, - double e, - double f, - float g, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + double x, + double y, + double z, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction, - ParticleOptions particleOptions, - ParticleOptions particleOptions2, - Holder holder + ParticleOptions smallExplosionParticles, + ParticleOptions largeExplosionParticles, + Holder explosionSound ) { } @@ -886,6 +908,16 @@ public class ClientLevel extends Level { return this.seaLevel; } + @Override + public int getClientLeafTintColor(BlockPos pos) { + return Minecraft.getInstance().getBlockColors().getColor(this.getBlockState(pos), this, pos, 0); + } + + @Override + public void registerForCleaning(CacheSlot cacheSlot) { + this.connection.registerForCleaning(cacheSlot); + } + @Environment(EnvType.CLIENT) public static class ClientLevelData implements WritableLevelData { private final boolean hardcore; @@ -1007,14 +1039,28 @@ public class ClientLevel extends Level { } public void onTrackingStart(Entity entity) { - if (entity instanceof AbstractClientPlayer) { - ClientLevel.this.players.add((AbstractClientPlayer)entity); + switch (entity) { + case AbstractClientPlayer abstractClientPlayer: + ClientLevel.this.players.add(abstractClientPlayer); + break; + case EnderDragon enderDragon: + ClientLevel.this.dragonParts.addAll(Arrays.asList(enderDragon.getSubEntities())); + break; + default: } } public void onTrackingEnd(Entity entity) { entity.unRide(); - ClientLevel.this.players.remove(entity); + switch (entity) { + case AbstractClientPlayer abstractClientPlayer: + ClientLevel.this.players.remove(abstractClientPlayer); + break; + case EnderDragon enderDragon: + ClientLevel.this.dragonParts.removeAll(Arrays.asList(enderDragon.getSubEntities())); + break; + default: + } } public void onSectionChange(Entity entity) { diff --git a/net/minecraft/client/multiplayer/ClientPacketListener.java b/net/minecraft/client/multiplayer/ClientPacketListener.java index f8f84bfd..ba82f5b5 100644 --- a/net/minecraft/client/multiplayer/ClientPacketListener.java +++ b/net/minecraft/client/multiplayer/ClientPacketListener.java @@ -3,12 +3,14 @@ package net.minecraft.client.multiplayer; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; +import com.google.common.hash.HashCode; import com.mojang.authlib.GameProfile; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.ParseResults; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry; +import java.lang.ref.WeakReference; import java.time.Instant; import java.util.ArrayList; import java.util.BitSet; @@ -30,7 +32,7 @@ import net.minecraft.client.ClientRecipeBook; import net.minecraft.client.DebugQueryHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.Options; -import net.minecraft.client.gui.components.ChatComponent; +import net.minecraft.client.gui.components.ChatComponent.State; import net.minecraft.client.gui.components.toasts.RecipeToast; import net.minecraft.client.gui.components.toasts.SystemToast; import net.minecraft.client.gui.screens.DeathScreen; @@ -43,6 +45,7 @@ import net.minecraft.client.gui.screens.inventory.BookViewScreen; import net.minecraft.client.gui.screens.inventory.CommandBlockEditScreen; import net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen; import net.minecraft.client.gui.screens.inventory.HorseInventoryScreen; +import net.minecraft.client.gui.screens.inventory.TestInstanceBlockEditScreen; import net.minecraft.client.gui.screens.multiplayer.ServerReconfigScreen; import net.minecraft.client.gui.screens.recipebook.RecipeUpdateListener; import net.minecraft.client.particle.ItemPickupParticle; @@ -64,13 +67,14 @@ import net.minecraft.commands.arguments.ArgumentSignatures; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.core.Registry; -import net.minecraft.core.RegistryAccess; import net.minecraft.core.RegistrySynchronization; import net.minecraft.core.SectionPos; +import net.minecraft.core.Registry.PendingTags; +import net.minecraft.core.RegistryAccess.Frozen; import net.minecraft.core.component.DataComponents; import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.Connection; +import net.minecraft.network.HashedPatchMap; import net.minecraft.network.TickablePacketListener; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.LastSeenMessagesTracker; @@ -82,7 +86,6 @@ import net.minecraft.network.chat.RemoteChatSession; import net.minecraft.network.chat.SignableCommand; import net.minecraft.network.chat.SignedMessageBody; import net.minecraft.network.chat.SignedMessageLink; -import net.minecraft.network.chat.LastSeenMessagesTracker.Update; import net.minecraft.network.chat.RemoteChatSession.Data; import net.minecraft.network.chat.SignedMessageChain.Encoder; import net.minecraft.network.chat.numbers.NumberFormat; @@ -113,7 +116,6 @@ import net.minecraft.network.protocol.common.custom.WorldGenAttemptDebugPayload; import net.minecraft.network.protocol.configuration.ConfigurationProtocols; import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.network.protocol.game.ClientboundAddEntityPacket; -import net.minecraft.network.protocol.game.ClientboundAddExperienceOrbPacket; import net.minecraft.network.protocol.game.ClientboundAnimatePacket; import net.minecraft.network.protocol.game.ClientboundAwardStatsPacket; import net.minecraft.network.protocol.game.ClientboundBlockChangedAckPacket; @@ -224,6 +226,7 @@ import net.minecraft.network.protocol.game.ClientboundTabListPacket; import net.minecraft.network.protocol.game.ClientboundTagQueryPacket; import net.minecraft.network.protocol.game.ClientboundTakeItemEntityPacket; import net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket; +import net.minecraft.network.protocol.game.ClientboundTestInstanceBlockStatus; import net.minecraft.network.protocol.game.ClientboundTickingStatePacket; import net.minecraft.network.protocol.game.ClientboundTickingStepPacket; import net.minecraft.network.protocol.game.ClientboundUpdateAdvancementsPacket; @@ -242,14 +245,14 @@ import net.minecraft.network.protocol.game.ServerboundClientCommandPacket; import net.minecraft.network.protocol.game.ServerboundConfigurationAcknowledgedPacket; import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket; import net.minecraft.network.protocol.game.ServerboundMoveVehiclePacket; +import net.minecraft.network.protocol.game.ServerboundPlayerLoadedPacket; import net.minecraft.network.protocol.game.VecDeltaCodec; import net.minecraft.network.protocol.game.ClientboundChunksBiomesPacket.ChunkBiomeData; -import net.minecraft.network.protocol.game.ClientboundGameEventPacket.Type; -import net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Parameters; import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket.AttributeSnapshot; import net.minecraft.network.protocol.game.ServerboundClientCommandPacket.Action; import net.minecraft.network.protocol.ping.ClientboundPongResponsePacket; import net.minecraft.network.syncher.SynchedEntityData.DataValue; +import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.ServerLinks; @@ -258,7 +261,8 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.stats.Stat; import net.minecraft.stats.StatsCounter; -import net.minecraft.tags.TagNetworkSerialization; +import net.minecraft.tags.TagNetworkSerialization.NetworkPayload; +import net.minecraft.util.HashOps; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.SignatureValidator; @@ -289,7 +293,7 @@ import net.minecraft.world.entity.monster.Guardian; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.ProfileKeyPair; -import net.minecraft.world.entity.player.ProfilePublicKey; +import net.minecraft.world.entity.player.ProfilePublicKey.ValidationException; import net.minecraft.world.entity.projectile.AbstractHurtingProjectile; import net.minecraft.world.entity.vehicle.AbstractBoat; import net.minecraft.world.entity.vehicle.AbstractMinecart; @@ -304,7 +308,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.PotionBrewing; import net.minecraft.world.item.crafting.RecipeAccess; -import net.minecraft.world.item.crafting.SelectableRecipe; +import net.minecraft.world.item.crafting.SelectableRecipe.SingleInputSet; import net.minecraft.world.item.crafting.display.RecipeDisplayId; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.GameType; @@ -327,8 +331,6 @@ import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.ScoreAccess; import net.minecraft.world.scores.ScoreHolder; import net.minecraft.world.scores.Scoreboard; -import net.minecraft.world.scores.Team.CollisionRule; -import net.minecraft.world.scores.Team.Visibility; import net.minecraft.world.scores.criteria.ObjectiveCriteria; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -340,6 +342,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme private static final Component UNSERURE_SERVER_TOAST = Component.translatable("multiplayer.unsecureserver.toast"); private static final Component INVALID_PACKET = Component.translatable("multiplayer.disconnect.invalid_packet"); private static final Component RECONFIGURE_SCREEN_MESSAGE = Component.translatable("connect.reconfiguring"); + private static final Component BAD_CHAT_INDEX = Component.translatable("multiplayer.disconnect.bad_chat_index"); private static final int PENDING_OFFSET_THRESHOLD = 64; public static final int TELEPORT_INTERPOLATION_THRESHOLD = 64; private final GameProfile localGameProfile; @@ -363,17 +366,19 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme */ private final RandomSource random = RandomSource.createThreadSafe(); private CommandDispatcher commands = new CommandDispatcher<>(); - private ClientRecipeContainer recipes = new ClientRecipeContainer(Map.of(), SelectableRecipe.SingleInputSet.empty()); + private ClientRecipeContainer recipes = new ClientRecipeContainer(Map.of(), SingleInputSet.empty()); private final UUID id = UUID.randomUUID(); private Set> levels; - private final RegistryAccess.Frozen registryAccess; + private final Frozen registryAccess; private final FeatureFlagSet enabledFeatures; private final PotionBrewing potionBrewing; private FuelValues fuelValues; + private final HashedPatchMap.HashGenerator decoratedHashOpsGenerator; private OptionalInt removedPlayerVehicleId = OptionalInt.empty(); @Nullable private LocalChatSession chatSession; private Encoder signedMessageEncoder = Encoder.UNSIGNED; + private int nextChatIndex; private LastSeenMessagesTracker lastSeenMessages = new LastSeenMessagesTracker(20); private MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault(); @Nullable @@ -390,11 +395,16 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme private volatile boolean closed; private final Scoreboard scoreboard = new Scoreboard(); private final SessionSearchTrees searchTrees = new SessionSearchTrees(); + private final List>> cacheSlots = new ArrayList(); public ClientPacketListener(Minecraft minecraft, Connection connection, CommonListenerCookie commonListenerCookie) { super(minecraft, connection, commonListenerCookie); this.localGameProfile = commonListenerCookie.localGameProfile(); this.registryAccess = commonListenerCookie.receivedRegistries(); + RegistryOps registryOps = this.registryAccess.createSerializationContext(HashOps.CRC32C_INSTANCE); + this.decoratedHashOpsGenerator = typedDataComponent -> typedDataComponent.encodeValue(registryOps) + .getOrThrow(string -> new IllegalArgumentException("Failed to hash " + typedDataComponent + ": " + string)) + .asInt(); this.enabledFeatures = commonListenerCookie.enabledFeatures(); this.advancements = new ClientAdvancements(minecraft, this.telemetryManager); this.suggestionsProvider = new ClientSuggestionProvider(this, minecraft); @@ -419,10 +429,22 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } public void clearLevel() { + this.clearCacheSlots(); this.level = null; this.levelLoadStatusManager = null; } + private void clearCacheSlots() { + for (WeakReference> weakReference : this.cacheSlots) { + CacheSlot cacheSlot = (CacheSlot)weakReference.get(); + if (cacheSlot != null) { + cacheSlot.clear(); + } + } + + this.cacheSlots.clear(); + } + public RecipeAccess recipes() { return this.recipes; } @@ -481,6 +503,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.minecraft.gameMode.setLocalMode(commonPlayerSpawnInfo.gameType(), commonPlayerSpawnInfo.previousGameType()); this.minecraft.options.setServerRenderDistance(packet.chunkRadius()); this.chatSession = null; + this.nextChatIndex = 0; this.lastSeenMessages = new LastSeenMessagesTracker(20); this.messageSignatureCache = MessageSignatureCache.createDefault(); if (this.connection.isEncrypted()) { @@ -548,20 +571,6 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - @Override - public void handleAddExperienceOrb(ClientboundAddExperienceOrbPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - double d = packet.getX(); - double e = packet.getY(); - double f = packet.getZ(); - Entity entity = new ExperienceOrb(this.level, d, e, f, packet.getValue()); - entity.syncPacketPositionCodec(d, e, f); - entity.setYRot(0.0F); - entity.setXRot(0.0F); - entity.setId(packet.getId()); - this.level.addEntity(entity); - } - @Override public void handleSetEntityMotion(ClientboundSetEntityMotionPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); @@ -581,27 +590,28 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleEntityPositionSync(ClientboundEntityPositionSyncPacket clientboundEntityPositionSyncPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundEntityPositionSyncPacket, this, this.minecraft); - Entity entity = this.level.getEntity(clientboundEntityPositionSyncPacket.id()); + public void handleEntityPositionSync(ClientboundEntityPositionSyncPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + Entity entity = this.level.getEntity(packet.id()); if (entity != null) { - Vec3 vec3 = clientboundEntityPositionSyncPacket.values().position(); + Vec3 vec3 = packet.values().position(); entity.getPositionCodec().setBase(vec3); - if (!entity.isControlledByLocalInstance()) { - float f = clientboundEntityPositionSyncPacket.values().yRot(); - float g = clientboundEntityPositionSyncPacket.values().xRot(); + if (!entity.isLocalInstanceAuthoritative()) { + float f = packet.values().yRot(); + float g = packet.values().xRot(); boolean bl = entity.position().distanceToSqr(vec3) > 4096.0; if (this.level.isTickingEntity(entity) && !bl) { - entity.lerpTo(vec3.x, vec3.y, vec3.z, f, g, 3); + entity.moveOrInterpolateTo(vec3, f, g); } else { - entity.moveTo(vec3.x, vec3.y, vec3.z, f, g); - if (entity.hasIndirectPassenger(this.minecraft.player)) { - entity.positionRider(this.minecraft.player); - this.minecraft.player.setOldPosAndRot(); - } + entity.snapTo(vec3, f, g); } - entity.setOnGround(clientboundEntityPositionSyncPacket.onGround()); + if (entity.isInterpolating() && entity.hasIndirectPassenger(this.minecraft.player)) { + entity.positionRider(this.minecraft.player); + this.minecraft.player.setOldPosAndRot(); + } + + entity.setOnGround(packet.onGround()); } } } @@ -629,14 +639,14 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } else { boolean bl = packet.relatives().contains(Relative.X) || packet.relatives().contains(Relative.Y) || packet.relatives().contains(Relative.Z); - boolean bl2 = this.level.isTickingEntity(entity) || !entity.isControlledByLocalInstance() || bl; + boolean bl2 = this.level.isTickingEntity(entity) || !entity.isLocalInstanceAuthoritative() || bl; boolean bl3 = setValuesFromPositionPacket(packet.change(), packet.relatives(), entity, bl2); entity.setOnGround(packet.onGround()); if (!bl3 && entity.hasIndirectPassenger(this.minecraft.player)) { entity.positionRider(this.minecraft.player); this.minecraft.player.setOldPosAndRot(); - if (entity.isControlledByOrIsLocalPlayer()) { - this.connection.send(new ServerboundMoveVehiclePacket(entity)); + if (entity.isLocalInstanceAuthoritative()) { + this.connection.send(ServerboundMoveVehiclePacket.fromEntity(entity)); } } } @@ -662,10 +672,10 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleSetHeldSlot(ClientboundSetHeldSlotPacket clientboundSetHeldSlotPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetHeldSlotPacket, this, this.minecraft); - if (Inventory.isHotbarSlot(clientboundSetHeldSlotPacket.getSlot())) { - this.minecraft.player.getInventory().selected = clientboundSetHeldSlotPacket.getSlot(); + public void handleSetHeldSlot(ClientboundSetHeldSlotPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + if (Inventory.isHotbarSlot(packet.slot())) { + this.minecraft.player.getInventory().setSelectedSlot(packet.slot()); } } @@ -674,7 +684,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Entity entity = packet.getEntity(this.level); if (entity != null) { - if (entity.isControlledByLocalInstance()) { + if (entity.isLocalInstanceAuthoritative()) { VecDeltaCodec vecDeltaCodec = entity.getPositionCodec(); Vec3 vec3 = vecDeltaCodec.decode(packet.getXa(), packet.getYa(), packet.getZa()); vecDeltaCodec.setBase(vec3); @@ -683,11 +693,13 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme VecDeltaCodec vecDeltaCodec = entity.getPositionCodec(); Vec3 vec3 = vecDeltaCodec.decode(packet.getXa(), packet.getYa(), packet.getZa()); vecDeltaCodec.setBase(vec3); - float f = packet.hasRotation() ? packet.getyRot() : entity.lerpTargetYRot(); - float g = packet.hasRotation() ? packet.getxRot() : entity.lerpTargetXRot(); - entity.lerpTo(vec3.x(), vec3.y(), vec3.z(), f, g, 3); + if (packet.hasRotation()) { + entity.moveOrInterpolateTo(vec3, packet.getYRot(), packet.getXRot()); + } else { + entity.moveOrInterpolateTo(vec3, entity.getYRot(), entity.getXRot()); + } } else if (packet.hasRotation()) { - entity.lerpTo(entity.lerpTargetX(), entity.lerpTargetY(), entity.lerpTargetZ(), packet.getyRot(), packet.getxRot(), 3); + entity.moveOrInterpolateTo(entity.position(), packet.getYRot(), packet.getXRot()); } entity.setOnGround(packet.isOnGround()); @@ -696,12 +708,11 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleMinecartAlongTrack(ClientboundMoveMinecartPacket clientboundMoveMinecartPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundMoveMinecartPacket, this, this.minecraft); - Entity entity = clientboundMoveMinecartPacket.getEntity(this.level); - if (entity instanceof AbstractMinecart abstractMinecart) { - if (!entity.isControlledByLocalInstance() && abstractMinecart.getBehavior() instanceof NewMinecartBehavior newMinecartBehavior) { - newMinecartBehavior.lerpSteps.addAll(clientboundMoveMinecartPacket.lerpSteps()); + public void handleMinecartAlongTrack(ClientboundMoveMinecartPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + if (packet.getEntity(this.level) instanceof AbstractMinecart abstractMinecart) { + if (abstractMinecart.getBehavior() instanceof NewMinecartBehavior newMinecartBehavior) { + newMinecartBehavior.lerpSteps.addAll(packet.lerpSteps()); } } } @@ -739,23 +750,16 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme setValuesFromPositionPacket(packet.change(), packet.relatives(), player, false); } - this.connection.send(new ServerboundMovePlayerPacket.PosRot(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot(), false, false)); this.connection.send(new ServerboundAcceptTeleportationPacket(packet.id())); + this.connection.send(new ServerboundMovePlayerPacket.PosRot(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot(), false, false)); } - private static boolean setValuesFromPositionPacket(PositionMoveRotation positionMoveRotation, Set set, Entity entity, boolean bl) { - PositionMoveRotation positionMoveRotation2 = PositionMoveRotation.ofEntityUsingLerpTarget(entity); - PositionMoveRotation positionMoveRotation3 = PositionMoveRotation.calculateAbsolute(positionMoveRotation2, positionMoveRotation, set); - boolean bl2 = positionMoveRotation2.position().distanceToSqr(positionMoveRotation3.position()) > 4096.0; - if (bl && !bl2) { - entity.lerpTo( - positionMoveRotation3.position().x(), - positionMoveRotation3.position().y(), - positionMoveRotation3.position().z(), - positionMoveRotation3.yRot(), - positionMoveRotation3.xRot(), - 3 - ); + private static boolean setValuesFromPositionPacket(PositionMoveRotation positionMoveRotation, Set relatives, Entity entity, boolean lerp) { + PositionMoveRotation positionMoveRotation2 = PositionMoveRotation.of(entity); + PositionMoveRotation positionMoveRotation3 = PositionMoveRotation.calculateAbsolute(positionMoveRotation2, positionMoveRotation, relatives); + boolean bl = positionMoveRotation2.position().distanceToSqr(positionMoveRotation3.position()) > 4096.0; + if (lerp && !bl) { + entity.moveOrInterpolateTo(positionMoveRotation3.position(), positionMoveRotation3.yRot(), positionMoveRotation3.xRot()); entity.setDeltaMovement(positionMoveRotation3.deltaMovement()); return true; } else { @@ -764,18 +768,18 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme entity.setYRot(positionMoveRotation3.yRot()); entity.setXRot(positionMoveRotation3.xRot()); PositionMoveRotation positionMoveRotation4 = new PositionMoveRotation(entity.oldPosition(), Vec3.ZERO, entity.yRotO, entity.xRotO); - PositionMoveRotation positionMoveRotation5 = PositionMoveRotation.calculateAbsolute(positionMoveRotation4, positionMoveRotation, set); + PositionMoveRotation positionMoveRotation5 = PositionMoveRotation.calculateAbsolute(positionMoveRotation4, positionMoveRotation, relatives); entity.setOldPosAndRot(positionMoveRotation5.position(), positionMoveRotation5.yRot(), positionMoveRotation5.xRot()); return false; } } @Override - public void handleRotatePlayer(ClientboundPlayerRotationPacket clientboundPlayerRotationPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundPlayerRotationPacket, this, this.minecraft); + public void handleRotatePlayer(ClientboundPlayerRotationPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Player player = this.minecraft.player; - player.setYRot(clientboundPlayerRotationPacket.yRot()); - player.setXRot(clientboundPlayerRotationPacket.xRot()); + player.setYRot(packet.yRot()); + player.setXRot(packet.xRot()); player.setOldRot(); this.connection.send(new ServerboundMovePlayerPacket.Rot(player.getYRot(), player.getXRot(), false, false)); } @@ -798,6 +802,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme LevelChunk levelChunk = this.level.getChunkSource().getChunk(i, j, false); if (levelChunk != null) { this.enableChunkLight(levelChunk, i, j); + this.minecraft.levelRenderer.onChunkReadyToRender(levelChunk.getPos()); } }); } @@ -879,7 +884,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); this.minecraft.getChatListener().clearQueue(); this.sendChatAcknowledgement(); - ChatComponent.State state = this.minecraft.gui.getChat().storeState(); + State state = this.minecraft.gui.getChat().storeState(); this.minecraft.clearClientLevel(new ServerReconfigScreen(RECONFIGURE_SCREEN_MESSAGE, this.connection)); this.connection .setupInboundProtocol( @@ -942,9 +947,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme ); } - this.minecraft - .particleEngine - .add(new ItemPickupParticle(this.minecraft.getEntityRenderDispatcher(), this.minecraft.renderBuffers(), this.level, entity, livingEntity)); + this.minecraft.particleEngine.add(new ItemPickupParticle(this.minecraft.getEntityRenderDispatcher(), this.level, entity, livingEntity)); if (entity instanceof ItemEntity itemEntity) { ItemStack itemStack = itemEntity.getItem(); if (!itemStack.isEmpty()) { @@ -969,33 +972,40 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme @Override public void handlePlayerChat(ClientboundPlayerChatPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - Optional optional = packet.body().unpack(this.messageSignatureCache); - if (optional.isEmpty()) { - this.connection.disconnect(INVALID_PACKET); + int i = this.nextChatIndex++; + if (packet.globalIndex() != i) { + LOGGER.error("Missing or out-of-order chat message from server, expected index {} but got {}", i, packet.globalIndex()); + this.connection.disconnect(BAD_CHAT_INDEX); } else { - this.messageSignatureCache.push((SignedMessageBody)optional.get(), packet.signature()); - UUID uUID = packet.sender(); - PlayerInfo playerInfo = this.getPlayerInfo(uUID); - if (playerInfo == null) { - LOGGER.error("Received player chat packet for unknown player with ID: {}", uUID); - this.minecraft.getChatListener().handleChatMessageError(uUID, packet.chatType()); + Optional optional = packet.body().unpack(this.messageSignatureCache); + if (optional.isEmpty()) { + LOGGER.error("Message from player with ID {} referenced unrecognized signature id", packet.sender()); + this.connection.disconnect(INVALID_PACKET); } else { - RemoteChatSession remoteChatSession = playerInfo.getChatSession(); - SignedMessageLink signedMessageLink; - if (remoteChatSession != null) { - signedMessageLink = new SignedMessageLink(packet.index(), uUID, remoteChatSession.sessionId()); + this.messageSignatureCache.push((SignedMessageBody)optional.get(), packet.signature()); + UUID uUID = packet.sender(); + PlayerInfo playerInfo = this.getPlayerInfo(uUID); + if (playerInfo == null) { + LOGGER.error("Received player chat packet for unknown player with ID: {}", uUID); + this.minecraft.getChatListener().handleChatMessageError(uUID, packet.signature(), packet.chatType()); } else { - signedMessageLink = SignedMessageLink.unsigned(uUID); - } + RemoteChatSession remoteChatSession = playerInfo.getChatSession(); + SignedMessageLink signedMessageLink; + if (remoteChatSession != null) { + signedMessageLink = new SignedMessageLink(packet.index(), uUID, remoteChatSession.sessionId()); + } else { + signedMessageLink = SignedMessageLink.unsigned(uUID); + } - PlayerChatMessage playerChatMessage = new PlayerChatMessage( - signedMessageLink, packet.signature(), (SignedMessageBody)optional.get(), packet.unsignedContent(), packet.filterMask() - ); - playerChatMessage = playerInfo.getMessageValidator().updateAndValidate(playerChatMessage); - if (playerChatMessage != null) { - this.minecraft.getChatListener().handlePlayerChatMessage(playerChatMessage, playerInfo.getProfile(), packet.chatType()); - } else { - this.minecraft.getChatListener().handleChatMessageError(uUID, packet.chatType()); + PlayerChatMessage playerChatMessage = new PlayerChatMessage( + signedMessageLink, packet.signature(), (SignedMessageBody)optional.get(), packet.unsignedContent(), packet.filterMask() + ); + playerChatMessage = playerInfo.getMessageValidator().updateAndValidate(playerChatMessage); + if (playerChatMessage != null) { + this.minecraft.getChatListener().handlePlayerChatMessage(playerChatMessage, playerInfo.getProfile(), packet.chatType()); + } else { + this.minecraft.getChatListener().handleChatMessageError(uUID, packet.signature(), packet.chatType()); + } } } } @@ -1248,8 +1258,8 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme localPlayer2.setShowDeathScreen(localPlayer.shouldShowDeathScreen()); localPlayer2.setLastDeathLocation(commonPlayerSpawnInfo.lastDeathLocation()); localPlayer2.setPortalCooldown(commonPlayerSpawnInfo.portalCooldown()); - localPlayer2.spinningEffectIntensity = localPlayer.spinningEffectIntensity; - localPlayer2.oSpinningEffectIntensity = localPlayer.oSpinningEffectIntensity; + localPlayer2.portalEffectIntensity = localPlayer.portalEffectIntensity; + localPlayer2.oPortalEffectIntensity = localPlayer.oPortalEffectIntensity; if (this.minecraft.screen instanceof DeathScreen || this.minecraft.screen instanceof DeathScreen.TitleConfirmScreen) { this.minecraft.setScreen(null); } @@ -1343,29 +1353,29 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleSetCursorItem(ClientboundSetCursorItemPacket clientboundSetCursorItemPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetCursorItemPacket, this, this.minecraft); - this.minecraft.getTutorial().onGetItem(clientboundSetCursorItemPacket.contents()); + public void handleSetCursorItem(ClientboundSetCursorItemPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + this.minecraft.getTutorial().onGetItem(packet.contents()); if (!(this.minecraft.screen instanceof CreativeModeInventoryScreen)) { - this.minecraft.player.containerMenu.setCarried(clientboundSetCursorItemPacket.contents()); + this.minecraft.player.containerMenu.setCarried(packet.contents()); } } @Override - public void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket clientboundSetPlayerInventoryPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetPlayerInventoryPacket, this, this.minecraft); - this.minecraft.getTutorial().onGetItem(clientboundSetPlayerInventoryPacket.contents()); - this.minecraft.player.getInventory().setItem(clientboundSetPlayerInventoryPacket.slot(), clientboundSetPlayerInventoryPacket.contents()); + public void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + this.minecraft.getTutorial().onGetItem(packet.contents()); + this.minecraft.player.getInventory().setItem(packet.slot(), packet.contents()); } @Override public void handleContainerContent(ClientboundContainerSetContentPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Player player = this.minecraft.player; - if (packet.getContainerId() == 0) { - player.inventoryMenu.initializeContents(packet.getStateId(), packet.getItems(), packet.getCarriedItem()); - } else if (packet.getContainerId() == player.containerMenu.containerId) { - player.containerMenu.initializeContents(packet.getStateId(), packet.getItems(), packet.getCarriedItem()); + if (packet.containerId() == 0) { + player.inventoryMenu.initializeContents(packet.stateId(), packet.items(), packet.carriedItem()); + } else if (packet.containerId() == player.containerMenu.containerId) { + player.containerMenu.initializeContents(packet.stateId(), packet.items(), packet.carriedItem()); } } @@ -1385,11 +1395,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); BlockPos blockPos = packet.getPos(); this.minecraft.level.getBlockEntity(blockPos, packet.getType()).ifPresent(blockEntity -> { - CompoundTag compoundTag = packet.getTag(); - if (!compoundTag.isEmpty()) { - blockEntity.loadWithComponents(compoundTag, this.registryAccess); - } - + blockEntity.loadWithComponents(packet.getTag(), this.registryAccess); if (blockEntity instanceof CommandBlockEntity && this.minecraft.screen instanceof CommandBlockEditScreen) { ((CommandBlockEditScreen)this.minecraft.screen).updateGui(); } @@ -1435,7 +1441,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public void handleGameEvent(ClientboundGameEventPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Player player = this.minecraft.player; - Type type = packet.getEvent(); + ClientboundGameEventPacket.Type type = packet.getEvent(); float f = packet.getParam(); int i = Mth.floor(f + 0.5F); if (type == ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE) { @@ -1477,7 +1483,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } else if (f == 104.0F) { this.minecraft.gui.getChat().addMessage(Component.translatable("demo.day.6", options.keyScreenshot.getTranslatedKeyMessage())); } - } else if (type == ClientboundGameEventPacket.ARROW_HIT_PLAYER) { + } else if (type == ClientboundGameEventPacket.PLAY_ARROW_HIT_SOUND) { this.level.playSound(player, player.getX(), player.getEyeY(), player.getZ(), SoundEvents.ARROW_HIT_PLAYER, SoundSource.PLAYERS, 0.18F, 0.45F); } else if (type == ClientboundGameEventPacket.RAIN_LEVEL_CHANGE) { this.level.setRainLevel(f); @@ -1603,14 +1609,14 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookAdd(ClientboundRecipeBookAddPacket clientboundRecipeBookAddPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookAddPacket, this, this.minecraft); + public void handleRecipeBookAdd(ClientboundRecipeBookAddPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - if (clientboundRecipeBookAddPacket.replace()) { + if (packet.replace()) { clientRecipeBook.clear(); } - for (ClientboundRecipeBookAddPacket.Entry entry : clientboundRecipeBookAddPacket.entries()) { + for (net.minecraft.network.protocol.game.ClientboundRecipeBookAddPacket.Entry entry : packet.entries()) { clientRecipeBook.add(entry.contents()); if (entry.highlight()) { clientRecipeBook.addHighlight(entry.contents().id()); @@ -1625,11 +1631,11 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket clientboundRecipeBookRemovePacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookRemovePacket, this, this.minecraft); + public void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - for (RecipeDisplayId recipeDisplayId : clientboundRecipeBookRemovePacket.recipes()) { + for (RecipeDisplayId recipeDisplayId : packet.recipes()) { clientRecipeBook.remove(recipeDisplayId); } @@ -1637,16 +1643,16 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket clientboundRecipeBookSettingsPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookSettingsPacket, this, this.minecraft); + public void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - clientRecipeBook.setBookSettings(clientboundRecipeBookSettingsPacket.bookSettings()); + clientRecipeBook.setBookSettings(packet.bookSettings()); this.refreshRecipeBook(clientRecipeBook); } - private void refreshRecipeBook(ClientRecipeBook clientRecipeBook) { - clientRecipeBook.rebuildCollections(); - this.searchTrees.updateRecipes(clientRecipeBook, this.level); + private void refreshRecipeBook(ClientRecipeBook recipeBook) { + recipeBook.rebuildCollections(); + this.searchTrees.updateRecipes(recipeBook, this.level); if (this.minecraft.screen instanceof RecipeUpdateListener recipeUpdateListener) { recipeUpdateListener.recipesUpdated(); } @@ -1669,22 +1675,22 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - private Registry.PendingTags updateTags(ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload) { - Registry registry = this.registryAccess.lookupOrThrow(resourceKey); - return registry.prepareTagReload(networkPayload.resolve(registry)); + private PendingTags updateTags(ResourceKey> registryKey, NetworkPayload payload) { + Registry registry = this.registryAccess.lookupOrThrow(registryKey); + return registry.prepareTagReload(payload.resolve(registry)); } @Override public void handleUpdateTags(ClientboundUpdateTagsPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - List> list = new ArrayList(packet.getTags().size()); + List> list = new ArrayList(packet.getTags().size()); boolean bl = this.connection.isMemoryConnection(); packet.getTags().forEach((resourceKey, networkPayload) -> { if (!bl || RegistrySynchronization.isNetworkable(resourceKey)) { list.add(this.updateTags(resourceKey, networkPayload)); } }); - list.forEach(Registry.PendingTags::apply); + list.forEach(PendingTags::apply); this.fuelValues = FuelValues.vanillaBurnTimes(this.registryAccess, this.enabledFeatures); List list2 = List.copyOf(CreativeModeTabs.searchTab().getDisplayItems()); this.searchTrees.updateCreativeTags(list2); @@ -1777,7 +1783,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme @Override public void handleTitlesClear(ClientboundClearTitlesPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - this.minecraft.gui.clear(); + this.minecraft.gui.clearTitles(); if (packet.shouldResetTimes()) { this.minecraft.gui.resetTitleTimes(); } @@ -1899,6 +1905,9 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme case UPDATE_DISPLAY_NAME: playerInfo.setTabListDisplayName(entry.displayName()); break; + case UPDATE_HAT: + playerInfo.setShowHat(entry.showHat()); + break; case UPDATE_LIST_ORDER: playerInfo.setTabListOrder(entry.listOrder()); } @@ -1916,7 +1925,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme try { RemoteChatSession remoteChatSession = data.validate(gameProfile, signatureValidator); playerInfo.setChatSession(remoteChatSession); - } catch (ProfilePublicKey.ValidationException var7) { + } catch (ValidationException var7) { LOGGER.error("Failed to validate profile key for player: '{}'", gameProfile.getName(), var7); playerInfo.clearChatSession(this.enforcesSecureChat()); } @@ -1991,15 +2000,24 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public void handleMoveVehicle(ClientboundMoveVehiclePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Entity entity = this.minecraft.player.getRootVehicle(); - if (entity != this.minecraft.player && entity.isControlledByLocalInstance()) { - Vec3 vec3 = new Vec3(packet.getX(), packet.getY(), packet.getZ()); - Vec3 vec32 = new Vec3(entity.lerpTargetX(), entity.lerpTargetY(), entity.lerpTargetZ()); - if (vec3.distanceTo(vec32) > 1.0E-5F) { - entity.cancelLerp(); - entity.absMoveTo(vec3.x(), vec3.y(), vec3.z(), packet.getYRot(), packet.getXRot()); + if (entity != this.minecraft.player && entity.isLocalInstanceAuthoritative()) { + Vec3 vec3 = packet.position(); + Vec3 vec32; + if (entity.isInterpolating()) { + vec32 = entity.getInterpolation().position(); + } else { + vec32 = entity.position(); } - this.connection.send(new ServerboundMoveVehiclePacket(entity)); + if (vec3.distanceTo(vec32) > 1.0E-5F) { + if (entity.isInterpolating()) { + entity.getInterpolation().cancel(); + } + + entity.absSnapTo(vec3.x(), vec3.y(), vec3.z(), packet.yRot(), packet.xRot()); + } + + this.connection.send(ServerboundMoveVehiclePacket.fromEntity(entity)); } } @@ -2157,9 +2175,9 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme @Override public void handleSetPlayerTeamPacket(ClientboundSetPlayerTeamPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action action = packet.getTeamAction(); + ClientboundSetPlayerTeamPacket.Action action = packet.getTeamAction(); PlayerTeam playerTeam; - if (action == net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action.ADD) { + if (action == ClientboundSetPlayerTeamPacket.Action.ADD) { playerTeam = this.scoreboard.addPlayerTeam(packet.getName()); } else { playerTeam = this.scoreboard.getPlayerTeam(packet.getName()); @@ -2169,36 +2187,28 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - Optional optional = packet.getParameters(); + Optional optional = packet.getParameters(); optional.ifPresent(parameters -> { playerTeam.setDisplayName(parameters.getDisplayName()); playerTeam.setColor(parameters.getColor()); playerTeam.unpackOptions(parameters.getOptions()); - Visibility visibility = Visibility.byName(parameters.getNametagVisibility()); - if (visibility != null) { - playerTeam.setNameTagVisibility(visibility); - } - - CollisionRule collisionRule = CollisionRule.byName(parameters.getCollisionRule()); - if (collisionRule != null) { - playerTeam.setCollisionRule(collisionRule); - } - + playerTeam.setNameTagVisibility(parameters.getNametagVisibility()); + playerTeam.setCollisionRule(parameters.getCollisionRule()); playerTeam.setPlayerPrefix(parameters.getPlayerPrefix()); playerTeam.setPlayerSuffix(parameters.getPlayerSuffix()); }); - net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action action2 = packet.getPlayerAction(); - if (action2 == net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action.ADD) { + ClientboundSetPlayerTeamPacket.Action action2 = packet.getPlayerAction(); + if (action2 == ClientboundSetPlayerTeamPacket.Action.ADD) { for (String string : packet.getPlayers()) { this.scoreboard.addPlayerToTeam(string, playerTeam); } - } else if (action2 == net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action.REMOVE) { + } else if (action2 == ClientboundSetPlayerTeamPacket.Action.REMOVE) { for (String string : packet.getPlayers()) { this.scoreboard.removePlayerFromTeam(string, playerTeam); } } - if (action == net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.Action.REMOVE) { + if (action == ClientboundSetPlayerTeamPacket.Action.REMOVE) { this.scoreboard.removePlayerTeam(playerTeam); } } @@ -2212,7 +2222,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme double f = packet.getMaxSpeed() * packet.getZDist(); try { - this.level.addParticle(packet.getParticle(), packet.isOverrideLimiter(), packet.getX(), packet.getY(), packet.getZ(), d, e, f); + this.level.addParticle(packet.getParticle(), packet.isOverrideLimiter(), packet.alwaysShow(), packet.getX(), packet.getY(), packet.getZ(), d, e, f); } catch (Throwable var17) { LOGGER.warn("Could not spawn particle effect {}", packet.getParticle()); } @@ -2226,7 +2236,8 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme double m = this.random.nextGaussian() * packet.getMaxSpeed(); try { - this.level.addParticle(packet.getParticle(), packet.isOverrideLimiter(), packet.getX() + g, packet.getY() + h, packet.getZ() + j, k, l, m); + this.level + .addParticle(packet.getParticle(), packet.isOverrideLimiter(), packet.alwaysShow(), packet.getX() + g, packet.getY() + h, packet.getZ() + j, k, l, m); } catch (Throwable var16) { LOGGER.warn("Could not spawn particle effect {}", packet.getParticle()); return; @@ -2282,17 +2293,17 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.level.queueLightUpdate(() -> this.applyLightData(i, j, clientboundLightUpdatePacketData, true)); } - private void applyLightData(int i, int j, ClientboundLightUpdatePacketData clientboundLightUpdatePacketData, boolean bl) { + private void applyLightData(int x, int z, ClientboundLightUpdatePacketData data, boolean update) { LevelLightEngine levelLightEngine = this.level.getChunkSource().getLightEngine(); - BitSet bitSet = clientboundLightUpdatePacketData.getSkyYMask(); - BitSet bitSet2 = clientboundLightUpdatePacketData.getEmptySkyYMask(); - Iterator iterator = clientboundLightUpdatePacketData.getSkyUpdates().iterator(); - this.readSectionList(i, j, levelLightEngine, LightLayer.SKY, bitSet, bitSet2, iterator, bl); - BitSet bitSet3 = clientboundLightUpdatePacketData.getBlockYMask(); - BitSet bitSet4 = clientboundLightUpdatePacketData.getEmptyBlockYMask(); - Iterator iterator2 = clientboundLightUpdatePacketData.getBlockUpdates().iterator(); - this.readSectionList(i, j, levelLightEngine, LightLayer.BLOCK, bitSet3, bitSet4, iterator2, bl); - levelLightEngine.setLightEnabled(new ChunkPos(i, j), true); + BitSet bitSet = data.getSkyYMask(); + BitSet bitSet2 = data.getEmptySkyYMask(); + Iterator iterator = data.getSkyUpdates().iterator(); + this.readSectionList(x, z, levelLightEngine, LightLayer.SKY, bitSet, bitSet2, iterator, update); + BitSet bitSet3 = data.getBlockYMask(); + BitSet bitSet4 = data.getEmptyBlockYMask(); + Iterator iterator2 = data.getBlockUpdates().iterator(); + this.readSectionList(x, z, levelLightEngine, LightLayer.BLOCK, bitSet3, bitSet4, iterator2, update); + levelLightEngine.setLightEnabled(new ChunkPos(x, z), true); } @Override @@ -2373,17 +2384,25 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.pingDebugMonitor.onPongReceived(packet); } + @Override + public void handleTestInstanceBlockStatus(ClientboundTestInstanceBlockStatus status) { + PacketUtils.ensureRunningOnSameThread(status, this, this.minecraft); + if (this.minecraft.screen instanceof TestInstanceBlockEditScreen testInstanceBlockEditScreen) { + testInstanceBlockEditScreen.setStatus(status.status(), status.size()); + } + } + private void readSectionList( - int i, int j, LevelLightEngine levelLightEngine, LightLayer lightLayer, BitSet bitSet, BitSet bitSet2, Iterator iterator, boolean bl + int x, int z, LevelLightEngine lightEngine, LightLayer lightLayer, BitSet skyYMask, BitSet emptySkyYMask, Iterator skyUpdates, boolean update ) { - for (int k = 0; k < levelLightEngine.getLightSectionCount(); k++) { - int l = levelLightEngine.getMinLightSection() + k; - boolean bl2 = bitSet.get(k); - boolean bl3 = bitSet2.get(k); - if (bl2 || bl3) { - levelLightEngine.queueSectionData(lightLayer, SectionPos.of(i, l, j), bl2 ? new DataLayer((byte[])((byte[])iterator.next()).clone()) : new DataLayer()); - if (bl) { - this.level.setSectionDirtyWithNeighbors(i, l, j); + for (int i = 0; i < lightEngine.getLightSectionCount(); i++) { + int j = lightEngine.getMinLightSection() + i; + boolean bl = skyYMask.get(i); + boolean bl2 = emptySkyYMask.get(i); + if (bl || bl2) { + lightEngine.queueSectionData(lightLayer, SectionPos.of(x, j, z), bl ? new DataLayer((byte[])((byte[])skyUpdates.next()).clone()) : new DataLayer()); + if (update) { + this.level.setSectionDirtyWithNeighbors(x, j, z); } } } @@ -2460,13 +2479,12 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme return this.levels; } - public RegistryAccess.Frozen registryAccess() { + public Frozen registryAccess() { return this.registryAccess; } - public void markMessageAsProcessed(PlayerChatMessage chatMessage, boolean acknowledged) { - MessageSignature messageSignature = chatMessage.signature(); - if (messageSignature != null && this.lastSeenMessages.addPending(messageSignature, acknowledged) && this.lastSeenMessages.offset() > 64) { + public void markMessageAsProcessed(MessageSignature signature, boolean acknowledged) { + if (this.lastSeenMessages.addPending(signature, acknowledged) && this.lastSeenMessages.offset() > 64) { this.sendChatAcknowledgement(); } } @@ -2481,7 +2499,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public void sendChat(String message) { Instant instant = Instant.now(); long l = SaltSupplier.getLong(); - Update update = this.lastSeenMessages.generateAndApplyUpdate(); + LastSeenMessagesTracker.Update update = this.lastSeenMessages.generateAndApplyUpdate(); MessageSignature messageSignature = this.signedMessageEncoder.pack(new SignedMessageBody(message, instant, l, update.lastSeen())); this.send(new ServerboundChatPacket(message, instant, l, messageSignature, update.update())); } @@ -2493,7 +2511,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } else { Instant instant = Instant.now(); long l = SaltSupplier.getLong(); - Update update = this.lastSeenMessages.generateAndApplyUpdate(); + LastSeenMessagesTracker.Update update = this.lastSeenMessages.generateAndApplyUpdate(); ArgumentSignatures argumentSignatures = ArgumentSignatures.signCommand(signableCommand, string -> { SignedMessageBody signedMessageBody = new SignedMessageBody(string, instant, l, update.lastSeen()); return this.signedMessageEncoder.pack(signedMessageBody); @@ -2515,10 +2533,10 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme return this.commands.parse(command, this.suggestionsProvider); } - public void broadcastClientInformation(ClientInformation clientInformation) { - if (!clientInformation.equals(this.remoteClientInformation)) { - this.send(new ServerboundClientInformationPacket(clientInformation)); - this.remoteClientInformation = clientInformation; + public void broadcastClientInformation(ClientInformation information) { + if (!information.equals(this.remoteClientInformation)) { + this.send(new ServerboundClientInformationPacket(information)); + this.remoteClientInformation = information; } } @@ -2542,6 +2560,10 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.telemetryManager.tick(); if (this.levelLoadStatusManager != null) { this.levelLoadStatusManager.tick(); + if (this.levelLoadStatusManager.levelReady() && !this.minecraft.player.hasClientLoaded()) { + this.connection.send(new ServerboundPlayerLoadedPacket()); + this.minecraft.player.setClientLoaded(true); + } } } @@ -2595,4 +2617,12 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public ServerLinks serverLinks() { return this.serverLinks; } + + public void registerForCleaning(CacheSlot cacheSlot) { + this.cacheSlots.add(new WeakReference(cacheSlot)); + } + + public HashedPatchMap.HashGenerator decoratedHashOpsGenenerator() { + return this.decoratedHashOpsGenerator; + } } diff --git a/net/minecraft/client/multiplayer/ClientRecipeContainer.java b/net/minecraft/client/multiplayer/ClientRecipeContainer.java index 122529a9..d8c3a526 100644 --- a/net/minecraft/client/multiplayer/ClientRecipeContainer.java +++ b/net/minecraft/client/multiplayer/ClientRecipeContainer.java @@ -14,14 +14,16 @@ public class ClientRecipeContainer implements RecipeAccess { private final Map, RecipePropertySet> itemSets; private final SelectableRecipe.SingleInputSet stonecutterRecipes; - public ClientRecipeContainer(Map, RecipePropertySet> map, SelectableRecipe.SingleInputSet singleInputSet) { - this.itemSets = map; - this.stonecutterRecipes = singleInputSet; + public ClientRecipeContainer( + Map, RecipePropertySet> itemSets, SelectableRecipe.SingleInputSet stonecutterRecipes + ) { + this.itemSets = itemSets; + this.stonecutterRecipes = stonecutterRecipes; } @Override - public RecipePropertySet propertySet(ResourceKey resourceKey) { - return (RecipePropertySet)this.itemSets.getOrDefault(resourceKey, RecipePropertySet.EMPTY); + public RecipePropertySet propertySet(ResourceKey propertySet) { + return (RecipePropertySet)this.itemSets.getOrDefault(propertySet, RecipePropertySet.EMPTY); } @Override diff --git a/net/minecraft/client/multiplayer/ClientSuggestionProvider.java b/net/minecraft/client/multiplayer/ClientSuggestionProvider.java index b58d5af0..e714b139 100644 --- a/net/minecraft/client/multiplayer/ClientSuggestionProvider.java +++ b/net/minecraft/client/multiplayer/ClientSuggestionProvider.java @@ -20,8 +20,8 @@ import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.core.BlockPos; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; +import net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket; import net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket; -import net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket.Action; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.flag.FeatureFlagSet; @@ -172,7 +172,7 @@ public class ClientSuggestionProvider implements SharedSuggestionProvider { } } - public void modifyCustomCompletions(Action action, List entries) { + public void modifyCustomCompletions(ClientboundCustomChatCompletionsPacket.Action action, List entries) { switch (action) { case ADD: this.customCompletionSuggestions.addAll(entries); diff --git a/net/minecraft/client/multiplayer/MultiPlayerGameMode.java b/net/minecraft/client/multiplayer/MultiPlayerGameMode.java index ee8e5296..2ca72fa6 100644 --- a/net/minecraft/client/multiplayer/MultiPlayerGameMode.java +++ b/net/minecraft/client/multiplayer/MultiPlayerGameMode.java @@ -1,6 +1,8 @@ package net.minecraft.client.multiplayer; import com.google.common.collect.Lists; +import com.google.common.primitives.Shorts; +import com.google.common.primitives.SignedBytes; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; @@ -20,13 +22,15 @@ import net.minecraft.client.resources.sounds.SoundInstance; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; +import net.minecraft.network.HashedStack; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ServerGamePacketListener; import net.minecraft.network.protocol.game.ServerboundContainerButtonClickPacket; import net.minecraft.network.protocol.game.ServerboundContainerClickPacket; import net.minecraft.network.protocol.game.ServerboundContainerSlotStateChangedPacket; import net.minecraft.network.protocol.game.ServerboundInteractPacket; -import net.minecraft.network.protocol.game.ServerboundPickItemPacket; +import net.minecraft.network.protocol.game.ServerboundPickItemFromBlockPacket; +import net.minecraft.network.protocol.game.ServerboundPickItemFromEntityPacket; import net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket; import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket; import net.minecraft.network.protocol.game.ServerboundSetCarriedItemPacket; @@ -39,6 +43,8 @@ import net.minecraft.stats.StatsCounter; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResult.Success; +import net.minecraft.world.InteractionResult.TryEmptyHandInteraction; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.HasCustomInventoryScreen; import net.minecraft.world.entity.player.Player; @@ -118,7 +124,7 @@ public class MultiPlayerGameMode { } else { Level level = this.minecraft.level; BlockState blockState = level.getBlockState(pos); - if (!this.minecraft.player.getMainHandItem().getItem().canAttackBlock(blockState, level, pos, this.minecraft.player)) { + if (!this.minecraft.player.getMainHandItem().canDestroyBlock(blockState, level, pos, this.minecraft.player)) { return false; } else { Block block = blockState.getBlock(); @@ -149,7 +155,7 @@ public class MultiPlayerGameMode { } else if (!this.minecraft.level.getWorldBorder().isWithinBounds(loc)) { return false; } else { - if (this.localPlayerMode.isCreative()) { + if (this.minecraft.player.getAbilities().instabuild) { BlockState blockState = this.minecraft.level.getBlockState(loc); this.minecraft.getTutorial().onDestroyBlock(this.minecraft.level, loc, blockState, 1.0F); this.startPrediction(this.minecraft.level, i -> { @@ -209,7 +215,7 @@ public class MultiPlayerGameMode { if (this.destroyDelay > 0) { this.destroyDelay--; return true; - } else if (this.localPlayerMode.isCreative() && this.minecraft.level.getWorldBorder().isWithinBounds(posBlock)) { + } else if (this.minecraft.player.getAbilities().instabuild && this.minecraft.level.getWorldBorder().isWithinBounds(posBlock)) { this.destroyDelay = 5; BlockState blockState = this.minecraft.level.getBlockState(posBlock); this.minecraft.getTutorial().onDestroyBlock(this.minecraft.level, posBlock, blockState, 1.0F); @@ -288,7 +294,7 @@ public class MultiPlayerGameMode { * Syncs the current player item with the server */ private void ensureHasSentCarriedItem() { - int i = this.minecraft.player.getInventory().selected; + int i = this.minecraft.player.getInventory().getSelectedSlot(); if (i != this.carriedIndex) { this.carriedIndex = i; this.connection.send(new ServerboundSetCarriedItemPacket(this.carriedIndex)); @@ -328,7 +334,7 @@ public class MultiPlayerGameMode { return interactionResult; } - if (interactionResult instanceof InteractionResult.TryEmptyHandInteraction && hand == InteractionHand.MAIN_HAND) { + if (interactionResult instanceof TryEmptyHandInteraction && hand == InteractionHand.MAIN_HAND) { InteractionResult interactionResult2 = blockState.useWithoutItem(this.minecraft.level, player, result); if (interactionResult2.consumesAction()) { return interactionResult2; @@ -339,7 +345,7 @@ public class MultiPlayerGameMode { if (!itemStack.isEmpty() && !player.getCooldowns().isOnCooldown(itemStack)) { UseOnContext useOnContext = new UseOnContext(player, hand, result); InteractionResult interactionResult3; - if (this.localPlayerMode.isCreative()) { + if (player.hasInfiniteMaterials()) { int i = itemStack.getCount(); interactionResult3 = itemStack.useOn(useOnContext); itemStack.setCount(i); @@ -369,7 +375,7 @@ public class MultiPlayerGameMode { } else { InteractionResult interactionResult = itemStack.use(this.minecraft.level, player, hand); ItemStack itemStack2; - if (interactionResult instanceof InteractionResult.Success success) { + if (interactionResult instanceof Success success) { itemStack2 = (ItemStack)Objects.requireNonNullElseGet(success.heldItemTransformedTo(), () -> player.getItemInHand(hand)); } else { itemStack2 = player.getItemInHand(hand); @@ -440,27 +446,28 @@ public class MultiPlayerGameMode { } abstractContainerMenu.clicked(slotId, mouseButton, clickType, player); - Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(); + Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(); for (int j = 0; j < i; j++) { ItemStack itemStack = (ItemStack)list.get(j); ItemStack itemStack2 = nonNullList.get(j).getItem(); if (!ItemStack.matches(itemStack, itemStack2)) { - int2ObjectMap.put(j, itemStack2.copy()); + int2ObjectMap.put(j, HashedStack.create(itemStack2, this.connection.decoratedHashOpsGenenerator())); } } + HashedStack hashedStack = HashedStack.create(abstractContainerMenu.getCarried(), this.connection.decoratedHashOpsGenenerator()); this.connection .send( new ServerboundContainerClickPacket( - containerId, abstractContainerMenu.getStateId(), slotId, mouseButton, clickType, abstractContainerMenu.getCarried().copy(), int2ObjectMap + containerId, abstractContainerMenu.getStateId(), Shorts.checkedCast(slotId), SignedBytes.checkedCast(mouseButton), clickType, int2ObjectMap, hashedStack ) ); } } - public void handlePlaceRecipe(int i, RecipeDisplayId recipeDisplayId, boolean bl) { - this.connection.send(new ServerboundPlaceRecipePacket(i, recipeDisplayId, bl)); + public void handlePlaceRecipe(int containerId, RecipeDisplayId recipe, boolean useMaxItems) { + this.connection.send(new ServerboundPlaceRecipePacket(containerId, recipe, useMaxItems)); } /** @@ -474,7 +481,7 @@ public class MultiPlayerGameMode { * Used in PlayerControllerMP to update the server with an ItemStack in a slot. */ public void handleCreativeModeItemAdd(ItemStack stack, int slotId) { - if (this.localPlayerMode.isCreative() && this.connection.isFeatureEnabled(stack.getItem().requiredFeatures())) { + if (this.minecraft.player.hasInfiniteMaterials() && this.connection.isFeatureEnabled(stack.getItem().requiredFeatures())) { this.connection.send(new ServerboundSetCreativeModeSlotPacket(slotId, stack)); } } @@ -484,7 +491,7 @@ public class MultiPlayerGameMode { */ public void handleCreativeModeItemDrop(ItemStack stack) { boolean bl = this.minecraft.screen instanceof AbstractContainerScreen && !(this.minecraft.screen instanceof CreativeModeInventoryScreen); - if (this.localPlayerMode.isCreative() && !bl && !stack.isEmpty() && this.connection.isFeatureEnabled(stack.getItem().requiredFeatures())) { + if (this.minecraft.player.hasInfiniteMaterials() && !bl && !stack.isEmpty() && this.connection.isFeatureEnabled(stack.getItem().requiredFeatures())) { this.connection.send(new ServerboundSetCreativeModeSlotPacket(-1, stack)); this.minecraft.player.getDropSpamThrottler().increment(); } @@ -507,13 +514,6 @@ public class MultiPlayerGameMode { return !this.localPlayerMode.isCreative(); } - /** - * Returns {@code true} if player is in creative mode. - */ - public boolean hasInfiniteItems() { - return this.localPlayerMode.isCreative(); - } - /** * Checks if the player is riding a horse, used to choose the GUI to open */ @@ -545,8 +545,12 @@ public class MultiPlayerGameMode { return this.destroyProgress > 0.0F ? (int)(this.destroyProgress * 10.0F) : -1; } - public void handlePickItem(int index) { - this.connection.send(new ServerboundPickItemPacket(index)); + public void handlePickItemFromBlock(BlockPos pos, boolean includeData) { + this.connection.send(new ServerboundPickItemFromBlockPacket(pos, includeData)); + } + + public void handlePickItemFromEntity(Entity entity, boolean includeData) { + this.connection.send(new ServerboundPickItemFromEntityPacket(entity.getId(), includeData)); } public void handleSlotStateChanged(int slotId, int containerId, boolean newState) { diff --git a/net/minecraft/client/multiplayer/PlayerInfo.java b/net/minecraft/client/multiplayer/PlayerInfo.java index db73cdbe..151bc229 100644 --- a/net/minecraft/client/multiplayer/PlayerInfo.java +++ b/net/minecraft/client/multiplayer/PlayerInfo.java @@ -2,6 +2,7 @@ package net.minecraft.client.multiplayer; import com.google.common.base.Suppliers; import com.mojang.authlib.GameProfile; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.function.Supplier; import net.fabricmc.api.EnvType; @@ -32,6 +33,7 @@ public class PlayerInfo { */ @Nullable private Component tabListDisplayName; + private boolean showHat = true; @Nullable private RemoteChatSession chatSession; private SignedMessageValidator messageValidator; @@ -47,11 +49,11 @@ public class PlayerInfo { private static Supplier createSkinLookup(GameProfile profile) { Minecraft minecraft = Minecraft.getInstance(); SkinManager skinManager = minecraft.getSkinManager(); - CompletableFuture completableFuture = skinManager.getOrLoad(profile); + CompletableFuture> completableFuture = skinManager.getOrLoad(profile); boolean bl = !minecraft.isLocalPlayer(profile.getId()); PlayerSkin playerSkin = DefaultPlayerSkin.get(profile); return () -> { - PlayerSkin playerSkin2 = (PlayerSkin)completableFuture.getNow(playerSkin); + PlayerSkin playerSkin2 = (PlayerSkin)((Optional)completableFuture.getNow(Optional.empty())).orElse(playerSkin); return bl && !playerSkin2.secure() ? playerSkin : playerSkin2; }; } @@ -124,8 +126,16 @@ public class PlayerInfo { return this.tabListDisplayName; } - public void setTabListOrder(int i) { - this.tabListOrder = i; + public void setShowHat(boolean showHat) { + this.showHat = showHat; + } + + public boolean showHat() { + return this.showHat; + } + + public void setTabListOrder(int tabListOrder) { + this.tabListOrder = tabListOrder; } public int getTabListOrder() { diff --git a/net/minecraft/client/multiplayer/RegistryDataCollector.java b/net/minecraft/client/multiplayer/RegistryDataCollector.java index ff4a6474..5619d36a 100644 --- a/net/minecraft/client/multiplayer/RegistryDataCollector.java +++ b/net/minecraft/client/multiplayer/RegistryDataCollector.java @@ -50,17 +50,19 @@ public class RegistryDataCollector { } private static Registry.PendingTags resolveRegistryTags( - RegistryAccess.Frozen frozen, ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload + RegistryAccess.Frozen registryAccess, ResourceKey> registryKey, TagNetworkSerialization.NetworkPayload payload ) { - Registry registry = frozen.lookupOrThrow(resourceKey); - return registry.prepareTagReload(networkPayload.resolve(registry)); + Registry registry = registryAccess.lookupOrThrow(registryKey); + return registry.prepareTagReload(payload.resolve(registry)); } - private RegistryAccess loadNewElementsAndTags(ResourceProvider resourceProvider, RegistryDataCollector.ContentsCollector contentsCollector, boolean bl) { + private RegistryAccess loadNewElementsAndTags( + ResourceProvider resourceProvider, RegistryDataCollector.ContentsCollector contentCollector, boolean isMemoryConnection + ) { LayeredRegistryAccess layeredRegistryAccess = ClientRegistryLayer.createRegistryAccess(); RegistryAccess.Frozen frozen = layeredRegistryAccess.getAccessForLoading(ClientRegistryLayer.REMOTE); Map>, RegistryDataLoader.NetworkedRegistryData> map = new HashMap(); - contentsCollector.elements + contentCollector.elements .forEach((resourceKey, listx) -> map.put(resourceKey, new RegistryDataLoader.NetworkedRegistryData(listx, TagNetworkSerialization.NetworkPayload.EMPTY))); List> list = new ArrayList(); if (this.tagCollector != null) { @@ -71,7 +73,7 @@ public class RegistryDataCollector { List listxx = networkedRegistryData != null ? networkedRegistryData.elements() : List.of(); return new RegistryDataLoader.NetworkedRegistryData(listxx, networkPayload); }); - } else if (!bl) { + } else if (!isMemoryConnection) { list.add(resolveRegistryTags(frozen, resourceKey, networkPayload)); } } @@ -95,12 +97,14 @@ public class RegistryDataCollector { } private static void addCrashDetails( - CrashReport crashReport, Map>, RegistryDataLoader.NetworkedRegistryData> map, List> list + CrashReport crashReport, + Map>, RegistryDataLoader.NetworkedRegistryData> dynamicRegistries, + List> staticRegistries ) { CrashReportCategory crashReportCategory = crashReport.addCategory("Received Elements and Tags"); crashReportCategory.setDetail( "Dynamic Registries", - (CrashReportDetail)(() -> (String)map.entrySet() + (CrashReportDetail)(() -> (String)dynamicRegistries.entrySet() .stream() .sorted(Comparator.comparing(entry -> ((ResourceKey)entry.getKey()).location())) .map( @@ -116,34 +120,34 @@ public class RegistryDataCollector { ); crashReportCategory.setDetail( "Static Registries", - (CrashReportDetail)(() -> (String)list.stream() + (CrashReportDetail)(() -> (String)staticRegistries.stream() .sorted(Comparator.comparing(pendingTags -> pendingTags.key().location())) .map(pendingTags -> String.format(Locale.ROOT, "\n\t\t%s: tags=%d", pendingTags.key().location(), pendingTags.size())) .collect(Collectors.joining())) ); } - private void loadOnlyTags(RegistryDataCollector.TagCollector tagCollector, RegistryAccess.Frozen frozen, boolean bl) { + private void loadOnlyTags(RegistryDataCollector.TagCollector tagCollector, RegistryAccess.Frozen registryAccess, boolean isMemoryConnection) { tagCollector.forEach((resourceKey, networkPayload) -> { - if (bl || RegistrySynchronization.isNetworkable(resourceKey)) { - resolveRegistryTags(frozen, resourceKey, networkPayload).apply(); + if (isMemoryConnection || RegistrySynchronization.isNetworkable(resourceKey)) { + resolveRegistryTags(registryAccess, resourceKey, networkPayload).apply(); } }); } - public RegistryAccess.Frozen collectGameRegistries(ResourceProvider resourceProvider, RegistryAccess.Frozen frozen, boolean bl) { - RegistryAccess registryAccess; + public RegistryAccess.Frozen collectGameRegistries(ResourceProvider resourceProvider, RegistryAccess.Frozen registryAccess, boolean isMemoryConnection) { + RegistryAccess registryAccess2; if (this.contentsCollector != null) { - registryAccess = this.loadNewElementsAndTags(resourceProvider, this.contentsCollector, bl); + registryAccess2 = this.loadNewElementsAndTags(resourceProvider, this.contentsCollector, isMemoryConnection); } else { if (this.tagCollector != null) { - this.loadOnlyTags(this.tagCollector, frozen, !bl); + this.loadOnlyTags(this.tagCollector, registryAccess, !isMemoryConnection); } - registryAccess = frozen; + registryAccess2 = registryAccess; } - return registryAccess.freeze(); + return registryAccess2.freeze(); } @Environment(EnvType.CLIENT) @@ -159,12 +163,12 @@ public class RegistryDataCollector { static class TagCollector { private final Map>, TagNetworkSerialization.NetworkPayload> tags = new HashMap(); - public void append(ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload) { - this.tags.put(resourceKey, networkPayload); + public void append(ResourceKey> registryKey, TagNetworkSerialization.NetworkPayload payload) { + this.tags.put(registryKey, payload); } - public void forEach(BiConsumer>, ? super TagNetworkSerialization.NetworkPayload> biConsumer) { - this.tags.forEach(biConsumer); + public void forEach(BiConsumer>, ? super TagNetworkSerialization.NetworkPayload> action) { + this.tags.forEach(action); } } } diff --git a/net/minecraft/client/multiplayer/ServerData.java b/net/minecraft/client/multiplayer/ServerData.java index 094fd409..a7a1b4eb 100644 --- a/net/minecraft/client/multiplayer/ServerData.java +++ b/net/minecraft/client/multiplayer/ServerData.java @@ -1,16 +1,19 @@ package net.minecraft.client.multiplayer; import com.mojang.logging.LogUtils; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import java.io.IOException; -import java.util.Base64; import java.util.Collections; import java.util.List; +import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.SharedConstants; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.status.ServerStatus.Players; +import net.minecraft.util.ExtraCodecs; import net.minecraft.util.PngInfo; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -48,16 +51,8 @@ public class ServerData { CompoundTag compoundTag = new CompoundTag(); compoundTag.putString("name", this.name); compoundTag.putString("ip", this.ip); - if (this.iconBytes != null) { - compoundTag.putString("icon", Base64.getEncoder().encodeToString(this.iconBytes)); - } - - if (this.packStatus == ServerData.ServerPackStatus.ENABLED) { - compoundTag.putBoolean("acceptTextures", true); - } else if (this.packStatus == ServerData.ServerPackStatus.DISABLED) { - compoundTag.putBoolean("acceptTextures", false); - } - + compoundTag.storeNullable("icon", ExtraCodecs.BASE64_STRING, this.iconBytes); + compoundTag.store(ServerData.ServerPackStatus.FIELD_CODEC, this.packStatus); return compoundTag; } @@ -73,26 +68,11 @@ public class ServerData { * Takes an NBTTagCompound with 'name' and 'ip' keys, returns a ServerData instance. */ public static ServerData read(CompoundTag nbtCompound) { - ServerData serverData = new ServerData(nbtCompound.getString("name"), nbtCompound.getString("ip"), ServerData.Type.OTHER); - if (nbtCompound.contains("icon", 8)) { - try { - byte[] bs = Base64.getDecoder().decode(nbtCompound.getString("icon")); - serverData.setIconBytes(validateIcon(bs)); - } catch (IllegalArgumentException var3) { - LOGGER.warn("Malformed base64 server icon", (Throwable)var3); - } - } - - if (nbtCompound.contains("acceptTextures", 99)) { - if (nbtCompound.getBoolean("acceptTextures")) { - serverData.setResourcePackStatus(ServerData.ServerPackStatus.ENABLED); - } else { - serverData.setResourcePackStatus(ServerData.ServerPackStatus.DISABLED); - } - } else { - serverData.setResourcePackStatus(ServerData.ServerPackStatus.PROMPT); - } - + ServerData serverData = new ServerData(nbtCompound.getStringOr("name", ""), nbtCompound.getStringOr("ip", ""), ServerData.Type.OTHER); + serverData.setIconBytes((byte[])nbtCompound.read("icon", ExtraCodecs.BASE64_STRING).orElse(null)); + serverData.setResourcePackStatus( + (ServerData.ServerPackStatus)nbtCompound.read(ServerData.ServerPackStatus.FIELD_CODEC).orElse(ServerData.ServerPackStatus.PROMPT) + ); return serverData; } @@ -162,6 +142,15 @@ public class ServerData { DISABLED("disabled"), PROMPT("prompt"); + public static final MapCodec FIELD_CODEC = Codec.BOOL + .optionalFieldOf("acceptTextures") + .xmap(optional -> (ServerData.ServerPackStatus)optional.map(boolean_ -> boolean_ ? ENABLED : DISABLED).orElse(PROMPT), serverPackStatus -> { + return switch (serverPackStatus) { + case ENABLED -> Optional.of(true); + case DISABLED -> Optional.of(false); + case PROMPT -> Optional.empty(); + }; + }); private final Component name; private ServerPackStatus(final String name) { diff --git a/net/minecraft/client/multiplayer/ServerList.java b/net/minecraft/client/multiplayer/ServerList.java index 6bc01a15..3c3d214e 100644 --- a/net/minecraft/client/multiplayer/ServerList.java +++ b/net/minecraft/client/multiplayer/ServerList.java @@ -42,19 +42,16 @@ public class ServerList { return; } - ListTag listTag = compoundTag.getList("servers", 10); - - for (int i = 0; i < listTag.size(); i++) { - CompoundTag compoundTag2 = listTag.getCompound(i); - ServerData serverData = ServerData.read(compoundTag2); - if (compoundTag2.getBoolean("hidden")) { + compoundTag.getListOrEmpty("servers").compoundStream().forEach(compoundTagx -> { + ServerData serverData = ServerData.read(compoundTagx); + if (compoundTagx.getBooleanOr("hidden", false)) { this.hiddenServerList.add(serverData); } else { this.serverList.add(serverData); } - } - } catch (Exception var6) { - LOGGER.error("Couldn't load server list", (Throwable)var6); + }); + } catch (Exception var2) { + LOGGER.error("Couldn't load server list", (Throwable)var2); } } diff --git a/net/minecraft/client/multiplayer/SessionSearchTrees.java b/net/minecraft/client/multiplayer/SessionSearchTrees.java index 28a8f7c3..de122880 100644 --- a/net/minecraft/client/multiplayer/SessionSearchTrees.java +++ b/net/minecraft/client/multiplayer/SessionSearchTrees.java @@ -55,11 +55,11 @@ public class SessionSearchTrees { .filter(string -> !string.isEmpty()); } - public void updateRecipes(ClientRecipeBook clientRecipeBook, Level level) { + public void updateRecipes(ClientRecipeBook recipeBook, Level level) { this.register( RECIPE_COLLECTIONS, () -> { - List list = clientRecipeBook.getCollections(); + List list = recipeBook.getCollections(); RegistryAccess registryAccess = level.registryAccess(); Registry registry = registryAccess.lookupOrThrow(Registries.ITEM); Item.TooltipContext tooltipContext = Item.TooltipContext.of(registryAccess); diff --git a/net/minecraft/client/multiplayer/chat/ChatListener.java b/net/minecraft/client/multiplayer/chat/ChatListener.java index 5eca4538..9d3ceec8 100644 --- a/net/minecraft/client/multiplayer/chat/ChatListener.java +++ b/net/minecraft/client/multiplayer/chat/ChatListener.java @@ -13,11 +13,11 @@ import net.minecraft.Util; import net.minecraft.client.GuiMessageTag; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientPacketListener; -import net.minecraft.network.chat.ChatType; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.FilterMask; import net.minecraft.network.chat.MessageSignature; import net.minecraft.network.chat.PlayerChatMessage; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.util.StringDecomposer; import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.Nullable; @@ -85,7 +85,7 @@ public class ChatListener { } } - public void handlePlayerChatMessage(PlayerChatMessage chatMessage, GameProfile gameProfile, ChatType.Bound boundChatType) { + public void handlePlayerChatMessage(PlayerChatMessage chatMessage, GameProfile gameProfile, Bound boundChatType) { boolean bl = this.minecraft.options.onlyShowSecureChat().get(); PlayerChatMessage playerChatMessage = bl ? chatMessage.removeUnsignedContent() : chatMessage; Component component = boundChatType.decorate(playerChatMessage.decoratedContent()); @@ -93,16 +93,21 @@ public class ChatListener { this.handleMessage(chatMessage.signature(), () -> { boolean bl2 = this.showMessageToPlayer(boundChatType, chatMessage, component, gameProfile, bl, instant); ClientPacketListener clientPacketListener = this.minecraft.getConnection(); - if (clientPacketListener != null) { - clientPacketListener.markMessageAsProcessed(chatMessage, bl2); + if (clientPacketListener != null && chatMessage.signature() != null) { + clientPacketListener.markMessageAsProcessed(chatMessage.signature(), bl2); } return bl2; }); } - public void handleChatMessageError(UUID sender, ChatType.Bound boundChatType) { + public void handleChatMessageError(UUID sender, @Nullable MessageSignature signature, Bound boundChatType) { this.handleMessage(null, () -> { + ClientPacketListener clientPacketListener = this.minecraft.getConnection(); + if (clientPacketListener != null && signature != null) { + clientPacketListener.markMessageAsProcessed(signature, false); + } + if (this.minecraft.isBlocked(sender)) { return false; } else { @@ -114,7 +119,7 @@ public class ChatListener { }); } - public void handleDisguisedChatMessage(Component message, ChatType.Bound boundChatType) { + public void handleDisguisedChatMessage(Component message, Bound boundChatType) { Instant instant = Instant.now(); this.handleMessage(null, () -> { Component component2 = boundChatType.decorate(message); @@ -127,12 +132,7 @@ public class ChatListener { } private boolean showMessageToPlayer( - ChatType.Bound boundChatType, - PlayerChatMessage chatMessage, - Component decoratedServerContent, - GameProfile gameProfile, - boolean onlyShowSecureChat, - Instant timestamp + Bound boundChatType, PlayerChatMessage chatMessage, Component decoratedServerContent, GameProfile gameProfile, boolean onlyShowSecureChat, Instant timestamp ) { ChatTrustLevel chatTrustLevel = this.evaluateTrustLevel(chatMessage, decoratedServerContent, timestamp); if (onlyShowSecureChat && chatTrustLevel.isNotSecure()) { @@ -160,7 +160,7 @@ public class ChatListener { } } - private void narrateChatMessage(ChatType.Bound boundChatType, Component message) { + private void narrateChatMessage(Bound boundChatType, Component message) { this.minecraft.getNarrator().sayChat(boundChatType.decorateNarration(message)); } @@ -168,7 +168,7 @@ public class ChatListener { return this.isSenderLocalPlayer(chatMessage.sender()) ? ChatTrustLevel.SECURE : ChatTrustLevel.evaluate(chatMessage, decoratedServerContent, timestamp); } - private void logPlayerMessage(PlayerChatMessage message, ChatType.Bound boundChatType, GameProfile gameProfile, ChatTrustLevel trustLevel) { + private void logPlayerMessage(PlayerChatMessage message, Bound boundChatType, GameProfile gameProfile, ChatTrustLevel trustLevel) { ChatLog chatLog = this.minecraft.getReportingContext().chatLog(); chatLog.push(LoggedChatMessage.player(gameProfile, message, trustLevel)); } diff --git a/net/minecraft/client/multiplayer/chat/report/ChatReport.java b/net/minecraft/client/multiplayer/chat/report/ChatReport.java index cbbd9bcd..4535f645 100644 --- a/net/minecraft/client/multiplayer/chat/report/ChatReport.java +++ b/net/minecraft/client/multiplayer/chat/report/ChatReport.java @@ -20,7 +20,9 @@ import net.fabricmc.api.Environment; import net.minecraft.Optionull; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.reporting.ChatReportScreen; -import net.minecraft.client.multiplayer.chat.LoggedChatMessage; +import net.minecraft.client.multiplayer.chat.LoggedChatMessage.Player; +import net.minecraft.client.multiplayer.chat.report.Report.CannotBuildReason; +import net.minecraft.client.multiplayer.chat.report.Report.Result; import net.minecraft.network.chat.MessageSignature; import net.minecraft.network.chat.SignedMessageBody; import net.minecraft.network.chat.SignedMessageLink; @@ -31,8 +33,8 @@ import org.jetbrains.annotations.Nullable; public class ChatReport extends Report { final IntSet reportedMessages = new IntOpenHashSet(); - ChatReport(UUID reportId, Instant createdAt, UUID reportedProfileId) { - super(reportId, createdAt, reportedProfileId); + ChatReport(UUID uUID, Instant instant, UUID uUID2) { + super(uUID, instant, uUID2); } public void toggleReported(int id, AbuseReportLimits limits) { @@ -58,7 +60,7 @@ public class ChatReport extends Report { } @Environment(EnvType.CLIENT) - public static class Builder extends Report.Builder { + public static class Builder extends net.minecraft.client.multiplayer.chat.report.Report.Builder { public Builder(ChatReport report, AbuseReportLimits limits) { super(report, limits); } @@ -86,21 +88,21 @@ public class ChatReport extends Report { @Nullable @Override - public Report.CannotBuildReason checkBuildable() { + public CannotBuildReason checkBuildable() { if (this.report.reportedMessages.isEmpty()) { - return Report.CannotBuildReason.NO_REPORTED_MESSAGES; + return CannotBuildReason.NO_REPORTED_MESSAGES; } else if (this.report.reportedMessages.size() > this.limits.maxReportedMessageCount()) { - return Report.CannotBuildReason.TOO_MANY_MESSAGES; + return CannotBuildReason.TOO_MANY_MESSAGES; } else if (this.report.reason == null) { - return Report.CannotBuildReason.NO_REASON; + return CannotBuildReason.NO_REASON; } else { - return this.report.comments.length() > this.limits.maxOpinionCommentsLength() ? Report.CannotBuildReason.COMMENT_TOO_LONG : super.checkBuildable(); + return this.report.comments.length() > this.limits.maxOpinionCommentsLength() ? CannotBuildReason.COMMENT_TOO_LONG : super.checkBuildable(); } } @Override - public Either build(ReportingContext reportingContext) { - Report.CannotBuildReason cannotBuildReason = this.checkBuildable(); + public Either build(ReportingContext reportingContext) { + CannotBuildReason cannotBuildReason = this.checkBuildable(); if (cannotBuildReason != null) { return Either.right(cannotBuildReason); } else { @@ -108,7 +110,7 @@ public class ChatReport extends Report { ReportEvidence reportEvidence = this.buildEvidence(reportingContext); ReportedEntity reportedEntity = new ReportedEntity(this.report.reportedProfileId); AbuseReport abuseReport = AbuseReport.chat(this.report.comments, string, reportEvidence, reportedEntity, this.report.createdAt); - return Either.left(new Report.Result(this.report.reportId, ReportType.CHAT, abuseReport)); + return Either.left(new Result(this.report.reportId, ReportType.CHAT, abuseReport)); } } @@ -121,7 +123,7 @@ public class ChatReport extends Report { return new ReportEvidence(Lists.reverse(list)); } - private ReportChatMessage buildReportedChatMessage(LoggedChatMessage.Player chatMessage, boolean messageReported) { + private ReportChatMessage buildReportedChatMessage(Player chatMessage, boolean messageReported) { SignedMessageLink signedMessageLink = chatMessage.message().link(); SignedMessageBody signedMessageBody = chatMessage.message().signedBody(); List list = signedMessageBody.lastSeen().entries().stream().map(MessageSignature::asByteBuffer).toList(); diff --git a/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java b/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java index 23eb04fa..a142716b 100644 --- a/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java +++ b/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java @@ -46,7 +46,7 @@ public record ReportEnvironment(String clientVersion, @Nullable ReportEnvironmen private static String getClientVersion() { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("1.21.2"); + stringBuilder.append("1.21.5"); if (Minecraft.checkModStatus().shouldReportAsModified()) { stringBuilder.append(" (modded)"); } diff --git a/net/minecraft/client/particle/BreakingItemParticle.java b/net/minecraft/client/particle/BreakingItemParticle.java index 558b2039..8cdf782b 100644 --- a/net/minecraft/client/particle/BreakingItemParticle.java +++ b/net/minecraft/client/particle/BreakingItemParticle.java @@ -4,8 +4,14 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ItemStackRenderState; +import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; +import net.minecraft.client.renderer.texture.TextureAtlas; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.particles.ItemParticleOption; +import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; @@ -14,8 +20,8 @@ public class BreakingItemParticle extends TextureSheetParticle { private final float uo; private final float vo; - BreakingItemParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, ItemStack stack) { - this(level, x, y, z, stack); + BreakingItemParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, ItemStackRenderState renderState) { + this(level, x, y, z, renderState); this.xd *= 0.1F; this.yd *= 0.1F; this.zd *= 0.1F; @@ -29,9 +35,15 @@ public class BreakingItemParticle extends TextureSheetParticle { return ParticleRenderType.TERRAIN_SHEET; } - protected BreakingItemParticle(ClientLevel level, double x, double y, double z, ItemStack stack) { + protected BreakingItemParticle(ClientLevel level, double x, double y, double z, ItemStackRenderState renderState) { super(level, x, y, z, 0.0, 0.0, 0.0); - this.setSprite(Minecraft.getInstance().getItemRenderer().getModel(stack, level, null, 0).getParticleIcon()); + TextureAtlasSprite textureAtlasSprite = renderState.pickParticleIcon(this.random); + if (textureAtlasSprite != null) { + this.setSprite(textureAtlasSprite); + } else { + this.setSprite((TextureAtlasSprite)Minecraft.getInstance().getTextureAtlas(TextureAtlas.LOCATION_BLOCKS).apply(MissingTextureAtlasSprite.getLocation())); + } + this.gravity = 1.0F; this.quadSize /= 2.0F; this.uo = this.random.nextFloat() * 3.0F; @@ -59,30 +71,40 @@ public class BreakingItemParticle extends TextureSheetParticle { } @Environment(EnvType.CLIENT) - public static class CobwebProvider implements ParticleProvider { + public static class CobwebProvider extends BreakingItemParticle.ItemParticleProvider { public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { - return new BreakingItemParticle(clientLevel, d, e, f, new ItemStack(Items.COBWEB)); + return new BreakingItemParticle(clientLevel, d, e, f, this.calculateState(new ItemStack(Items.COBWEB), clientLevel)); } } @Environment(EnvType.CLIENT) - public static class Provider implements ParticleProvider { + public abstract static class ItemParticleProvider implements ParticleProvider { + private final ItemStackRenderState scratchRenderState = new ItemStackRenderState(); + + protected ItemStackRenderState calculateState(ItemStack stack, ClientLevel level) { + Minecraft.getInstance().getItemModelResolver().updateForTopItem(this.scratchRenderState, stack, ItemDisplayContext.GROUND, level, null, 0); + return this.scratchRenderState; + } + } + + @Environment(EnvType.CLIENT) + public static class Provider extends BreakingItemParticle.ItemParticleProvider { public Particle createParticle(ItemParticleOption type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new BreakingItemParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, type.getItem()); + return new BreakingItemParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, this.calculateState(type.getItem(), level)); } } @Environment(EnvType.CLIENT) - public static class SlimeProvider implements ParticleProvider { + public static class SlimeProvider extends BreakingItemParticle.ItemParticleProvider { public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new BreakingItemParticle(level, x, y, z, new ItemStack(Items.SLIME_BALL)); + return new BreakingItemParticle(level, x, y, z, this.calculateState(new ItemStack(Items.SLIME_BALL), level)); } } @Environment(EnvType.CLIENT) - public static class SnowballProvider implements ParticleProvider { + public static class SnowballProvider extends BreakingItemParticle.ItemParticleProvider { public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new BreakingItemParticle(level, x, y, z, new ItemStack(Items.SNOWBALL)); + return new BreakingItemParticle(level, x, y, z, this.calculateState(new ItemStack(Items.SNOWBALL), level)); } } } diff --git a/net/minecraft/client/particle/BubbleColumnUpParticle.java b/net/minecraft/client/particle/BubbleColumnUpParticle.java index b395f0a8..ed167d15 100644 --- a/net/minecraft/client/particle/BubbleColumnUpParticle.java +++ b/net/minecraft/client/particle/BubbleColumnUpParticle.java @@ -9,15 +9,15 @@ import net.minecraft.tags.FluidTags; @Environment(EnvType.CLIENT) public class BubbleColumnUpParticle extends TextureSheetParticle { - BubbleColumnUpParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z); + BubbleColumnUpParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f); this.gravity = -0.125F; this.friction = 0.85F; this.setSize(0.02F, 0.02F); this.quadSize = this.quadSize * (this.random.nextFloat() * 0.6F + 0.2F); - this.xd = xSpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; - this.yd = ySpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; - this.zd = zSpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.xd = g * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.yd = h * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.zd = i * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; this.lifetime = (int)(40.0 / (Math.random() * 0.8 + 0.2)); } diff --git a/net/minecraft/client/particle/BubbleParticle.java b/net/minecraft/client/particle/BubbleParticle.java index 164d0cdf..98c149b8 100644 --- a/net/minecraft/client/particle/BubbleParticle.java +++ b/net/minecraft/client/particle/BubbleParticle.java @@ -9,13 +9,13 @@ import net.minecraft.tags.FluidTags; @Environment(EnvType.CLIENT) public class BubbleParticle extends TextureSheetParticle { - BubbleParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z); + BubbleParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f); this.setSize(0.02F, 0.02F); this.quadSize = this.quadSize * (this.random.nextFloat() * 0.6F + 0.2F); - this.xd = xSpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; - this.yd = ySpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; - this.zd = zSpeed * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.xd = g * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.yd = h * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; + this.zd = i * 0.2F + (Math.random() * 2.0 - 1.0) * 0.02F; this.lifetime = (int)(8.0 / (Math.random() * 0.8 + 0.2)); } diff --git a/net/minecraft/client/particle/CherryParticle.java b/net/minecraft/client/particle/CherryParticle.java deleted file mode 100644 index 40b0dfe6..00000000 --- a/net/minecraft/client/particle/CherryParticle.java +++ /dev/null @@ -1,69 +0,0 @@ -package net.minecraft.client.particle; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; - -@Environment(EnvType.CLIENT) -public class CherryParticle extends TextureSheetParticle { - private static final float ACCELERATION_SCALE = 0.0025F; - private static final int INITIAL_LIFETIME = 300; - private static final int CURVE_ENDPOINT_TIME = 300; - private static final float FALL_ACC = 0.25F; - private static final float WIND_BIG = 2.0F; - private float rotSpeed; - private final float particleRandom; - private final float spinAcceleration; - - protected CherryParticle(ClientLevel level, double x, double y, double z, SpriteSet spriteSet) { - super(level, x, y, z); - this.setSprite(spriteSet.get(this.random.nextInt(12), 12)); - this.rotSpeed = (float)Math.toRadians(this.random.nextBoolean() ? -30.0 : 30.0); - this.particleRandom = this.random.nextFloat(); - this.spinAcceleration = (float)Math.toRadians(this.random.nextBoolean() ? -5.0 : 5.0); - this.lifetime = 300; - this.gravity = 7.5E-4F; - float f = this.random.nextBoolean() ? 0.05F : 0.075F; - this.quadSize = f; - this.setSize(f, f); - this.friction = 1.0F; - } - - @Override - public ParticleRenderType getRenderType() { - return ParticleRenderType.PARTICLE_SHEET_OPAQUE; - } - - @Override - public void tick() { - this.xo = this.x; - this.yo = this.y; - this.zo = this.z; - if (this.lifetime-- <= 0) { - this.remove(); - } - - if (!this.removed) { - float f = 300 - this.lifetime; - float g = Math.min(f / 300.0F, 1.0F); - double d = Math.cos(Math.toRadians(this.particleRandom * 60.0F)) * 2.0 * Math.pow(g, 1.25); - double e = Math.sin(Math.toRadians(this.particleRandom * 60.0F)) * 2.0 * Math.pow(g, 1.25); - this.xd += d * 0.0025F; - this.zd += e * 0.0025F; - this.yd = this.yd - this.gravity; - this.rotSpeed = this.rotSpeed + this.spinAcceleration / 20.0F; - this.oRoll = this.roll; - this.roll = this.roll + this.rotSpeed / 20.0F; - this.move(this.xd, this.yd, this.zd); - if (this.onGround || this.lifetime < 299 && (this.xd == 0.0 || this.zd == 0.0)) { - this.remove(); - } - - if (!this.removed) { - this.xd = this.xd * this.friction; - this.yd = this.yd * this.friction; - this.zd = this.zd * this.friction; - } - } - } -} diff --git a/net/minecraft/client/particle/CritParticle.java b/net/minecraft/client/particle/CritParticle.java index c14529b2..001f76fa 100644 --- a/net/minecraft/client/particle/CritParticle.java +++ b/net/minecraft/client/particle/CritParticle.java @@ -8,20 +8,20 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class CritParticle extends TextureSheetParticle { - CritParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, 0.0, 0.0, 0.0); + CritParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, 0.0, 0.0, 0.0); this.friction = 0.7F; this.gravity = 0.5F; this.xd *= 0.1F; this.yd *= 0.1F; this.zd *= 0.1F; - this.xd += xSpeed * 0.4; - this.yd += ySpeed * 0.4; - this.zd += zSpeed * 0.4; - float f = (float)(Math.random() * 0.3F + 0.6F); - this.rCol = f; - this.gCol = f; - this.bCol = f; + this.xd += g * 0.4; + this.yd += h * 0.4; + this.zd += i * 0.4; + float j = (float)(Math.random() * 0.3F + 0.6F); + this.rCol = j; + this.gCol = j; + this.bCol = j; this.quadSize *= 0.75F; this.lifetime = Math.max((int)(6.0 / (Math.random() * 0.8 + 0.6)), 1); this.hasPhysics = false; diff --git a/net/minecraft/client/particle/DripParticle.java b/net/minecraft/client/particle/DripParticle.java index 47468731..81be8a0c 100644 --- a/net/minecraft/client/particle/DripParticle.java +++ b/net/minecraft/client/particle/DripParticle.java @@ -310,8 +310,8 @@ public class DripParticle extends TextureSheetParticle { @Environment(EnvType.CLIENT) static class FallingParticle extends DripParticle { - FallingParticle(ClientLevel level, double x, double y, double z, Fluid type) { - this(level, x, y, z, type, (int)(64.0 / (Math.random() * 0.8 + 0.2))); + FallingParticle(ClientLevel clientLevel, double d, double e, double f, Fluid fluid) { + this(clientLevel, d, e, f, fluid, (int)(64.0 / (Math.random() * 0.8 + 0.2))); } FallingParticle(ClientLevel level, double x, double y, double z, Fluid type, int lifetime) { diff --git a/net/minecraft/client/particle/DustColorTransitionParticle.java b/net/minecraft/client/particle/DustColorTransitionParticle.java index 9e62d53f..9d362f0c 100644 --- a/net/minecraft/client/particle/DustColorTransitionParticle.java +++ b/net/minecraft/client/particle/DustColorTransitionParticle.java @@ -35,9 +35,9 @@ public class DustColorTransitionParticle extends DustParticleBase { + private final SpriteSet sprites; + + public CherryProvider(SpriteSet sprites) { + this.sprites = sprites; + } + + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new FallingLeavesParticle(clientLevel, d, e, f, this.sprites, 0.25F, 2.0F, false, true, 1.0F, 0.0F); + } + } + + @Environment(EnvType.CLIENT) + public static class PaleOakProvider implements ParticleProvider { + private final SpriteSet sprites; + + public PaleOakProvider(SpriteSet sprites) { + this.sprites = sprites; + } + + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new FallingLeavesParticle(clientLevel, d, e, f, this.sprites, 0.07F, 10.0F, true, false, 2.0F, 0.021F); + } + } + + @Environment(EnvType.CLIENT) + public static class TintedLeavesProvider implements ParticleProvider { + private final SpriteSet sprites; + + public TintedLeavesProvider(SpriteSet sprites) { + this.sprites = sprites; + } + + public Particle createParticle(ColorParticleOption colorParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + Particle particle = new FallingLeavesParticle(clientLevel, d, e, f, this.sprites, 0.07F, 10.0F, true, false, 2.0F, 0.021F); + particle.setColor(colorParticleOption.getRed(), colorParticleOption.getGreen(), colorParticleOption.getBlue()); + return particle; + } + } +} diff --git a/net/minecraft/client/particle/FireflyParticle.java b/net/minecraft/client/particle/FireflyParticle.java new file mode 100644 index 00000000..cb38be71 --- /dev/null +++ b/net/minecraft/client/particle/FireflyParticle.java @@ -0,0 +1,83 @@ +package net.minecraft.client.particle; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.util.Mth; + +@Environment(EnvType.CLIENT) +public class FireflyParticle extends TextureSheetParticle { + private static final float PARTICLE_FADE_OUT_LIGHT_TIME = 0.3F; + private static final float PARTICLE_FADE_IN_LIGHT_TIME = 0.1F; + private static final float PARTICLE_FADE_OUT_ALPHA_TIME = 0.5F; + private static final float PARTICLE_FADE_IN_ALPHA_TIME = 0.3F; + private static final int PARTICLE_MIN_LIFETIME = 36; + private static final int PARTICLE_MAX_LIFETIME = 180; + + FireflyParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); + this.speedUpWhenYMotionIsBlocked = true; + this.friction = 0.96F; + this.quadSize *= 0.75F; + this.yd *= 0.8F; + this.xd *= 0.8F; + this.zd *= 0.8F; + } + + @Override + public ParticleRenderType getRenderType() { + return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; + } + + @Override + public int getLightColor(float partialTick) { + return (int)(255.0F * getFadeAmount(this.getLifetimeProgress(this.age + partialTick), 0.1F, 0.3F)); + } + + @Override + public void tick() { + super.tick(); + if (!this.level.getBlockState(BlockPos.containing(this.x, this.y, this.z)).isAir()) { + this.remove(); + } else { + this.setAlpha(getFadeAmount(this.getLifetimeProgress(this.age), 0.3F, 0.5F)); + if (Math.random() > 0.95 || this.age == 1) { + this.setParticleSpeed(-0.05F + 0.1F * Math.random(), -0.05F + 0.1F * Math.random(), -0.05F + 0.1F * Math.random()); + } + } + } + + private float getLifetimeProgress(float age) { + return Mth.clamp(age / this.lifetime, 0.0F, 1.0F); + } + + private static float getFadeAmount(float lifetimeProgress, float fadeIn, float fadeOut) { + if (lifetimeProgress >= 1.0F - fadeIn) { + return (1.0F - lifetimeProgress) / fadeIn; + } else { + return lifetimeProgress <= fadeOut ? lifetimeProgress / fadeOut : 1.0F; + } + } + + @Environment(EnvType.CLIENT) + public static class FireflyProvider implements ParticleProvider { + private final SpriteSet sprite; + + public FireflyProvider(SpriteSet sprite) { + this.sprite = sprite; + } + + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + FireflyParticle fireflyParticle = new FireflyParticle( + clientLevel, d, e, f, 0.5 - clientLevel.random.nextDouble(), clientLevel.random.nextBoolean() ? h : -h, 0.5 - clientLevel.random.nextDouble() + ); + fireflyParticle.setLifetime(clientLevel.random.nextIntBetweenInclusive(36, 180)); + fireflyParticle.scale(1.5F); + fireflyParticle.pickSprite(this.sprite); + fireflyParticle.setAlpha(0.0F); + return fireflyParticle; + } + } +} diff --git a/net/minecraft/client/particle/FireworkParticles.java b/net/minecraft/client/particle/FireworkParticles.java index 591ce628..e1cc7490 100644 --- a/net/minecraft/client/particle/FireworkParticles.java +++ b/net/minecraft/client/particle/FireworkParticles.java @@ -18,6 +18,7 @@ import net.minecraft.util.ARGB; import net.minecraft.util.Mth; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.component.FireworkExplosion; +import net.minecraft.world.item.component.FireworkExplosion.Shape; @Environment(EnvType.CLIENT) public class FireworkParticles { @@ -38,8 +39,8 @@ public class FireworkParticles { @Environment(EnvType.CLIENT) public static class OverlayParticle extends TextureSheetParticle { - OverlayParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + OverlayParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); this.lifetime = 4; } @@ -49,9 +50,9 @@ public class FireworkParticles { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { - this.setAlpha(0.6F - (this.age + partialTicks - 1.0F) * 0.25F * 0.5F); - super.render(buffer, camera, partialTicks); + public void render(VertexConsumer buffer, Camera camera, float partialTick) { + this.setAlpha(0.6F - (this.age + partialTick - 1.0F) * 0.25F * 0.5F); + super.render(buffer, camera, partialTick); } @Override @@ -90,9 +91,9 @@ public class FireworkParticles { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { + public void render(VertexConsumer buffer, Camera camera, float partialTick) { if (!this.twinkle || this.age < this.lifetime / 3 || (this.age + this.lifetime) / 3 % 2 == 0) { - super.render(buffer, camera, partialTicks); + super.render(buffer, camera, partialTick); } } @@ -185,7 +186,7 @@ public class FireworkParticles { bl2 = true; } else { for (FireworkExplosion fireworkExplosion : this.explosions) { - if (fireworkExplosion.shape() == FireworkExplosion.Shape.LARGE_BALL) { + if (fireworkExplosion.shape() == Shape.LARGE_BALL) { bl2 = true; break; } diff --git a/net/minecraft/client/particle/FlameParticle.java b/net/minecraft/client/particle/FlameParticle.java index 04b18c61..f43e407e 100644 --- a/net/minecraft/client/particle/FlameParticle.java +++ b/net/minecraft/client/particle/FlameParticle.java @@ -8,8 +8,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class FlameParticle extends RisingParticle { - FlameParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); + FlameParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); } @Override @@ -67,8 +67,8 @@ public class FlameParticle extends RisingParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - FlameParticle flameParticle = new FlameParticle(level, x, y, z, xSpeed, ySpeed, zSpeed); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + FlameParticle flameParticle = new FlameParticle(clientLevel, d, e, f, g, h, i); flameParticle.pickSprite(this.sprite); flameParticle.scale(0.5F); return flameParticle; diff --git a/net/minecraft/client/particle/FlyStraightTowardsParticle.java b/net/minecraft/client/particle/FlyStraightTowardsParticle.java index 11e15484..ba858209 100644 --- a/net/minecraft/client/particle/FlyStraightTowardsParticle.java +++ b/net/minecraft/client/particle/FlyStraightTowardsParticle.java @@ -77,9 +77,9 @@ public class FlyStraightTowardsParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - FlyStraightTowardsParticle flyStraightTowardsParticle = new FlyStraightTowardsParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, -12210434, -1); - flyStraightTowardsParticle.scale(Mth.randomBetween(level.getRandom(), 3.0F, 5.0F)); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + FlyStraightTowardsParticle flyStraightTowardsParticle = new FlyStraightTowardsParticle(clientLevel, d, e, f, g, h, i, -12210434, -1); + flyStraightTowardsParticle.scale(Mth.randomBetween(clientLevel.getRandom(), 3.0F, 5.0F)); flyStraightTowardsParticle.pickSprite(this.sprite); return flyStraightTowardsParticle; } diff --git a/net/minecraft/client/particle/FlyTowardsPositionParticle.java b/net/minecraft/client/particle/FlyTowardsPositionParticle.java index d9d5df6e..1409f860 100644 --- a/net/minecraft/client/particle/FlyTowardsPositionParticle.java +++ b/net/minecraft/client/particle/FlyTowardsPositionParticle.java @@ -5,7 +5,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.particle.Particle.LifetimeAlpha; import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) @@ -14,14 +13,14 @@ public class FlyTowardsPositionParticle extends TextureSheetParticle { private final double yStart; private final double zStart; private final boolean isGlowing; - private final LifetimeAlpha lifetimeAlpha; + private final Particle.LifetimeAlpha lifetimeAlpha; - FlyTowardsPositionParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - this(level, x, y, z, xSpeed, ySpeed, zSpeed, false, LifetimeAlpha.ALWAYS_OPAQUE); + FlyTowardsPositionParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + this(clientLevel, d, e, f, g, h, i, false, Particle.LifetimeAlpha.ALWAYS_OPAQUE); } FlyTowardsPositionParticle( - ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, boolean isGlowing, LifetimeAlpha lifetimeAlpha + ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, boolean isGlowing, Particle.LifetimeAlpha lifetimeAlpha ) { super(level, x, y, z); this.isGlowing = isGlowing; @@ -99,9 +98,9 @@ public class FlyTowardsPositionParticle extends TextureSheetParticle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { - this.setAlpha(this.lifetimeAlpha.currentAlphaForAge(this.age, this.lifetime, partialTicks)); - super.render(buffer, camera, partialTicks); + public void render(VertexConsumer buffer, Camera camera, float partialTick) { + this.setAlpha(this.lifetimeAlpha.currentAlphaForAge(this.age, this.lifetime, partialTick)); + super.render(buffer, camera, partialTick); } @Environment(EnvType.CLIENT) @@ -112,8 +111,8 @@ public class FlyTowardsPositionParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - FlyTowardsPositionParticle flyTowardsPositionParticle = new FlyTowardsPositionParticle(level, x, y, z, xSpeed, ySpeed, zSpeed); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + FlyTowardsPositionParticle flyTowardsPositionParticle = new FlyTowardsPositionParticle(clientLevel, d, e, f, g, h, i); flyTowardsPositionParticle.pickSprite(this.sprite); return flyTowardsPositionParticle; } @@ -127,8 +126,8 @@ public class FlyTowardsPositionParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - FlyTowardsPositionParticle flyTowardsPositionParticle = new FlyTowardsPositionParticle(level, x, y, z, xSpeed, ySpeed, zSpeed); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + FlyTowardsPositionParticle flyTowardsPositionParticle = new FlyTowardsPositionParticle(clientLevel, d, e, f, g, h, i); flyTowardsPositionParticle.pickSprite(this.sprite); return flyTowardsPositionParticle; } @@ -142,9 +141,9 @@ public class FlyTowardsPositionParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { FlyTowardsPositionParticle flyTowardsPositionParticle = new FlyTowardsPositionParticle( - level, x, y, z, xSpeed, ySpeed, zSpeed, true, new LifetimeAlpha(0.0F, 0.6F, 0.25F, 1.0F) + clientLevel, d, e, f, g, h, i, true, new Particle.LifetimeAlpha(0.0F, 0.6F, 0.25F, 1.0F) ); flyTowardsPositionParticle.scale(1.5F); flyTowardsPositionParticle.pickSprite(this.sprite); diff --git a/net/minecraft/client/particle/GlowParticle.java b/net/minecraft/client/particle/GlowParticle.java index 9e878f4f..d84203bc 100644 --- a/net/minecraft/client/particle/GlowParticle.java +++ b/net/minecraft/client/particle/GlowParticle.java @@ -57,13 +57,13 @@ public class GlowParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - GlowParticle glowParticle = new GlowParticle(level, x, y, z, 0.0, 0.0, 0.0, this.sprite); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + GlowParticle glowParticle = new GlowParticle(clientLevel, d, e, f, 0.0, 0.0, 0.0, this.sprite); glowParticle.setColor(1.0F, 0.9F, 1.0F); - glowParticle.setParticleSpeed(xSpeed * 0.25, ySpeed * 0.25, zSpeed * 0.25); - int i = 2; - int j = 4; - glowParticle.setLifetime(level.random.nextInt(2) + 2); + glowParticle.setParticleSpeed(g * 0.25, h * 0.25, i * 0.25); + int j = 2; + int k = 4; + glowParticle.setLifetime(clientLevel.random.nextInt(2) + 2); return glowParticle; } } @@ -76,23 +76,23 @@ public class GlowParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { GlowParticle glowParticle = new GlowParticle( - level, x, y, z, 0.5 - GlowParticle.RANDOM.nextDouble(), ySpeed, 0.5 - GlowParticle.RANDOM.nextDouble(), this.sprite + clientLevel, d, e, f, 0.5 - GlowParticle.RANDOM.nextDouble(), h, 0.5 - GlowParticle.RANDOM.nextDouble(), this.sprite ); - if (level.random.nextBoolean()) { + if (clientLevel.random.nextBoolean()) { glowParticle.setColor(0.6F, 1.0F, 0.8F); } else { glowParticle.setColor(0.08F, 0.4F, 0.4F); } glowParticle.yd *= 0.2F; - if (xSpeed == 0.0 && zSpeed == 0.0) { + if (g == 0.0 && i == 0.0) { glowParticle.xd *= 0.1F; glowParticle.zd *= 0.1F; } - glowParticle.setLifetime((int)(8.0 / (level.random.nextDouble() * 0.8 + 0.2))); + glowParticle.setLifetime((int)(8.0 / (clientLevel.random.nextDouble() * 0.8 + 0.2))); return glowParticle; } } @@ -106,18 +106,18 @@ public class GlowParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - GlowParticle glowParticle = new GlowParticle(level, x, y, z, 0.0, 0.0, 0.0, this.sprite); - if (level.random.nextBoolean()) { + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + GlowParticle glowParticle = new GlowParticle(clientLevel, d, e, f, 0.0, 0.0, 0.0, this.sprite); + if (clientLevel.random.nextBoolean()) { glowParticle.setColor(0.29F, 0.58F, 0.51F); } else { glowParticle.setColor(0.43F, 0.77F, 0.62F); } - glowParticle.setParticleSpeed(xSpeed * 0.01, ySpeed * 0.01, zSpeed * 0.01); - int i = 10; - int j = 40; - glowParticle.setLifetime(level.random.nextInt(30) + 10); + glowParticle.setParticleSpeed(g * 0.01, h * 0.01, i * 0.01); + int j = 10; + int k = 40; + glowParticle.setLifetime(clientLevel.random.nextInt(30) + 10); return glowParticle; } } @@ -131,13 +131,13 @@ public class GlowParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - GlowParticle glowParticle = new GlowParticle(level, x, y, z, 0.0, 0.0, 0.0, this.sprite); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + GlowParticle glowParticle = new GlowParticle(clientLevel, d, e, f, 0.0, 0.0, 0.0, this.sprite); glowParticle.setColor(1.0F, 0.9F, 1.0F); - glowParticle.setParticleSpeed(xSpeed * 0.01 / 2.0, ySpeed * 0.01, zSpeed * 0.01 / 2.0); - int i = 10; - int j = 40; - glowParticle.setLifetime(level.random.nextInt(30) + 10); + glowParticle.setParticleSpeed(g * 0.01 / 2.0, h * 0.01, i * 0.01 / 2.0); + int j = 10; + int k = 40; + glowParticle.setLifetime(clientLevel.random.nextInt(30) + 10); return glowParticle; } } @@ -151,13 +151,13 @@ public class GlowParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - GlowParticle glowParticle = new GlowParticle(level, x, y, z, 0.0, 0.0, 0.0, this.sprite); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + GlowParticle glowParticle = new GlowParticle(clientLevel, d, e, f, 0.0, 0.0, 0.0, this.sprite); glowParticle.setColor(0.91F, 0.55F, 0.08F); - glowParticle.setParticleSpeed(xSpeed * 0.01 / 2.0, ySpeed * 0.01, zSpeed * 0.01 / 2.0); - int i = 10; - int j = 40; - glowParticle.setLifetime(level.random.nextInt(30) + 10); + glowParticle.setParticleSpeed(g * 0.01 / 2.0, h * 0.01, i * 0.01 / 2.0); + int j = 10; + int k = 40; + glowParticle.setLifetime(clientLevel.random.nextInt(30) + 10); return glowParticle; } } diff --git a/net/minecraft/client/particle/GustParticle.java b/net/minecraft/client/particle/GustParticle.java index f504b34a..8c5d6092 100644 --- a/net/minecraft/client/particle/GustParticle.java +++ b/net/minecraft/client/particle/GustParticle.java @@ -45,8 +45,8 @@ public class GustParticle extends TextureSheetParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new GustParticle(level, x, y, z, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new GustParticle(clientLevel, d, e, f, this.sprites); } } @@ -58,8 +58,8 @@ public class GustParticle extends TextureSheetParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - Particle particle = new GustParticle(level, x, y, z, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + Particle particle = new GustParticle(clientLevel, d, e, f, this.sprites); particle.scale(0.15F); return particle; } diff --git a/net/minecraft/client/particle/GustSeedParticle.java b/net/minecraft/client/particle/GustSeedParticle.java index b00ea8b1..b827993e 100644 --- a/net/minecraft/client/particle/GustSeedParticle.java +++ b/net/minecraft/client/particle/GustSeedParticle.java @@ -46,8 +46,8 @@ public class GustSeedParticle extends NoRenderParticle { this.tickDelayInBetween = tickDelayInBetween; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new GustSeedParticle(level, x, y, z, this.scale, this.lifetime, this.tickDelayInBetween); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new GustSeedParticle(clientLevel, d, e, f, this.scale, this.lifetime, this.tickDelayInBetween); } } } diff --git a/net/minecraft/client/particle/HeartParticle.java b/net/minecraft/client/particle/HeartParticle.java index eece9177..e54f7526 100644 --- a/net/minecraft/client/particle/HeartParticle.java +++ b/net/minecraft/client/particle/HeartParticle.java @@ -8,8 +8,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class HeartParticle extends TextureSheetParticle { - HeartParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z, 0.0, 0.0, 0.0); + HeartParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f, 0.0, 0.0, 0.0); this.speedUpWhenYMotionIsBlocked = true; this.friction = 0.86F; this.xd *= 0.01F; diff --git a/net/minecraft/client/particle/HugeExplosionSeedParticle.java b/net/minecraft/client/particle/HugeExplosionSeedParticle.java index 5219912f..a868807a 100644 --- a/net/minecraft/client/particle/HugeExplosionSeedParticle.java +++ b/net/minecraft/client/particle/HugeExplosionSeedParticle.java @@ -8,8 +8,8 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class HugeExplosionSeedParticle extends NoRenderParticle { - HugeExplosionSeedParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z, 0.0, 0.0, 0.0); + HugeExplosionSeedParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f, 0.0, 0.0, 0.0); this.lifetime = 8; } diff --git a/net/minecraft/client/particle/ItemPickupParticle.java b/net/minecraft/client/particle/ItemPickupParticle.java index 97bb312c..54f6659a 100644 --- a/net/minecraft/client/particle/ItemPickupParticle.java +++ b/net/minecraft/client/particle/ItemPickupParticle.java @@ -7,7 +7,6 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderBuffers; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; @@ -17,7 +16,6 @@ import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class ItemPickupParticle extends Particle { private static final int LIFE_TIME = 3; - private final RenderBuffers renderBuffers; private final Entity itemEntity; private final Entity target; private int life; @@ -29,15 +27,12 @@ public class ItemPickupParticle extends Particle { private double targetYOld; private double targetZOld; - public ItemPickupParticle(EntityRenderDispatcher entityRenderDispatcher, RenderBuffers buffers, ClientLevel level, Entity itemEntity, Entity target) { - this(entityRenderDispatcher, buffers, level, itemEntity, target, itemEntity.getDeltaMovement()); + public ItemPickupParticle(EntityRenderDispatcher entityRenderDispatcher, ClientLevel level, Entity itemEntity, Entity target) { + this(entityRenderDispatcher, level, itemEntity, target, itemEntity.getDeltaMovement()); } - private ItemPickupParticle( - EntityRenderDispatcher entityRenderDispatcher, RenderBuffers buffers, ClientLevel level, Entity itemEntity, Entity target, Vec3 speedVector - ) { - super(level, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), speedVector.x, speedVector.y, speedVector.z); - this.renderBuffers = buffers; + private ItemPickupParticle(EntityRenderDispatcher entityRenderDispatcher, ClientLevel level, Entity itemEntity, Entity target, Vec3 speed) { + super(level, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), speed.x, speed.y, speed.z); this.itemEntity = this.getSafeCopy(itemEntity); this.target = target; this.entityRenderDispatcher = entityRenderDispatcher; @@ -55,16 +50,15 @@ public class ItemPickupParticle extends Particle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { - float f = (this.life + partialTicks) / 3.0F; + public void renderCustom(PoseStack poseStack, MultiBufferSource bufferSource, Camera camera, float partialTick) { + float f = (this.life + partialTick) / 3.0F; f *= f; - double d = Mth.lerp((double)partialTicks, this.targetXOld, this.targetX); - double e = Mth.lerp((double)partialTicks, this.targetYOld, this.targetY); - double g = Mth.lerp((double)partialTicks, this.targetZOld, this.targetZ); + double d = Mth.lerp((double)partialTick, this.targetXOld, this.targetX); + double e = Mth.lerp((double)partialTick, this.targetYOld, this.targetY); + double g = Mth.lerp((double)partialTick, this.targetZOld, this.targetZ); double h = Mth.lerp((double)f, this.itemEntity.getX(), d); double i = Mth.lerp((double)f, this.itemEntity.getY(), e); double j = Mth.lerp((double)f, this.itemEntity.getZ(), g); - MultiBufferSource.BufferSource bufferSource = this.renderBuffers.bufferSource(); Vec3 vec3 = camera.getPosition(); this.entityRenderDispatcher .render( @@ -72,12 +66,15 @@ public class ItemPickupParticle extends Particle { h - vec3.x(), i - vec3.y(), j - vec3.z(), - partialTicks, + partialTick, new PoseStack(), bufferSource, - this.entityRenderDispatcher.getPackedLightCoords(this.itemEntity, partialTicks) + this.entityRenderDispatcher.getPackedLightCoords(this.itemEntity, partialTick) ); - bufferSource.endBatch(); + } + + @Override + public void render(VertexConsumer buffer, Camera camera, float partialTick) { } @Override diff --git a/net/minecraft/client/particle/LavaParticle.java b/net/minecraft/client/particle/LavaParticle.java index 3a85e09f..5d3482e5 100644 --- a/net/minecraft/client/particle/LavaParticle.java +++ b/net/minecraft/client/particle/LavaParticle.java @@ -8,8 +8,8 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class LavaParticle extends TextureSheetParticle { - LavaParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z, 0.0, 0.0, 0.0); + LavaParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f, 0.0, 0.0, 0.0); this.gravity = 0.75F; this.friction = 0.999F; this.xd *= 0.8F; diff --git a/net/minecraft/client/particle/MobAppearanceParticle.java b/net/minecraft/client/particle/MobAppearanceParticle.java index c63a096c..fc3973b0 100644 --- a/net/minecraft/client/particle/MobAppearanceParticle.java +++ b/net/minecraft/client/particle/MobAppearanceParticle.java @@ -24,8 +24,8 @@ public class MobAppearanceParticle extends Particle { private final Model model; private final RenderType renderType = RenderType.entityTranslucent(ElderGuardianRenderer.GUARDIAN_ELDER_LOCATION); - MobAppearanceParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + MobAppearanceParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); this.model = new GuardianModel(Minecraft.getInstance().getEntityModels().bakeLayer(ModelLayers.ELDER_GUARDIAN)); this.gravity = 0.0F; this.lifetime = 30; @@ -37,20 +37,23 @@ public class MobAppearanceParticle extends Particle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { - float f = (this.age + partialTicks) / this.lifetime; + public void renderCustom(PoseStack poseStack, MultiBufferSource bufferSource, Camera camera, float partialTick) { + float f = (this.age + partialTick) / this.lifetime; float g = 0.05F + 0.5F * Mth.sin(f * (float) Math.PI); int i = ARGB.colorFromFloat(g, 1.0F, 1.0F, 1.0F); - PoseStack poseStack = new PoseStack(); + poseStack.pushPose(); poseStack.mulPose(camera.rotation()); poseStack.mulPose(Axis.XP.rotationDegrees(60.0F - 150.0F * f)); float h = 0.42553192F; poseStack.scale(0.42553192F, -0.42553192F, -0.42553192F); poseStack.translate(0.0F, -0.56F, 3.5F); - MultiBufferSource.BufferSource bufferSource = Minecraft.getInstance().renderBuffers().bufferSource(); VertexConsumer vertexConsumer = bufferSource.getBuffer(this.renderType); this.model.renderToBuffer(poseStack, vertexConsumer, 15728880, OverlayTexture.NO_OVERLAY, i); - bufferSource.endBatch(); + poseStack.popPose(); + } + + @Override + public void render(VertexConsumer buffer, Camera camera, float partialTick) { } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/particle/NoRenderParticle.java b/net/minecraft/client/particle/NoRenderParticle.java index f1a6e776..7a83a1c6 100644 --- a/net/minecraft/client/particle/NoRenderParticle.java +++ b/net/minecraft/client/particle/NoRenderParticle.java @@ -8,16 +8,16 @@ import net.minecraft.client.multiplayer.ClientLevel; @Environment(EnvType.CLIENT) public class NoRenderParticle extends Particle { - protected NoRenderParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + protected NoRenderParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); } - protected NoRenderParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); + protected NoRenderParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); } @Override - public final void render(VertexConsumer buffer, Camera camera, float partialTicks) { + public final void render(VertexConsumer buffer, Camera camera, float partialTick) { } @Override diff --git a/net/minecraft/client/particle/Particle.java b/net/minecraft/client/particle/Particle.java index 8bd71f71..c77be2bf 100644 --- a/net/minecraft/client/particle/Particle.java +++ b/net/minecraft/client/particle/Particle.java @@ -1,5 +1,6 @@ package net.minecraft.client.particle; +import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.List; import java.util.Optional; @@ -8,6 +9,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleGroup; import net.minecraft.util.Mth; @@ -135,7 +137,10 @@ public abstract class Particle { } } - public abstract void render(VertexConsumer buffer, Camera camera, float partialTicks); + public abstract void render(VertexConsumer buffer, Camera camera, float partialTick); + + public void renderCustom(PoseStack poseStack, MultiBufferSource bufferSource, Camera camera, float partialTick) { + } public abstract ParticleRenderType getRenderType(); diff --git a/net/minecraft/client/particle/ParticleEngine.java b/net/minecraft/client/particle/ParticleEngine.java index 9def498b..bc75f6b3 100644 --- a/net/minecraft/client/particle/ParticleEngine.java +++ b/net/minecraft/client/particle/ParticleEngine.java @@ -5,11 +5,8 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.MeshData; -import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; @@ -22,6 +19,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Queue; import java.util.Set; @@ -37,19 +35,23 @@ import net.minecraft.Util; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.BlockMarker.Provider; -import net.minecraft.client.particle.BreakingItemParticle.CobwebProvider; -import net.minecraft.client.particle.BreakingItemParticle.SlimeProvider; -import net.minecraft.client.particle.BreakingItemParticle.SnowballProvider; import net.minecraft.client.particle.CampfireSmokeParticle.CosyProvider; import net.minecraft.client.particle.CampfireSmokeParticle.SignalProvider; import net.minecraft.client.particle.CritParticle.DamageIndicatorProvider; import net.minecraft.client.particle.CritParticle.MagicProvider; +import net.minecraft.client.particle.FireworkParticles.FlashProvider; +import net.minecraft.client.particle.FireworkParticles.SparkProvider; import net.minecraft.client.particle.FlameParticle.SmallFlameProvider; +import net.minecraft.client.particle.FlyStraightTowardsParticle.OminousSpawnProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.EnchantProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.NautilusProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.VaultConnectionProvider; import net.minecraft.client.particle.GlowParticle.ElectricSparkProvider; import net.minecraft.client.particle.GlowParticle.GlowSquidProvider; import net.minecraft.client.particle.GlowParticle.ScrapeProvider; import net.minecraft.client.particle.GlowParticle.WaxOffProvider; import net.minecraft.client.particle.GlowParticle.WaxOnProvider; +import net.minecraft.client.particle.GustParticle.SmallProvider; import net.minecraft.client.particle.HeartParticle.AngryVillagerProvider; import net.minecraft.client.particle.ParticleProvider.Sprite; import net.minecraft.client.particle.PlayerCloudParticle.SneezeProvider; @@ -58,6 +60,7 @@ import net.minecraft.client.particle.SoulParticle.EmissiveProvider; import net.minecraft.client.particle.SpellParticle.InstantProvider; import net.minecraft.client.particle.SpellParticle.MobEffectProvider; import net.minecraft.client.particle.SpellParticle.WitchProvider; +import net.minecraft.client.particle.SquidInkParticle.GlowInkProvider; import net.minecraft.client.particle.SuspendedParticle.CrimsonSporeProvider; import net.minecraft.client.particle.SuspendedParticle.SporeBlossomAirProvider; import net.minecraft.client.particle.SuspendedParticle.UnderwaterProvider; @@ -66,12 +69,15 @@ import net.minecraft.client.particle.SuspendedTownParticle.ComposterFillProvider import net.minecraft.client.particle.SuspendedTownParticle.DolphinSpeedProvider; import net.minecraft.client.particle.SuspendedTownParticle.EggCrackProvider; import net.minecraft.client.particle.SuspendedTownParticle.HappyVillagerProvider; -import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.particle.TerrainParticle.CrumblingProvider; +import net.minecraft.client.particle.TerrainParticle.DustPillarProvider; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.texture.SpriteLoader; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.texture.SpriteLoader.Preparations; +import net.minecraft.client.resources.model.AtlasIds; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleGroup; @@ -101,15 +107,13 @@ import org.slf4j.Logger; public class ParticleEngine implements PreparableReloadListener { private static final Logger LOGGER = LogUtils.getLogger(); private static final FileToIdConverter PARTICLE_LISTER = FileToIdConverter.json("particles"); - private static final ResourceLocation PARTICLES_ATLAS_INFO = ResourceLocation.withDefaultNamespace("particles"); private static final int MAX_PARTICLES_PER_LAYER = 16384; - private static final List RENDER_ORDER = ImmutableList.of( - ParticleRenderType.TERRAIN_SHEET, ParticleRenderType.PARTICLE_SHEET_OPAQUE, ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT, ParticleRenderType.CUSTOM + private static final List RENDER_ORDER = List.of( + ParticleRenderType.TERRAIN_SHEET, ParticleRenderType.PARTICLE_SHEET_OPAQUE, ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT ); protected ClientLevel level; private final Map> particles = Maps.>newIdentityHashMap(); private final Queue trackingEmitters = Queues.newArrayDeque(); - private final TextureManager textureManager; private final RandomSource random = RandomSource.create(); private final Int2ObjectMap> providers = new Int2ObjectOpenHashMap<>(); private final Queue particlesToAdd = Queues.newArrayDeque(); @@ -121,14 +125,13 @@ public class ParticleEngine implements PreparableReloadListener { this.textureAtlas = new TextureAtlas(TextureAtlas.LOCATION_PARTICLES); textureManager.register(this.textureAtlas.location(), this.textureAtlas); this.level = level; - this.textureManager = textureManager; this.registerProviders(); } private void registerProviders() { this.register(ParticleTypes.ANGRY_VILLAGER, AngryVillagerProvider::new); this.register(ParticleTypes.BLOCK_MARKER, new Provider()); - this.register(ParticleTypes.BLOCK, new TerrainParticle.Provider()); + this.register(ParticleTypes.BLOCK, new net.minecraft.client.particle.TerrainParticle.Provider()); this.register(ParticleTypes.BUBBLE, net.minecraft.client.particle.BubbleParticle.Provider::new); this.register(ParticleTypes.BUBBLE_COLUMN_UP, net.minecraft.client.particle.BubbleColumnUpParticle.Provider::new); this.register(ParticleTypes.BUBBLE_POP, net.minecraft.client.particle.BubblePopParticle.Provider::new); @@ -146,23 +149,23 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.LANDING_LAVA, DripParticle::createLavaLandParticle); this.register(ParticleTypes.DRIPPING_WATER, DripParticle::createWaterHangParticle); this.register(ParticleTypes.FALLING_WATER, DripParticle::createWaterFallParticle); - this.register(ParticleTypes.DUST, DustParticle.Provider::new); + this.register(ParticleTypes.DUST, net.minecraft.client.particle.DustParticle.Provider::new); this.register(ParticleTypes.DUST_COLOR_TRANSITION, net.minecraft.client.particle.DustColorTransitionParticle.Provider::new); this.register(ParticleTypes.EFFECT, net.minecraft.client.particle.SpellParticle.Provider::new); this.register(ParticleTypes.ELDER_GUARDIAN, new MobAppearanceParticle.Provider()); this.register(ParticleTypes.ENCHANTED_HIT, MagicProvider::new); - this.register(ParticleTypes.ENCHANT, FlyTowardsPositionParticle.EnchantProvider::new); + this.register(ParticleTypes.ENCHANT, EnchantProvider::new); this.register(ParticleTypes.END_ROD, net.minecraft.client.particle.EndRodParticle.Provider::new); this.register(ParticleTypes.ENTITY_EFFECT, MobEffectProvider::new); this.register(ParticleTypes.EXPLOSION_EMITTER, new net.minecraft.client.particle.HugeExplosionSeedParticle.Provider()); - this.register(ParticleTypes.EXPLOSION, HugeExplosionParticle.Provider::new); - this.register(ParticleTypes.SONIC_BOOM, SonicBoomParticle.Provider::new); + this.register(ParticleTypes.EXPLOSION, net.minecraft.client.particle.HugeExplosionParticle.Provider::new); + this.register(ParticleTypes.SONIC_BOOM, net.minecraft.client.particle.SonicBoomParticle.Provider::new); this.register(ParticleTypes.FALLING_DUST, net.minecraft.client.particle.FallingDustParticle.Provider::new); - this.register(ParticleTypes.GUST, GustParticle.Provider::new); - this.register(ParticleTypes.SMALL_GUST, GustParticle.SmallProvider::new); + this.register(ParticleTypes.GUST, net.minecraft.client.particle.GustParticle.Provider::new); + this.register(ParticleTypes.SMALL_GUST, SmallProvider::new); this.register(ParticleTypes.GUST_EMITTER_LARGE, new net.minecraft.client.particle.GustSeedParticle.Provider(3.0, 7, 0)); this.register(ParticleTypes.GUST_EMITTER_SMALL, new net.minecraft.client.particle.GustSeedParticle.Provider(1.0, 3, 2)); - this.register(ParticleTypes.FIREWORK, FireworkParticles.SparkProvider::new); + this.register(ParticleTypes.FIREWORK, SparkProvider::new); this.register(ParticleTypes.FISHING, net.minecraft.client.particle.WakeParticle.Provider::new); this.register(ParticleTypes.FLAME, net.minecraft.client.particle.FlameParticle.Provider::new); this.register(ParticleTypes.INFESTED, net.minecraft.client.particle.SpellParticle.Provider::new); @@ -171,18 +174,18 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SCULK_CHARGE_POP, net.minecraft.client.particle.SculkChargePopParticle.Provider::new); this.register(ParticleTypes.SOUL, net.minecraft.client.particle.SoulParticle.Provider::new); this.register(ParticleTypes.SOUL_FIRE_FLAME, net.minecraft.client.particle.FlameParticle.Provider::new); - this.register(ParticleTypes.FLASH, FireworkParticles.FlashProvider::new); + this.register(ParticleTypes.FLASH, FlashProvider::new); this.register(ParticleTypes.HAPPY_VILLAGER, HappyVillagerProvider::new); this.register(ParticleTypes.HEART, net.minecraft.client.particle.HeartParticle.Provider::new); this.register(ParticleTypes.INSTANT_EFFECT, InstantProvider::new); - this.register(ParticleTypes.ITEM, new net.minecraft.client.particle.BreakingItemParticle.Provider()); - this.register(ParticleTypes.ITEM_SLIME, new SlimeProvider()); - this.register(ParticleTypes.ITEM_COBWEB, new CobwebProvider()); - this.register(ParticleTypes.ITEM_SNOWBALL, new SnowballProvider()); + this.register(ParticleTypes.ITEM, new BreakingItemParticle.Provider()); + this.register(ParticleTypes.ITEM_SLIME, new BreakingItemParticle.SlimeProvider()); + this.register(ParticleTypes.ITEM_COBWEB, new BreakingItemParticle.CobwebProvider()); + this.register(ParticleTypes.ITEM_SNOWBALL, new BreakingItemParticle.SnowballProvider()); this.register(ParticleTypes.LARGE_SMOKE, net.minecraft.client.particle.LargeSmokeParticle.Provider::new); this.register(ParticleTypes.LAVA, net.minecraft.client.particle.LavaParticle.Provider::new); this.register(ParticleTypes.MYCELIUM, net.minecraft.client.particle.SuspendedTownParticle.Provider::new); - this.register(ParticleTypes.NAUTILUS, FlyTowardsPositionParticle.NautilusProvider::new); + this.register(ParticleTypes.NAUTILUS, NautilusProvider::new); this.register(ParticleTypes.NOTE, net.minecraft.client.particle.NoteParticle.Provider::new); this.register(ParticleTypes.POOF, net.minecraft.client.particle.ExplodeParticle.Provider::new); this.register(ParticleTypes.PORTAL, net.minecraft.client.particle.PortalParticle.Provider::new); @@ -192,9 +195,9 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SNEEZE, SneezeProvider::new); this.register(ParticleTypes.SNOWFLAKE, net.minecraft.client.particle.SnowflakeParticle.Provider::new); this.register(ParticleTypes.SPIT, net.minecraft.client.particle.SpitParticle.Provider::new); - this.register(ParticleTypes.SWEEP_ATTACK, AttackSweepParticle.Provider::new); + this.register(ParticleTypes.SWEEP_ATTACK, net.minecraft.client.particle.AttackSweepParticle.Provider::new); this.register(ParticleTypes.TOTEM_OF_UNDYING, net.minecraft.client.particle.TotemParticle.Provider::new); - this.register(ParticleTypes.SQUID_INK, SquidInkParticle.Provider::new); + this.register(ParticleTypes.SQUID_INK, net.minecraft.client.particle.SquidInkParticle.Provider::new); this.register(ParticleTypes.UNDERWATER, UnderwaterProvider::new); this.register(ParticleTypes.SPLASH, net.minecraft.client.particle.SplashParticle.Provider::new); this.register(ParticleTypes.WITCH, WitchProvider::new); @@ -211,18 +214,18 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.FALLING_OBSIDIAN_TEAR, DripParticle::createObsidianTearFallParticle); this.register(ParticleTypes.LANDING_OBSIDIAN_TEAR, DripParticle::createObsidianTearLandParticle); this.register(ParticleTypes.REVERSE_PORTAL, ReversePortalProvider::new); - this.register(ParticleTypes.WHITE_ASH, WhiteAshParticle.Provider::new); + this.register(ParticleTypes.WHITE_ASH, net.minecraft.client.particle.WhiteAshParticle.Provider::new); this.register(ParticleTypes.SMALL_FLAME, SmallFlameProvider::new); this.register(ParticleTypes.DRIPPING_DRIPSTONE_WATER, DripParticle::createDripstoneWaterHangParticle); this.register(ParticleTypes.FALLING_DRIPSTONE_WATER, DripParticle::createDripstoneWaterFallParticle); - this.register( - ParticleTypes.CHERRY_LEAVES, spriteSet -> (simpleParticleType, clientLevel, d, e, f, g, h, i) -> new CherryParticle(clientLevel, d, e, f, spriteSet) - ); + this.register(ParticleTypes.CHERRY_LEAVES, FallingLeavesParticle.CherryProvider::new); + this.register(ParticleTypes.PALE_OAK_LEAVES, FallingLeavesParticle.PaleOakProvider::new); + this.register(ParticleTypes.TINTED_LEAVES, FallingLeavesParticle.TintedLeavesProvider::new); this.register(ParticleTypes.DRIPPING_DRIPSTONE_LAVA, DripParticle::createDripstoneLavaHangParticle); this.register(ParticleTypes.FALLING_DRIPSTONE_LAVA, DripParticle::createDripstoneLavaFallParticle); this.register(ParticleTypes.VIBRATION, net.minecraft.client.particle.VibrationSignalParticle.Provider::new); - this.register(ParticleTypes.TRAIL, TrailParticle.Provider::new); - this.register(ParticleTypes.GLOW_SQUID_INK, SquidInkParticle.GlowInkProvider::new); + this.register(ParticleTypes.TRAIL, net.minecraft.client.particle.TrailParticle.Provider::new); + this.register(ParticleTypes.GLOW_SQUID_INK, GlowInkProvider::new); this.register(ParticleTypes.GLOW, GlowSquidProvider::new); this.register(ParticleTypes.WAX_ON, WaxOnProvider::new); this.register(ParticleTypes.WAX_OFF, WaxOffProvider::new); @@ -230,15 +233,16 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SCRAPE, ScrapeProvider::new); this.register(ParticleTypes.SHRIEK, net.minecraft.client.particle.ShriekParticle.Provider::new); this.register(ParticleTypes.EGG_CRACK, EggCrackProvider::new); - this.register(ParticleTypes.DUST_PLUME, DustPlumeParticle.Provider::new); + this.register(ParticleTypes.DUST_PLUME, net.minecraft.client.particle.DustPlumeParticle.Provider::new); this.register(ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER, net.minecraft.client.particle.TrialSpawnerDetectionParticle.Provider::new); this.register(ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS, net.minecraft.client.particle.TrialSpawnerDetectionParticle.Provider::new); - this.register(ParticleTypes.VAULT_CONNECTION, FlyTowardsPositionParticle.VaultConnectionProvider::new); - this.register(ParticleTypes.DUST_PILLAR, new TerrainParticle.DustPillarProvider()); + this.register(ParticleTypes.VAULT_CONNECTION, VaultConnectionProvider::new); + this.register(ParticleTypes.DUST_PILLAR, new DustPillarProvider()); this.register(ParticleTypes.RAID_OMEN, net.minecraft.client.particle.SpellParticle.Provider::new); this.register(ParticleTypes.TRIAL_OMEN, net.minecraft.client.particle.SpellParticle.Provider::new); - this.register(ParticleTypes.OMINOUS_SPAWNING, FlyStraightTowardsParticle.OminousSpawnProvider::new); - this.register(ParticleTypes.BLOCK_CRUMBLE, new TerrainParticle.CrumblingProvider()); + this.register(ParticleTypes.OMINOUS_SPAWNING, OminousSpawnProvider::new); + this.register(ParticleTypes.BLOCK_CRUMBLE, new CrumblingProvider()); + this.register(ParticleTypes.FIREFLY, FireflyParticle.FireflyProvider::new); } private void register(ParticleType particleType, ParticleProvider particleFactory) { @@ -287,14 +291,14 @@ public class ParticleEngine implements PreparableReloadListener { return Util.sequence(list); } ); - CompletableFuture completableFuture2 = SpriteLoader.create(this.textureAtlas) - .loadAndStitch(resourceManager, PARTICLES_ATLAS_INFO, 0, executor) - .thenCompose(Preparations::waitForUpload); + CompletableFuture completableFuture2 = SpriteLoader.create(this.textureAtlas) + .loadAndStitch(resourceManager, AtlasIds.PARTICLES, 0, executor) + .thenCompose(SpriteLoader.Preparations::waitForUpload); return CompletableFuture.allOf(completableFuture2, completableFuture).thenCompose(preparationBarrier::wait).thenAcceptAsync(void_ -> { this.clearParticles(); ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("upload"); - Preparations preparations = (Preparations)completableFuture2.join(); + SpriteLoader.Preparations preparations = (SpriteLoader.Preparations)completableFuture2.join(); this.textureAtlas.upload(preparations); profilerFiller.popPush("bindSpriteSets"); Set set = new HashSet(); @@ -463,39 +467,52 @@ public class ParticleEngine implements PreparableReloadListener { } } - public void render(LightTexture lightTexture, Camera camera, float partialTick) { - lightTexture.turnOnLightLayer(); - RenderSystem.enableDepthTest(); - + public void render(Camera camera, float partialTick, BufferSource bufferSource) { for (ParticleRenderType particleRenderType : RENDER_ORDER) { Queue queue = (Queue)this.particles.get(particleRenderType); if (queue != null && !queue.isEmpty()) { - Tesselator tesselator = Tesselator.getInstance(); - BufferBuilder bufferBuilder = particleRenderType.begin(tesselator, this.textureManager); - if (bufferBuilder != null) { - for (Particle particle : queue) { - try { - particle.render(bufferBuilder, camera, partialTick); - } catch (Throwable var14) { - CrashReport crashReport = CrashReport.forThrowable(var14, "Rendering Particle"); - CrashReportCategory crashReportCategory = crashReport.addCategory("Particle being rendered"); - crashReportCategory.setDetail("Particle", particle::toString); - crashReportCategory.setDetail("Particle Type", particleRenderType::toString); - throw new ReportedException(crashReport); - } - } - - MeshData meshData = bufferBuilder.build(); - if (meshData != null) { - BufferUploader.drawWithShader(meshData); - } - } + renderParticleType(camera, partialTick, bufferSource, particleRenderType, queue); } } - RenderSystem.depthMask(true); - RenderSystem.disableBlend(); - lightTexture.turnOffLightLayer(); + Queue queue2 = (Queue)this.particles.get(ParticleRenderType.CUSTOM); + if (queue2 != null && !queue2.isEmpty()) { + renderCustomParticles(camera, partialTick, bufferSource, queue2); + } + + bufferSource.endBatch(); + } + + private static void renderParticleType(Camera camera, float partialTick, BufferSource bufferSource, ParticleRenderType particleType, Queue particles) { + VertexConsumer vertexConsumer = bufferSource.getBuffer((RenderType)Objects.requireNonNull(particleType.renderType())); + + for (Particle particle : particles) { + try { + particle.render(vertexConsumer, camera, partialTick); + } catch (Throwable var11) { + CrashReport crashReport = CrashReport.forThrowable(var11, "Rendering Particle"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Particle being rendered"); + crashReportCategory.setDetail("Particle", particle::toString); + crashReportCategory.setDetail("Particle Type", particleType::toString); + throw new ReportedException(crashReport); + } + } + } + + private static void renderCustomParticles(Camera camera, float partialTick, BufferSource bufferSource, Queue particles) { + PoseStack poseStack = new PoseStack(); + + for (Particle particle : particles) { + try { + particle.renderCustom(poseStack, bufferSource, camera, partialTick); + } catch (Throwable var10) { + CrashReport crashReport = CrashReport.forThrowable(var10, "Rendering Particle"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Particle being rendered"); + crashReportCategory.setDetail("Particle", particle::toString); + crashReportCategory.setDetail("Particle Type", "Custom"); + throw new ReportedException(crashReport); + } + } } public void setLevel(@Nullable ClientLevel level) { diff --git a/net/minecraft/client/particle/ParticleRenderType.java b/net/minecraft/client/particle/ParticleRenderType.java index c9586696..4045f4ad 100644 --- a/net/minecraft/client/particle/ParticleRenderType.java +++ b/net/minecraft/client/particle/ParticleRenderType.java @@ -1,87 +1,20 @@ package net.minecraft.client.particle; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexFormat; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.CoreShaders; +import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.renderer.texture.TextureManager; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public interface ParticleRenderType { - ParticleRenderType TERRAIN_SHEET = new ParticleRenderType() { - @Override - public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { - RenderSystem.enableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.depthMask(true); - RenderSystem.setShader(CoreShaders.PARTICLE); - RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_BLOCKS); - return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - } - - public String toString() { - return "TERRAIN_SHEET"; - } - }; - ParticleRenderType PARTICLE_SHEET_OPAQUE = new ParticleRenderType() { - @Override - public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { - RenderSystem.disableBlend(); - RenderSystem.depthMask(true); - RenderSystem.setShader(CoreShaders.PARTICLE); - RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_PARTICLES); - return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - } - - public String toString() { - return "PARTICLE_SHEET_OPAQUE"; - } - }; - ParticleRenderType PARTICLE_SHEET_TRANSLUCENT = new ParticleRenderType() { - @Override - public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { - RenderSystem.depthMask(true); - RenderSystem.setShader(CoreShaders.PARTICLE); - RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_PARTICLES); - RenderSystem.enableBlend(); - RenderSystem.defaultBlendFunc(); - return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - } - - public String toString() { - return "PARTICLE_SHEET_TRANSLUCENT"; - } - }; - ParticleRenderType CUSTOM = new ParticleRenderType() { - @Override - public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { - RenderSystem.depthMask(true); - RenderSystem.disableBlend(); - return tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - } - - public String toString() { - return "CUSTOM"; - } - }; - ParticleRenderType NO_RENDER = new ParticleRenderType() { - @Nullable - @Override - public BufferBuilder begin(Tesselator tesselator, TextureManager textureManager) { - return null; - } - - public String toString() { - return "NO_RENDER"; - } - }; - - @Nullable - BufferBuilder begin(Tesselator tesselator, TextureManager textureManager); +public record ParticleRenderType(String name, @Nullable RenderType renderType) { + public static final ParticleRenderType TERRAIN_SHEET = new ParticleRenderType("TERRAIN_SHEET", RenderType.translucentParticle(TextureAtlas.LOCATION_BLOCKS)); + public static final ParticleRenderType PARTICLE_SHEET_OPAQUE = new ParticleRenderType( + "PARTICLE_SHEET_OPAQUE", RenderType.opaqueParticle(TextureAtlas.LOCATION_PARTICLES) + ); + public static final ParticleRenderType PARTICLE_SHEET_TRANSLUCENT = new ParticleRenderType( + "PARTICLE_SHEET_TRANSLUCENT", RenderType.translucentParticle(TextureAtlas.LOCATION_PARTICLES) + ); + public static final ParticleRenderType CUSTOM = new ParticleRenderType("CUSTOM", null); + public static final ParticleRenderType NO_RENDER = new ParticleRenderType("NO_RENDER", null); } diff --git a/net/minecraft/client/particle/PortalParticle.java b/net/minecraft/client/particle/PortalParticle.java index 7d096159..7a1e671f 100644 --- a/net/minecraft/client/particle/PortalParticle.java +++ b/net/minecraft/client/particle/PortalParticle.java @@ -11,22 +11,22 @@ public class PortalParticle extends TextureSheetParticle { private final double yStart; private final double zStart; - protected PortalParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z); - this.xd = xSpeed; - this.yd = ySpeed; - this.zd = zSpeed; - this.x = x; - this.y = y; - this.z = z; + protected PortalParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f); + this.xd = g; + this.yd = h; + this.zd = i; + this.x = d; + this.y = e; + this.z = f; this.xStart = this.x; this.yStart = this.y; this.zStart = this.z; this.quadSize = 0.1F * (this.random.nextFloat() * 0.2F + 0.5F); - float f = this.random.nextFloat() * 0.6F + 0.4F; - this.rCol = f * 0.9F; - this.gCol = f * 0.3F; - this.bCol = f; + float j = this.random.nextFloat() * 0.6F + 0.4F; + this.rCol = j * 0.9F; + this.gCol = j * 0.3F; + this.bCol = j; this.lifetime = (int)(Math.random() * 10.0) + 40; } diff --git a/net/minecraft/client/particle/ReversePortalParticle.java b/net/minecraft/client/particle/ReversePortalParticle.java index dcef3d1d..18569784 100644 --- a/net/minecraft/client/particle/ReversePortalParticle.java +++ b/net/minecraft/client/particle/ReversePortalParticle.java @@ -7,8 +7,8 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class ReversePortalParticle extends PortalParticle { - ReversePortalParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); + ReversePortalParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); this.quadSize *= 1.5F; this.lifetime = (int)(Math.random() * 2.0) + 60; } diff --git a/net/minecraft/client/particle/ShriekParticle.java b/net/minecraft/client/particle/ShriekParticle.java index a977cb95..acf5edec 100644 --- a/net/minecraft/client/particle/ShriekParticle.java +++ b/net/minecraft/client/particle/ShriekParticle.java @@ -31,14 +31,14 @@ public class ShriekParticle extends TextureSheetParticle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { + public void render(VertexConsumer buffer, Camera camera, float partialTick) { if (this.delay <= 0) { - this.alpha = 1.0F - Mth.clamp((this.age + partialTicks) / this.lifetime, 0.0F, 1.0F); + this.alpha = 1.0F - Mth.clamp((this.age + partialTick) / this.lifetime, 0.0F, 1.0F); Quaternionf quaternionf = new Quaternionf(); quaternionf.rotationX(-1.0472F); - this.renderRotatedQuad(buffer, camera, quaternionf, partialTicks); + this.renderRotatedQuad(buffer, camera, quaternionf, partialTick); quaternionf.rotationYXZ((float) -Math.PI, 1.0472F, 0.0F); - this.renderRotatedQuad(buffer, camera, quaternionf, partialTicks); + this.renderRotatedQuad(buffer, camera, quaternionf, partialTick); } } @@ -69,8 +69,8 @@ public class ShriekParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(ShriekParticleOption type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - ShriekParticle shriekParticle = new ShriekParticle(level, x, y, z, type.getDelay()); + public Particle createParticle(ShriekParticleOption shriekParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + ShriekParticle shriekParticle = new ShriekParticle(clientLevel, d, e, f, shriekParticleOption.getDelay()); shriekParticle.pickSprite(this.sprite); shriekParticle.setAlpha(1.0F); return shriekParticle; diff --git a/net/minecraft/client/particle/SingleQuadParticle.java b/net/minecraft/client/particle/SingleQuadParticle.java index db70a2c0..14a83f7a 100644 --- a/net/minecraft/client/particle/SingleQuadParticle.java +++ b/net/minecraft/client/particle/SingleQuadParticle.java @@ -14,12 +14,12 @@ import org.joml.Vector3f; public abstract class SingleQuadParticle extends Particle { protected float quadSize = 0.1F * (this.random.nextFloat() * 0.5F + 0.5F) * 2.0F; - protected SingleQuadParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + protected SingleQuadParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); } - protected SingleQuadParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); + protected SingleQuadParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); } public SingleQuadParticle.FacingCameraMode getFacingCameraMode() { @@ -27,14 +27,14 @@ public abstract class SingleQuadParticle extends Particle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { + public void render(VertexConsumer buffer, Camera camera, float partialTick) { Quaternionf quaternionf = new Quaternionf(); - this.getFacingCameraMode().setRotation(quaternionf, camera, partialTicks); + this.getFacingCameraMode().setRotation(quaternionf, camera, partialTick); if (this.roll != 0.0F) { - quaternionf.rotateZ(Mth.lerp(partialTicks, this.oRoll, this.roll)); + quaternionf.rotateZ(Mth.lerp(partialTick, this.oRoll, this.roll)); } - this.renderRotatedQuad(buffer, camera, quaternionf, partialTicks); + this.renderRotatedQuad(buffer, camera, quaternionf, partialTick); } protected void renderRotatedQuad(VertexConsumer buffer, Camera camera, Quaternionf quaternion, float partialTicks) { diff --git a/net/minecraft/client/particle/SnowflakeParticle.java b/net/minecraft/client/particle/SnowflakeParticle.java index 583eaf23..24c76ce6 100644 --- a/net/minecraft/client/particle/SnowflakeParticle.java +++ b/net/minecraft/client/particle/SnowflakeParticle.java @@ -44,8 +44,8 @@ public class SnowflakeParticle extends TextureSheetParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - SnowflakeParticle snowflakeParticle = new SnowflakeParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + SnowflakeParticle snowflakeParticle = new SnowflakeParticle(clientLevel, d, e, f, g, h, i, this.sprites); snowflakeParticle.setColor(0.923F, 0.964F, 0.999F); return snowflakeParticle; } diff --git a/net/minecraft/client/particle/SonicBoomParticle.java b/net/minecraft/client/particle/SonicBoomParticle.java index 2e1fa914..7ba5153d 100644 --- a/net/minecraft/client/particle/SonicBoomParticle.java +++ b/net/minecraft/client/particle/SonicBoomParticle.java @@ -7,11 +7,11 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class SonicBoomParticle extends HugeExplosionParticle { - protected SonicBoomParticle(ClientLevel level, double x, double y, double z, double quadSizeMultiplier, SpriteSet sprites) { - super(level, x, y, z, quadSizeMultiplier, sprites); + protected SonicBoomParticle(ClientLevel clientLevel, double d, double e, double f, double g, SpriteSet spriteSet) { + super(clientLevel, d, e, f, g, spriteSet); this.lifetime = 16; this.quadSize = 1.5F; - this.setSpriteFromAge(sprites); + this.setSpriteFromAge(spriteSet); } @Environment(EnvType.CLIENT) @@ -22,8 +22,8 @@ public class SonicBoomParticle extends HugeExplosionParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new SonicBoomParticle(level, x, y, z, xSpeed, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new SonicBoomParticle(clientLevel, d, e, f, g, this.sprites); } } } diff --git a/net/minecraft/client/particle/SoulParticle.java b/net/minecraft/client/particle/SoulParticle.java index 89d40883..4dc2356b 100644 --- a/net/minecraft/client/particle/SoulParticle.java +++ b/net/minecraft/client/particle/SoulParticle.java @@ -41,8 +41,8 @@ public class SoulParticle extends RisingParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - SoulParticle soulParticle = new SoulParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, this.sprite); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + SoulParticle soulParticle = new SoulParticle(clientLevel, d, e, f, g, h, i, this.sprite); soulParticle.setAlpha(1.0F); soulParticle.isGlowing = true; return soulParticle; diff --git a/net/minecraft/client/particle/SpellParticle.java b/net/minecraft/client/particle/SpellParticle.java index 1f61ee5a..4e2ff548 100644 --- a/net/minecraft/client/particle/SpellParticle.java +++ b/net/minecraft/client/particle/SpellParticle.java @@ -89,10 +89,10 @@ public class SpellParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(ColorParticleOption type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - Particle particle = new SpellParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, this.sprite); - particle.setColor(type.getRed(), type.getGreen(), type.getBlue()); - particle.setAlpha(type.getAlpha()); + public Particle createParticle(ColorParticleOption colorParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + Particle particle = new SpellParticle(clientLevel, d, e, f, g, h, i, this.sprite); + particle.setColor(colorParticleOption.getRed(), colorParticleOption.getGreen(), colorParticleOption.getBlue()); + particle.setAlpha(colorParticleOption.getAlpha()); return particle; } } diff --git a/net/minecraft/client/particle/SpitParticle.java b/net/minecraft/client/particle/SpitParticle.java index 1add9986..0faccfce 100644 --- a/net/minecraft/client/particle/SpitParticle.java +++ b/net/minecraft/client/particle/SpitParticle.java @@ -7,8 +7,8 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class SpitParticle extends ExplodeParticle { - SpitParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, SpriteSet sprites) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed, sprites); + SpitParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i, SpriteSet spriteSet) { + super(clientLevel, d, e, f, g, h, i, spriteSet); this.gravity = 0.5F; } diff --git a/net/minecraft/client/particle/SquidInkParticle.java b/net/minecraft/client/particle/SquidInkParticle.java index 5b7693f7..680d2810 100644 --- a/net/minecraft/client/particle/SquidInkParticle.java +++ b/net/minecraft/client/particle/SquidInkParticle.java @@ -46,8 +46,8 @@ public class SquidInkParticle extends SimpleAnimatedParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new SquidInkParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, ARGB.color(255, 204, 31, 102), this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new SquidInkParticle(clientLevel, d, e, f, g, h, i, ARGB.color(255, 204, 31, 102), this.sprites); } } diff --git a/net/minecraft/client/particle/SuspendedParticle.java b/net/minecraft/client/particle/SuspendedParticle.java index 28cb42e9..9171240e 100644 --- a/net/minecraft/client/particle/SuspendedParticle.java +++ b/net/minecraft/client/particle/SuspendedParticle.java @@ -1,10 +1,9 @@ package net.minecraft.client.particle; -import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.core.particles.ParticleGroup; +import net.minecraft.client.particle.SuspendedParticle.SporeBlossomAirProvider.1; import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -65,14 +64,9 @@ public class SuspendedParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - SuspendedParticle suspendedParticle = new SuspendedParticle(level, this.sprite, x, y, z, 0.0, -0.8F, 0.0) { - @Override - public Optional getParticleGroup() { - return Optional.of(ParticleGroup.SPORE_BLOSSOM); - } - }; - suspendedParticle.lifetime = Mth.randomBetweenInclusive(level.random, 500, 1000); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + SuspendedParticle suspendedParticle = new 1(this, clientLevel, this.sprite, d, e, f, 0.0, -0.8F, 0.0); + suspendedParticle.lifetime = Mth.randomBetweenInclusive(clientLevel.random, 500, 1000); suspendedParticle.gravity = 0.01F; suspendedParticle.setColor(0.32F, 0.5F, 0.22F); return suspendedParticle; diff --git a/net/minecraft/client/particle/SuspendedTownParticle.java b/net/minecraft/client/particle/SuspendedTownParticle.java index 20a578e6..7a1a8929 100644 --- a/net/minecraft/client/particle/SuspendedTownParticle.java +++ b/net/minecraft/client/particle/SuspendedTownParticle.java @@ -7,12 +7,12 @@ import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class SuspendedTownParticle extends TextureSheetParticle { - SuspendedTownParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); - float f = this.random.nextFloat() * 0.1F + 0.2F; - this.rCol = f; - this.gCol = f; - this.bCol = f; + SuspendedTownParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); + float j = this.random.nextFloat() * 0.1F + 0.2F; + this.rCol = j; + this.gCol = j; + this.bCol = j; this.setSize(0.02F, 0.02F); this.quadSize = this.quadSize * (this.random.nextFloat() * 0.6F + 0.5F); this.xd *= 0.02F; @@ -90,8 +90,8 @@ public class SuspendedTownParticle extends TextureSheetParticle { this.sprite = sprite; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - SuspendedTownParticle suspendedTownParticle = new SuspendedTownParticle(level, x, y, z, xSpeed, ySpeed, zSpeed); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + SuspendedTownParticle suspendedTownParticle = new SuspendedTownParticle(clientLevel, d, e, f, g, h, i); suspendedTownParticle.pickSprite(this.sprite); suspendedTownParticle.setColor(1.0F, 1.0F, 1.0F); return suspendedTownParticle; diff --git a/net/minecraft/client/particle/TextureSheetParticle.java b/net/minecraft/client/particle/TextureSheetParticle.java index 56f1522e..2f2a174c 100644 --- a/net/minecraft/client/particle/TextureSheetParticle.java +++ b/net/minecraft/client/particle/TextureSheetParticle.java @@ -9,12 +9,12 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; public abstract class TextureSheetParticle extends SingleQuadParticle { protected TextureAtlasSprite sprite; - protected TextureSheetParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + protected TextureSheetParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); } - protected TextureSheetParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - super(level, x, y, z, xSpeed, ySpeed, zSpeed); + protected TextureSheetParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + super(clientLevel, d, e, f, g, h, i); } protected void setSprite(TextureAtlasSprite sprite) { diff --git a/net/minecraft/client/particle/TrackingEmitter.java b/net/minecraft/client/particle/TrackingEmitter.java index eeb75ed2..0e9cf6c9 100644 --- a/net/minecraft/client/particle/TrackingEmitter.java +++ b/net/minecraft/client/particle/TrackingEmitter.java @@ -40,7 +40,7 @@ public class TrackingEmitter extends NoRenderParticle { double g = this.entity.getX(d / 4.0); double h = this.entity.getY(0.5 + e / 4.0); double j = this.entity.getZ(f / 4.0); - this.level.addParticle(this.particleType, false, g, h, j, d, e + 0.2, f); + this.level.addParticle(this.particleType, g, h, j, d, e + 0.2, f); } } diff --git a/net/minecraft/client/particle/TrailParticle.java b/net/minecraft/client/particle/TrailParticle.java index 5a71f5a9..9fb2f993 100644 --- a/net/minecraft/client/particle/TrailParticle.java +++ b/net/minecraft/client/particle/TrailParticle.java @@ -3,7 +3,7 @@ package net.minecraft.client.particle; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.core.particles.TargetColorParticleOption; +import net.minecraft.core.particles.TrailParticleOption; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; import net.minecraft.world.phys.Vec3; @@ -12,14 +12,14 @@ import net.minecraft.world.phys.Vec3; public class TrailParticle extends TextureSheetParticle { private final Vec3 target; - TrailParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i, Vec3 vec3, int j) { - super(clientLevel, d, e, f, g, h, i); - j = ARGB.scaleRGB(j, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F); - this.rCol = ARGB.red(j) / 255.0F; - this.gCol = ARGB.green(j) / 255.0F; - this.bCol = ARGB.blue(j) / 255.0F; + TrailParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, Vec3 target, int color) { + super(level, x, y, z, xSpeed, ySpeed, zSpeed); + color = ARGB.scaleRGB(color, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F); + this.rCol = ARGB.red(color) / 255.0F; + this.gCol = ARGB.green(color) / 255.0F; + this.bCol = ARGB.blue(color) / 255.0F; this.quadSize = 0.26F; - this.target = vec3; + this.target = target; } @Override @@ -49,19 +49,17 @@ public class TrailParticle extends TextureSheetParticle { } @Environment(EnvType.CLIENT) - public static class Provider implements ParticleProvider { + public static class Provider implements ParticleProvider { private final SpriteSet sprite; - public Provider(SpriteSet spriteSet) { - this.sprite = spriteSet; + public Provider(SpriteSet sprite) { + this.sprite = sprite; } - public Particle createParticle( - TargetColorParticleOption targetColorParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i - ) { - TrailParticle trailParticle = new TrailParticle(clientLevel, d, e, f, g, h, i, targetColorParticleOption.target(), targetColorParticleOption.color()); + public Particle createParticle(TrailParticleOption trailParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + TrailParticle trailParticle = new TrailParticle(clientLevel, d, e, f, g, h, i, trailParticleOption.target(), trailParticleOption.color()); trailParticle.pickSprite(this.sprite); - trailParticle.setLifetime(clientLevel.random.nextInt(40) + 10); + trailParticle.setLifetime(trailParticleOption.duration()); return trailParticle; } } diff --git a/net/minecraft/client/particle/TrialSpawnerDetectionParticle.java b/net/minecraft/client/particle/TrialSpawnerDetectionParticle.java index 15da9a83..f205f9b3 100644 --- a/net/minecraft/client/particle/TrialSpawnerDetectionParticle.java +++ b/net/minecraft/client/particle/TrialSpawnerDetectionParticle.java @@ -66,8 +66,8 @@ public class TrialSpawnerDetectionParticle extends TextureSheetParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new TrialSpawnerDetectionParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, 1.5F, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new TrialSpawnerDetectionParticle(clientLevel, d, e, f, g, h, i, 1.5F, this.sprites); } } } diff --git a/net/minecraft/client/particle/VibrationSignalParticle.java b/net/minecraft/client/particle/VibrationSignalParticle.java index 663a8fe5..911601f5 100644 --- a/net/minecraft/client/particle/VibrationSignalParticle.java +++ b/net/minecraft/client/particle/VibrationSignalParticle.java @@ -37,15 +37,15 @@ public class VibrationSignalParticle extends TextureSheetParticle { } @Override - public void render(VertexConsumer buffer, Camera camera, float partialTicks) { - float f = Mth.sin((this.age + partialTicks - (float) (Math.PI * 2)) * 0.05F) * 2.0F; - float g = Mth.lerp(partialTicks, this.rotO, this.rot); - float h = Mth.lerp(partialTicks, this.pitchO, this.pitch) + (float) (Math.PI / 2); + public void render(VertexConsumer buffer, Camera camera, float partialTick) { + float f = Mth.sin((this.age + partialTick - (float) (Math.PI * 2)) * 0.05F) * 2.0F; + float g = Mth.lerp(partialTick, this.rotO, this.rot); + float h = Mth.lerp(partialTick, this.pitchO, this.pitch) + (float) (Math.PI / 2); Quaternionf quaternionf = new Quaternionf(); quaternionf.rotationY(g).rotateX(-h).rotateY(f); - this.renderRotatedQuad(buffer, camera, quaternionf, partialTicks); + this.renderRotatedQuad(buffer, camera, quaternionf, partialTick); quaternionf.rotationY((float) -Math.PI + g).rotateX(h).rotateY(f); - this.renderRotatedQuad(buffer, camera, quaternionf, partialTicks); + this.renderRotatedQuad(buffer, camera, quaternionf, partialTick); } @Override @@ -95,8 +95,12 @@ public class VibrationSignalParticle extends TextureSheetParticle { this.sprite = sprites; } - public Particle createParticle(VibrationParticleOption type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - VibrationSignalParticle vibrationSignalParticle = new VibrationSignalParticle(level, x, y, z, type.getDestination(), type.getArrivalInTicks()); + public Particle createParticle( + VibrationParticleOption vibrationParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i + ) { + VibrationSignalParticle vibrationSignalParticle = new VibrationSignalParticle( + clientLevel, d, e, f, vibrationParticleOption.getDestination(), vibrationParticleOption.getArrivalInTicks() + ); vibrationSignalParticle.pickSprite(this.sprite); vibrationSignalParticle.setAlpha(1.0F); return vibrationSignalParticle; diff --git a/net/minecraft/client/particle/WaterCurrentDownParticle.java b/net/minecraft/client/particle/WaterCurrentDownParticle.java index 3cf00bcc..1b169bf5 100644 --- a/net/minecraft/client/particle/WaterCurrentDownParticle.java +++ b/net/minecraft/client/particle/WaterCurrentDownParticle.java @@ -12,8 +12,8 @@ import net.minecraft.util.Mth; public class WaterCurrentDownParticle extends TextureSheetParticle { private float angle; - WaterCurrentDownParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z); + WaterCurrentDownParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f); this.lifetime = (int)(Math.random() * 60.0) + 30; this.hasPhysics = false; this.xd = 0.0; diff --git a/net/minecraft/client/particle/WaterDropParticle.java b/net/minecraft/client/particle/WaterDropParticle.java index 6b4499b0..696204d1 100644 --- a/net/minecraft/client/particle/WaterDropParticle.java +++ b/net/minecraft/client/particle/WaterDropParticle.java @@ -4,13 +4,13 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; +import net.minecraft.core.Direction.Axis; import net.minecraft.core.particles.SimpleParticleType; @Environment(EnvType.CLIENT) public class WaterDropParticle extends TextureSheetParticle { - protected WaterDropParticle(ClientLevel level, double x, double y, double z) { - super(level, x, y, z, 0.0, 0.0, 0.0); + protected WaterDropParticle(ClientLevel clientLevel, double d, double e, double f) { + super(clientLevel, d, e, f, 0.0, 0.0, 0.0); this.xd *= 0.3F; this.yd = Math.random() * 0.2F + 0.1F; this.zd *= 0.3F; @@ -48,7 +48,7 @@ public class WaterDropParticle extends TextureSheetParticle { BlockPos blockPos = BlockPos.containing(this.x, this.y, this.z); double d = Math.max( - this.level.getBlockState(blockPos).getCollisionShape(this.level, blockPos).max(Direction.Axis.Y, this.x - blockPos.getX(), this.z - blockPos.getZ()), + this.level.getBlockState(blockPos).getCollisionShape(this.level, blockPos).max(Axis.Y, this.x - blockPos.getX(), this.z - blockPos.getZ()), this.level.getFluidState(blockPos).getHeight(this.level, blockPos) ); if (d > 0.0 && this.y < blockPos.getY() + d) { diff --git a/net/minecraft/client/particle/WhiteSmokeParticle.java b/net/minecraft/client/particle/WhiteSmokeParticle.java index 32441da9..4837c75c 100644 --- a/net/minecraft/client/particle/WhiteSmokeParticle.java +++ b/net/minecraft/client/particle/WhiteSmokeParticle.java @@ -26,8 +26,8 @@ public class WhiteSmokeParticle extends BaseAshSmokeParticle { this.sprites = sprites; } - public Particle createParticle(SimpleParticleType type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { - return new WhiteSmokeParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, 1.0F, this.sprites); + public Particle createParticle(SimpleParticleType simpleParticleType, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i) { + return new WhiteSmokeParticle(clientLevel, d, e, f, g, h, i, 1.0F, this.sprites); } } } diff --git a/net/minecraft/client/player/AbstractClientPlayer.java b/net/minecraft/client/player/AbstractClientPlayer.java index 818af212..f4e55763 100644 --- a/net/minecraft/client/player/AbstractClientPlayer.java +++ b/net/minecraft/client/player/AbstractClientPlayer.java @@ -33,16 +33,11 @@ public abstract class AbstractClientPlayer extends Player { this.clientLevel = clientLevel; } + @Nullable @Override - public boolean isSpectator() { + public GameType gameMode() { PlayerInfo playerInfo = this.getPlayerInfo(); - return playerInfo != null && playerInfo.getGameMode() == GameType.SPECTATOR; - } - - @Override - public boolean isCreative() { - PlayerInfo playerInfo = this.getPlayerInfo(); - return playerInfo != null && playerInfo.getGameMode() == GameType.CREATIVE; + return playerInfo != null ? playerInfo.getGameMode() : null; } @Nullable @@ -70,27 +65,27 @@ public abstract class AbstractClientPlayer extends Player { return playerInfo == null ? DefaultPlayerSkin.get(this.getUUID()) : playerInfo.getSkin(); } - public float getFieldOfViewModifier(boolean bl, float f) { - float g = 1.0F; + public float getFieldOfViewModifier(boolean isFirstPerson, float fovEffectScale) { + float f = 1.0F; if (this.getAbilities().flying) { - g *= 1.1F; + f *= 1.1F; } - float h = this.getAbilities().getWalkingSpeed(); - if (h != 0.0F) { - float i = (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) / h; - g *= (i + 1.0F) / 2.0F; + float g = this.getAbilities().getWalkingSpeed(); + if (g != 0.0F) { + float h = (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) / g; + f *= (h + 1.0F) / 2.0F; } if (this.isUsingItem()) { if (this.getUseItem().is(Items.BOW)) { - float i = Math.min(this.getTicksUsingItem() / 20.0F, 1.0F); - g *= 1.0F - Mth.square(i) * 0.15F; - } else if (bl && this.isScoping()) { + float h = Math.min(this.getTicksUsingItem() / 20.0F, 1.0F); + f *= 1.0F - Mth.square(h) * 0.15F; + } else if (isFirstPerson && this.isScoping()) { return 0.1F; } } - return Mth.lerp(f, 1.0F, g); + return Mth.lerp(fovEffectScale, 1.0F, f); } } diff --git a/net/minecraft/client/player/ClientInput.java b/net/minecraft/client/player/ClientInput.java index 49a38ed9..e0e87a82 100644 --- a/net/minecraft/client/player/ClientInput.java +++ b/net/minecraft/client/player/ClientInput.java @@ -8,18 +8,17 @@ import net.minecraft.world.phys.Vec2; @Environment(EnvType.CLIENT) public class ClientInput { public Input keyPresses = Input.EMPTY; - public float leftImpulse; - public float forwardImpulse; + protected Vec2 moveVector = Vec2.ZERO; - public void tick(boolean bl, float f) { + public void tick() { } public Vec2 getMoveVector() { - return new Vec2(this.leftImpulse, this.forwardImpulse); + return this.moveVector; } public boolean hasForwardImpulse() { - return this.forwardImpulse > 1.0E-5F; + return this.moveVector.y > 1.0E-5F; } public void makeJump() { diff --git a/net/minecraft/client/player/KeyboardInput.java b/net/minecraft/client/player/KeyboardInput.java index baebd3d8..ccd67f45 100644 --- a/net/minecraft/client/player/KeyboardInput.java +++ b/net/minecraft/client/player/KeyboardInput.java @@ -4,6 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Options; import net.minecraft.world.entity.player.Input; +import net.minecraft.world.phys.Vec2; @Environment(EnvType.CLIENT) public class KeyboardInput extends ClientInput { @@ -22,7 +23,7 @@ public class KeyboardInput extends ClientInput { } @Override - public void tick(boolean bl, float f) { + public void tick() { this.keyPresses = new Input( this.options.keyUp.isDown(), this.options.keyDown.isDown(), @@ -32,11 +33,8 @@ public class KeyboardInput extends ClientInput { this.options.keyShift.isDown(), this.options.keySprint.isDown() ); - this.forwardImpulse = calculateImpulse(this.keyPresses.forward(), this.keyPresses.backward()); - this.leftImpulse = calculateImpulse(this.keyPresses.left(), this.keyPresses.right()); - if (bl) { - this.leftImpulse *= f; - this.forwardImpulse *= f; - } + float f = calculateImpulse(this.keyPresses.forward(), this.keyPresses.backward()); + float g = calculateImpulse(this.keyPresses.left(), this.keyPresses.right()); + this.moveVector = new Vec2(g, f).normalized(); } } diff --git a/net/minecraft/client/player/LocalPlayer.java b/net/minecraft/client/player/LocalPlayer.java index 6368d6b3..8687e0d1 100644 --- a/net/minecraft/client/player/LocalPlayer.java +++ b/net/minecraft/client/player/LocalPlayer.java @@ -22,6 +22,8 @@ import net.minecraft.client.gui.screens.inventory.JigsawBlockEditScreen; import net.minecraft.client.gui.screens.inventory.MinecartCommandBlockEditScreen; import net.minecraft.client.gui.screens.inventory.SignEditScreen; import net.minecraft.client.gui.screens.inventory.StructureBlockEditScreen; +import net.minecraft.client.gui.screens.inventory.TestBlockEditScreen; +import net.minecraft.client.gui.screens.inventory.TestInstanceBlockEditScreen; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.resources.sounds.AmbientSoundHandler; @@ -34,7 +36,6 @@ import net.minecraft.client.resources.sounds.UnderwaterAmbientSoundHandler; import net.minecraft.client.resources.sounds.UnderwaterAmbientSoundInstances.UnderwaterAmbientSoundInstance; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Holder; import net.minecraft.core.component.DataComponents; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.chat.Component; @@ -58,8 +59,6 @@ import net.minecraft.tags.FluidTags; import net.minecraft.util.Mth; import net.minecraft.util.TickThrottler; import net.minecraft.world.InteractionHand; -import net.minecraft.world.effect.MobEffect; -import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.HumanoidArm; @@ -77,12 +76,14 @@ import net.minecraft.world.item.component.WritableBookContent; import net.minecraft.world.item.crafting.display.RecipeDisplayId; import net.minecraft.world.level.BaseCommandBlock; import net.minecraft.world.level.GameType; -import net.minecraft.world.level.block.Portal; +import net.minecraft.world.level.block.Portal.Transition; import net.minecraft.world.level.block.entity.CommandBlockEntity; import net.minecraft.world.level.block.entity.HangingSignBlockEntity; import net.minecraft.world.level.block.entity.JigsawBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.entity.StructureBlockEntity; +import net.minecraft.world.level.block.entity.TestBlockEntity; +import net.minecraft.world.level.block.entity.TestInstanceBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec2; @@ -101,6 +102,7 @@ public class LocalPlayer extends AbstractClientPlayer { private static final float WATER_VISION_QUICK_PERCENT = 0.6F; private static final double SUFFOCATING_COLLISION_CHECK_SCALE = 0.35; private static final double MINOR_COLLISION_ANGLE_THRESHOLD_RADIAN = 0.13962634F; + public static final float USING_ITEM_SPEED_FACTOR = 0.2F; public final ClientPacketListener connection; private final StatsCounter stats; private final ClientRecipeBook recipeBook; @@ -147,8 +149,8 @@ public class LocalPlayer extends AbstractClientPlayer { public float xBobO; private int jumpRidingTicks; private float jumpRidingScale; - public float spinningEffectIntensity; - public float oSpinningEffectIntensity; + public float portalEffectIntensity; + public float oPortalEffectIntensity; private boolean startedUsingItem; @Nullable private InteractionHand usingItemHand; @@ -217,27 +219,30 @@ public class LocalPlayer extends AbstractClientPlayer { @Override public void tick() { - this.dropSpamThrottler.tick(); - super.tick(); - this.sendShiftKeyState(); - if (!this.lastSentInput.equals(this.input.keyPresses)) { - this.connection.send(new ServerboundPlayerInputPacket(this.input.keyPresses)); - this.lastSentInput = this.input.keyPresses; - } - - if (this.isPassenger()) { - this.connection.send(new ServerboundMovePlayerPacket.Rot(this.getYRot(), this.getXRot(), this.onGround(), this.horizontalCollision)); - Entity entity = this.getRootVehicle(); - if (entity != this && entity.isControlledByLocalInstance()) { - this.connection.send(new ServerboundMoveVehiclePacket(entity)); - this.sendIsSprintingIfNeeded(); + this.tickClientLoadTimeout(); + if (this.hasClientLoaded()) { + this.dropSpamThrottler.tick(); + super.tick(); + this.sendShiftKeyState(); + if (!this.lastSentInput.equals(this.input.keyPresses)) { + this.connection.send(new ServerboundPlayerInputPacket(this.input.keyPresses)); + this.lastSentInput = this.input.keyPresses; } - } else { - this.sendPosition(); - } - for (AmbientSoundHandler ambientSoundHandler : this.ambientSoundHandlers) { - ambientSoundHandler.tick(); + if (this.isPassenger()) { + this.connection.send(new ServerboundMovePlayerPacket.Rot(this.getYRot(), this.getXRot(), this.onGround(), this.horizontalCollision)); + Entity entity = this.getRootVehicle(); + if (entity != this && entity.isLocalInstanceAuthoritative()) { + this.connection.send(ServerboundMoveVehiclePacket.fromEntity(entity)); + this.sendIsSprintingIfNeeded(); + } + } else { + this.sendPosition(); + } + + for (AmbientSoundHandler ambientSoundHandler : this.ambientSoundHandlers) { + ambientSoundHandler.tick(); + } } } @@ -266,12 +271,9 @@ public class LocalPlayer extends AbstractClientPlayer { boolean bl = Mth.lengthSquared(d, e, f) > Mth.square(2.0E-4) || this.positionReminder >= 20; boolean bl2 = g != 0.0 || h != 0.0; if (bl && bl2) { - this.connection - .send( - new ServerboundMovePlayerPacket.PosRot(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot(), this.onGround(), this.horizontalCollision) - ); + this.connection.send(new ServerboundMovePlayerPacket.PosRot(this.position(), this.getYRot(), this.getXRot(), this.onGround(), this.horizontalCollision)); } else if (bl) { - this.connection.send(new ServerboundMovePlayerPacket.Pos(this.getX(), this.getY(), this.getZ(), this.onGround(), this.horizontalCollision)); + this.connection.send(new ServerboundMovePlayerPacket.Pos(this.position(), this.onGround(), this.horizontalCollision)); } else if (bl2) { this.connection.send(new ServerboundMovePlayerPacket.Rot(this.getYRot(), this.getXRot(), this.onGround(), this.horizontalCollision)); } else if (this.lastOnGround != this.onGround() || this.lastHorizontalCollision != this.horizontalCollision) { @@ -406,15 +408,15 @@ public class LocalPlayer extends AbstractClientPlayer { return this.recipeBook; } - public void removeRecipeHighlight(RecipeDisplayId recipeDisplayId) { - if (this.recipeBook.willHighlight(recipeDisplayId)) { - this.recipeBook.removeHighlight(recipeDisplayId); - this.connection.send(new ServerboundRecipeBookSeenRecipePacket(recipeDisplayId)); + public void removeRecipeHighlight(RecipeDisplayId recipe) { + if (this.recipeBook.willHighlight(recipe)) { + this.recipeBook.removeHighlight(recipe); + this.connection.send(new ServerboundRecipeBookSeenRecipePacket(recipe)); } } @Override - protected int getPermissionLevel() { + public int getPermissionLevel() { return this.permissionLevel; } @@ -506,11 +508,6 @@ public class LocalPlayer extends AbstractClientPlayer { this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), sound, source, volume, pitch, false); } - @Override - public boolean isEffectiveAi() { - return true; - } - @Override public void startUsingItem(InteractionHand hand) { ItemStack itemStack = this.getItemInHand(hand); @@ -593,6 +590,16 @@ public class LocalPlayer extends AbstractClientPlayer { this.minecraft.setScreen(new StructureBlockEditScreen(structureEntity)); } + @Override + public void openTestBlock(TestBlockEntity testBlockEntity) { + this.minecraft.setScreen(new TestBlockEditScreen(testBlockEntity)); + } + + @Override + public void openTestInstanceBlock(TestInstanceBlockEntity testInstanceBlockEntity) { + this.minecraft.setScreen(new TestInstanceBlockEditScreen(testInstanceBlockEntity)); + } + @Override public void openJigsawBlock(JigsawBlockEntity jigsawBlockEntity) { this.minecraft.setScreen(new JigsawBlockEditScreen(jigsawBlockEntity)); @@ -631,19 +638,58 @@ public class LocalPlayer extends AbstractClientPlayer { } @Override - public void serverAiStep() { - super.serverAiStep(); + public void applyInput() { if (this.isControlledCamera()) { - this.xxa = this.input.leftImpulse; - this.zza = this.input.forwardImpulse; + Vec2 vec2 = this.modifyInput(this.input.getMoveVector()); + this.xxa = vec2.x; + this.zza = vec2.y; this.jumping = this.input.keyPresses.jump(); this.yBobO = this.yBob; this.xBobO = this.xBob; this.xBob = this.xBob + (this.getXRot() - this.xBob) * 0.5F; this.yBob = this.yBob + (this.getYRot() - this.yBob) * 0.5F; + } else { + super.applyInput(); } } + private Vec2 modifyInput(Vec2 moveVector) { + if (moveVector.lengthSquared() == 0.0F) { + return moveVector; + } else { + Vec2 vec2 = moveVector.scale(0.98F); + if (this.isUsingItem() && !this.isPassenger()) { + vec2 = vec2.scale(0.2F); + } + + if (this.isMovingSlowly()) { + float f = (float)this.getAttributeValue(Attributes.SNEAKING_SPEED); + vec2 = vec2.scale(f); + } + + return modifyInputSpeedForSquareMovement(vec2); + } + } + + private static Vec2 modifyInputSpeedForSquareMovement(Vec2 moveVector) { + float f = moveVector.length(); + if (f <= 0.0F) { + return moveVector; + } else { + Vec2 vec2 = moveVector.scale(1.0F / f); + float g = distanceToUnitSquare(vec2); + float h = Math.min(f * g, 1.0F); + return vec2.scale(h); + } + } + + private static float distanceToUnitSquare(Vec2 moveVector) { + float f = Math.abs(moveVector.x); + float g = Math.abs(moveVector.y); + float h = g > f ? f / g : g / f; + return Mth.sqrt(1.0F + Mth.square(h)); + } + protected boolean isControlledCamera() { return this.minecraft.getCameraEntity() == this; } @@ -673,28 +719,21 @@ public class LocalPlayer extends AbstractClientPlayer { } if (!(this.minecraft.screen instanceof ReceivingLevelScreen)) { - this.handleConfusionTransitionEffect(this.getActivePortalLocalTransition() == Portal.Transition.CONFUSION); + this.handlePortalTransitionEffect(this.getActivePortalLocalTransition() == Transition.CONFUSION); this.processPortalCooldown(); } boolean bl = this.input.keyPresses.jump(); boolean bl2 = this.input.keyPresses.shift(); - boolean bl3 = this.hasEnoughImpulseToStartSprinting(); + boolean bl3 = this.input.hasForwardImpulse(); Abilities abilities = this.getAbilities(); this.crouching = !abilities.flying && !this.isSwimming() && !this.isPassenger() && this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.CROUCHING) && (this.isShiftKeyDown() || !this.isSleeping() && !this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.STANDING)); - float f = (float)this.getAttributeValue(Attributes.SNEAKING_SPEED); - this.input.tick(this.isMovingSlowly(), f); + this.input.tick(); this.minecraft.getTutorial().onInput(this.input); - if (this.isUsingItem() && !this.isPassenger()) { - this.input.leftImpulse *= 0.2F; - this.input.forwardImpulse *= 0.2F; - this.sprintTriggerTime = 0; - } - boolean bl4 = false; if (this.autoJumpTime > 0) { this.autoJumpTime--; @@ -709,43 +748,40 @@ public class LocalPlayer extends AbstractClientPlayer { this.moveTowardsClosestSpace(this.getX() + this.getBbWidth() * 0.35, this.getZ() + this.getBbWidth() * 0.35); } - if (bl2) { + if (bl2 || this.isUsingItem() && !this.isPassenger() || this.input.keyPresses.backward()) { this.sprintTriggerTime = 0; } - boolean bl5 = this.canStartSprinting(); - boolean bl6 = this.isPassenger() ? this.getVehicle().onGround() : this.onGround(); - boolean bl7 = !bl2 && !bl3; - if ((bl6 || this.isUnderWater()) && bl7 && bl5) { - if (this.sprintTriggerTime <= 0 && !this.minecraft.options.keySprint.isDown()) { - this.sprintTriggerTime = 7; - } else { + if (this.canStartSprinting()) { + if (!bl3) { + if (this.sprintTriggerTime > 0) { + this.setSprinting(true); + } else { + this.sprintTriggerTime = 7; + } + } + + if (this.input.keyPresses.sprint()) { this.setSprinting(true); } } - if ((!this.isInWater() || this.isUnderWater()) && bl5 && this.minecraft.options.keySprint.isDown()) { - this.setSprinting(true); - } - if (this.isSprinting()) { - boolean bl8 = !this.input.hasForwardImpulse() || !this.hasEnoughFoodToStartSprinting(); - boolean bl9 = bl8 || this.horizontalCollision && !this.minorHorizontalCollision || this.isInWater() && !this.isUnderWater(); if (this.isSwimming()) { - if (!this.onGround() && !this.input.keyPresses.shift() && bl8 || !this.isInWater()) { + if (this.shouldStopSwimSprinting()) { this.setSprinting(false); } - } else if (bl9) { + } else if (this.shouldStopRunSprinting()) { this.setSprinting(false); } } - boolean bl8 = false; + boolean bl5 = false; if (abilities.mayfly) { if (this.minecraft.gameMode.isAlwaysFlying()) { if (!abilities.flying) { abilities.flying = true; - bl8 = true; + bl5 = true; this.onUpdateAbilities(); } } else if (!bl && this.input.keyPresses.jump() && !bl4) { @@ -757,14 +793,14 @@ public class LocalPlayer extends AbstractClientPlayer { this.jumpFromGround(); } - bl8 = true; + bl5 = true; this.onUpdateAbilities(); this.jumpTriggerTime = 0; } } } - if (this.input.keyPresses.jump() && !bl8 && !bl && !this.onClimbable() && this.tryToStartFallFlying()) { + if (this.input.keyPresses.jump() && !bl5 && !bl && !this.onClimbable() && this.tryToStartFallFlying()) { this.connection.send(new ServerboundPlayerCommandPacket(this, Action.START_FALL_FLYING)); } @@ -831,8 +867,29 @@ public class LocalPlayer extends AbstractClientPlayer { } } - public Portal.Transition getActivePortalLocalTransition() { - return this.portalProcess == null ? Portal.Transition.NONE : this.portalProcess.getPortalLocalTransition(); + private boolean shouldStopRunSprinting() { + return this.hasBlindness() + || this.isPassenger() && !this.vehicleCanSprint(this.getVehicle()) + || !this.input.hasForwardImpulse() + || !this.hasEnoughFoodToSprint() + || this.horizontalCollision && !this.minorHorizontalCollision + || this.isInWater() && !this.isUnderWater(); + } + + private boolean shouldStopSwimSprinting() { + return this.hasBlindness() + || this.isPassenger() && !this.vehicleCanSprint(this.getVehicle()) + || !this.isInWater() + || !this.input.hasForwardImpulse() && !this.onGround() && !this.input.keyPresses.shift() + || !this.hasEnoughFoodToSprint(); + } + + private boolean hasBlindness() { + return this.hasEffect(MobEffects.BLINDNESS); + } + + public Transition getActivePortalLocalTransition() { + return this.portalProcess == null ? Transition.NONE : this.portalProcess.getPortalLocalTransition(); } @Override @@ -843,10 +900,10 @@ public class LocalPlayer extends AbstractClientPlayer { } } - private void handleConfusionTransitionEffect(boolean useConfusion) { - this.oSpinningEffectIntensity = this.spinningEffectIntensity; + private void handlePortalTransitionEffect(boolean inPortal) { + this.oPortalEffectIntensity = this.portalEffectIntensity; float f = 0.0F; - if (useConfusion && this.portalProcess != null && this.portalProcess.isInsidePortalThisTick()) { + if (inPortal && this.portalProcess != null && this.portalProcess.isInsidePortalThisTick()) { if (this.minecraft.screen != null && !this.minecraft.screen.isPauseScreen() && !(this.minecraft.screen instanceof DeathScreen) @@ -858,19 +915,17 @@ public class LocalPlayer extends AbstractClientPlayer { this.minecraft.setScreen(null); } - if (this.spinningEffectIntensity == 0.0F) { + if (this.portalEffectIntensity == 0.0F) { this.minecraft.getSoundManager().play(SimpleSoundInstance.forLocalAmbience(SoundEvents.PORTAL_TRIGGER, this.random.nextFloat() * 0.4F + 0.8F, 0.25F)); } f = 0.0125F; this.portalProcess.setAsInsidePortalThisTick(false); - } else if (this.hasEffect(MobEffects.CONFUSION) && !this.getEffect(MobEffects.CONFUSION).endsWithin(60)) { - f = 0.006666667F; - } else if (this.spinningEffectIntensity > 0.0F) { + } else if (this.portalEffectIntensity > 0.0F) { f = -0.05F; } - this.spinningEffectIntensity = Mth.clamp(this.spinningEffectIntensity + f, 0.0F, 1.0F); + this.portalEffectIntensity = Mth.clamp(this.portalEffectIntensity + f, 0.0F, 1.0F); } @Override @@ -888,22 +943,11 @@ public class LocalPlayer extends AbstractClientPlayer { return this.handsBusy; } - @Nullable @Override - public MobEffectInstance removeEffectNoUpdate(Holder effect) { - if (effect.is(MobEffects.CONFUSION)) { - this.oSpinningEffectIntensity = 0.0F; - this.spinningEffectIntensity = 0.0F; - } - - return super.removeEffectNoUpdate(effect); - } - - @Override - public void move(MoverType type, Vec3 pos) { + public void move(MoverType type, Vec3 movement) { double d = this.getX(); double e = this.getZ(); - super.move(type, pos); + super.move(type, movement); float f = (float)(this.getX() - d); float g = (float)(this.getZ() - e); this.updateAutoJump(f, g); @@ -953,8 +997,8 @@ public class LocalPlayer extends AbstractClientPlayer { if (blockState2.getCollisionShape(this.level(), blockPos, collisionContext).isEmpty()) { float m = 7.0F; float n = 1.2F; - if (this.hasEffect(MobEffects.JUMP)) { - n += (this.getEffect(MobEffects.JUMP).getAmplifier() + 1) * 0.75F; + if (this.hasEffect(MobEffects.JUMP_BOOST)) { + n += (this.getEffect(MobEffects.JUMP_BOOST).getAmplifier() + 1) * 0.75F; } float o = Math.max(f * 7.0F, 1.0F / l); @@ -1045,30 +1089,26 @@ public class LocalPlayer extends AbstractClientPlayer { } private boolean isMoving() { - Vec2 vec2 = this.input.getMoveVector(); - return vec2.x != 0.0F || vec2.y != 0.0F; + return this.input.getMoveVector().lengthSquared() > 0.0F; } private boolean canStartSprinting() { return !this.isSprinting() - && this.hasEnoughImpulseToStartSprinting() - && this.hasEnoughFoodToStartSprinting() + && this.input.hasForwardImpulse() + && this.hasEnoughFoodToSprint() && !this.isUsingItem() - && !this.hasEffect(MobEffects.BLINDNESS) + && !this.hasBlindness() && (!this.isPassenger() || this.vehicleCanSprint(this.getVehicle())) - && !this.isFallFlying(); + && (!this.isFallFlying() || this.isUnderWater()) + && (!this.isMovingSlowly() || this.isUnderWater()) + && (!this.isInWater() || this.isUnderWater()); } private boolean vehicleCanSprint(Entity vehicle) { - return vehicle.canSprint() && vehicle.isControlledByLocalInstance(); + return vehicle.canSprint() && vehicle.isLocalInstanceAuthoritative(); } - private boolean hasEnoughImpulseToStartSprinting() { - double d = 0.8; - return this.isUnderWater() ? this.input.hasForwardImpulse() : this.input.forwardImpulse >= 0.8; - } - - private boolean hasEnoughFoodToStartSprinting() { + private boolean hasEnoughFoodToSprint() { return this.isPassenger() || this.getFoodData().getFoodLevel() > 6.0F || this.getAbilities().mayfly; } @@ -1143,8 +1183,8 @@ public class LocalPlayer extends AbstractClientPlayer { } @Override - public void handleCreativeModeItemDrop(ItemStack itemStack) { - this.minecraft.gameMode.handleCreativeModeItemDrop(itemStack); + public void handleCreativeModeItemDrop(ItemStack stack) { + this.minecraft.gameMode.handleCreativeModeItemDrop(stack); } @Override diff --git a/net/minecraft/client/player/RemotePlayer.java b/net/minecraft/client/player/RemotePlayer.java index bdda1ab9..8a29cd7f 100644 --- a/net/minecraft/client/player/RemotePlayer.java +++ b/net/minecraft/client/player/RemotePlayer.java @@ -44,9 +44,8 @@ public class RemotePlayer extends AbstractClientPlayer { @Override public void aiStep() { - if (this.lerpSteps > 0) { - this.lerpPositionAndRotationStep(this.lerpSteps, this.lerpX, this.lerpY, this.lerpZ, this.lerpYRot, this.lerpXRot); - this.lerpSteps--; + if (this.isInterpolating()) { + this.getInterpolation().interpolate(); } if (this.lerpHeadSteps > 0) { diff --git a/net/minecraft/client/renderer/BiomeColors.java b/net/minecraft/client/renderer/BiomeColors.java index 51a9d7a1..7c655a77 100644 --- a/net/minecraft/client/renderer/BiomeColors.java +++ b/net/minecraft/client/renderer/BiomeColors.java @@ -11,6 +11,7 @@ import net.minecraft.world.level.biome.Biome; public class BiomeColors { public static final ColorResolver GRASS_COLOR_RESOLVER = Biome::getGrassColor; public static final ColorResolver FOLIAGE_COLOR_RESOLVER = (biome, d, e) -> biome.getFoliageColor(); + public static final ColorResolver DRY_FOLIAGE_COLOR_RESOLVER = (biome, d, e) -> biome.getDryFoliageColor(); public static final ColorResolver WATER_COLOR_RESOLVER = (biome, d, e) -> biome.getWaterColor(); private static int getAverageColor(BlockAndTintGetter level, BlockPos blockPos, ColorResolver colorResolver) { @@ -25,6 +26,10 @@ public class BiomeColors { return getAverageColor(level, blockPos, FOLIAGE_COLOR_RESOLVER); } + public static int getAverageDryFoliageColor(BlockAndTintGetter level, BlockPos blockPos) { + return getAverageColor(level, blockPos, DRY_FOLIAGE_COLOR_RESOLVER); + } + public static int getAverageWaterColor(BlockAndTintGetter level, BlockPos blockPos) { return getAverageColor(level, blockPos, WATER_COLOR_RESOLVER); } diff --git a/net/minecraft/client/renderer/BlockEntityWithoutLevelRenderer.java b/net/minecraft/client/renderer/BlockEntityWithoutLevelRenderer.java deleted file mode 100644 index c03cf908..00000000 --- a/net/minecraft/client/renderer/BlockEntityWithoutLevelRenderer.java +++ /dev/null @@ -1,174 +0,0 @@ -package net.minecraft.client.renderer; - -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Map; -import java.util.Objects; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ShieldModel; -import net.minecraft.client.model.SkullModelBase; -import net.minecraft.client.model.TridentModel; -import net.minecraft.client.model.geom.EntityModelSet; -import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.blockentity.BannerRenderer; -import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; -import net.minecraft.client.renderer.blockentity.SkullBlockRenderer; -import net.minecraft.client.renderer.entity.ItemRenderer; -import net.minecraft.client.resources.model.Material; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.core.BlockPos; -import net.minecraft.core.component.DataComponents; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.server.packs.resources.ResourceManagerReloadListener; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.DyeColor; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.component.ResolvableProfile; -import net.minecraft.world.level.block.AbstractBannerBlock; -import net.minecraft.world.level.block.AbstractSkullBlock; -import net.minecraft.world.level.block.BedBlock; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.ShulkerBoxBlock; -import net.minecraft.world.level.block.SkullBlock; -import net.minecraft.world.level.block.entity.BannerBlockEntity; -import net.minecraft.world.level.block.entity.BannerPatternLayers; -import net.minecraft.world.level.block.entity.BedBlockEntity; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.entity.ChestBlockEntity; -import net.minecraft.world.level.block.entity.ConduitBlockEntity; -import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity; -import net.minecraft.world.level.block.entity.EnderChestBlockEntity; -import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity; -import net.minecraft.world.level.block.entity.TrappedChestBlockEntity; -import net.minecraft.world.level.block.state.BlockState; - -@Environment(EnvType.CLIENT) -public class BlockEntityWithoutLevelRenderer implements ResourceManagerReloadListener { - private static final ShulkerBoxBlockEntity[] SHULKER_BOXES = (ShulkerBoxBlockEntity[])Arrays.stream(DyeColor.values()) - .sorted(Comparator.comparingInt(DyeColor::getId)) - .map(dyeColor -> new ShulkerBoxBlockEntity(dyeColor, BlockPos.ZERO, Blocks.SHULKER_BOX.defaultBlockState())) - .toArray(ShulkerBoxBlockEntity[]::new); - private static final ShulkerBoxBlockEntity DEFAULT_SHULKER_BOX = new ShulkerBoxBlockEntity(BlockPos.ZERO, Blocks.SHULKER_BOX.defaultBlockState()); - private final ChestBlockEntity chest = new ChestBlockEntity(BlockPos.ZERO, Blocks.CHEST.defaultBlockState()); - private final ChestBlockEntity trappedChest = new TrappedChestBlockEntity(BlockPos.ZERO, Blocks.TRAPPED_CHEST.defaultBlockState()); - private final EnderChestBlockEntity enderChest = new EnderChestBlockEntity(BlockPos.ZERO, Blocks.ENDER_CHEST.defaultBlockState()); - private final BannerBlockEntity banner = new BannerBlockEntity(BlockPos.ZERO, Blocks.WHITE_BANNER.defaultBlockState()); - private final BedBlockEntity bed = new BedBlockEntity(BlockPos.ZERO, Blocks.RED_BED.defaultBlockState()); - private final ConduitBlockEntity conduit = new ConduitBlockEntity(BlockPos.ZERO, Blocks.CONDUIT.defaultBlockState()); - private final DecoratedPotBlockEntity decoratedPot = new DecoratedPotBlockEntity(BlockPos.ZERO, Blocks.DECORATED_POT.defaultBlockState()); - private ShieldModel shieldModel; - private TridentModel tridentModel; - private Map skullModels; - private final BlockEntityRenderDispatcher blockEntityRenderDispatcher; - private final EntityModelSet entityModelSet; - - public BlockEntityWithoutLevelRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher, EntityModelSet entityModelSet) { - this.blockEntityRenderDispatcher = blockEntityRenderDispatcher; - this.entityModelSet = entityModelSet; - } - - @Override - public void onResourceManagerReload(ResourceManager resourceManager) { - this.shieldModel = new ShieldModel(this.entityModelSet.bakeLayer(ModelLayers.SHIELD)); - this.tridentModel = new TridentModel(this.entityModelSet.bakeLayer(ModelLayers.TRIDENT)); - this.skullModels = SkullBlockRenderer.createSkullRenderers(this.entityModelSet); - } - - public void renderByItem(ItemStack stack, ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource buffer, int packedLight, int packedOverlay) { - Item item = stack.getItem(); - if (item instanceof BlockItem) { - Block block = ((BlockItem)item).getBlock(); - if (block instanceof AbstractSkullBlock abstractSkullBlock) { - ResolvableProfile resolvableProfile = stack.get(DataComponents.PROFILE); - if (resolvableProfile != null && !resolvableProfile.isResolved()) { - stack.remove(DataComponents.PROFILE); - resolvableProfile.resolve().thenAcceptAsync(resolvableProfilex -> stack.set(DataComponents.PROFILE, resolvableProfilex), Minecraft.getInstance()); - resolvableProfile = null; - } - - SkullModelBase skullModelBase = (SkullModelBase)this.skullModels.get(abstractSkullBlock.getType()); - RenderType renderType = SkullBlockRenderer.getRenderType(abstractSkullBlock.getType(), resolvableProfile); - SkullBlockRenderer.renderSkull(null, 180.0F, 0.0F, poseStack, buffer, packedLight, skullModelBase, renderType); - } else { - BlockState blockState = block.defaultBlockState(); - BlockEntity blockEntity; - if (block instanceof AbstractBannerBlock) { - this.banner.fromItem(stack, ((AbstractBannerBlock)block).getColor()); - blockEntity = this.banner; - } else if (block instanceof BedBlock) { - this.bed.setColor(((BedBlock)block).getColor()); - blockEntity = this.bed; - } else if (blockState.is(Blocks.CONDUIT)) { - blockEntity = this.conduit; - } else if (blockState.is(Blocks.CHEST)) { - blockEntity = this.chest; - } else if (blockState.is(Blocks.ENDER_CHEST)) { - blockEntity = this.enderChest; - } else if (blockState.is(Blocks.TRAPPED_CHEST)) { - blockEntity = this.trappedChest; - } else if (blockState.is(Blocks.DECORATED_POT)) { - this.decoratedPot.setFromItem(stack); - blockEntity = this.decoratedPot; - } else { - if (!(block instanceof ShulkerBoxBlock)) { - return; - } - - DyeColor dyeColor = ShulkerBoxBlock.getColorFromItem(item); - if (dyeColor == null) { - blockEntity = DEFAULT_SHULKER_BOX; - } else { - blockEntity = SHULKER_BOXES[dyeColor.getId()]; - } - } - - this.blockEntityRenderDispatcher.renderItem(blockEntity, poseStack, buffer, packedLight, packedOverlay); - } - } else { - if (stack.is(Items.SHIELD)) { - BannerPatternLayers bannerPatternLayers = stack.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY); - DyeColor dyeColor2 = stack.get(DataComponents.BASE_COLOR); - boolean bl = !bannerPatternLayers.layers().isEmpty() || dyeColor2 != null; - poseStack.pushPose(); - poseStack.scale(1.0F, -1.0F, -1.0F); - Material material = bl ? ModelBakery.SHIELD_BASE : ModelBakery.NO_PATTERN_SHIELD; - VertexConsumer vertexConsumer = material.sprite() - .wrap(ItemRenderer.getFoilBuffer(buffer, this.shieldModel.renderType(material.atlasLocation()), displayContext == ItemDisplayContext.GUI, stack.hasFoil())); - this.shieldModel.handle().render(poseStack, vertexConsumer, packedLight, packedOverlay); - if (bl) { - BannerRenderer.renderPatterns( - poseStack, - buffer, - packedLight, - packedOverlay, - this.shieldModel.plate(), - material, - false, - (DyeColor)Objects.requireNonNullElse(dyeColor2, DyeColor.WHITE), - bannerPatternLayers, - stack.hasFoil(), - false - ); - } else { - this.shieldModel.plate().render(poseStack, vertexConsumer, packedLight, packedOverlay); - } - - poseStack.popPose(); - } else if (stack.is(Items.TRIDENT)) { - poseStack.pushPose(); - poseStack.scale(1.0F, -1.0F, -1.0F); - VertexConsumer vertexConsumer2 = ItemRenderer.getFoilBuffer(buffer, this.tridentModel.renderType(TridentModel.TEXTURE), false, stack.hasFoil()); - this.tridentModel.renderToBuffer(poseStack, vertexConsumer2, packedLight, packedOverlay); - poseStack.popPose(); - } - } - } -} diff --git a/net/minecraft/client/renderer/CloudRenderer.java b/net/minecraft/client/renderer/CloudRenderer.java index 50f12faf..2aed2bdd 100644 --- a/net/minecraft/client/renderer/CloudRenderer.java +++ b/net/minecraft/client/renderer/CloudRenderer.java @@ -1,19 +1,29 @@ package net.minecraft.client.renderer; +import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexBuffer; +import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.InputStream; import java.util.Optional; +import java.util.OptionalDouble; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.CloudStatus; +import net.minecraft.client.Minecraft; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.SimplePreparableReloadListener; @@ -22,7 +32,6 @@ import net.minecraft.util.Mth; import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; -import org.joml.Matrix4f; import org.slf4j.Logger; @Environment(EnvType.CLIENT) @@ -46,8 +55,10 @@ public class CloudRenderer extends SimplePreparableReloadListener prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { try { @@ -103,130 +114,179 @@ public class CloudRenderer extends SimplePreparableReloadListener> 4 & 4294967295L); + private static int getColor(long cellData) { + return (int)(cellData >> 4 & 4294967295L); } - private static boolean isNorthEmpty(long l) { - return (l >> 3 & 1L) != 0L; + private static boolean isNorthEmpty(long cellData) { + return (cellData >> 3 & 1L) != 0L; } - private static boolean isEastEmpty(long l) { - return (l >> 2 & 1L) != 0L; + private static boolean isEastEmpty(long cellData) { + return (cellData >> 2 & 1L) != 0L; } - private static boolean isSouthEmpty(long l) { - return (l >> 1 & 1L) != 0L; + private static boolean isSouthEmpty(long cellData) { + return (cellData >> 1 & 1L) != 0L; } - private static boolean isWestEmpty(long l) { - return (l >> 0 & 1L) != 0L; + private static boolean isWestEmpty(long cellData) { + return (cellData >> 0 & 1L) != 0L; } - public void render(int i, CloudStatus cloudStatus, float f, Matrix4f matrix4f, Matrix4f matrix4f2, Vec3 vec3, float g) { + public void render(int cloudColor, CloudStatus cloudStatus, float height, Vec3 cameraPosition, float ticks) { if (this.texture != null) { - float h = (float)(f - vec3.y); - float j = h + 4.0F; + float f = (float)(height - cameraPosition.y); + float g = f + 4.0F; CloudRenderer.RelativeCameraPos relativeCameraPos; - if (j < 0.0F) { + if (g < 0.0F) { relativeCameraPos = CloudRenderer.RelativeCameraPos.ABOVE_CLOUDS; - } else if (h > 0.0F) { + } else if (f > 0.0F) { relativeCameraPos = CloudRenderer.RelativeCameraPos.BELOW_CLOUDS; } else { relativeCameraPos = CloudRenderer.RelativeCameraPos.INSIDE_CLOUDS; } - double d = vec3.x + g * 0.030000001F; - double e = vec3.z + 3.96F; - double k = this.texture.width * 12.0; - double l = this.texture.height * 12.0; - d -= Mth.floor(d / k) * k; - e -= Mth.floor(e / l) * l; - int m = Mth.floor(d / 12.0); - int n = Mth.floor(e / 12.0); - float o = (float)(d - m * 12.0F); - float p = (float)(e - n * 12.0F); - RenderType renderType = cloudStatus == CloudStatus.FANCY ? RenderType.clouds() : RenderType.flatClouds(); - this.vertexBuffer.bind(); - if (this.needsRebuild || m != this.prevCellX || n != this.prevCellZ || relativeCameraPos != this.prevRelativeCameraPos || cloudStatus != this.prevType) { + double d = cameraPosition.x + ticks * 0.030000001F; + double e = cameraPosition.z + 3.96F; + double h = this.texture.width * 12.0; + double i = this.texture.height * 12.0; + d -= Mth.floor(d / h) * h; + e -= Mth.floor(e / i) * i; + int j = Mth.floor(d / 12.0); + int k = Mth.floor(e / 12.0); + float l = (float)(d - j * 12.0F); + float m = (float)(e - k * 12.0F); + boolean bl = cloudStatus == CloudStatus.FANCY; + RenderPipeline renderPipeline = bl ? RenderPipelines.CLOUDS : RenderPipelines.FLAT_CLOUDS; + if (this.needsRebuild || j != this.prevCellX || k != this.prevCellZ || relativeCameraPos != this.prevRelativeCameraPos || cloudStatus != this.prevType) { this.needsRebuild = false; - this.prevCellX = m; - this.prevCellZ = n; + this.prevCellX = j; + this.prevCellZ = k; this.prevRelativeCameraPos = relativeCameraPos; this.prevType = cloudStatus; - MeshData meshData = this.buildMesh(Tesselator.getInstance(), m, n, cloudStatus, relativeCameraPos, renderType); - if (meshData != null) { - this.vertexBuffer.upload(meshData); - this.vertexBufferEmpty = false; - } else { - this.vertexBufferEmpty = true; + + try (MeshData meshData = this.buildMesh(Tesselator.getInstance(), j, k, cloudStatus, relativeCameraPos, renderPipeline)) { + if (meshData == null) { + this.indexCount = 0; + } else { + if (this.vertexBuffer != null && this.vertexBuffer.size >= meshData.vertexBuffer().remaining()) { + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + commandEncoder.writeToBuffer(this.vertexBuffer, meshData.vertexBuffer(), 0); + } else { + if (this.vertexBuffer != null) { + this.vertexBuffer.close(); + } + + this.vertexBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Cloud vertex buffer", BufferType.VERTICES, BufferUsage.DYNAMIC_WRITE, meshData.vertexBuffer()); + } + + this.indexCount = meshData.drawState().indexCount(); + } } } - if (!this.vertexBufferEmpty) { - RenderSystem.setShaderColor(ARGB.from8BitChannel(ARGB.red(i)), ARGB.from8BitChannel(ARGB.green(i)), ARGB.from8BitChannel(ARGB.blue(i)), 1.0F); - if (cloudStatus == CloudStatus.FANCY) { - this.drawWithRenderType(RenderType.cloudsDepthOnly(), matrix4f, matrix4f2, o, h, p); + if (this.indexCount != 0) { + RenderSystem.setShaderColor(ARGB.redFloat(cloudColor), ARGB.greenFloat(cloudColor), ARGB.blueFloat(cloudColor), 1.0F); + if (bl) { + this.draw(RenderPipelines.CLOUDS_DEPTH_ONLY, l, f, m); } - this.drawWithRenderType(renderType, matrix4f, matrix4f2, o, h, p); - VertexBuffer.unbind(); + this.draw(renderPipeline, l, f, m); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); } } } - private void drawWithRenderType(RenderType renderType, Matrix4f matrix4f, Matrix4f matrix4f2, float f, float g, float h) { - renderType.setupRenderState(); - CompiledShaderProgram compiledShaderProgram = RenderSystem.getShader(); - if (compiledShaderProgram != null && compiledShaderProgram.MODEL_OFFSET != null) { - compiledShaderProgram.MODEL_OFFSET.set(-f, g, -h); + private void draw(RenderPipeline pipeline, float x, float y, float z) { + RenderSystem.setModelOffset(-x, y, -z); + RenderTarget renderTarget = Minecraft.getInstance().getMainRenderTarget(); + RenderTarget renderTarget2 = Minecraft.getInstance().levelRenderer.getCloudsTarget(); + GpuTexture gpuTexture; + GpuTexture gpuTexture2; + if (renderTarget2 != null) { + gpuTexture = renderTarget2.getColorTexture(); + gpuTexture2 = renderTarget2.getDepthTexture(); + } else { + gpuTexture = renderTarget.getColorTexture(); + gpuTexture2 = renderTarget.getDepthTexture(); } - this.vertexBuffer.drawWithShader(matrix4f, matrix4f2, compiledShaderProgram); - renderType.clearRenderState(); + GpuBuffer gpuBuffer = this.indices.getBuffer(this.indexCount); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(pipeline); + renderPass.setIndexBuffer(gpuBuffer, this.indices.type()); + renderPass.setVertexBuffer(0, this.vertexBuffer); + renderPass.drawIndexed(0, this.indexCount); + } + + RenderSystem.resetModelOffset(); } @Nullable private MeshData buildMesh( - Tesselator tesselator, int i, int j, CloudStatus cloudStatus, CloudRenderer.RelativeCameraPos relativeCameraPos, RenderType renderType + Tesselator tesselator, int cellX, int cellY, CloudStatus cloudStatus, CloudRenderer.RelativeCameraPos relativeCameraPos, RenderPipeline pipeline ) { float f = 0.8F; - int k = ARGB.colorFromFloat(0.8F, 1.0F, 1.0F, 1.0F); - int l = ARGB.colorFromFloat(0.8F, 0.9F, 0.9F, 0.9F); - int m = ARGB.colorFromFloat(0.8F, 0.7F, 0.7F, 0.7F); - int n = ARGB.colorFromFloat(0.8F, 0.8F, 0.8F, 0.8F); - BufferBuilder bufferBuilder = tesselator.begin(renderType.mode(), renderType.format()); - this.buildMesh(relativeCameraPos, bufferBuilder, i, j, m, k, l, n, cloudStatus == CloudStatus.FANCY); + int i = ARGB.colorFromFloat(0.8F, 1.0F, 1.0F, 1.0F); + int j = ARGB.colorFromFloat(0.8F, 0.9F, 0.9F, 0.9F); + int k = ARGB.colorFromFloat(0.8F, 0.7F, 0.7F, 0.7F); + int l = ARGB.colorFromFloat(0.8F, 0.8F, 0.8F, 0.8F); + BufferBuilder bufferBuilder = tesselator.begin(pipeline.getVertexFormatMode(), pipeline.getVertexFormat()); + this.buildMesh(relativeCameraPos, bufferBuilder, cellX, cellY, k, i, j, l, cloudStatus == CloudStatus.FANCY); return bufferBuilder.build(); } - private void buildMesh(CloudRenderer.RelativeCameraPos relativeCameraPos, BufferBuilder bufferBuilder, int i, int j, int k, int l, int m, int n, boolean bl) { + private void buildMesh( + CloudRenderer.RelativeCameraPos relativeCameraPos, + BufferBuilder bufferBuilder, + int cellX, + int cellZ, + int bottomColor, + int topColor, + int sideColor, + int frontColor, + boolean fancyClouds + ) { if (this.texture != null) { - int o = 32; + int i = 32; long[] ls = this.texture.cells; - int p = this.texture.width; - int q = this.texture.height; + int j = this.texture.width; + int k = this.texture.height; - for (int r = -32; r <= 32; r++) { - for (int s = -32; s <= 32; s++) { - int t = Math.floorMod(i + s, p); - int u = Math.floorMod(j + r, q); - long v = ls[t + u * p]; - if (v != 0L) { - int w = getColor(v); - if (bl) { - this.buildExtrudedCell(relativeCameraPos, bufferBuilder, ARGB.multiply(k, w), ARGB.multiply(l, w), ARGB.multiply(m, w), ARGB.multiply(n, w), s, r, v); + for (int l = -32; l <= 32; l++) { + for (int m = -32; m <= 32; m++) { + int n = Math.floorMod(cellX + m, j); + int o = Math.floorMod(cellZ + l, k); + long p = ls[n + o * j]; + if (p != 0L) { + int q = getColor(p); + if (fancyClouds) { + this.buildExtrudedCell( + relativeCameraPos, + bufferBuilder, + ARGB.multiply(bottomColor, q), + ARGB.multiply(topColor, q), + ARGB.multiply(sideColor, q), + ARGB.multiply(frontColor, q), + m, + l, + p + ); } else { - this.buildFlatCell(bufferBuilder, ARGB.multiply(l, w), s, r); + this.buildFlatCell(bufferBuilder, ARGB.multiply(topColor, q), m, l); } } } @@ -234,94 +294,102 @@ public class CloudRenderer extends SimplePreparableReloadListener 0) { - bufferBuilder.addVertex(f, 0.0F, q).setColor(l); - bufferBuilder.addVertex(f, 4.0F, q).setColor(l); - bufferBuilder.addVertex(g, 4.0F, q).setColor(l); - bufferBuilder.addVertex(g, 0.0F, q).setColor(l); + if (isNorthEmpty(cellData) && y > 0) { + bufferBuilder.addVertex(f, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(frontColor); } - if (isSouthEmpty(o) && n < 0) { - bufferBuilder.addVertex(g, 0.0F, r).setColor(l); - bufferBuilder.addVertex(g, 4.0F, r).setColor(l); - bufferBuilder.addVertex(f, 4.0F, r).setColor(l); - bufferBuilder.addVertex(f, 0.0F, r).setColor(l); + if (isSouthEmpty(cellData) && y < 0) { + bufferBuilder.addVertex(g, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(frontColor); } - if (isWestEmpty(o) && m > 0) { - bufferBuilder.addVertex(f, 0.0F, r).setColor(k); - bufferBuilder.addVertex(f, 4.0F, r).setColor(k); - bufferBuilder.addVertex(f, 4.0F, q).setColor(k); - bufferBuilder.addVertex(f, 0.0F, q).setColor(k); + if (isWestEmpty(cellData) && x > 0) { + bufferBuilder.addVertex(f, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(sideColor); } - if (isEastEmpty(o) && m < 0) { - bufferBuilder.addVertex(g, 0.0F, q).setColor(k); - bufferBuilder.addVertex(g, 4.0F, q).setColor(k); - bufferBuilder.addVertex(g, 4.0F, r).setColor(k); - bufferBuilder.addVertex(g, 0.0F, r).setColor(k); + if (isEastEmpty(cellData) && x < 0) { + bufferBuilder.addVertex(g, 0.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(sideColor); } - boolean bl = Math.abs(m) <= 1 && Math.abs(n) <= 1; + boolean bl = Math.abs(x) <= 1 && Math.abs(y) <= 1; if (bl) { - bufferBuilder.addVertex(g, 4.0F, q).setColor(j); - bufferBuilder.addVertex(g, 4.0F, r).setColor(j); - bufferBuilder.addVertex(f, 4.0F, r).setColor(j); - bufferBuilder.addVertex(f, 4.0F, q).setColor(j); - bufferBuilder.addVertex(f, 0.0F, q).setColor(i); - bufferBuilder.addVertex(f, 0.0F, r).setColor(i); - bufferBuilder.addVertex(g, 0.0F, r).setColor(i); - bufferBuilder.addVertex(g, 0.0F, q).setColor(i); - bufferBuilder.addVertex(g, 0.0F, q).setColor(l); - bufferBuilder.addVertex(g, 4.0F, q).setColor(l); - bufferBuilder.addVertex(f, 4.0F, q).setColor(l); - bufferBuilder.addVertex(f, 0.0F, q).setColor(l); - bufferBuilder.addVertex(f, 0.0F, r).setColor(l); - bufferBuilder.addVertex(f, 4.0F, r).setColor(l); - bufferBuilder.addVertex(g, 4.0F, r).setColor(l); - bufferBuilder.addVertex(g, 0.0F, r).setColor(l); - bufferBuilder.addVertex(f, 0.0F, q).setColor(k); - bufferBuilder.addVertex(f, 4.0F, q).setColor(k); - bufferBuilder.addVertex(f, 4.0F, r).setColor(k); - bufferBuilder.addVertex(f, 0.0F, r).setColor(k); - bufferBuilder.addVertex(g, 0.0F, r).setColor(k); - bufferBuilder.addVertex(g, 4.0F, r).setColor(k); - bufferBuilder.addVertex(g, 4.0F, q).setColor(k); - bufferBuilder.addVertex(g, 0.0F, q).setColor(k); + bufferBuilder.addVertex(g, 4.0F, j).setColor(topColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(topColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(topColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(topColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(bottomColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(sideColor); } } @@ -330,7 +398,9 @@ public class CloudRenderer extends SimplePreparableReloadListener samplers = new ArrayList(); - private final Object2IntMap samplerTextures = new Object2IntArrayMap<>(); - private final IntList samplerLocations = new IntArrayList(); - private final List uniforms = new ArrayList(); - private final Map uniformsByName = new HashMap(); - private final Map uniformConfigs = new HashMap(); - private final int programId; - @Nullable - public Uniform MODEL_VIEW_MATRIX; - @Nullable - public Uniform PROJECTION_MATRIX; - @Nullable - public Uniform TEXTURE_MATRIX; - @Nullable - public Uniform SCREEN_SIZE; - @Nullable - public Uniform COLOR_MODULATOR; - @Nullable - public Uniform LIGHT0_DIRECTION; - @Nullable - public Uniform LIGHT1_DIRECTION; - @Nullable - public Uniform GLINT_ALPHA; - @Nullable - public Uniform FOG_START; - @Nullable - public Uniform FOG_END; - @Nullable - public Uniform FOG_COLOR; - @Nullable - public Uniform FOG_SHAPE; - @Nullable - public Uniform LINE_WIDTH; - @Nullable - public Uniform GAME_TIME; - @Nullable - public Uniform MODEL_OFFSET; - - private CompiledShaderProgram(int i) { - this.programId = i; - this.samplerTextures.defaultReturnValue(-1); - } - - public static CompiledShaderProgram link(CompiledShader compiledShader, CompiledShader compiledShader2, VertexFormat vertexFormat) throws ShaderManager.CompilationException { - int i = GlStateManager.glCreateProgram(); - if (i <= 0) { - throw new ShaderManager.CompilationException("Could not create shader program (returned program ID " + i + ")"); - } else { - vertexFormat.bindAttributes(i); - GlStateManager.glAttachShader(i, compiledShader.getShaderId()); - GlStateManager.glAttachShader(i, compiledShader2.getShaderId()); - GlStateManager.glLinkProgram(i); - int j = GlStateManager.glGetProgrami(i, 35714); - if (j == 0) { - String string = GlStateManager.glGetProgramInfoLog(i, 32768); - throw new ShaderManager.CompilationException( - "Error encountered when linking program containing VS " + compiledShader.getId() + " and FS " + compiledShader2.getId() + ". Log output: " + string - ); - } else { - return new CompiledShaderProgram(i); - } - } - } - - public void setupUniforms(List list, List list2) { - RenderSystem.assertOnRenderThread(); - - for (ShaderProgramConfig.Uniform uniform : list) { - String string = uniform.name(); - int i = Uniform.glGetUniformLocation(this.programId, string); - if (i != -1) { - Uniform uniform2 = this.parseUniformNode(uniform); - uniform2.setLocation(i); - this.uniforms.add(uniform2); - this.uniformsByName.put(string, uniform2); - this.uniformConfigs.put(string, uniform); - } - } - - for (ShaderProgramConfig.Sampler sampler : list2) { - int j = Uniform.glGetUniformLocation(this.programId, sampler.name()); - if (j != -1) { - this.samplers.add(sampler); - this.samplerLocations.add(j); - } - } - - this.MODEL_VIEW_MATRIX = this.getUniform("ModelViewMat"); - this.PROJECTION_MATRIX = this.getUniform("ProjMat"); - this.TEXTURE_MATRIX = this.getUniform("TextureMat"); - this.SCREEN_SIZE = this.getUniform("ScreenSize"); - this.COLOR_MODULATOR = this.getUniform("ColorModulator"); - this.LIGHT0_DIRECTION = this.getUniform("Light0_Direction"); - this.LIGHT1_DIRECTION = this.getUniform("Light1_Direction"); - this.GLINT_ALPHA = this.getUniform("GlintAlpha"); - this.FOG_START = this.getUniform("FogStart"); - this.FOG_END = this.getUniform("FogEnd"); - this.FOG_COLOR = this.getUniform("FogColor"); - this.FOG_SHAPE = this.getUniform("FogShape"); - this.LINE_WIDTH = this.getUniform("LineWidth"); - this.GAME_TIME = this.getUniform("GameTime"); - this.MODEL_OFFSET = this.getUniform("ModelOffset"); - } - - public void close() { - this.uniforms.forEach(Uniform::close); - GlStateManager.glDeleteProgram(this.programId); - } - - public void clear() { - RenderSystem.assertOnRenderThread(); - GlStateManager._glUseProgram(0); - int i = GlStateManager._getActiveTexture(); - - for (int j = 0; j < this.samplerLocations.size(); j++) { - ShaderProgramConfig.Sampler sampler = (ShaderProgramConfig.Sampler)this.samplers.get(j); - if (!this.samplerTextures.containsKey(sampler.name())) { - GlStateManager._activeTexture(33984 + j); - GlStateManager._bindTexture(0); - } - } - - GlStateManager._activeTexture(i); - } - - public void apply() { - RenderSystem.assertOnRenderThread(); - GlStateManager._glUseProgram(this.programId); - int i = GlStateManager._getActiveTexture(); - - for (int j = 0; j < this.samplerLocations.size(); j++) { - String string = ((ShaderProgramConfig.Sampler)this.samplers.get(j)).name(); - int k = this.samplerTextures.getInt(string); - if (k != -1) { - int l = this.samplerLocations.getInt(j); - Uniform.uploadInteger(l, j); - RenderSystem.activeTexture(33984 + j); - RenderSystem.bindTexture(k); - } - } - - GlStateManager._activeTexture(i); - - for (Uniform uniform : this.uniforms) { - uniform.upload(); - } - } - - @Nullable - public Uniform getUniform(String string) { - RenderSystem.assertOnRenderThread(); - return (Uniform)this.uniformsByName.get(string); - } - - @Nullable - public ShaderProgramConfig.Uniform getUniformConfig(String string) { - return (ShaderProgramConfig.Uniform)this.uniformConfigs.get(string); - } - - public AbstractUniform safeGetUniform(String string) { - Uniform uniform = this.getUniform(string); - return (AbstractUniform)(uniform == null ? DUMMY_UNIFORM : uniform); - } - - public void bindSampler(String string, int i) { - this.samplerTextures.put(string, i); - } - - private Uniform parseUniformNode(ShaderProgramConfig.Uniform uniform) { - int i = Uniform.getTypeFromString(uniform.type()); - int j = uniform.count(); - int k = j > 1 && j <= 4 && i < 8 ? j - 1 : 0; - Uniform uniform2 = new Uniform(uniform.name(), i + k, j); - uniform2.setFromConfig(uniform); - return uniform2; - } - - public void setDefaultUniforms(VertexFormat.Mode mode, Matrix4f matrix4f, Matrix4f matrix4f2, Window window) { - for (int i = 0; i < 12; i++) { - int j = RenderSystem.getShaderTexture(i); - this.bindSampler("Sampler" + i, j); - } - - if (this.MODEL_VIEW_MATRIX != null) { - this.MODEL_VIEW_MATRIX.set(matrix4f); - } - - if (this.PROJECTION_MATRIX != null) { - this.PROJECTION_MATRIX.set(matrix4f2); - } - - if (this.COLOR_MODULATOR != null) { - this.COLOR_MODULATOR.set(RenderSystem.getShaderColor()); - } - - if (this.GLINT_ALPHA != null) { - this.GLINT_ALPHA.set(RenderSystem.getShaderGlintAlpha()); - } - - FogParameters fogParameters = RenderSystem.getShaderFog(); - if (this.FOG_START != null) { - this.FOG_START.set(fogParameters.start()); - } - - if (this.FOG_END != null) { - this.FOG_END.set(fogParameters.end()); - } - - if (this.FOG_COLOR != null) { - this.FOG_COLOR.set(fogParameters.red(), fogParameters.green(), fogParameters.blue(), fogParameters.alpha()); - } - - if (this.FOG_SHAPE != null) { - this.FOG_SHAPE.set(fogParameters.shape().getIndex()); - } - - if (this.TEXTURE_MATRIX != null) { - this.TEXTURE_MATRIX.set(RenderSystem.getTextureMatrix()); - } - - if (this.GAME_TIME != null) { - this.GAME_TIME.set(RenderSystem.getShaderGameTime()); - } - - if (this.SCREEN_SIZE != null) { - this.SCREEN_SIZE.set((float)window.getWidth(), (float)window.getHeight()); - } - - if (this.LINE_WIDTH != null && (mode == VertexFormat.Mode.LINES || mode == VertexFormat.Mode.LINE_STRIP)) { - this.LINE_WIDTH.set(RenderSystem.getShaderLineWidth()); - } - - RenderSystem.setupShaderLights(this); - } - - @VisibleForTesting - public void registerUniform(Uniform uniform) { - this.uniforms.add(uniform); - this.uniformsByName.put(uniform.getName(), uniform); - } - - @VisibleForTesting - public int getProgramId() { - return this.programId; - } -} diff --git a/net/minecraft/client/renderer/CoreShaders.java b/net/minecraft/client/renderer/CoreShaders.java deleted file mode 100644 index fc6ee44c..00000000 --- a/net/minecraft/client/renderer/CoreShaders.java +++ /dev/null @@ -1,90 +0,0 @@ -package net.minecraft.client.renderer; - -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.VertexFormat; -import java.util.ArrayList; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public class CoreShaders { - private static final List PROGRAMS = new ArrayList(); - public static final ShaderProgram BLIT_SCREEN = register("blit_screen", DefaultVertexFormat.BLIT_SCREEN); - public static final ShaderProgram LIGHTMAP = register("lightmap", DefaultVertexFormat.BLIT_SCREEN); - public static final ShaderProgram PARTICLE = register("particle", DefaultVertexFormat.PARTICLE); - public static final ShaderProgram POSITION = register("position", DefaultVertexFormat.POSITION); - public static final ShaderProgram POSITION_COLOR = register("position_color", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram POSITION_COLOR_LIGHTMAP = register("position_color_lightmap", DefaultVertexFormat.POSITION_COLOR_LIGHTMAP); - public static final ShaderProgram POSITION_COLOR_TEX_LIGHTMAP = register("position_color_tex_lightmap", DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP); - public static final ShaderProgram POSITION_TEX = register("position_tex", DefaultVertexFormat.POSITION_TEX); - public static final ShaderProgram POSITION_TEX_COLOR = register("position_tex_color", DefaultVertexFormat.POSITION_TEX_COLOR); - public static final ShaderProgram RENDERTYPE_SOLID = register("rendertype_solid", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_CUTOUT_MIPPED = register("rendertype_cutout_mipped", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_CUTOUT = register("rendertype_cutout", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_TRANSLUCENT = register("rendertype_translucent", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_TRANSLUCENT_MOVING_BLOCK = register("rendertype_translucent_moving_block", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_ARMOR_CUTOUT_NO_CULL = register("rendertype_armor_cutout_no_cull", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ARMOR_TRANSLUCENT = register("rendertype_armor_translucent", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_SOLID = register("rendertype_entity_solid", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_CUTOUT = register("rendertype_entity_cutout", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_CUTOUT_NO_CULL = register("rendertype_entity_cutout_no_cull", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_CUTOUT_NO_CULL_Z_OFFSET = register( - "rendertype_entity_cutout_no_cull_z_offset", DefaultVertexFormat.NEW_ENTITY - ); - public static final ShaderProgram RENDERTYPE_ITEM_ENTITY_TRANSLUCENT_CULL = register("rendertype_item_entity_translucent_cull", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_TRANSLUCENT = register("rendertype_entity_translucent", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_TRANSLUCENT_EMISSIVE = register("rendertype_entity_translucent_emissive", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_SMOOTH_CUTOUT = register("rendertype_entity_smooth_cutout", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_BEACON_BEAM = register("rendertype_beacon_beam", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_ENTITY_DECAL = register("rendertype_entity_decal", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_NO_OUTLINE = register("rendertype_entity_no_outline", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_SHADOW = register("rendertype_entity_shadow", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENTITY_ALPHA = register("rendertype_entity_alpha", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_EYES = register("rendertype_eyes", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_ENERGY_SWIRL = register("rendertype_energy_swirl", DefaultVertexFormat.NEW_ENTITY); - public static final ShaderProgram RENDERTYPE_LEASH = register("rendertype_leash", DefaultVertexFormat.POSITION_COLOR_LIGHTMAP); - public static final ShaderProgram RENDERTYPE_WATER_MASK = register("rendertype_water_mask", DefaultVertexFormat.POSITION); - public static final ShaderProgram RENDERTYPE_OUTLINE = register("rendertype_outline", DefaultVertexFormat.POSITION_TEX_COLOR); - public static final ShaderProgram RENDERTYPE_ARMOR_ENTITY_GLINT = register("rendertype_armor_entity_glint", DefaultVertexFormat.POSITION_TEX); - public static final ShaderProgram RENDERTYPE_GLINT_TRANSLUCENT = register("rendertype_glint_translucent", DefaultVertexFormat.POSITION_TEX); - public static final ShaderProgram RENDERTYPE_GLINT = register("rendertype_glint", DefaultVertexFormat.POSITION_TEX); - public static final ShaderProgram RENDERTYPE_ENTITY_GLINT = register("rendertype_entity_glint", DefaultVertexFormat.POSITION_TEX); - public static final ShaderProgram RENDERTYPE_TEXT = register("rendertype_text", DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP); - public static final ShaderProgram RENDERTYPE_TEXT_BACKGROUND = register("rendertype_text_background", DefaultVertexFormat.POSITION_COLOR_LIGHTMAP); - public static final ShaderProgram RENDERTYPE_TEXT_INTENSITY = register("rendertype_text_intensity", DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP); - public static final ShaderProgram RENDERTYPE_TEXT_SEE_THROUGH = register("rendertype_text_see_through", DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP); - public static final ShaderProgram RENDERTYPE_TEXT_BACKGROUND_SEE_THROUGH = register( - "rendertype_text_background_see_through", DefaultVertexFormat.POSITION_COLOR_LIGHTMAP - ); - public static final ShaderProgram RENDERTYPE_TEXT_INTENSITY_SEE_THROUGH = register( - "rendertype_text_intensity_see_through", DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP - ); - public static final ShaderProgram RENDERTYPE_LIGHTNING = register("rendertype_lightning", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_TRIPWIRE = register("rendertype_tripwire", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_END_PORTAL = register("rendertype_end_portal", DefaultVertexFormat.POSITION); - public static final ShaderProgram RENDERTYPE_END_GATEWAY = register("rendertype_end_gateway", DefaultVertexFormat.POSITION); - public static final ShaderProgram RENDERTYPE_CLOUDS = register("rendertype_clouds", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_LINES = register("rendertype_lines", DefaultVertexFormat.POSITION_COLOR_NORMAL); - public static final ShaderProgram RENDERTYPE_CRUMBLING = register("rendertype_crumbling", DefaultVertexFormat.BLOCK); - public static final ShaderProgram RENDERTYPE_GUI = register("rendertype_gui", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_GUI_OVERLAY = register("rendertype_gui_overlay", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_GUI_TEXT_HIGHLIGHT = register("rendertype_gui_text_highlight", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_GUI_GHOST_RECIPE_OVERLAY = register("rendertype_gui_ghost_recipe_overlay", DefaultVertexFormat.POSITION_COLOR); - public static final ShaderProgram RENDERTYPE_BREEZE_WIND = register("rendertype_breeze_wind", DefaultVertexFormat.NEW_ENTITY); - - private static ShaderProgram register(String string, VertexFormat vertexFormat) { - return register(string, vertexFormat, ShaderDefines.EMPTY); - } - - private static ShaderProgram register(String string, VertexFormat vertexFormat, ShaderDefines shaderDefines) { - ShaderProgram shaderProgram = new ShaderProgram(ResourceLocation.withDefaultNamespace("core/" + string), vertexFormat, shaderDefines); - PROGRAMS.add(shaderProgram); - return shaderProgram; - } - - public static List getProgramsToPreload() { - return PROGRAMS; - } -} diff --git a/net/minecraft/client/renderer/CubeMap.java b/net/minecraft/client/renderer/CubeMap.java index 3df0bc39..7fbb2536 100644 --- a/net/minecraft/client/renderer/CubeMap.java +++ b/net/minecraft/client/renderer/CubeMap.java @@ -1,124 +1,135 @@ package net.minecraft.client.renderer; import com.mojang.blaze3d.ProjectionType; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.pipeline.RenderTarget; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; +import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.VertexFormat; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; +import java.util.List; +import java.util.OptionalDouble; +import java.util.OptionalInt; +import java.util.stream.IntStream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; import org.joml.Matrix4f; import org.joml.Matrix4fStack; @Environment(EnvType.CLIENT) public class CubeMap { private static final int SIDES = 6; - private final ResourceLocation[] images = new ResourceLocation[6]; + @Nullable + private GpuBuffer cubeMapBuffer = null; + private final List sides; public CubeMap(ResourceLocation baseImageLocation) { - for (int i = 0; i < 6; i++) { - this.images[i] = baseImageLocation.withPath(baseImageLocation.getPath() + "_" + i + ".png"); - } + this.sides = IntStream.range(0, 6).mapToObj(i -> baseImageLocation.withPath(baseImageLocation.getPath() + "_" + i + ".png")).toList(); } public void render(Minecraft mc, float pitch, float yaw, float alpha) { - Tesselator tesselator = Tesselator.getInstance(); + if (this.cubeMapBuffer == null) { + this.initializeVertices(); + } + Matrix4f matrix4f = new Matrix4f().setPerspective(1.4835298F, (float)mc.getWindow().getWidth() / mc.getWindow().getHeight(), 0.05F, 10.0F); RenderSystem.backupProjectionMatrix(); RenderSystem.setProjectionMatrix(matrix4f, ProjectionType.PERSPECTIVE); Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); matrix4fStack.rotationX((float) Math.PI); - RenderSystem.setShader(CoreShaders.POSITION_TEX_COLOR); - RenderSystem.enableBlend(); - RenderSystem.disableCull(); - RenderSystem.depthMask(false); int i = 2; + RenderPipeline renderPipeline = RenderPipelines.PANORAMA; + RenderTarget renderTarget = Minecraft.getInstance().getMainRenderTarget(); + GpuTexture gpuTexture = renderTarget.getColorTexture(); + GpuTexture gpuTexture2 = renderTarget.getDepthTexture(); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer = autoStorageIndexBuffer.getBuffer(36); - for (int j = 0; j < 4; j++) { - matrix4fStack.pushMatrix(); - float f = (j % 2 / 2.0F - 0.5F) / 256.0F; - float g = (j / 2 / 2.0F - 0.5F) / 256.0F; - float h = 0.0F; - matrix4fStack.translate(f, g, 0.0F); - matrix4fStack.rotateX(pitch * (float) (Math.PI / 180.0)); - matrix4fStack.rotateY(yaw * (float) (Math.PI / 180.0)); + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(renderPipeline); + renderPass.setVertexBuffer(0, this.cubeMapBuffer); + renderPass.setIndexBuffer(gpuBuffer, autoStorageIndexBuffer.type()); - for (int k = 0; k < 6; k++) { - RenderSystem.setShaderTexture(0, this.images[k]); - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - int l = Math.round(255.0F * alpha) / (j + 1); - if (k == 0) { - bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); + for (int j = 0; j < 4; j++) { + matrix4fStack.pushMatrix(); + float f = (j % 2 / 2.0F - 0.5F) / 256.0F; + float g = (j / 2 / 2.0F - 0.5F) / 256.0F; + float h = 0.0F; + matrix4fStack.translate(f, g, 0.0F); + matrix4fStack.rotateX(pitch * (float) (Math.PI / 180.0)); + matrix4fStack.rotateY(yaw * (float) (Math.PI / 180.0)); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, alpha / (j + 1)); + + for (int k = 0; k < 6; k++) { + renderPass.bindSampler("Sampler0", mc.getTextureManager().getTexture((ResourceLocation)this.sides.get(k)).getTexture()); + renderPass.drawIndexed(6 * k, 6); } - if (k == 1) { - bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); - } - - if (k == 2) { - bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); - } - - if (k == 3) { - bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); - } - - if (k == 4) { - bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); - } - - if (k == 5) { - bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(0.0F, 0.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F).setWhiteAlpha(l); - bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(1.0F, 0.0F).setWhiteAlpha(l); - } - - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); + matrix4fStack.popMatrix(); } - - matrix4fStack.popMatrix(); - RenderSystem.colorMask(true, true, true, false); } - RenderSystem.colorMask(true, true, true, true); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.restoreProjectionMatrix(); matrix4fStack.popMatrix(); - RenderSystem.depthMask(true); - RenderSystem.enableCull(); - RenderSystem.enableDepthTest(); } - public CompletableFuture preload(TextureManager texMngr, Executor backgroundExecutor) { - CompletableFuture[] completableFutures = new CompletableFuture[6]; + private void initializeVertices() { + this.cubeMapBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Cube map vertex buffer", BufferType.VERTICES, BufferUsage.DYNAMIC_WRITE, 24 * DefaultVertexFormat.POSITION_TEX.getVertexSize()); - for (int i = 0; i < completableFutures.length; i++) { - completableFutures[i] = texMngr.preload(this.images[i], backgroundExecutor); + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(DefaultVertexFormat.POSITION_TEX.getVertexSize() * 4)) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); + bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(1.0F, 0.0F); + bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F); + bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(1.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, -1.0F, -1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, -1.0F, 1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(1.0F, -1.0F, 1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(1.0F, -1.0F, -1.0F).setUv(1.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, 1.0F).setUv(0.0F, 0.0F); + bufferBuilder.addVertex(-1.0F, 1.0F, -1.0F).setUv(0.0F, 1.0F); + bufferBuilder.addVertex(1.0F, 1.0F, -1.0F).setUv(1.0F, 1.0F); + bufferBuilder.addVertex(1.0F, 1.0F, 1.0F).setUv(1.0F, 0.0F); + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + commandEncoder.writeToBuffer(this.cubeMapBuffer, meshData.vertexBuffer(), 0); + } } + } - return CompletableFuture.allOf(completableFutures); + public void registerTextures(TextureManager textureManager) { + for (ResourceLocation resourceLocation : this.sides) { + textureManager.registerForNextReload(resourceLocation); + } } } diff --git a/net/minecraft/client/renderer/DimensionSpecialEffects.java b/net/minecraft/client/renderer/DimensionSpecialEffects.java index d9102afb..ce927ab4 100644 --- a/net/minecraft/client/renderer/DimensionSpecialEffects.java +++ b/net/minecraft/client/renderer/DimensionSpecialEffects.java @@ -41,11 +41,11 @@ public abstract class DimensionSpecialEffects { return EFFECTS.get(dimensionType.effectsLocation()); } - public boolean isSunriseOrSunset(float f) { + public boolean isSunriseOrSunset(float timeOfDay) { return false; } - public int getSunriseOrSunsetColor(float f) { + public int getSunriseOrSunsetColor(float timeOfDay) { return 0; } @@ -117,17 +117,17 @@ public abstract class DimensionSpecialEffects { } @Override - public boolean isSunriseOrSunset(float f) { - float g = Mth.cos(f * (float) (Math.PI * 2)); - return g >= -0.4F && g <= 0.4F; + public boolean isSunriseOrSunset(float timeOfDay) { + float f = Mth.cos(timeOfDay * (float) (Math.PI * 2)); + return f >= -0.4F && f <= 0.4F; } @Override - public int getSunriseOrSunsetColor(float f) { - float g = Mth.cos(f * (float) (Math.PI * 2)); - float h = g / 0.4F * 0.5F + 0.5F; - float i = Mth.square(1.0F - (1.0F - Mth.sin(h * (float) Math.PI)) * 0.99F); - return ARGB.colorFromFloat(i, h * 0.3F + 0.7F, h * h * 0.7F + 0.2F, 0.2F); + public int getSunriseOrSunsetColor(float timeOfDay) { + float f = Mth.cos(timeOfDay * (float) (Math.PI * 2)); + float g = f / 0.4F * 0.5F + 0.5F; + float h = Mth.square(1.0F - (1.0F - Mth.sin(g * (float) Math.PI)) * 0.99F); + return ARGB.colorFromFloat(h, g * 0.3F + 0.7F, g * g * 0.7F + 0.2F, 0.2F); } @Override diff --git a/net/minecraft/client/renderer/FogRenderer.java b/net/minecraft/client/renderer/FogRenderer.java index 851aa9e7..e308e65c 100644 --- a/net/minecraft/client/renderer/FogRenderer.java +++ b/net/minecraft/client/renderer/FogRenderer.java @@ -40,151 +40,150 @@ public class FogRenderer { private static long biomeChangedTime = -1L; private static boolean fogEnabled = true; - public static Vector4f computeFogColor(Camera camera, float f, ClientLevel clientLevel, int i, float g) { + public static Vector4f computeFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount) { FogType fogType = camera.getFluidInCamera(); Entity entity = camera.getEntity(); - float u; - float v; - float w; + float r; + float s; + float t; if (fogType == FogType.WATER) { long l = Util.getMillis(); - int j = clientLevel.getBiome(BlockPos.containing(camera.getPosition())).value().getWaterFogColor(); + int i = level.getBiome(BlockPos.containing(camera.getPosition())).value().getWaterFogColor(); if (biomeChangedTime < 0L) { - targetBiomeFog = j; - previousBiomeFog = j; + targetBiomeFog = i; + previousBiomeFog = i; biomeChangedTime = l; } - int k = targetBiomeFog >> 16 & 0xFF; - int m = targetBiomeFog >> 8 & 0xFF; - int n = targetBiomeFog & 0xFF; - int o = previousBiomeFog >> 16 & 0xFF; - int p = previousBiomeFog >> 8 & 0xFF; - int q = previousBiomeFog & 0xFF; - float h = Mth.clamp((float)(l - biomeChangedTime) / 5000.0F, 0.0F, 1.0F); - float r = Mth.lerp(h, (float)o, (float)k); - float s = Mth.lerp(h, (float)p, (float)m); - float t = Mth.lerp(h, (float)q, (float)n); - u = r / 255.0F; - v = s / 255.0F; - w = t / 255.0F; - if (targetBiomeFog != j) { - targetBiomeFog = j; - previousBiomeFog = Mth.floor(r) << 16 | Mth.floor(s) << 8 | Mth.floor(t); + int j = targetBiomeFog >> 16 & 0xFF; + int k = targetBiomeFog >> 8 & 0xFF; + int m = targetBiomeFog & 0xFF; + int n = previousBiomeFog >> 16 & 0xFF; + int o = previousBiomeFog >> 8 & 0xFF; + int p = previousBiomeFog & 0xFF; + float f = Mth.clamp((float)(l - biomeChangedTime) / 5000.0F, 0.0F, 1.0F); + float g = Mth.lerp(f, (float)n, (float)j); + float h = Mth.lerp(f, (float)o, (float)k); + float q = Mth.lerp(f, (float)p, (float)m); + r = g / 255.0F; + s = h / 255.0F; + t = q / 255.0F; + if (targetBiomeFog != i) { + targetBiomeFog = i; + previousBiomeFog = Mth.floor(g) << 16 | Mth.floor(h) << 8 | Mth.floor(q); biomeChangedTime = l; } } else if (fogType == FogType.LAVA) { - u = 0.6F; - v = 0.1F; - w = 0.0F; + r = 0.6F; + s = 0.1F; + t = 0.0F; biomeChangedTime = -1L; } else if (fogType == FogType.POWDER_SNOW) { - u = 0.623F; - v = 0.734F; - w = 0.785F; + r = 0.623F; + s = 0.734F; + t = 0.785F; biomeChangedTime = -1L; } else { - float x = 0.25F + 0.75F * i / 32.0F; - x = 1.0F - (float)Math.pow(x, 0.25); - int y = clientLevel.getSkyColor(camera.getPosition(), f); - float z = ARGB.from8BitChannel(ARGB.red(y)); - float aa = ARGB.from8BitChannel(ARGB.green(y)); - float ab = ARGB.from8BitChannel(ARGB.blue(y)); - float ac = Mth.clamp(Mth.cos(clientLevel.getTimeOfDay(f) * (float) (Math.PI * 2)) * 2.0F + 0.5F, 0.0F, 1.0F); - BiomeManager biomeManager = clientLevel.getBiomeManager(); + float u = 0.25F + 0.75F * renderDistance / 32.0F; + u = 1.0F - (float)Math.pow(u, 0.25); + int v = level.getSkyColor(camera.getPosition(), partialTick); + float w = ARGB.redFloat(v); + float x = ARGB.greenFloat(v); + float y = ARGB.blueFloat(v); + float z = Mth.clamp(Mth.cos(level.getTimeOfDay(partialTick) * (float) (Math.PI * 2)) * 2.0F + 0.5F, 0.0F, 1.0F); + BiomeManager biomeManager = level.getBiomeManager(); Vec3 vec3 = camera.getPosition().subtract(2.0, 2.0, 2.0).scale(0.25); Vec3 vec32 = CubicSampler.gaussianSampleVec3( - vec3, - (ix, jx, k) -> clientLevel.effects().getBrightnessDependentFogColor(Vec3.fromRGB24(biomeManager.getNoiseBiomeAtQuart(ix, jx, k).value().getFogColor()), ac) + vec3, (ix, j, k) -> level.effects().getBrightnessDependentFogColor(Vec3.fromRGB24(biomeManager.getNoiseBiomeAtQuart(ix, j, k).value().getFogColor()), z) ); - u = (float)vec32.x(); - v = (float)vec32.y(); - w = (float)vec32.z(); - if (i >= 4) { - float h = Mth.sin(clientLevel.getSunAngle(f)) > 0.0F ? -1.0F : 1.0F; - Vector3f vector3f = new Vector3f(h, 0.0F, 0.0F); - float s = camera.getLookVector().dot(vector3f); - if (s < 0.0F) { - s = 0.0F; + r = (float)vec32.x(); + s = (float)vec32.y(); + t = (float)vec32.z(); + if (renderDistance >= 4) { + float f = Mth.sin(level.getSunAngle(partialTick)) > 0.0F ? -1.0F : 1.0F; + Vector3f vector3f = new Vector3f(f, 0.0F, 0.0F); + float h = camera.getLookVector().dot(vector3f); + if (h < 0.0F) { + h = 0.0F; } - if (s > 0.0F && clientLevel.effects().isSunriseOrSunset(clientLevel.getTimeOfDay(f))) { - int ad = clientLevel.effects().getSunriseOrSunsetColor(clientLevel.getTimeOfDay(f)); - s *= ARGB.from8BitChannel(ARGB.alpha(ad)); - u = u * (1.0F - s) + ARGB.from8BitChannel(ARGB.red(ad)) * s; - v = v * (1.0F - s) + ARGB.from8BitChannel(ARGB.green(ad)) * s; - w = w * (1.0F - s) + ARGB.from8BitChannel(ARGB.blue(ad)) * s; + if (h > 0.0F && level.effects().isSunriseOrSunset(level.getTimeOfDay(partialTick))) { + int aa = level.effects().getSunriseOrSunsetColor(level.getTimeOfDay(partialTick)); + h *= ARGB.alphaFloat(aa); + r = r * (1.0F - h) + ARGB.redFloat(aa) * h; + s = s * (1.0F - h) + ARGB.greenFloat(aa) * h; + t = t * (1.0F - h) + ARGB.blueFloat(aa) * h; } } - u += (z - u) * x; - v += (aa - v) * x; - w += (ab - w) * x; - float hx = clientLevel.getRainLevel(f); - if (hx > 0.0F) { - float r = 1.0F - hx * 0.5F; - float sx = 1.0F - hx * 0.4F; - u *= r; - v *= r; - w *= sx; + r += (w - r) * u; + s += (x - s) * u; + t += (y - t) * u; + float fx = level.getRainLevel(partialTick); + if (fx > 0.0F) { + float g = 1.0F - fx * 0.5F; + float hx = 1.0F - fx * 0.4F; + r *= g; + s *= g; + t *= hx; } - float r = clientLevel.getThunderLevel(f); - if (r > 0.0F) { - float sx = 1.0F - r * 0.5F; - u *= sx; - v *= sx; - w *= sx; + float g = level.getThunderLevel(partialTick); + if (g > 0.0F) { + float hx = 1.0F - g * 0.5F; + r *= hx; + s *= hx; + t *= hx; } biomeChangedTime = -1L; } - float xx = ((float)camera.getPosition().y - clientLevel.getMinY()) * clientLevel.getLevelData().getClearColorScale(); - FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, f); + float ux = ((float)camera.getPosition().y - level.getMinY()) * level.getLevelData().getClearColorScale(); + FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, partialTick); if (mobEffectFogFunction != null) { LivingEntity livingEntity = (LivingEntity)entity; - xx = mobEffectFogFunction.getModifiedVoidDarkness(livingEntity, livingEntity.getEffect(mobEffectFogFunction.getMobEffect()), xx, f); + ux = mobEffectFogFunction.getModifiedVoidDarkness(livingEntity, livingEntity.getEffect(mobEffectFogFunction.getMobEffect()), ux, partialTick); } - if (xx < 1.0F && fogType != FogType.LAVA && fogType != FogType.POWDER_SNOW) { - if (xx < 0.0F) { - xx = 0.0F; + if (ux < 1.0F && fogType != FogType.LAVA && fogType != FogType.POWDER_SNOW) { + if (ux < 0.0F) { + ux = 0.0F; } - xx *= xx; - u *= xx; - v *= xx; - w *= xx; + ux *= ux; + r *= ux; + s *= ux; + t *= ux; } - if (g > 0.0F) { - u = u * (1.0F - g) + u * 0.7F * g; - v = v * (1.0F - g) + v * 0.6F * g; - w = w * (1.0F - g) + w * 0.6F * g; + if (darkenWorldAmount > 0.0F) { + r = r * (1.0F - darkenWorldAmount) + r * 0.7F * darkenWorldAmount; + s = s * (1.0F - darkenWorldAmount) + s * 0.6F * darkenWorldAmount; + t = t * (1.0F - darkenWorldAmount) + t * 0.6F * darkenWorldAmount; } - float zx; + float wx; if (fogType == FogType.WATER) { if (entity instanceof LocalPlayer) { - zx = ((LocalPlayer)entity).getWaterVision(); + wx = ((LocalPlayer)entity).getWaterVision(); } else { - zx = 1.0F; + wx = 1.0F; } } else if (entity instanceof LivingEntity livingEntity2 && livingEntity2.hasEffect(MobEffects.NIGHT_VISION) && !livingEntity2.hasEffect(MobEffects.DARKNESS)) { - zx = GameRenderer.getNightVisionScale(livingEntity2, f); + wx = GameRenderer.getNightVisionScale(livingEntity2, partialTick); } else { - zx = 0.0F; + wx = 0.0F; } - if (u != 0.0F && v != 0.0F && w != 0.0F) { - float aax = Math.min(1.0F / u, Math.min(1.0F / v, 1.0F / w)); - u = u * (1.0F - zx) + u * aax * zx; - v = v * (1.0F - zx) + v * aax * zx; - w = w * (1.0F - zx) + w * aax * zx; + if (r != 0.0F && s != 0.0F && t != 0.0F) { + float xx = Math.min(1.0F / r, Math.min(1.0F / s, 1.0F / t)); + r = r * (1.0F - wx) + r * xx * wx; + s = s * (1.0F - wx) + s * xx * wx; + t = t * (1.0F - wx) + t * xx * wx; } - return new Vector4f(u, v, w, 1.0F); + return new Vector4f(r, s, t, 1.0F); } public static boolean toggleFog() { @@ -201,18 +200,18 @@ public class FogRenderer { : null; } - public static FogParameters setupFog(Camera camera, FogRenderer.FogMode fogMode, Vector4f vector4f, float f, boolean bl, float g) { + public static FogParameters setupFog(Camera camera, FogRenderer.FogMode fogMode, Vector4f fogColor, float renderDistance, boolean isFoggy, float partialTick) { if (!fogEnabled) { return FogParameters.NO_FOG; } else { FogType fogType = camera.getFluidInCamera(); Entity entity = camera.getEntity(); FogRenderer.FogData fogData = new FogRenderer.FogData(fogMode); - FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, g); + FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, partialTick); if (fogType == FogType.LAVA) { if (entity.isSpectator()) { fogData.start = -8.0F; - fogData.end = f * 0.5F; + fogData.end = renderDistance * 0.5F; } else if (entity instanceof LivingEntity && ((LivingEntity)entity).hasEffect(MobEffects.FIRE_RESISTANCE)) { fogData.start = 0.0F; fogData.end = 5.0F; @@ -223,7 +222,7 @@ public class FogRenderer { } else if (fogType == FogType.POWDER_SNOW) { if (entity.isSpectator()) { fogData.start = -8.0F; - fogData.end = f * 0.5F; + fogData.end = renderDistance * 0.5F; } else { fogData.start = 0.0F; fogData.end = 2.0F; @@ -232,7 +231,7 @@ public class FogRenderer { LivingEntity livingEntity = (LivingEntity)entity; MobEffectInstance mobEffectInstance = livingEntity.getEffect(mobEffectFogFunction.getMobEffect()); if (mobEffectInstance != null) { - mobEffectFogFunction.setupFog(fogData, livingEntity, mobEffectInstance, f, g); + mobEffectFogFunction.setupFog(fogData, livingEntity, mobEffectInstance, renderDistance, partialTick); } } else if (fogType == FogType.WATER) { fogData.start = -8.0F; @@ -245,25 +244,25 @@ public class FogRenderer { } } - if (fogData.end > f) { - fogData.end = f; + if (fogData.end > renderDistance) { + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } - } else if (bl) { - fogData.start = f * 0.05F; - fogData.end = Math.min(f, 192.0F) * 0.5F; + } else if (isFoggy) { + fogData.start = renderDistance * 0.05F; + fogData.end = Math.min(renderDistance, 192.0F) * 0.5F; } else if (fogMode == FogRenderer.FogMode.FOG_SKY) { fogData.start = 0.0F; - fogData.end = f; + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } else if (fogMode == FogRenderer.FogMode.FOG_TERRAIN) { - float h = Mth.clamp(f / 10.0F, 4.0F, 64.0F); - fogData.start = f - h; - fogData.end = f; + float f = Mth.clamp(renderDistance / 10.0F, 4.0F, 64.0F); + fogData.start = renderDistance - f; + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } - return new FogParameters(fogData.start, fogData.end, fogData.shape, vector4f.x, vector4f.y, vector4f.z, vector4f.w); + return new FogParameters(fogData.start, fogData.end, fogData.shape, fogColor.x, fogColor.y, fogColor.z, fogColor.w); } } @@ -275,14 +274,14 @@ public class FogRenderer { } @Override - public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f) { - float g = effectInstance.isInfiniteDuration() ? 5.0F : Mth.lerp(Math.min(1.0F, effectInstance.getDuration() / 20.0F), farPlaneDistance, 5.0F); + public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick) { + float f = effectInstance.isInfiniteDuration() ? 5.0F : Mth.lerp(Math.min(1.0F, effectInstance.getDuration() / 20.0F), farPlaneDistance, 5.0F); if (fogData.mode == FogRenderer.FogMode.FOG_SKY) { fogData.start = 0.0F; - fogData.end = g * 0.8F; + fogData.end = f * 0.8F; } else if (fogData.mode == FogRenderer.FogMode.FOG_TERRAIN) { - fogData.start = g * 0.25F; - fogData.end = g; + fogData.start = f * 0.25F; + fogData.end = f; } } } @@ -295,18 +294,18 @@ public class FogRenderer { } @Override - public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f) { - float g = Mth.lerp(effectInstance.getBlendFactor(entity, f), farPlaneDistance, 15.0F); + public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick) { + float f = Mth.lerp(effectInstance.getBlendFactor(entity, partialTick), farPlaneDistance, 15.0F); fogData.start = switch (fogData.mode) { case FOG_SKY -> 0.0F; - case FOG_TERRAIN -> g * 0.75F; + case FOG_TERRAIN -> f * 0.75F; }; - fogData.end = g; + fogData.end = f; } @Override - public float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float f, float partialTick) { + public float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float voidDarkness, float partialTick) { return 1.0F - effectInstance.getBlendFactor(entity, partialTick); } } @@ -333,23 +332,23 @@ public class FogRenderer { interface MobEffectFogFunction { Holder getMobEffect(); - void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f); + void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick); - default boolean isEnabled(LivingEntity entity, float f) { + default boolean isEnabled(LivingEntity entity, float partialTick) { return entity.hasEffect(this.getMobEffect()); } - default float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float f, float partialTick) { + default float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float voidDarkness, float partialTick) { MobEffectInstance mobEffectInstance = entity.getEffect(this.getMobEffect()); if (mobEffectInstance != null) { if (mobEffectInstance.endsWithin(19)) { - f = 1.0F - mobEffectInstance.getDuration() / 20.0F; + voidDarkness = 1.0F - mobEffectInstance.getDuration() / 20.0F; } else { - f = 0.0F; + voidDarkness = 0.0F; } } - return f; + return voidDarkness; } } } diff --git a/net/minecraft/client/renderer/GameRenderer.java b/net/minecraft/client/renderer/GameRenderer.java index 40eb241d..df769a60 100644 --- a/net/minecraft/client/renderer/GameRenderer.java +++ b/net/minecraft/client/renderer/GameRenderer.java @@ -1,19 +1,24 @@ package net.minecraft.client.renderer; import com.mojang.blaze3d.ProjectionType; +import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.platform.Lighting; import com.mojang.blaze3d.platform.NativeImage; import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.resource.CrossFrameResourcePool; +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.systems.GpuDevice; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.jtracy.TracyClient; import com.mojang.logging.LogUtils; import com.mojang.math.Axis; import java.io.IOException; +import java.io.Reader; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; -import java.util.Locale; +import java.util.function.BiFunction; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.CrashReport; @@ -28,6 +33,8 @@ import net.minecraft.client.Options; import net.minecraft.client.Screenshot; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.player.AbstractClientPlayer; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.server.IntegratedServer; import net.minecraft.core.BlockPos; @@ -65,6 +72,7 @@ import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.HitResult.Type; +import org.apache.commons.io.IOUtils; import org.jetbrains.annotations.Nullable; import org.joml.Matrix4f; import org.joml.Matrix4fStack; @@ -77,16 +85,18 @@ public class GameRenderer implements AutoCloseable { private static final ResourceLocation BLUR_POST_CHAIN_ID = ResourceLocation.withDefaultNamespace("blur"); public static final int MAX_BLUR_RADIUS = 10; private static final Logger LOGGER = LogUtils.getLogger(); - private static final boolean DEPTH_BUFFER_DEBUG = false; public static final float PROJECTION_Z_NEAR = 0.05F; private static final float GUI_Z_NEAR = 1000.0F; + private static final float PORTAL_SPINNING_SPEED = 20.0F; + private static final float NAUSEA_SPINNING_SPEED = 7.0F; private final Minecraft minecraft; private final ResourceManager resourceManager; private final RandomSource random = RandomSource.create(); private float renderDistance; public final ItemInHandRenderer itemInHandRenderer; private final RenderBuffers renderBuffers; - private int confusionAnimationTick; + private float spinningEffectTime; + private float spinningEffectSpeed; private float fovModifier; private float oldFovModifier; private float darkenWorldAmount; @@ -166,8 +176,8 @@ public class GameRenderer implements AutoCloseable { } } - private void setPostEffect(ResourceLocation resourceLocation) { - this.postEffectId = resourceLocation; + private void setPostEffect(ResourceLocation postEffectId) { + this.postEffectId = postEffectId; this.effectActive = true; } @@ -176,19 +186,49 @@ public class GameRenderer implements AutoCloseable { if (!(f < 1.0F)) { PostChain postChain = this.minecraft.getShaderManager().getPostChain(BLUR_POST_CHAIN_ID, LevelTargetBundle.MAIN_TARGETS); if (postChain != null) { - postChain.setUniform("Radius", f); - postChain.process(this.minecraft.getMainRenderTarget(), this.resourcePool); + postChain.process(this.minecraft.getMainRenderTarget(), this.resourcePool, renderPass -> renderPass.setUniform("Radius", f)); } } } public void preloadUiShader(ResourceProvider resourceProvider) { - try { - this.minecraft - .getShaderManager() - .preloadForStartup(resourceProvider, CoreShaders.RENDERTYPE_GUI, CoreShaders.RENDERTYPE_GUI_OVERLAY, CoreShaders.POSITION_TEX_COLOR); - } catch (ShaderManager.CompilationException | IOException var3) { - throw new RuntimeException("Could not preload shaders for loading UI", var3); + GpuDevice gpuDevice = RenderSystem.getDevice(); + BiFunction biFunction = (resourceLocation, shaderType) -> { + ResourceLocation resourceLocation2 = shaderType.idConverter().idToFile(resourceLocation); + + try { + Reader reader = resourceProvider.getResourceOrThrow(resourceLocation2).openAsReader(); + + String var5; + try { + var5 = IOUtils.toString(reader); + } catch (Throwable var8) { + if (reader != null) { + try { + reader.close(); + } catch (Throwable var7) { + var8.addSuppressed(var7); + } + } + + throw var8; + } + + if (reader != null) { + reader.close(); + } + + return var5; + } catch (IOException var9) { + LOGGER.error("Coudln't preload {} shader {}: {}", shaderType, resourceLocation, var9); + return null; + } + }; + gpuDevice.precompilePipeline(RenderPipelines.GUI, biFunction); + gpuDevice.precompilePipeline(RenderPipelines.GUI_OVERLAY, biFunction); + gpuDevice.precompilePipeline(RenderPipelines.GUI_TEXTURED_OVERLAY, biFunction); + if (TracyClient.isAvailable()) { + gpuDevice.precompilePipeline(RenderPipelines.TRACY_BLIT, biFunction); } } @@ -198,13 +238,22 @@ public class GameRenderer implements AutoCloseable { public void tick() { this.tickFov(); this.lightTexture.tick(); + LocalPlayer localPlayer = this.minecraft.player; if (this.minecraft.getCameraEntity() == null) { - this.minecraft.setCameraEntity(this.minecraft.player); + this.minecraft.setCameraEntity(localPlayer); } this.mainCamera.tick(); this.itemInHandRenderer.tick(); - this.confusionAnimationTick++; + float f = localPlayer.portalEffectIntensity; + float g = localPlayer.getEffectBlendFactor(MobEffects.NAUSEA, 1.0F); + if (!(f > 0.0F) && !(g > 0.0F)) { + this.spinningEffectSpeed = 0.0F; + } else { + this.spinningEffectSpeed = (f * 20.0F + g * 7.0F) / (f + g); + this.spinningEffectTime = this.spinningEffectTime + this.spinningEffectSpeed; + } + if (this.minecraft.level.tickRateManager().runsNormally()) { this.minecraft.levelRenderer.tickParticles(this.mainCamera); this.darkenWorldAmountO = this.darkenWorldAmount; @@ -305,28 +354,28 @@ public class GameRenderer implements AutoCloseable { this.fovModifier = Mth.clamp(this.fovModifier, 0.1F, 1.5F); } - private float getFov(Camera camera, float f, boolean bl) { + private float getFov(Camera camera, float partialTick, boolean useFovSetting) { if (this.panoramicMode) { return 90.0F; } else { - float g = 70.0F; - if (bl) { - g = this.minecraft.options.fov().get().intValue(); - g *= Mth.lerp(f, this.oldFovModifier, this.fovModifier); + float f = 70.0F; + if (useFovSetting) { + f = this.minecraft.options.fov().get().intValue(); + f *= Mth.lerp(partialTick, this.oldFovModifier, this.fovModifier); } if (camera.getEntity() instanceof LivingEntity livingEntity && livingEntity.isDeadOrDying()) { - float h = Math.min(livingEntity.deathTime + f, 20.0F); - g /= (1.0F - 500.0F / (h + 500.0F)) * 2.0F + 1.0F; + float g = Math.min(livingEntity.deathTime + partialTick, 20.0F); + f /= (1.0F - 500.0F / (g + 500.0F)) * 2.0F + 1.0F; } FogType fogType = camera.getFluidInCamera(); if (fogType == FogType.LAVA || fogType == FogType.WATER) { - float h = this.minecraft.options.fovEffectScale().get().floatValue(); - g *= Mth.lerp(h, 1.0F, 0.85714287F); + float g = this.minecraft.options.fovEffectScale().get().floatValue(); + f *= Mth.lerp(g, 1.0F, 0.85714287F); } - return g; + return f; } } @@ -407,12 +456,14 @@ public class GameRenderer implements AutoCloseable { matrix4fStack.popMatrix(); poseStack.popPose(); if (this.minecraft.options.getCameraType().isFirstPerson() && !bl) { - ScreenEffectRenderer.renderScreenEffect(this.minecraft, poseStack); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + ScreenEffectRenderer.renderScreenEffect(this.minecraft, poseStack, bufferSource); + bufferSource.endBatch(); } } } - public Matrix4f getProjectionMatrix(float f) { + public Matrix4f getProjectionMatrix(float fov) { Matrix4f matrix4f = new Matrix4f(); if (this.zoom != 1.0F) { matrix4f.translate(this.zoomX, -this.zoomY, 0.0F); @@ -420,7 +471,7 @@ public class GameRenderer implements AutoCloseable { } return matrix4f.perspective( - f * (float) (Math.PI / 180.0), (float)this.minecraft.getWindow().getWidth() / this.minecraft.getWindow().getHeight(), 0.05F, this.getDepthFar() + fov * (float) (Math.PI / 180.0), (float)this.minecraft.getWindow().getWidth() / this.minecraft.getWindow().getHeight(), 0.05F, this.getDepthFar() ); } @@ -447,29 +498,25 @@ public class GameRenderer implements AutoCloseable { if (!this.minecraft.noRender) { ProfilerFiller profilerFiller = Profiler.get(); boolean bl = this.minecraft.isGameLoadFinished(); - int i = (int)(this.minecraft.mouseHandler.xpos() * this.minecraft.getWindow().getGuiScaledWidth() / this.minecraft.getWindow().getScreenWidth()); - int j = (int)(this.minecraft.mouseHandler.ypos() * this.minecraft.getWindow().getGuiScaledHeight() / this.minecraft.getWindow().getScreenHeight()); - RenderSystem.viewport(0, 0, this.minecraft.getWindow().getWidth(), this.minecraft.getWindow().getHeight()); + int i = (int)this.minecraft.mouseHandler.getScaledXPos(this.minecraft.getWindow()); + int j = (int)this.minecraft.mouseHandler.getScaledYPos(this.minecraft.getWindow()); if (bl && renderLevel && this.minecraft.level != null) { profilerFiller.push("level"); this.renderLevel(deltaTracker); this.tryTakeScreenshotIfNeeded(); this.minecraft.levelRenderer.doEntityOutline(); if (this.postEffectId != null && this.effectActive) { - RenderSystem.disableBlend(); - RenderSystem.disableDepthTest(); RenderSystem.resetTextureMatrix(); PostChain postChain = this.minecraft.getShaderManager().getPostChain(this.postEffectId, LevelTargetBundle.MAIN_TARGETS); if (postChain != null) { - postChain.process(this.minecraft.getMainRenderTarget(), this.resourcePool); + postChain.process(this.minecraft.getMainRenderTarget(), this.resourcePool, null); } } - - this.minecraft.getMainRenderTarget().bindWrite(true); } Window window = this.minecraft.getWindow(); - RenderSystem.clear(256); + RenderTarget renderTarget = this.minecraft.getMainRenderTarget(); + RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(renderTarget.getDepthTexture(), 1.0); Matrix4f matrix4f = new Matrix4f() .setOrtho(0.0F, (float)(window.getWidth() / window.getGuiScale()), (float)(window.getHeight() / window.getGuiScale()), 0.0F, 1000.0F, 21000.0F); RenderSystem.setProjectionMatrix(matrix4f, ProjectionType.ORTHOGRAPHIC); @@ -486,15 +533,15 @@ public class GameRenderer implements AutoCloseable { this.minecraft.gui.render(guiGraphics, deltaTracker); guiGraphics.flush(); - RenderSystem.clear(256); + RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(renderTarget.getDepthTexture(), 1.0); profilerFiller.pop(); } if (this.minecraft.getOverlay() != null) { try { this.minecraft.getOverlay().render(guiGraphics, i, j, deltaTracker.getGameTimeDeltaTicks()); - } catch (Throwable var17) { - CrashReport crashReport = CrashReport.forThrowable(var17, "Rendering overlay"); + } catch (Throwable var18) { + CrashReport crashReport = CrashReport.forThrowable(var18, "Rendering overlay"); CrashReportCategory crashReportCategory = crashReport.addCategory("Overlay render details"); crashReportCategory.setDetail("Overlay name", (CrashReportDetail)(() -> this.minecraft.getOverlay().getClass().getCanonicalName())); throw new ReportedException(crashReport); @@ -502,28 +549,11 @@ public class GameRenderer implements AutoCloseable { } else if (bl && this.minecraft.screen != null) { try { this.minecraft.screen.renderWithTooltip(guiGraphics, i, j, deltaTracker.getGameTimeDeltaTicks()); - } catch (Throwable var16) { - CrashReport crashReport = CrashReport.forThrowable(var16, "Rendering screen"); + } catch (Throwable var17) { + CrashReport crashReport = CrashReport.forThrowable(var17, "Rendering screen"); CrashReportCategory crashReportCategory = crashReport.addCategory("Screen render details"); crashReportCategory.setDetail("Screen name", (CrashReportDetail)(() -> this.minecraft.screen.getClass().getCanonicalName())); - crashReportCategory.setDetail( - "Mouse location", - (CrashReportDetail)(() -> String.format( - Locale.ROOT, "Scaled: (%d, %d). Absolute: (%f, %f)", i, j, this.minecraft.mouseHandler.xpos(), this.minecraft.mouseHandler.ypos() - )) - ); - crashReportCategory.setDetail( - "Screen size", - (CrashReportDetail)(() -> String.format( - Locale.ROOT, - "Scaled: (%d, %d). Absolute: (%d, %d). Scale factor of %f", - this.minecraft.getWindow().getGuiScaledWidth(), - this.minecraft.getWindow().getGuiScaledHeight(), - this.minecraft.getWindow().getWidth(), - this.minecraft.getWindow().getHeight(), - this.minecraft.getWindow().getGuiScale() - )) - ); + this.minecraft.mouseHandler.fillMousePositionDetails(crashReportCategory, this.minecraft.getWindow()); throw new ReportedException(crashReport); } @@ -531,8 +561,8 @@ public class GameRenderer implements AutoCloseable { if (this.minecraft.screen != null) { this.minecraft.screen.handleDelayedNarration(); } - } catch (Throwable var15) { - CrashReport crashReport = CrashReport.forThrowable(var15, "Narrating screen"); + } catch (Throwable var16) { + CrashReport crashReport = CrashReport.forThrowable(var16, "Narrating screen"); CrashReportCategory crashReportCategory = crashReport.addCategory("Screen details"); crashReportCategory.setDetail("Screen name", (CrashReportDetail)(() -> this.minecraft.screen.getClass().getCanonicalName())); throw new ReportedException(crashReport); @@ -576,8 +606,7 @@ public class GameRenderer implements AutoCloseable { private void takeAutoScreenshot(Path path) { if (this.minecraft.levelRenderer.countRenderedSections() > 10 && this.minecraft.levelRenderer.hasRenderedAllSections()) { - NativeImage nativeImage = Screenshot.takeScreenshot(this.minecraft.getMainRenderTarget()); - Util.ioPool().execute(() -> { + Screenshot.takeScreenshot(this.minecraft.getMainRenderTarget(), nativeImage -> Util.ioPool().execute(() -> { int i = nativeImage.getWidth(); int j = nativeImage.getHeight(); int k = 0; @@ -598,7 +627,7 @@ public class GameRenderer implements AutoCloseable { } finally { nativeImage.close(); } - }); + })); } } @@ -630,9 +659,10 @@ public class GameRenderer implements AutoCloseable { public void renderLevel(DeltaTracker deltaTracker) { float f = deltaTracker.getGameTimeDeltaPartialTick(true); + LocalPlayer localPlayer = this.minecraft.player; this.lightTexture.updateLightTexture(f); if (this.minecraft.getCameraEntity() == null) { - this.minecraft.setCameraEntity(this.minecraft.player); + this.minecraft.setCameraEntity(localPlayer); } this.pick(f); @@ -641,7 +671,7 @@ public class GameRenderer implements AutoCloseable { boolean bl = this.shouldRenderBlockOutline(); profilerFiller.popPush("camera"); Camera camera = this.mainCamera; - Entity entity = (Entity)(this.minecraft.getCameraEntity() == null ? this.minecraft.player : this.minecraft.getCameraEntity()); + Entity entity = (Entity)(this.minecraft.getCameraEntity() == null ? localPlayer : this.minecraft.getCameraEntity()); float g = this.minecraft.level.tickRateManager().isEntityFrozen(entity) ? 1.0F : f; camera.setup(this.minecraft.level, entity, !this.minecraft.options.getCameraType().isFirstPerson(), this.minecraft.options.getCameraType().isMirrored(), g); this.renderDistance = this.minecraft.options.getEffectiveRenderDistance() * 16; @@ -655,29 +685,29 @@ public class GameRenderer implements AutoCloseable { matrix4f.mul(poseStack.last().pose()); float i = this.minecraft.options.screenEffectScale().get().floatValue(); - float j = Mth.lerp(f, this.minecraft.player.oSpinningEffectIntensity, this.minecraft.player.spinningEffectIntensity) * (i * i); - if (j > 0.0F) { - int k = this.minecraft.player.hasEffect(MobEffects.CONFUSION) ? 7 : 20; - float l = 5.0F / (j * j + 5.0F) - j * 0.04F; - l *= l; + float j = Mth.lerp(f, localPlayer.oPortalEffectIntensity, localPlayer.portalEffectIntensity); + float k = localPlayer.getEffectBlendFactor(MobEffects.NAUSEA, f); + float l = Math.max(j, k) * (i * i); + if (l > 0.0F) { + float m = 5.0F / (l * l + 5.0F) - l * 0.04F; + m *= m; Vector3f vector3f = new Vector3f(0.0F, Mth.SQRT_OF_TWO / 2.0F, Mth.SQRT_OF_TWO / 2.0F); - float m = (this.confusionAnimationTick + f) * k * (float) (Math.PI / 180.0); - matrix4f.rotate(m, vector3f); - matrix4f.scale(1.0F / l, 1.0F, 1.0F); - matrix4f.rotate(-m, vector3f); + float n = (this.spinningEffectTime + f * this.spinningEffectSpeed) * (float) (Math.PI / 180.0); + matrix4f.rotate(n, vector3f); + matrix4f.scale(1.0F / m, 1.0F, 1.0F); + matrix4f.rotate(-n, vector3f); } - float n = Math.max(h, this.minecraft.options.fov().get().intValue()); - Matrix4f matrix4f2 = this.getProjectionMatrix(n); + float m = Math.max(h, this.minecraft.options.fov().get().intValue()); + Matrix4f matrix4f2 = this.getProjectionMatrix(m); RenderSystem.setProjectionMatrix(matrix4f, ProjectionType.PERSPECTIVE); Quaternionf quaternionf = camera.rotation().conjugate(new Quaternionf()); Matrix4f matrix4f3 = new Matrix4f().rotation(quaternionf); this.minecraft.levelRenderer.prepareCullFrustum(camera.getPosition(), matrix4f3, matrix4f2); - this.minecraft.getMainRenderTarget().bindWrite(true); - this.minecraft.levelRenderer.renderLevel(this.resourcePool, deltaTracker, bl, camera, this, this.lightTexture, matrix4f3, matrix4f); + this.minecraft.levelRenderer.renderLevel(this.resourcePool, deltaTracker, bl, camera, this, matrix4f3, matrix4f); profilerFiller.popPush("hand"); if (this.renderHand) { - RenderSystem.clear(256); + RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(this.minecraft.getMainRenderTarget().getDepthTexture(), 1.0); this.renderItemInHand(camera, f, matrix4f3); } diff --git a/net/minecraft/client/renderer/GpuWarnlistManager.java b/net/minecraft/client/renderer/GpuWarnlistManager.java index f02fe4b8..144a71a5 100644 --- a/net/minecraft/client/renderer/GpuWarnlistManager.java +++ b/net/minecraft/client/renderer/GpuWarnlistManager.java @@ -7,7 +7,8 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; -import com.mojang.blaze3d.platform.GlUtil; +import com.mojang.blaze3d.systems.GpuDevice; +import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.Reader; @@ -178,19 +179,22 @@ public class GpuWarnlistManager extends SimplePreparableReloadListener apply() { Builder builder = new Builder<>(); - String string = matchAny(this.rendererPatterns, GlUtil.getRenderer()); - if (!string.isEmpty()) { - builder.put("renderer", string); - } + GpuDevice gpuDevice = RenderSystem.getDevice(); + if (gpuDevice.getBackendName().equals("OpenGL")) { + String string = matchAny(this.rendererPatterns, gpuDevice.getRenderer()); + if (!string.isEmpty()) { + builder.put("renderer", string); + } - String string2 = matchAny(this.versionPatterns, GlUtil.getOpenGLVersion()); - if (!string2.isEmpty()) { - builder.put("version", string2); - } + String string2 = matchAny(this.versionPatterns, gpuDevice.getVersion()); + if (!string2.isEmpty()) { + builder.put("version", string2); + } - String string3 = matchAny(this.vendorPatterns, GlUtil.getVendor()); - if (!string3.isEmpty()) { - builder.put("vendor", string3); + String string3 = matchAny(this.vendorPatterns, gpuDevice.getVendor()); + if (!string3.isEmpty()) { + builder.put("vendor", string3); + } } return builder.build(); diff --git a/net/minecraft/client/renderer/ItemBlockRenderTypes.java b/net/minecraft/client/renderer/ItemBlockRenderTypes.java index fbd87fa6..fb18c30d 100644 --- a/net/minecraft/client/renderer/ItemBlockRenderTypes.java +++ b/net/minecraft/client/renderer/ItemBlockRenderTypes.java @@ -70,10 +70,15 @@ public class ItemBlockRenderTypes { hashMap.put(Blocks.COBWEB, renderType3); hashMap.put(Blocks.SHORT_GRASS, renderType3); hashMap.put(Blocks.FERN, renderType3); + hashMap.put(Blocks.BUSH, renderType3); hashMap.put(Blocks.DEAD_BUSH, renderType3); + hashMap.put(Blocks.SHORT_DRY_GRASS, renderType3); + hashMap.put(Blocks.TALL_DRY_GRASS, renderType3); hashMap.put(Blocks.SEAGRASS, renderType3); hashMap.put(Blocks.TALL_SEAGRASS, renderType3); hashMap.put(Blocks.DANDELION, renderType3); + hashMap.put(Blocks.OPEN_EYEBLOSSOM, renderType3); + hashMap.put(Blocks.CLOSED_EYEBLOSSOM, renderType3); hashMap.put(Blocks.POPPY, renderType3); hashMap.put(Blocks.BLUE_ORCHID, renderType3); hashMap.put(Blocks.ALLIUM, renderType3); @@ -136,6 +141,7 @@ public class ItemBlockRenderTypes { hashMap.put(Blocks.PALE_MOSS_CARPET, renderType3); hashMap.put(Blocks.PALE_HANGING_MOSS, renderType3); hashMap.put(Blocks.GLOW_LICHEN, renderType3); + hashMap.put(Blocks.RESIN_CLUMP, renderType3); hashMap.put(Blocks.LILY_PAD, renderType3); hashMap.put(Blocks.NETHER_WART, renderType3); hashMap.put(Blocks.BREWING_STAND, renderType3); @@ -154,6 +160,8 @@ public class ItemBlockRenderTypes { hashMap.put(Blocks.POTTED_FERN, renderType3); hashMap.put(Blocks.POTTED_DANDELION, renderType3); hashMap.put(Blocks.POTTED_POPPY, renderType3); + hashMap.put(Blocks.POTTED_OPEN_EYEBLOSSOM, renderType3); + hashMap.put(Blocks.POTTED_CLOSED_EYEBLOSSOM, renderType3); hashMap.put(Blocks.POTTED_BLUE_ORCHID, renderType3); hashMap.put(Blocks.POTTED_ALLIUM, renderType3); hashMap.put(Blocks.POTTED_AZURE_BLUET, renderType3); @@ -280,6 +288,8 @@ public class ItemBlockRenderTypes { hashMap.put(Blocks.FLOWERING_AZALEA, renderType3); hashMap.put(Blocks.AZALEA, renderType3); hashMap.put(Blocks.PINK_PETALS, renderType3); + hashMap.put(Blocks.WILDFLOWERS, renderType3); + hashMap.put(Blocks.LEAF_LITTER, renderType3); hashMap.put(Blocks.BIG_DRIPLEAF, renderType3); hashMap.put(Blocks.BIG_DRIPLEAF_STEM, renderType3); hashMap.put(Blocks.SMALL_DRIPLEAF, renderType3); @@ -298,6 +308,8 @@ public class ItemBlockRenderTypes { hashMap.put(Blocks.WAXED_EXPOSED_COPPER_GRATE, renderType3); hashMap.put(Blocks.WAXED_WEATHERED_COPPER_GRATE, renderType3); hashMap.put(Blocks.WAXED_OXIDIZED_COPPER_GRATE, renderType3); + hashMap.put(Blocks.FIREFLY_BUSH, renderType3); + hashMap.put(Blocks.CACTUS_FLOWER, renderType3); RenderType renderType4 = RenderType.translucent(); hashMap.put(Blocks.ICE, renderType4); hashMap.put(Blocks.NETHER_PORTAL, renderType4); @@ -370,13 +382,13 @@ public class ItemBlockRenderTypes { } } - public static RenderType getRenderType(BlockState blockState) { - RenderType renderType = getChunkRenderType(blockState); + public static RenderType getRenderType(BlockState state) { + RenderType renderType = getChunkRenderType(state); return renderType == RenderType.translucent() ? Sheets.translucentItemSheet() : Sheets.cutoutBlockSheet(); } - public static RenderType getRenderType(ItemStack itemStack) { - if (itemStack.getItem() instanceof BlockItem blockItem) { + public static RenderType getRenderType(ItemStack stack) { + if (stack.getItem() instanceof BlockItem blockItem) { Block block = blockItem.getBlock(); return getRenderType(block.defaultBlockState()); } else { diff --git a/net/minecraft/client/renderer/ItemInHandRenderer.java b/net/minecraft/client/renderer/ItemInHandRenderer.java index 2d76adb5..002a6480 100644 --- a/net/minecraft/client/renderer/ItemInHandRenderer.java +++ b/net/minecraft/client/renderer/ItemInHandRenderer.java @@ -10,9 +10,11 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.player.PlayerRenderer; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.client.renderer.state.MapRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.component.DataComponents; @@ -28,6 +30,7 @@ import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.MapItem; +import net.minecraft.world.item.ShieldItem; import net.minecraft.world.level.saveddata.maps.MapId; import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import org.joml.Matrix4f; @@ -118,20 +121,22 @@ public class ItemInHandRenderer { private float oOffHandHeight; private final EntityRenderDispatcher entityRenderDispatcher; private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; - public ItemInHandRenderer(Minecraft minecraft, EntityRenderDispatcher entityRenderDispatcher, ItemRenderer itemRenderer) { + public ItemInHandRenderer(Minecraft minecraft, EntityRenderDispatcher entityRenderDispatcher, ItemRenderer itemRenderer, ItemModelResolver itemModelResolver) { this.minecraft = minecraft; this.entityRenderDispatcher = entityRenderDispatcher; this.itemRenderer = itemRenderer; + this.itemModelResolver = itemModelResolver; } public void renderItem( - LivingEntity entity, ItemStack itemStack, ItemDisplayContext displayContext, boolean leftHand, PoseStack poseStack, MultiBufferSource buffer, int seed + LivingEntity entity, ItemStack stack, ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight ) { - if (!itemStack.isEmpty()) { + if (!stack.isEmpty()) { this.itemRenderer .renderStatic( - entity, itemStack, displayContext, leftHand, poseStack, buffer, entity.level(), seed, OverlayTexture.NO_OVERLAY, entity.getId() + displayContext.ordinal() + entity, stack, displayContext, poseStack, bufferSource, entity.level(), packedLight, OverlayTexture.NO_OVERLAY, entity.getId() + displayContext.ordinal() ); } } @@ -145,7 +150,7 @@ public class ItemInHandRenderer { return -Mth.cos(f * (float) Math.PI) * 0.5F + 0.5F; } - private void renderMapHand(PoseStack poseStack, MultiBufferSource buffer, int packedLight, HumanoidArm side) { + private void renderMapHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, HumanoidArm side) { PlayerRenderer playerRenderer = (PlayerRenderer)this.entityRenderDispatcher.getRenderer(this.minecraft.player); poseStack.pushPose(); float f = side == HumanoidArm.RIGHT ? 1.0F : -1.0F; @@ -155,9 +160,9 @@ public class ItemInHandRenderer { poseStack.translate(f * 0.3F, -1.1F, 0.45F); ResourceLocation resourceLocation = this.minecraft.player.getSkin().texture(); if (side == HumanoidArm.RIGHT) { - playerRenderer.renderRightHand(poseStack, buffer, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.RIGHT_SLEEVE)); + playerRenderer.renderRightHand(poseStack, bufferSource, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.RIGHT_SLEEVE)); } else { - playerRenderer.renderLeftHand(poseStack, buffer, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.LEFT_SLEEVE)); + playerRenderer.renderLeftHand(poseStack, bufferSource, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.LEFT_SLEEVE)); } poseStack.popPose(); @@ -317,7 +322,7 @@ public class ItemInHandRenderer { poseStack.translate(i * 0.56F, -0.52F + equippedProg * -0.6F, -0.72F); } - public void renderHandsWithItems(float partialTicks, PoseStack poseStack, MultiBufferSource.BufferSource buffer, LocalPlayer playerEntity, int combinedLight) { + public void renderHandsWithItems(float partialTicks, PoseStack poseStack, BufferSource buffer, LocalPlayer playerEntity, int combinedLight) { float f = playerEntity.getAttackAnim(partialTicks); InteractionHand interactionHand = MoreObjects.firstNonNull(playerEntity.swingingArm, InteractionHand.MAIN_HAND); float g = playerEntity.getXRot(partialTicks); @@ -404,7 +409,7 @@ public class ItemInHandRenderer { boolean bl2 = CrossbowItem.isCharged(stack); boolean bl3 = humanoidArm == HumanoidArm.RIGHT; int i = bl3 ? 1 : -1; - if (player.isUsingItem() && player.getUseItemRemainingTicks() > 0 && player.getUsedItemHand() == hand) { + if (player.isUsingItem() && player.getUseItemRemainingTicks() > 0 && player.getUsedItemHand() == hand && !bl2) { this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); poseStack.translate(i * -0.4785682F, -0.094387F, 0.05731531F); poseStack.mulPose(Axis.XP.rotationDegrees(-11.935F)); @@ -427,12 +432,7 @@ public class ItemInHandRenderer { poseStack.scale(1.0F, 1.0F, 1.0F + g * 0.2F); poseStack.mulPose(Axis.YN.rotationDegrees(i * 45.0F)); } else { - float fx = -0.4F * Mth.sin(Mth.sqrt(swingProgress) * (float) Math.PI); - float gx = 0.2F * Mth.sin(Mth.sqrt(swingProgress) * (float) (Math.PI * 2)); - float h = -0.2F * Mth.sin(swingProgress * (float) Math.PI); - poseStack.translate(i * fx, gx, h); - this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); - this.applyItemArmAttackTransform(poseStack, humanoidArm, swingProgress); + this.swingArm(swingProgress, equippedProgress, poseStack, i, humanoidArm); if (bl2 && swingProgress < 0.001F && bl) { poseStack.translate(i * -0.641864F, 0.0F, 0.0F); poseStack.mulPose(Axis.YP.rotationDegrees(i * 10.0F)); @@ -440,12 +440,12 @@ public class ItemInHandRenderer { } this.renderItem( - player, stack, bl3 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, !bl3, poseStack, buffer, combinedLight + player, stack, bl3 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, poseStack, buffer, combinedLight ); } else { boolean bl2 = humanoidArm == HumanoidArm.RIGHT; + int l = bl2 ? 1 : -1; if (player.isUsingItem() && player.getUseItemRemainingTicks() > 0 && player.getUsedItemHand() == hand) { - int l = bl2 ? 1 : -1; switch (stack.getUseAnimation()) { case NONE: this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); @@ -457,6 +457,12 @@ public class ItemInHandRenderer { break; case BLOCK: this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); + if (!(stack.getItem() instanceof ShieldItem)) { + poseStack.translate(l * -0.14142136F, 0.08F, 0.14142136F); + poseStack.mulPose(Axis.XP.rotationDegrees(-102.25F)); + poseStack.mulPose(Axis.YP.rotationDegrees(l * 13.365F)); + poseStack.mulPose(Axis.ZP.rotationDegrees(l * 78.05F)); + } break; case BOW: this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); @@ -507,25 +513,21 @@ public class ItemInHandRenderer { break; case BRUSH: this.applyBrushTransform(poseStack, partialTicks, humanoidArm, stack, player, equippedProgress); + break; + case BUNDLE: + this.swingArm(swingProgress, equippedProgress, poseStack, l, humanoidArm); } } else if (player.isAutoSpinAttack()) { this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); - int l = bl2 ? 1 : -1; poseStack.translate(l * -0.4F, 0.8F, 0.3F); poseStack.mulPose(Axis.YP.rotationDegrees(l * 65.0F)); poseStack.mulPose(Axis.ZP.rotationDegrees(l * -85.0F)); } else { - float n = -0.4F * Mth.sin(Mth.sqrt(swingProgress) * (float) Math.PI); - float mxx = 0.2F * Mth.sin(Mth.sqrt(swingProgress) * (float) (Math.PI * 2)); - float fxxx = -0.2F * Mth.sin(swingProgress * (float) Math.PI); - int o = bl2 ? 1 : -1; - poseStack.translate(o * n, mxx, fxxx); - this.applyItemArmTransform(poseStack, humanoidArm, equippedProgress); - this.applyItemArmAttackTransform(poseStack, humanoidArm, swingProgress); + this.swingArm(swingProgress, equippedProgress, poseStack, l, humanoidArm); } this.renderItem( - player, stack, bl2 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, !bl2, poseStack, buffer, combinedLight + player, stack, bl2 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, poseStack, buffer, combinedLight ); } @@ -533,17 +535,30 @@ public class ItemInHandRenderer { } } + private void swingArm(float swingProgress, float equippedProgress, PoseStack poseStack, int direction, HumanoidArm arm) { + float f = -0.4F * Mth.sin(Mth.sqrt(swingProgress) * (float) Math.PI); + float g = 0.2F * Mth.sin(Mth.sqrt(swingProgress) * (float) (Math.PI * 2)); + float h = -0.2F * Mth.sin(swingProgress * (float) Math.PI); + poseStack.translate(direction * f, g, h); + this.applyItemArmTransform(poseStack, arm, equippedProgress); + this.applyItemArmAttackTransform(poseStack, arm, swingProgress); + } + + private boolean shouldInstantlyReplaceVisibleItem(ItemStack oldItem, ItemStack newItem) { + return ItemStack.matches(oldItem, newItem) ? true : !this.itemModelResolver.shouldPlaySwapAnimation(newItem); + } + public void tick() { this.oMainHandHeight = this.mainHandHeight; this.oOffHandHeight = this.offHandHeight; LocalPlayer localPlayer = this.minecraft.player; ItemStack itemStack = localPlayer.getMainHandItem(); ItemStack itemStack2 = localPlayer.getOffhandItem(); - if (ItemStack.matches(this.mainHandItem, itemStack)) { + if (this.shouldInstantlyReplaceVisibleItem(this.mainHandItem, itemStack)) { this.mainHandItem = itemStack; } - if (ItemStack.matches(this.offHandItem, itemStack2)) { + if (this.shouldInstantlyReplaceVisibleItem(this.offHandItem, itemStack2)) { this.offHandItem = itemStack2; } @@ -552,8 +567,10 @@ public class ItemInHandRenderer { this.offHandHeight = Mth.clamp(this.offHandHeight - 0.4F, 0.0F, 1.0F); } else { float f = localPlayer.getAttackStrengthScale(1.0F); - this.mainHandHeight = this.mainHandHeight + Mth.clamp((this.mainHandItem == itemStack ? f * f * f : 0.0F) - this.mainHandHeight, -0.4F, 0.4F); - this.offHandHeight = this.offHandHeight + Mth.clamp((this.offHandItem == itemStack2 ? 1 : 0) - this.offHandHeight, -0.4F, 0.4F); + float g = this.mainHandItem != itemStack ? 0.0F : f * f * f; + float h = this.offHandItem != itemStack2 ? 0.0F : 1.0F; + this.mainHandHeight = this.mainHandHeight + Mth.clamp(g - this.mainHandHeight, -0.4F, 0.4F); + this.offHandHeight = this.offHandHeight + Mth.clamp(h - this.offHandHeight, -0.4F, 0.4F); } if (this.mainHandHeight < 0.1F) { diff --git a/net/minecraft/client/renderer/ItemModelShaper.java b/net/minecraft/client/renderer/ItemModelShaper.java deleted file mode 100644 index fc8181fd..00000000 --- a/net/minecraft/client/renderer/ItemModelShaper.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.minecraft.client.renderer; - -import java.util.HashMap; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Supplier; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.ModelManager; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.core.component.DataComponents; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; - -@Environment(EnvType.CLIENT) -public class ItemModelShaper { - private final Map modelToBakedModel = new HashMap(); - private final Supplier missingModel; - private final Function modelGetter; - - public ItemModelShaper(ModelManager modelManager) { - this.missingModel = modelManager::getMissingModel; - this.modelGetter = resourceLocation -> modelManager.getModel(ModelResourceLocation.inventory(resourceLocation)); - } - - public BakedModel getItemModel(ItemStack stack) { - ResourceLocation resourceLocation = stack.get(DataComponents.ITEM_MODEL); - return resourceLocation == null ? (BakedModel)this.missingModel.get() : this.getItemModel(resourceLocation); - } - - public BakedModel getItemModel(ResourceLocation resourceLocation) { - return (BakedModel)this.modelToBakedModel.computeIfAbsent(resourceLocation, this.modelGetter); - } - - public void invalidateCache() { - this.modelToBakedModel.clear(); - } -} diff --git a/net/minecraft/client/renderer/LevelEventHandler.java b/net/minecraft/client/renderer/LevelEventHandler.java index 3844f94a..b911b4d6 100644 --- a/net/minecraft/client/renderer/LevelEventHandler.java +++ b/net/minecraft/client/renderer/LevelEventHandler.java @@ -13,6 +13,7 @@ import net.minecraft.client.resources.sounds.SoundInstance; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.Holder; +import net.minecraft.core.Direction.Axis; import net.minecraft.core.particles.ItemParticleOption; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; @@ -61,18 +62,21 @@ public class LevelEventHandler { this.levelRenderer = levelRenderer; } - public void globalLevelEvent(int i, BlockPos blockPos, int j) { - switch (i) { + /** + * Handles a global level event. This includes playing sounds that should be heard by any player, regardless of position and dimension, such as the Wither spawning. + */ + public void globalLevelEvent(int type, BlockPos pos, int data) { + switch (type) { case 1023: case 1028: case 1038: Camera camera = this.minecraft.gameRenderer.getMainCamera(); if (camera.isInitialized()) { - Vec3 vec3 = Vec3.atCenterOf(blockPos).subtract(camera.getPosition()).normalize(); + Vec3 vec3 = Vec3.atCenterOf(pos).subtract(camera.getPosition()).normalize(); Vec3 vec32 = camera.getPosition().add(vec3.scale(2.0)); - if (i == 1023) { + if (type == 1023) { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.WITHER_SPAWN, SoundSource.HOSTILE, 1.0F, 1.0F, false); - } else if (i == 1038) { + } else if (type == 1038) { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.END_PORTAL_SPAWN, SoundSource.HOSTILE, 1.0F, 1.0F, false); } else { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.ENDER_DRAGON_DEATH, SoundSource.HOSTILE, 5.0F, 1.0F, false); @@ -81,246 +85,226 @@ public class LevelEventHandler { } } - public void levelEvent(int i, BlockPos blockPos, int j) { + public void levelEvent(int type, BlockPos pos, int data) { RandomSource randomSource = this.level.random; - switch (i) { + switch (type) { case 1000: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_DISPENSE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_DISPENSE, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1001: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_FAIL, SoundSource.BLOCKS, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_FAIL, SoundSource.BLOCKS, 1.0F, 1.2F, false); break; case 1002: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_LAUNCH, SoundSource.BLOCKS, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_LAUNCH, SoundSource.BLOCKS, 1.0F, 1.2F, false); break; case 1004: - this.level.playLocalSound(blockPos, SoundEvents.FIREWORK_ROCKET_SHOOT, SoundSource.NEUTRAL, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.FIREWORK_ROCKET_SHOOT, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; case 1009: - if (j == 0) { + if (data == 0) { + this.level + .playLocalSound(pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false); + } else if (data == 1) { this.level .playLocalSound( - blockPos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false - ); - } else if (j == 1) { - this.level - .playLocalSound( - blockPos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 0.7F, 1.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.4F, false + pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 0.7F, 1.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.4F, false ); } break; case 1010: - this.level.registryAccess().lookupOrThrow(Registries.JUKEBOX_SONG).get(j).ifPresent(reference -> this.playJukeboxSong(reference, blockPos)); + this.level.registryAccess().lookupOrThrow(Registries.JUKEBOX_SONG).get(data).ifPresent(reference -> this.playJukeboxSong(reference, pos)); break; case 1011: - this.stopJukeboxSongAndNotifyNearby(blockPos); + this.stopJukeboxSongAndNotifyNearby(pos); break; case 1015: this.level - .playLocalSound(blockPos, SoundEvents.GHAST_WARN, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.GHAST_WARN, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1016: this.level - .playLocalSound(blockPos, SoundEvents.GHAST_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.GHAST_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1017: this.level .playLocalSound( - blockPos, SoundEvents.ENDER_DRAGON_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ENDER_DRAGON_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1018: this.level - .playLocalSound(blockPos, SoundEvents.BLAZE_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.BLAZE_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1019: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_ATTACK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_ATTACK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1020: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_ATTACK_IRON_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_ATTACK_IRON_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1021: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_BREAK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_BREAK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1022: this.level - .playLocalSound( - blockPos, SoundEvents.WITHER_BREAK_BLOCK, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false - ); + .playLocalSound(pos, SoundEvents.WITHER_BREAK_BLOCK, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1024: this.level - .playLocalSound(blockPos, SoundEvents.WITHER_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.WITHER_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1025: this.level - .playLocalSound(blockPos, SoundEvents.BAT_TAKEOFF, SoundSource.NEUTRAL, 0.05F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.BAT_TAKEOFF, SoundSource.NEUTRAL, 0.05F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1026: this.level - .playLocalSound(blockPos, SoundEvents.ZOMBIE_INFECT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.ZOMBIE_INFECT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1027: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_VILLAGER_CONVERTED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_VILLAGER_CONVERTED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1029: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_DESTROY, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_DESTROY, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 1030: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_USE, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_USE, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 1031: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_LAND, SoundSource.BLOCKS, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_LAND, SoundSource.BLOCKS, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1032: this.minecraft.getSoundManager().play(SimpleSoundInstance.forLocalAmbience(SoundEvents.PORTAL_TRAVEL, randomSource.nextFloat() * 0.4F + 0.8F, 0.25F)); break; case 1033: - this.level.playLocalSound(blockPos, SoundEvents.CHORUS_FLOWER_GROW, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CHORUS_FLOWER_GROW, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1034: - this.level.playLocalSound(blockPos, SoundEvents.CHORUS_FLOWER_DEATH, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CHORUS_FLOWER_DEATH, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1035: - this.level.playLocalSound(blockPos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1039: - this.level.playLocalSound(blockPos, SoundEvents.PHANTOM_BITE, SoundSource.HOSTILE, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.PHANTOM_BITE, SoundSource.HOSTILE, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1040: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_CONVERTED_TO_DROWNED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_CONVERTED_TO_DROWNED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1041: this.level .playLocalSound( - blockPos, SoundEvents.HUSK_CONVERTED_TO_ZOMBIE, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.HUSK_CONVERTED_TO_ZOMBIE, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1042: - this.level.playLocalSound(blockPos, SoundEvents.GRINDSTONE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.GRINDSTONE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1043: - this.level.playLocalSound(blockPos, SoundEvents.BOOK_PAGE_TURN, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.BOOK_PAGE_TURN, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1044: - this.level.playLocalSound(blockPos, SoundEvents.SMITHING_TABLE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.SMITHING_TABLE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1045: - this.level.playLocalSound(blockPos, SoundEvents.POINTED_DRIPSTONE_LAND, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_LAND, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1046: this.level - .playLocalSound( - blockPos, SoundEvents.POINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false - ); + .playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1047: this.level - .playLocalSound( - blockPos, SoundEvents.POINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false - ); + .playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1048: this.level .playLocalSound( - blockPos, SoundEvents.SKELETON_CONVERTED_TO_STRAY, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.SKELETON_CONVERTED_TO_STRAY, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1049: - this.level.playLocalSound(blockPos, SoundEvents.CRAFTER_CRAFT, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CRAFTER_CRAFT, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1050: - this.level.playLocalSound(blockPos, SoundEvents.CRAFTER_FAIL, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CRAFTER_FAIL, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1051: - this.level - .playLocalSound(blockPos, SoundEvents.WIND_CHARGE_THROW, SoundSource.BLOCKS, 0.5F, 0.4F / (this.level.getRandom().nextFloat() * 0.4F + 0.8F), false); + this.level.playLocalSound(pos, SoundEvents.WIND_CHARGE_THROW, SoundSource.BLOCKS, 0.5F, 0.4F / (this.level.getRandom().nextFloat() * 0.4F + 0.8F), false); break; case 1500: - ComposterBlock.handleFill(this.level, blockPos, j > 0); + ComposterBlock.handleFill(this.level, pos, data > 0); break; case 1501: this.level - .playLocalSound( - blockPos, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false - ); + .playLocalSound(pos, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false); - for (int ox = 0; ox < 8; ox++) { + for (int mx = 0; mx < 8; mx++) { this.level - .addParticle( - ParticleTypes.LARGE_SMOKE, - blockPos.getX() + randomSource.nextDouble(), - blockPos.getY() + 1.2, - blockPos.getZ() + randomSource.nextDouble(), - 0.0, - 0.0, - 0.0 - ); + .addParticle(ParticleTypes.LARGE_SMOKE, pos.getX() + randomSource.nextDouble(), pos.getY() + 1.2, pos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0); } break; case 1502: this.level .playLocalSound( - blockPos, SoundEvents.REDSTONE_TORCH_BURNOUT, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false + pos, SoundEvents.REDSTONE_TORCH_BURNOUT, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false ); - for (int ox = 0; ox < 5; ox++) { - double g = blockPos.getX() + randomSource.nextDouble() * 0.6 + 0.2; - double p = blockPos.getY() + randomSource.nextDouble() * 0.6 + 0.2; - double q = blockPos.getZ() + randomSource.nextDouble() * 0.6 + 0.2; - this.level.addParticle(ParticleTypes.SMOKE, g, p, q, 0.0, 0.0, 0.0); + for (int mx = 0; mx < 5; mx++) { + double g = pos.getX() + randomSource.nextDouble() * 0.6 + 0.2; + double n = pos.getY() + randomSource.nextDouble() * 0.6 + 0.2; + double o = pos.getZ() + randomSource.nextDouble() * 0.6 + 0.2; + this.level.addParticle(ParticleTypes.SMOKE, g, n, o, 0.0, 0.0, 0.0); } break; case 1503: - this.level.playLocalSound(blockPos, SoundEvents.END_PORTAL_FRAME_FILL, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.END_PORTAL_FRAME_FILL, SoundSource.BLOCKS, 1.0F, 1.0F, false); - for (int ox = 0; ox < 16; ox++) { - double g = blockPos.getX() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; - double p = blockPos.getY() + 0.8125; - double q = blockPos.getZ() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; - this.level.addParticle(ParticleTypes.SMOKE, g, p, q, 0.0, 0.0, 0.0); + for (int mx = 0; mx < 16; mx++) { + double g = pos.getX() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; + double n = pos.getY() + 0.8125; + double o = pos.getZ() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; + this.level.addParticle(ParticleTypes.SMOKE, g, n, o, 0.0, 0.0, 0.0); } break; case 1504: - PointedDripstoneBlock.spawnDripParticle(this.level, blockPos, this.level.getBlockState(blockPos)); + PointedDripstoneBlock.spawnDripParticle(this.level, pos, this.level.getBlockState(pos)); break; case 1505: - BoneMealItem.addGrowthParticles(this.level, blockPos, j); - this.level.playLocalSound(blockPos, SoundEvents.BONE_MEAL_USE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + BoneMealItem.addGrowthParticles(this.level, pos, data); + this.level.playLocalSound(pos, SoundEvents.BONE_MEAL_USE, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 2000: - this.shootParticles(j, blockPos, randomSource, ParticleTypes.SMOKE); + this.shootParticles(data, pos, randomSource, ParticleTypes.SMOKE); break; case 2001: - BlockState blockState = Block.stateById(j); + BlockState blockState = Block.stateById(data); if (!blockState.isAir()) { SoundType soundType = blockState.getSoundType(); - this.level - .playLocalSound(blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, (soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F, false); + this.level.playLocalSound(pos, soundType.getBreakSound(), SoundSource.BLOCKS, (soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F, false); } - this.level.addDestroyBlockEffect(blockPos, blockState); + this.level.addDestroyBlockEffect(pos, blockState); break; case 2002: case 2007: - Vec3 vec3 = Vec3.atBottomCenterOf(blockPos); + Vec3 vec3 = Vec3.atBottomCenterOf(pos); - for (int l = 0; l < 8; l++) { + for (int j = 0; j < 8; j++) { this.levelRenderer .addParticle( new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.SPLASH_POTION)), @@ -333,34 +317,34 @@ public class LevelEventHandler { ); } - float h = (j >> 16 & 0xFF) / 255.0F; - float m = (j >> 8 & 0xFF) / 255.0F; - float n = (j >> 0 & 0xFF) / 255.0F; - ParticleOptions particleOptions = i == 2007 ? ParticleTypes.INSTANT_EFFECT : ParticleTypes.EFFECT; + float h = (data >> 16 & 0xFF) / 255.0F; + float k = (data >> 8 & 0xFF) / 255.0F; + float l = (data >> 0 & 0xFF) / 255.0F; + ParticleOptions particleOptions = type == 2007 ? ParticleTypes.INSTANT_EFFECT : ParticleTypes.EFFECT; - for (int ox = 0; ox < 100; ox++) { + for (int mx = 0; mx < 100; mx++) { double g = randomSource.nextDouble() * 4.0; - double p = randomSource.nextDouble() * Math.PI * 2.0; - double q = Math.cos(p) * g; - double r = 0.01 + randomSource.nextDouble() * 0.5; - double s = Math.sin(p) * g; + double n = randomSource.nextDouble() * Math.PI * 2.0; + double o = Math.cos(n) * g; + double p = 0.01 + randomSource.nextDouble() * 0.5; + double q = Math.sin(n) * g; Particle particle = this.levelRenderer - .addParticleInternal(particleOptions, particleOptions.getType().getOverrideLimiter(), vec3.x + q * 0.1, vec3.y + 0.3, vec3.z + s * 0.1, q, r, s); + .addParticleInternal(particleOptions, particleOptions.getType().getOverrideLimiter(), vec3.x + o * 0.1, vec3.y + 0.3, vec3.z + q * 0.1, o, p, q); if (particle != null) { - float t = 0.75F + randomSource.nextFloat() * 0.25F; - particle.setColor(h * t, m * t, n * t); + float r = 0.75F + randomSource.nextFloat() * 0.25F; + particle.setColor(h * r, k * r, l * r); particle.setPower((float)g); } } - this.level.playLocalSound(blockPos, SoundEvents.SPLASH_POTION_BREAK, SoundSource.NEUTRAL, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.SPLASH_POTION_BREAK, SoundSource.NEUTRAL, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 2003: - double d = blockPos.getX() + 0.5; - double e = blockPos.getY(); - double f = blockPos.getZ() + 0.5; + double d = pos.getX() + 0.5; + double e = pos.getY(); + double f = pos.getZ() + 0.5; - for (int k = 0; k < 8; k++) { + for (int i = 0; i < 8; i++) { this.levelRenderer .addParticle( new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.ENDER_EYE)), @@ -379,60 +363,58 @@ public class LevelEventHandler { } break; case 2004: - for (int ux = 0; ux < 20; ux++) { - double v = blockPos.getX() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - double w = blockPos.getY() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - double x = blockPos.getZ() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - this.level.addParticle(ParticleTypes.SMOKE, v, w, x, 0.0, 0.0, 0.0); - this.level.addParticle(ParticleTypes.FLAME, v, w, x, 0.0, 0.0, 0.0); + for (int sx = 0; sx < 20; sx++) { + double t = pos.getX() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + double u = pos.getY() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + double v = pos.getZ() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + this.level.addParticle(ParticleTypes.SMOKE, t, u, v, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.FLAME, t, u, v, 0.0, 0.0, 0.0); } break; case 2006: - for (int o = 0; o < 200; o++) { - float ad = randomSource.nextFloat() * 4.0F; - float ai = randomSource.nextFloat() * (float) (Math.PI * 2); - double p = Mth.cos(ai) * ad; - double q = 0.01 + randomSource.nextDouble() * 0.5; - double r = Mth.sin(ai) * ad; + for (int m = 0; m < 200; m++) { + float ab = randomSource.nextFloat() * 4.0F; + float ag = randomSource.nextFloat() * (float) (Math.PI * 2); + double n = Mth.cos(ag) * ab; + double o = 0.01 + randomSource.nextDouble() * 0.5; + double p = Mth.sin(ag) * ab; Particle particle2 = this.levelRenderer - .addParticleInternal(ParticleTypes.DRAGON_BREATH, false, blockPos.getX() + p * 0.1, blockPos.getY() + 0.3, blockPos.getZ() + r * 0.1, p, q, r); + .addParticleInternal(ParticleTypes.DRAGON_BREATH, false, pos.getX() + n * 0.1, pos.getY() + 0.3, pos.getZ() + p * 0.1, n, o, p); if (particle2 != null) { - particle2.setPower(ad); + particle2.setPower(ab); } } - if (j == 1) { - this.level.playLocalSound(blockPos, SoundEvents.DRAGON_FIREBALL_EXPLODE, SoundSource.HOSTILE, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + if (data == 1) { + this.level.playLocalSound(pos, SoundEvents.DRAGON_FIREBALL_EXPLODE, SoundSource.HOSTILE, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); } break; case 2008: - this.level.addParticle(ParticleTypes.EXPLOSION, blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.EXPLOSION, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0, 0.0, 0.0); break; case 2009: - for (int ox = 0; ox < 8; ox++) { + for (int mx = 0; mx < 8; mx++) { this.level - .addParticle( - ParticleTypes.CLOUD, blockPos.getX() + randomSource.nextDouble(), blockPos.getY() + 1.2, blockPos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0 - ); + .addParticle(ParticleTypes.CLOUD, pos.getX() + randomSource.nextDouble(), pos.getY() + 1.2, pos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0); } break; case 2010: - this.shootParticles(j, blockPos, randomSource, ParticleTypes.WHITE_SMOKE); + this.shootParticles(data, pos, randomSource, ParticleTypes.WHITE_SMOKE); break; case 2011: - ParticleUtils.spawnParticleInBlock(this.level, blockPos, j, ParticleTypes.HAPPY_VILLAGER); + ParticleUtils.spawnParticleInBlock(this.level, pos, data, ParticleTypes.HAPPY_VILLAGER); break; case 2012: - ParticleUtils.spawnParticleInBlock(this.level, blockPos, j, ParticleTypes.HAPPY_VILLAGER); + ParticleUtils.spawnParticleInBlock(this.level, pos, data, ParticleTypes.HAPPY_VILLAGER); break; case 2013: - ParticleUtils.spawnSmashAttackParticles(this.level, blockPos, j); + ParticleUtils.spawnSmashAttackParticles(this.level, pos, data); break; case 3000: - this.level.addParticle(ParticleTypes.EXPLOSION_EMITTER, true, blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.EXPLOSION_EMITTER, true, true, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0, 0.0, 0.0); this.level .playLocalSound( - blockPos, + pos, SoundEvents.END_GATEWAY_SPAWN, SoundSource.BLOCKS, 10.0F, @@ -441,93 +423,84 @@ public class LevelEventHandler { ); break; case 3001: - this.level.playLocalSound(blockPos, SoundEvents.ENDER_DRAGON_GROWL, SoundSource.HOSTILE, 64.0F, 0.8F + this.level.random.nextFloat() * 0.3F, false); + this.level.playLocalSound(pos, SoundEvents.ENDER_DRAGON_GROWL, SoundSource.HOSTILE, 64.0F, 0.8F + this.level.random.nextFloat() * 0.3F, false); break; case 3002: - if (j >= 0 && j < Direction.Axis.VALUES.length) { - ParticleUtils.spawnParticlesAlongAxis(Direction.Axis.VALUES[j], this.level, blockPos, 0.125, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(10, 19)); + if (data >= 0 && data < Axis.VALUES.length) { + ParticleUtils.spawnParticlesAlongAxis(Axis.VALUES[data], this.level, pos, 0.125, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(10, 19)); } else { - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(3, 5)); } break; case 3003: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.WAX_ON, UniformInt.of(3, 5)); - this.level.playLocalSound(blockPos, SoundEvents.HONEYCOMB_WAX_ON, SoundSource.BLOCKS, 1.0F, 1.0F, false); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.WAX_ON, UniformInt.of(3, 5)); + this.level.playLocalSound(pos, SoundEvents.HONEYCOMB_WAX_ON, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 3004: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.WAX_OFF, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.WAX_OFF, UniformInt.of(3, 5)); break; case 3005: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.SCRAPE, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.SCRAPE, UniformInt.of(3, 5)); break; case 3006: - int u = j >> 6; - if (u > 0) { - if (randomSource.nextFloat() < 0.3F + u * 0.1F) { - float n = 0.15F + 0.02F * u * u * randomSource.nextFloat(); - float y = 0.4F + 0.3F * u * randomSource.nextFloat(); - this.level.playLocalSound(blockPos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, n, y, false); + int s = data >> 6; + if (s > 0) { + if (randomSource.nextFloat() < 0.3F + s * 0.1F) { + float l = 0.15F + 0.02F * s * s * randomSource.nextFloat(); + float w = 0.4F + 0.3F * s * randomSource.nextFloat(); + this.level.playLocalSound(pos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, l, w, false); } - byte b = (byte)(j & 63); - IntProvider intProvider = UniformInt.of(0, u); - float z = 0.005F; + byte b = (byte)(data & 63); + IntProvider intProvider = UniformInt.of(0, s); + float x = 0.005F; Supplier supplier = () -> new Vec3( Mth.nextDouble(randomSource, -0.005F, 0.005F), Mth.nextDouble(randomSource, -0.005F, 0.005F), Mth.nextDouble(randomSource, -0.005F, 0.005F) ); if (b == 0) { for (Direction direction : Direction.values()) { - float aa = direction == Direction.DOWN ? (float) Math.PI : 0.0F; - double r = direction.getAxis() == Direction.Axis.Y ? 0.65 : 0.57; - ParticleUtils.spawnParticlesOnBlockFace(this.level, blockPos, new SculkChargeParticleOptions(aa), intProvider, direction, supplier, r); + float y = direction == Direction.DOWN ? (float) Math.PI : 0.0F; + double p = direction.getAxis() == Axis.Y ? 0.65 : 0.57; + ParticleUtils.spawnParticlesOnBlockFace(this.level, pos, new SculkChargeParticleOptions(y), intProvider, direction, supplier, p); } } else { for (Direction direction2 : MultifaceBlock.unpack(b)) { - float ab = direction2 == Direction.UP ? (float) Math.PI : 0.0F; - double q = 0.35; - ParticleUtils.spawnParticlesOnBlockFace(this.level, blockPos, new SculkChargeParticleOptions(ab), intProvider, direction2, supplier, 0.35); + float z = direction2 == Direction.UP ? (float) Math.PI : 0.0F; + double o = 0.35; + ParticleUtils.spawnParticlesOnBlockFace(this.level, pos, new SculkChargeParticleOptions(z), intProvider, direction2, supplier, 0.35); } } } else { - this.level.playLocalSound(blockPos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F, false); - boolean bl = this.level.getBlockState(blockPos).isCollisionShapeFullBlock(this.level, blockPos); - int ac = bl ? 40 : 20; - float z = bl ? 0.45F : 0.25F; - float ad = 0.07F; + this.level.playLocalSound(pos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + boolean bl = this.level.getBlockState(pos).isCollisionShapeFullBlock(this.level, pos); + int aa = bl ? 40 : 20; + float x = bl ? 0.45F : 0.25F; + float ab = 0.07F; - for (int ae = 0; ae < ac; ae++) { - float af = 2.0F * randomSource.nextFloat() - 1.0F; - float ab = 2.0F * randomSource.nextFloat() - 1.0F; - float ag = 2.0F * randomSource.nextFloat() - 1.0F; + for (int ac = 0; ac < aa; ac++) { + float ad = 2.0F * randomSource.nextFloat() - 1.0F; + float z = 2.0F * randomSource.nextFloat() - 1.0F; + float ae = 2.0F * randomSource.nextFloat() - 1.0F; this.level .addParticle( - ParticleTypes.SCULK_CHARGE_POP, - blockPos.getX() + 0.5 + af * z, - blockPos.getY() + 0.5 + ab * z, - blockPos.getZ() + 0.5 + ag * z, - af * 0.07F, - ab * 0.07F, - ag * 0.07F + ParticleTypes.SCULK_CHARGE_POP, pos.getX() + 0.5 + ad * x, pos.getY() + 0.5 + z * x, pos.getZ() + 0.5 + ae * x, ad * 0.07F, z * 0.07F, ae * 0.07F ); } } break; case 3007: - for (int ah = 0; ah < 10; ah++) { - this.level - .addParticle( - new ShriekParticleOption(ah * 5), false, blockPos.getX() + 0.5, blockPos.getY() + SculkShriekerBlock.TOP_Y, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0 - ); + for (int af = 0; af < 10; af++) { + this.level.addParticle(new ShriekParticleOption(af * 5), pos.getX() + 0.5, pos.getY() + SculkShriekerBlock.TOP_Y, pos.getZ() + 0.5, 0.0, 0.0, 0.0); } - BlockState blockState3 = this.level.getBlockState(blockPos); + BlockState blockState3 = this.level.getBlockState(pos); boolean bl2 = blockState3.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean)blockState3.getValue(BlockStateProperties.WATERLOGGED); if (!bl2) { this.level .playLocalSound( - blockPos.getX() + 0.5, - blockPos.getY() + SculkShriekerBlock.TOP_Y, - blockPos.getZ() + 0.5, + pos.getX() + 0.5, + pos.getY() + SculkShriekerBlock.TOP_Y, + pos.getZ() + 0.5, SoundEvents.SCULK_SHRIEKER_SHRIEK, SoundSource.BLOCKS, 2.0F, @@ -537,156 +510,152 @@ public class LevelEventHandler { } break; case 3008: - BlockState blockState2 = Block.stateById(j); + BlockState blockState2 = Block.stateById(data); if (blockState2.getBlock() instanceof BrushableBlock brushableBlock) { - this.level.playLocalSound(blockPos, brushableBlock.getBrushCompletedSound(), SoundSource.PLAYERS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, brushableBlock.getBrushCompletedSound(), SoundSource.PLAYERS, 1.0F, 1.0F, false); } - this.level.addDestroyBlockEffect(blockPos, blockState2); + this.level.addDestroyBlockEffect(pos, blockState2); break; case 3009: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.EGG_CRACK, UniformInt.of(3, 6)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.EGG_CRACK, UniformInt.of(3, 6)); break; case 3011: - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); break; case 3012: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_SPAWN_MOB, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_SPAWN_MOB, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); break; case 3013: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, j, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, data, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER); break; case 3014: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_EJECT_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_EJECT_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addEjectItemParticles(this.level, blockPos, randomSource); + TrialSpawner.addEjectItemParticles(this.level, pos, randomSource); break; case 3015: - if (this.level.getBlockEntity(blockPos) instanceof VaultBlockEntity vaultBlockEntity) { + if (this.level.getBlockEntity(pos) instanceof VaultBlockEntity vaultBlockEntity) { VaultBlockEntity.Client.emitActivationParticles( this.level, vaultBlockEntity.getBlockPos(), vaultBlockEntity.getBlockState(), vaultBlockEntity.getSharedData(), - j == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME + data == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME ); this.level - .playLocalSound(blockPos, SoundEvents.VAULT_ACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); + .playLocalSound(pos, SoundEvents.VAULT_ACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); } break; case 3016: - VaultBlockEntity.Client.emitDeactivationParticles(this.level, blockPos, j == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME); + VaultBlockEntity.Client.emitDeactivationParticles(this.level, pos, data == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME); this.level - .playLocalSound( - blockPos, SoundEvents.VAULT_DEACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true - ); + .playLocalSound(pos, SoundEvents.VAULT_DEACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); break; case 3017: - TrialSpawner.addEjectItemParticles(this.level, blockPos, randomSource); + TrialSpawner.addEjectItemParticles(this.level, pos, randomSource); break; case 3018: - for (int ux = 0; ux < 10; ux++) { + for (int sx = 0; sx < 10; sx++) { + double t = randomSource.nextGaussian() * 0.02; + double u = randomSource.nextGaussian() * 0.02; double v = randomSource.nextGaussian() * 0.02; - double w = randomSource.nextGaussian() * 0.02; - double x = randomSource.nextGaussian() * 0.02; this.level .addParticle( - ParticleTypes.POOF, - blockPos.getX() + randomSource.nextDouble(), - blockPos.getY() + randomSource.nextDouble(), - blockPos.getZ() + randomSource.nextDouble(), - v, - w, - x + ParticleTypes.POOF, pos.getX() + randomSource.nextDouble(), pos.getY() + randomSource.nextDouble(), pos.getZ() + randomSource.nextDouble(), t, u, v ); } this.level - .playLocalSound(blockPos, SoundEvents.COBWEB_PLACE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); + .playLocalSound(pos, SoundEvents.COBWEB_PLACE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); break; case 3019: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, j, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, data, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); break; case 3020: this.level .playLocalSound( - blockPos, + pos, SoundEvents.TRIAL_SPAWNER_OMINOUS_ACTIVATE, SoundSource.BLOCKS, - j == 0 ? 0.3F : 1.0F, + data == 0 ? 0.3F : 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, 0, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); - TrialSpawner.addBecomeOminousParticles(this.level, blockPos, randomSource); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, 0, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); + TrialSpawner.addBecomeOminousParticles(this.level, pos, randomSource); break; case 3021: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_SPAWN_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_SPAWN_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); } } - private void shootParticles(int i, BlockPos blockPos, RandomSource randomSource, SimpleParticleType simpleParticleType) { - Direction direction = Direction.from3DDataValue(i); - int j = direction.getStepX(); - int k = direction.getStepY(); - int l = direction.getStepZ(); + private void shootParticles(int direction, BlockPos pos, RandomSource random, SimpleParticleType particleType) { + Direction direction2 = Direction.from3DDataValue(direction); + int i = direction2.getStepX(); + int j = direction2.getStepY(); + int k = direction2.getStepZ(); - for (int m = 0; m < 10; m++) { - double d = randomSource.nextDouble() * 0.2 + 0.01; - double e = blockPos.getX() + j * 0.6 + 0.5 + j * 0.01 + (randomSource.nextDouble() - 0.5) * l * 0.5; - double f = blockPos.getY() + k * 0.6 + 0.5 + k * 0.01 + (randomSource.nextDouble() - 0.5) * k * 0.5; - double g = blockPos.getZ() + l * 0.6 + 0.5 + l * 0.01 + (randomSource.nextDouble() - 0.5) * j * 0.5; - double h = j * d + randomSource.nextGaussian() * 0.01; - double n = k * d + randomSource.nextGaussian() * 0.01; - double o = l * d + randomSource.nextGaussian() * 0.01; - this.levelRenderer.addParticle(simpleParticleType, e, f, g, h, n, o); + for (int l = 0; l < 10; l++) { + double d = random.nextDouble() * 0.2 + 0.01; + double e = pos.getX() + i * 0.6 + 0.5 + i * 0.01 + (random.nextDouble() - 0.5) * k * 0.5; + double f = pos.getY() + j * 0.6 + 0.5 + j * 0.01 + (random.nextDouble() - 0.5) * j * 0.5; + double g = pos.getZ() + k * 0.6 + 0.5 + k * 0.01 + (random.nextDouble() - 0.5) * i * 0.5; + double h = i * d + random.nextGaussian() * 0.01; + double m = j * d + random.nextGaussian() * 0.01; + double n = k * d + random.nextGaussian() * 0.01; + this.levelRenderer.addParticle(particleType, e, f, g, h, m, n); } } - private void playJukeboxSong(Holder holder, BlockPos blockPos) { - this.stopJukeboxSong(blockPos); - JukeboxSong jukeboxSong = holder.value(); + private void playJukeboxSong(Holder song, BlockPos pos) { + this.stopJukeboxSong(pos); + JukeboxSong jukeboxSong = song.value(); SoundEvent soundEvent = jukeboxSong.soundEvent().value(); - SoundInstance soundInstance = SimpleSoundInstance.forJukeboxSong(soundEvent, Vec3.atCenterOf(blockPos)); - this.playingJukeboxSongs.put(blockPos, soundInstance); + SoundInstance soundInstance = SimpleSoundInstance.forJukeboxSong(soundEvent, Vec3.atCenterOf(pos)); + this.playingJukeboxSongs.put(pos, soundInstance); this.minecraft.getSoundManager().play(soundInstance); this.minecraft.gui.setNowPlaying(jukeboxSong.description()); - this.notifyNearbyEntities(this.level, blockPos, true); + this.notifyNearbyEntities(this.level, pos, true); } - private void stopJukeboxSong(BlockPos blockPos) { - SoundInstance soundInstance = (SoundInstance)this.playingJukeboxSongs.remove(blockPos); + private void stopJukeboxSong(BlockPos pos) { + SoundInstance soundInstance = (SoundInstance)this.playingJukeboxSongs.remove(pos); if (soundInstance != null) { this.minecraft.getSoundManager().stop(soundInstance); } } - private void stopJukeboxSongAndNotifyNearby(BlockPos blockPos) { - this.stopJukeboxSong(blockPos); - this.notifyNearbyEntities(this.level, blockPos, false); + private void stopJukeboxSongAndNotifyNearby(BlockPos pos) { + this.stopJukeboxSong(pos); + this.notifyNearbyEntities(this.level, pos, false); } - private void notifyNearbyEntities(Level level, BlockPos blockPos, boolean bl) { - for (LivingEntity livingEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(blockPos).inflate(3.0))) { - livingEntity.setRecordPlayingNearby(blockPos, bl); + /** + * Notifies living entities in a 3 block range of the specified {@code pos} that a record is or isn't playing nearby, dependent on the specified {@code playing} parameter. + * This is used to make parrots start or stop partying. + */ + private void notifyNearbyEntities(Level level, BlockPos pos, boolean playing) { + for (LivingEntity livingEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(pos).inflate(3.0))) { + livingEntity.setRecordPlayingNearby(pos, playing); } } } diff --git a/net/minecraft/client/renderer/LevelRenderer.java b/net/minecraft/client/renderer/LevelRenderer.java index 98101c0d..77889806 100644 --- a/net/minecraft/client/renderer/LevelRenderer.java +++ b/net/minecraft/client/renderer/LevelRenderer.java @@ -2,21 +2,22 @@ package net.minecraft.client.renderer; import com.google.common.collect.Lists; import com.google.common.collect.Sets; +import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.framegraph.FrameGraphBuilder; import com.mojang.blaze3d.framegraph.FramePass; +import com.mojang.blaze3d.framegraph.FrameGraphBuilder.Inspector; +import com.mojang.blaze3d.pipeline.RenderPipeline; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.pipeline.TextureTarget; -import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.Lighting; import com.mojang.blaze3d.resource.GraphicsResourceAllocator; import com.mojang.blaze3d.resource.RenderTargetDescriptor; import com.mojang.blaze3d.resource.ResourceHandle; -import com.mojang.blaze3d.shaders.Uniform; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.SheetedDecalTextureGenerator; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexBuffer; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.blaze3d.vertex.VertexMultiConsumer; @@ -34,6 +35,8 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Locale; +import java.util.OptionalDouble; +import java.util.OptionalInt; import java.util.Set; import java.util.SortedSet; import java.util.function.Supplier; @@ -53,6 +56,9 @@ import net.minecraft.client.PrioritizeChunkUpdates; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.DimensionSpecialEffects.SkyType; +import net.minecraft.client.renderer.FogRenderer.FogMode; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.client.renderer.chunk.RenderRegionCache; import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; @@ -71,6 +77,7 @@ import net.minecraft.server.level.ParticleStatus; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.ResourceManagerReloadListener; import net.minecraft.util.ARGB; +import net.minecraft.util.Brightness; import net.minecraft.util.Mth; import net.minecraft.util.VisibleForDebug; import net.minecraft.util.profiling.Profiler; @@ -86,7 +93,6 @@ import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.lighting.LevelLightEngine; import net.minecraft.world.level.material.FogType; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; @@ -186,8 +192,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.entityOutlineTarget.destroyBuffers(); } - this.entityOutlineTarget = new TextureTarget(this.minecraft.getWindow().getWidth(), this.minecraft.getWindow().getHeight(), true); - this.entityOutlineTarget.setClearColor(0.0F, 0.0F, 0.0F, 0.0F); + this.entityOutlineTarget = new TextureTarget("Entity Outline", this.minecraft.getWindow().getWidth(), this.minecraft.getWindow().getHeight(), true); } @Nullable @@ -207,13 +212,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab public void doEntityOutline() { if (this.shouldShowEntityOutlines()) { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE - ); - this.entityOutlineTarget.blitAndBlendToScreen(this.minecraft.getWindow().getWidth(), this.minecraft.getWindow().getHeight()); - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); + this.entityOutlineTarget.blitAndBlendToTexture(this.minecraft.getMainRenderTarget().getColorTexture()); } } @@ -283,10 +282,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.viewArea = new ViewArea(this.sectionRenderDispatcher, this.level, this.minecraft.options.getEffectiveRenderDistance(), this); this.sectionOcclusionGraph.waitAndReset(this.viewArea); this.clearVisibleSections(); - Entity entity = this.minecraft.getCameraEntity(); - if (entity != null) { - this.viewArea.repositionCamera(SectionPos.of(entity)); - } + Camera camera = this.minecraft.gameRenderer.getMainCamera(); + this.viewArea.repositionCamera(SectionPos.of(camera.getPosition())); } } @@ -358,6 +355,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.lastCameraSectionY = j; this.lastCameraSectionZ = k; this.viewArea.repositionCamera(SectionPos.of(vec3)); + this.worldBorderRenderer.invalidate(); } this.sectionRenderDispatcher.setCamera(vec3); @@ -421,12 +419,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab public void renderLevel( GraphicsResourceAllocator graphicsResourceAllocator, DeltaTracker deltaTracker, - boolean bl, + boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, - LightTexture lightTexture, - Matrix4f matrix4f, - Matrix4f matrix4f2 + Matrix4f frustumMatrix, + Matrix4f projectionMatrix ) { float f = deltaTracker.getGameTimeDeltaPartialTick(false); RenderSystem.setShaderGameTime(this.level.getGameTime(), f); @@ -442,38 +439,38 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab double e = vec3.y(); double g = vec3.z(); profilerFiller.popPush("culling"); - boolean bl2 = this.capturedFrustum != null; - Frustum frustum = bl2 ? this.capturedFrustum : this.cullingFrustum; + boolean bl = this.capturedFrustum != null; + Frustum frustum = bl ? this.capturedFrustum : this.cullingFrustum; Profiler.get().popPush("captureFrustum"); if (this.captureFrustum) { - this.capturedFrustum = bl2 ? new Frustum(matrix4f, matrix4f2) : frustum; + this.capturedFrustum = bl ? new Frustum(frustumMatrix, projectionMatrix) : frustum; this.capturedFrustum.prepare(d, e, g); this.captureFrustum = false; } profilerFiller.popPush("fog"); float h = gameRenderer.getRenderDistance(); - boolean bl3 = this.minecraft.level.effects().isFoggyAt(Mth.floor(d), Mth.floor(e)) || this.minecraft.gui.getBossOverlay().shouldCreateWorldFog(); + boolean bl2 = this.minecraft.level.effects().isFoggyAt(Mth.floor(d), Mth.floor(e)) || this.minecraft.gui.getBossOverlay().shouldCreateWorldFog(); Vector4f vector4f = FogRenderer.computeFogColor( camera, f, this.minecraft.level, this.minecraft.options.getEffectiveRenderDistance(), gameRenderer.getDarkenWorldAmount(f) ); - FogParameters fogParameters = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_TERRAIN, vector4f, h, bl3, f); - FogParameters fogParameters2 = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_SKY, vector4f, h, bl3, f); + FogParameters fogParameters = FogRenderer.setupFog(camera, FogMode.FOG_TERRAIN, vector4f, h, bl2, f); + FogParameters fogParameters2 = FogRenderer.setupFog(camera, FogMode.FOG_SKY, vector4f, h, bl2, f); profilerFiller.popPush("cullEntities"); - boolean bl4 = this.collectVisibleEntities(camera, frustum, this.visibleEntities); + boolean bl3 = this.collectVisibleEntities(camera, frustum, this.visibleEntities); this.visibleEntityCount = this.visibleEntities.size(); profilerFiller.popPush("terrain_setup"); - this.setupRender(camera, frustum, bl2, this.minecraft.player.isSpectator()); + this.setupRender(camera, frustum, bl, this.minecraft.player.isSpectator()); profilerFiller.popPush("compile_sections"); this.compileSections(camera); Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); - matrix4fStack.mul(matrix4f); + matrix4fStack.mul(frustumMatrix); FrameGraphBuilder frameGraphBuilder = new FrameGraphBuilder(); this.targets.main = frameGraphBuilder.importExternal("main", this.minecraft.getMainRenderTarget()); int i = this.minecraft.getMainRenderTarget().width; int j = this.minecraft.getMainRenderTarget().height; - RenderTargetDescriptor renderTargetDescriptor = new RenderTargetDescriptor(i, j, true); + RenderTargetDescriptor renderTargetDescriptor = new RenderTargetDescriptor(i, j, true, 0); PostChain postChain = this.getTransparencyChain(); if (postChain != null) { this.targets.translucent = frameGraphBuilder.createInternal("translucent", renderTargetDescriptor); @@ -489,55 +486,58 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab FramePass framePass = frameGraphBuilder.addPass("clear"); this.targets.main = framePass.readsAndWrites(this.targets.main); - framePass.executes(() -> { - RenderSystem.clearColor(vector4f.x, vector4f.y, vector4f.z, 0.0F); - RenderSystem.clear(16640); - }); - if (!bl3) { + framePass.executes( + () -> { + RenderTarget renderTarget = this.minecraft.getMainRenderTarget(); + RenderSystem.getDevice() + .createCommandEncoder() + .clearColorAndDepthTextures( + renderTarget.getColorTexture(), ARGB.colorFromFloat(0.0F, vector4f.x, vector4f.y, vector4f.z), renderTarget.getDepthTexture(), 1.0 + ); + } + ); + if (!bl2) { this.addSkyPass(frameGraphBuilder, camera, f, fogParameters2); } - this.addMainPass(frameGraphBuilder, frustum, camera, matrix4f, matrix4f2, fogParameters, bl, bl4, deltaTracker, profilerFiller); + this.addMainPass(frameGraphBuilder, frustum, camera, frustumMatrix, projectionMatrix, fogParameters, renderBlockOutline, bl3, deltaTracker, profilerFiller); PostChain postChain2 = this.minecraft.getShaderManager().getPostChain(ENTITY_OUTLINE_POST_CHAIN_ID, LevelTargetBundle.OUTLINE_TARGETS); - if (bl4 && postChain2 != null) { - postChain2.addToFrame(frameGraphBuilder, i, j, this.targets); + if (bl3 && postChain2 != null) { + postChain2.addToFrame(frameGraphBuilder, i, j, this.targets, null); } - this.addParticlesPass(frameGraphBuilder, camera, lightTexture, f, fogParameters); + this.addParticlesPass(frameGraphBuilder, camera, f, fogParameters); CloudStatus cloudStatus = this.minecraft.options.getCloudsType(); if (cloudStatus != CloudStatus.OFF) { float k = this.level.effects().getCloudHeight(); if (!Float.isNaN(k)) { float l = this.ticks + f; int m = this.level.getCloudColor(f); - this.addCloudsPass(frameGraphBuilder, matrix4f, matrix4f2, cloudStatus, camera.getPosition(), l, m, k + 0.33F); + this.addCloudsPass(frameGraphBuilder, cloudStatus, camera.getPosition(), l, m, k + 0.33F); } } - this.addWeatherPass(frameGraphBuilder, lightTexture, camera.getPosition(), f, fogParameters); + this.addWeatherPass(frameGraphBuilder, camera.getPosition(), f, fogParameters); if (postChain != null) { - postChain.addToFrame(frameGraphBuilder, i, j, this.targets); + postChain.addToFrame(frameGraphBuilder, i, j, this.targets, null); } this.addLateDebugPass(frameGraphBuilder, vec3, fogParameters); profilerFiller.popPush("framegraph"); - frameGraphBuilder.execute(graphicsResourceAllocator, new FrameGraphBuilder.Inspector() { + frameGraphBuilder.execute(graphicsResourceAllocator, new Inspector() { @Override - public void beforeExecutePass(String string) { - profilerFiller.push(string); + public void beforeExecutePass(String name) { + profilerFiller.push(name); } @Override - public void afterExecutePass(String string) { + public void afterExecutePass(String name) { profilerFiller.pop(); } }); - this.minecraft.getMainRenderTarget().bindWrite(false); this.visibleEntities.clear(); this.targets.clear(); matrix4fStack.popMatrix(); - RenderSystem.depthMask(true); - RenderSystem.disableBlend(); RenderSystem.setShaderFog(FogParameters.NO_FOG); } @@ -545,13 +545,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab FrameGraphBuilder frameGraphBuilder, Frustum frustum, Camera camera, - Matrix4f matrix4f, - Matrix4f matrix4f2, + Matrix4f frustumMatrix, + Matrix4f projectionMatrix, FogParameters fogParameters, - boolean bl, - boolean bl2, + boolean renderBlockOutline, + boolean renderEntityOutline, DeltaTracker deltaTracker, - ProfilerFiller profilerFiller + ProfilerFiller profiler ) { FramePass framePass = frameGraphBuilder.addPass("main"); this.targets.main = framePass.readsAndWrites(this.targets.main); @@ -567,15 +567,14 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.targets.weather = framePass.readsAndWrites(this.targets.weather); } - if (bl2 && this.targets.entityOutline != null) { + if (renderEntityOutline && this.targets.entityOutline != null) { this.targets.entityOutline = framePass.readsAndWrites(this.targets.entityOutline); } ResourceHandle resourceHandle = this.targets.main; ResourceHandle resourceHandle2 = this.targets.translucent; ResourceHandle resourceHandle3 = this.targets.itemEntity; - ResourceHandle resourceHandle4 = this.targets.weather; - ResourceHandle resourceHandle5 = this.targets.entityOutline; + ResourceHandle resourceHandle4 = this.targets.entityOutline; framePass.executes(() -> { RenderSystem.setShaderFog(fogParameters); float f = deltaTracker.getGameTimeDeltaPartialTick(false); @@ -583,10 +582,10 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab double d = vec3.x(); double e = vec3.y(); double g = vec3.z(); - profilerFiller.push("terrain"); - this.renderSectionLayer(RenderType.solid(), d, e, g, matrix4f, matrix4f2); - this.renderSectionLayer(RenderType.cutoutMipped(), d, e, g, matrix4f, matrix4f2); - this.renderSectionLayer(RenderType.cutout(), d, e, g, matrix4f, matrix4f2); + profiler.push("terrain"); + this.renderSectionLayer(RenderType.solid(), d, e, g, frustumMatrix, projectionMatrix); + this.renderSectionLayer(RenderType.cutoutMipped(), d, e, g, frustumMatrix, projectionMatrix); + this.renderSectionLayer(RenderType.cutout(), d, e, g, frustumMatrix, projectionMatrix); if (this.level.effects().constantAmbientLight()) { Lighting.setupNetherLevel(); } else { @@ -594,31 +593,22 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } if (resourceHandle3 != null) { - resourceHandle3.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle3.get().clear(); resourceHandle3.get().copyDepthFrom(this.minecraft.getMainRenderTarget()); - resourceHandle.get().bindWrite(false); } - if (resourceHandle4 != null) { - resourceHandle4.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle4.get().clear(); - } - - if (this.shouldShowEntityOutlines() && resourceHandle5 != null) { - resourceHandle5.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle5.get().clear(); - resourceHandle.get().bindWrite(false); + if (this.shouldShowEntityOutlines() && resourceHandle4 != null) { + RenderTarget renderTarget = resourceHandle4.get(); + RenderSystem.getDevice().createCommandEncoder().clearColorAndDepthTextures(renderTarget.getColorTexture(), 0, renderTarget.getDepthTexture(), 1.0); } PoseStack poseStack = new PoseStack(); - MultiBufferSource.BufferSource bufferSource = this.renderBuffers.bufferSource(); - MultiBufferSource.BufferSource bufferSource2 = this.renderBuffers.crumblingBufferSource(); - profilerFiller.popPush("entities"); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + BufferSource bufferSource2 = this.renderBuffers.crumblingBufferSource(); + profiler.popPush("entities"); this.renderEntities(poseStack, bufferSource, camera, deltaTracker, this.visibleEntities); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); - profilerFiller.popPush("blockentities"); + profiler.popPush("blockentities"); this.renderBlockEntities(poseStack, bufferSource, bufferSource2, camera, f); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); @@ -633,11 +623,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab bufferSource.endBatch(Sheets.hangingSignSheet()); bufferSource.endBatch(Sheets.chestSheet()); this.renderBuffers.outlineBufferSource().endOutlineBatch(); - if (bl) { + if (renderBlockOutline) { this.renderBlockOutline(camera, bufferSource, poseStack, false); } - profilerFiller.popPush("debug"); + profiler.popPush("debug"); this.minecraft.debugRenderer.render(poseStack, frustum, bufferSource, d, e, g); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); @@ -648,32 +638,30 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab bufferSource.endBatch(RenderType.glint()); bufferSource.endBatch(RenderType.glintTranslucent()); bufferSource.endBatch(RenderType.entityGlint()); - profilerFiller.popPush("destroyProgress"); + profiler.popPush("destroyProgress"); this.renderBlockDestroyAnimation(poseStack, camera, bufferSource2); bufferSource2.endBatch(); this.checkPoseStack(poseStack); bufferSource.endBatch(RenderType.waterMask()); bufferSource.endBatch(); if (resourceHandle2 != null) { - resourceHandle2.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle2.get().clear(); resourceHandle2.get().copyDepthFrom(resourceHandle.get()); } - profilerFiller.popPush("translucent"); - this.renderSectionLayer(RenderType.translucent(), d, e, g, matrix4f, matrix4f2); - profilerFiller.popPush("string"); - this.renderSectionLayer(RenderType.tripwire(), d, e, g, matrix4f, matrix4f2); - if (bl) { + profiler.popPush("translucent"); + this.renderSectionLayer(RenderType.translucent(), d, e, g, frustumMatrix, projectionMatrix); + profiler.popPush("string"); + this.renderSectionLayer(RenderType.tripwire(), d, e, g, frustumMatrix, projectionMatrix); + if (renderBlockOutline) { this.renderBlockOutline(camera, bufferSource, poseStack, true); } bufferSource.endBatch(); - profilerFiller.pop(); + profiler.pop(); }); } - private void addParticlesPass(FrameGraphBuilder frameGraphBuilder, Camera camera, LightTexture lightTexture, float f, FogParameters fogParameters) { + private void addParticlesPass(FrameGraphBuilder frameGraphBuilder, Camera camera, float partialTick, FogParameters fog) { FramePass framePass = frameGraphBuilder.addPass("particles"); if (this.targets.particles != null) { this.targets.particles = framePass.readsAndWrites(this.targets.particles); @@ -685,22 +673,16 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab ResourceHandle resourceHandle = this.targets.main; ResourceHandle resourceHandle2 = this.targets.particles; framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); if (resourceHandle2 != null) { - resourceHandle2.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle2.get().clear(); resourceHandle2.get().copyDepthFrom(resourceHandle.get()); } - RenderStateShard.PARTICLES_TARGET.setupRenderState(); - this.minecraft.particleEngine.render(lightTexture, camera, f); - RenderStateShard.PARTICLES_TARGET.clearRenderState(); + this.minecraft.particleEngine.render(camera, partialTick, this.renderBuffers.bufferSource()); }); } - private void addCloudsPass( - FrameGraphBuilder frameGraphBuilder, Matrix4f matrix4f, Matrix4f matrix4f2, CloudStatus cloudStatus, Vec3 vec3, float f, int i, float g - ) { + private void addCloudsPass(FrameGraphBuilder frameGraphBuilder, CloudStatus cloudStatus, Vec3 cameraPosition, float ticks, int cloudColor, float cloudHeight) { FramePass framePass = frameGraphBuilder.addPass("clouds"); if (this.targets.clouds != null) { this.targets.clouds = framePass.readsAndWrites(this.targets.clouds); @@ -708,20 +690,12 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.targets.main = framePass.readsAndWrites(this.targets.main); } - ResourceHandle resourceHandle = this.targets.clouds; - framePass.executes(() -> { - if (resourceHandle != null) { - resourceHandle.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - resourceHandle.get().clear(); - } - - this.cloudRenderer.render(i, cloudStatus, g, matrix4f, matrix4f2, vec3, f); - }); + framePass.executes(() -> this.cloudRenderer.render(cloudColor, cloudStatus, cloudHeight, cameraPosition, ticks)); } - private void addWeatherPass(FrameGraphBuilder frameGraphBuilder, LightTexture lightTexture, Vec3 vec3, float f, FogParameters fogParameters) { + private void addWeatherPass(FrameGraphBuilder frameGraphBuilder, Vec3 cameraPosition, float partialTick, FogParameters fog) { int i = this.minecraft.options.getEffectiveRenderDistance() * 16; - float g = this.minecraft.gameRenderer.getDepthFar(); + float f = this.minecraft.gameRenderer.getDepthFar(); FramePass framePass = frameGraphBuilder.addPass("weather"); if (this.targets.weather != null) { this.targets.weather = framePass.readsAndWrites(this.targets.weather); @@ -730,15 +704,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); - RenderStateShard.WEATHER_TARGET.setupRenderState(); - this.weatherEffectRenderer.render(this.minecraft.level, lightTexture, this.ticks, f, vec3); - this.worldBorderRenderer.render(this.level.getWorldBorder(), vec3, i, g); - RenderStateShard.WEATHER_TARGET.clearRenderState(); + RenderSystem.setShaderFog(fog); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + this.weatherEffectRenderer.render(this.minecraft.level, bufferSource, this.ticks, partialTick, cameraPosition); + this.worldBorderRenderer.render(this.level.getWorldBorder(), cameraPosition, i, f); + bufferSource.endBatch(); }); } - private void addLateDebugPass(FrameGraphBuilder frameGraphBuilder, Vec3 vec3, FogParameters fogParameters) { + private void addLateDebugPass(FrameGraphBuilder frameGraphBuilder, Vec3 cameraPosition, FogParameters fog) { FramePass framePass = frameGraphBuilder.addPass("late_debug"); this.targets.main = framePass.readsAndWrites(this.targets.main); if (this.targets.itemEntity != null) { @@ -747,17 +721,16 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab ResourceHandle resourceHandle = this.targets.main; framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); - resourceHandle.get().bindWrite(false); + RenderSystem.setShaderFog(fog); PoseStack poseStack = new PoseStack(); - MultiBufferSource.BufferSource bufferSource = this.renderBuffers.bufferSource(); - this.minecraft.debugRenderer.renderAfterTranslucents(poseStack, bufferSource, vec3.x, vec3.y, vec3.z); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + this.minecraft.debugRenderer.renderAfterTranslucents(poseStack, bufferSource, cameraPosition.x, cameraPosition.y, cameraPosition.z); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); }); } - private boolean collectVisibleEntities(Camera camera, Frustum frustum, List list) { + private boolean collectVisibleEntities(Camera camera, Frustum frustum, List output) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -772,7 +745,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab if ((this.level.isOutsideBuildHeight(blockPos.getY()) || this.isSectionCompiled(blockPos)) && (entity != camera.getEntity() || camera.isDetached() || camera.getEntity() instanceof LivingEntity && ((LivingEntity)camera.getEntity()).isSleeping()) && (!(entity instanceof LocalPlayer) || camera.getEntity() == entity)) { - list.add(entity); + output.add(entity); if (bl2 && this.minecraft.shouldEntityAppearGlowing(entity)) { bl = true; } @@ -783,7 +756,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab return bl; } - private void renderEntities(PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, Camera camera, DeltaTracker deltaTracker, List list) { + private void renderEntities(PoseStack poseStack, BufferSource bufferSource, Camera camera, DeltaTracker deltaTracker, List entities) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -791,7 +764,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab TickRateManager tickRateManager = this.minecraft.level.tickRateManager(); boolean bl = this.shouldShowEntityOutlines(); - for (Entity entity : list) { + for (Entity entity : entities) { if (entity.tickCount == 0) { entity.xOld = entity.getX(); entity.yOld = entity.getY(); @@ -813,13 +786,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void renderBlockEntities( - PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, MultiBufferSource.BufferSource bufferSource2, Camera camera, float f - ) { + private void renderBlockEntities(PoseStack poseStack, BufferSource bufferSource, BufferSource crumblingBufferSource, Camera camera, float partialTick) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); - double g = vec3.z(); + double f = vec3.z(); for (SectionRenderDispatcher.RenderSection renderSection : this.visibleSections) { List list = renderSection.getCompiled().getRenderableBlockEntities(); @@ -828,13 +799,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab BlockPos blockPos = blockEntity.getBlockPos(); MultiBufferSource multiBufferSource = bufferSource; poseStack.pushPose(); - poseStack.translate(blockPos.getX() - d, blockPos.getY() - e, blockPos.getZ() - g); + poseStack.translate(blockPos.getX() - d, blockPos.getY() - e, blockPos.getZ() - f); SortedSet sortedSet = this.destructionProgress.get(blockPos.asLong()); if (sortedSet != null && !sortedSet.isEmpty()) { int i = ((BlockDestructionProgress)sortedSet.last()).getProgress(); if (i >= 0) { PoseStack.Pose pose = poseStack.last(); - VertexConsumer vertexConsumer = new SheetedDecalTextureGenerator(bufferSource2.getBuffer((RenderType)ModelBakery.DESTROY_TYPES.get(i)), pose, 1.0F); + VertexConsumer vertexConsumer = new SheetedDecalTextureGenerator( + crumblingBufferSource.getBuffer((RenderType)ModelBakery.DESTROY_TYPES.get(i)), pose, 1.0F + ); multiBufferSource = renderType -> { VertexConsumer vertexConsumer2 = bufferSource.getBuffer(renderType); return renderType.affectsCrumbling() ? VertexMultiConsumer.create(vertexConsumer, vertexConsumer2) : vertexConsumer2; @@ -842,7 +815,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - this.blockEntityRenderDispatcher.render(blockEntity, f, poseStack, multiBufferSource); + this.blockEntityRenderDispatcher.render(blockEntity, partialTick, poseStack, multiBufferSource); poseStack.popPose(); } } @@ -852,14 +825,14 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab for (BlockEntity blockEntity2 : this.globalBlockEntities) { BlockPos blockPos2 = blockEntity2.getBlockPos(); poseStack.pushPose(); - poseStack.translate(blockPos2.getX() - d, blockPos2.getY() - e, blockPos2.getZ() - g); - this.blockEntityRenderDispatcher.render(blockEntity2, f, poseStack, bufferSource); + poseStack.translate(blockPos2.getX() - d, blockPos2.getY() - e, blockPos2.getZ() - f); + this.blockEntityRenderDispatcher.render(blockEntity2, partialTick, poseStack, bufferSource); poseStack.popPose(); } } } - private void renderBlockDestroyAnimation(PoseStack poseStack, Camera camera, MultiBufferSource.BufferSource bufferSource) { + private void renderBlockDestroyAnimation(PoseStack poseStack, Camera camera, BufferSource bufferSource) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -882,14 +855,14 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void renderBlockOutline(Camera camera, MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, boolean bl) { + private void renderBlockOutline(Camera camera, BufferSource bufferSource, PoseStack poseStack, boolean sort) { if (this.minecraft.hitResult instanceof BlockHitResult blockHitResult) { if (blockHitResult.getType() != Type.MISS) { BlockPos blockPos = blockHitResult.getBlockPos(); BlockState blockState = this.level.getBlockState(blockPos); if (!blockState.isAir() && this.level.getWorldBorder().isWithinBounds(blockPos)) { - boolean bl2 = ItemBlockRenderTypes.getChunkRenderType(blockState).sortOnUpload(); - if (bl2 != bl) { + boolean bl = ItemBlockRenderTypes.getChunkRenderType(blockState).sortOnUpload(); + if (bl != sort) { return; } @@ -914,7 +887,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab * @throws java.lang.IllegalStateException if the specified {@code poseStack} is not clear */ private void checkPoseStack(PoseStack poseStack) { - if (!poseStack.clear()) { + if (!poseStack.isEmpty()) { throw new IllegalStateException("Pose stack not empty"); } } @@ -927,15 +900,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab .render(entity, d - camX, e - camY, f - camZ, partialTick, poseStack, bufferSource, this.entityRenderDispatcher.getPackedLightCoords(entity, partialTick)); } - private void scheduleTranslucentSectionResort(Vec3 vec3) { + private void scheduleTranslucentSectionResort(Vec3 cameraPosition) { if (!this.visibleSections.isEmpty()) { - BlockPos blockPos = BlockPos.containing(vec3); + BlockPos blockPos = BlockPos.containing(cameraPosition); boolean bl = !blockPos.equals(this.lastTranslucentSortBlockPos); Profiler.get().push("translucent_sort"); SectionRenderDispatcher.TranslucencyPointOfView translucencyPointOfView = new SectionRenderDispatcher.TranslucencyPointOfView(); for (SectionRenderDispatcher.RenderSection renderSection : this.nearbyVisibleSections) { - this.scheduleResort(renderSection, translucencyPointOfView, vec3, bl, true); + this.scheduleResort(renderSection, translucencyPointOfView, cameraPosition, bl, true); } this.translucencyResortIterationIndex = this.translucencyResortIterationIndex % this.visibleSections.size(); @@ -943,7 +916,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab while (i-- > 0) { int j = this.translucencyResortIterationIndex++ % this.visibleSections.size(); - this.scheduleResort(this.visibleSections.get(j), translucencyPointOfView, vec3, bl, false); + this.scheduleResort(this.visibleSections.get(j), translucencyPointOfView, cameraPosition, bl, false); } this.lastTranslucentSortBlockPos = blockPos; @@ -951,18 +924,21 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } + /** + * @param force If {@code true}, will schedule a resort even if the point of view hasn't changed + */ private void scheduleResort( - SectionRenderDispatcher.RenderSection renderSection, - SectionRenderDispatcher.TranslucencyPointOfView translucencyPointOfView, - Vec3 vec3, - boolean bl, - boolean bl2 + SectionRenderDispatcher.RenderSection section, + SectionRenderDispatcher.TranslucencyPointOfView pointOfView, + Vec3 cameraPosition, + boolean force, + boolean ignoreAxisAlignment ) { - translucencyPointOfView.set(vec3, renderSection.getSectionNode()); - boolean bl3 = !translucencyPointOfView.equals(renderSection.pointOfView.get()); - boolean bl4 = bl && (translucencyPointOfView.isAxisAligned() || bl2); - if ((bl4 || bl3) && !renderSection.transparencyResortingScheduled() && renderSection.hasTranslucentGeometry()) { - renderSection.resortTransparency(this.sectionRenderDispatcher); + pointOfView.set(cameraPosition, section.getSectionNode()); + boolean bl = !pointOfView.equals(section.pointOfView.get()); + boolean bl2 = force && (pointOfView.isAxisAligned() || ignoreAxisAlignment); + if ((bl2 || bl) && !section.transparencyResortingScheduled() && section.hasTranslucentGeometry()) { + section.resortTransparency(this.sectionRenderDispatcher); } } @@ -973,39 +949,66 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab boolean bl = renderType != RenderType.translucent(); ObjectListIterator objectListIterator = this.visibleSections.listIterator(bl ? 0 : this.visibleSections.size()); renderType.setupRenderState(); - CompiledShaderProgram compiledShaderProgram = RenderSystem.getShader(); - if (compiledShaderProgram == null) { - renderType.clearRenderState(); - zone.close(); - } else { - compiledShaderProgram.setDefaultUniforms(VertexFormat.Mode.QUADS, frustrumMatrix, projectionMatrix, this.minecraft.getWindow()); - compiledShaderProgram.apply(); - Uniform uniform = compiledShaderProgram.MODEL_OFFSET; + RenderPipeline renderPipeline = renderType.getRenderPipeline(); + ArrayList arrayList = new ArrayList(); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(renderType.mode()); + int i = 0; - while (bl ? objectListIterator.hasNext() : objectListIterator.hasPrevious()) { - SectionRenderDispatcher.RenderSection renderSection = bl ? (SectionRenderDispatcher.RenderSection)objectListIterator.next() : objectListIterator.previous(); - if (!renderSection.getCompiled().isEmpty(renderType)) { - VertexBuffer vertexBuffer = renderSection.getBuffer(renderType); - BlockPos blockPos = renderSection.getOrigin(); - if (uniform != null) { - uniform.set((float)(blockPos.getX() - x), (float)(blockPos.getY() - y), (float)(blockPos.getZ() - z)); - uniform.upload(); + while (bl ? objectListIterator.hasNext() : objectListIterator.hasPrevious()) { + SectionRenderDispatcher.RenderSection renderSection = bl ? (SectionRenderDispatcher.RenderSection)objectListIterator.next() : objectListIterator.previous(); + SectionRenderDispatcher.SectionBuffers sectionBuffers = renderSection.getBuffers(renderType); + if (!renderSection.getCompiled().isEmpty(renderType) && sectionBuffers != null) { + GpuBuffer gpuBuffer; + VertexFormat.IndexType indexType; + if (sectionBuffers.getIndexBuffer() == null) { + if (sectionBuffers.getIndexCount() > i) { + i = sectionBuffers.getIndexCount(); } - vertexBuffer.bind(); - vertexBuffer.draw(); + gpuBuffer = null; + indexType = null; + } else { + gpuBuffer = sectionBuffers.getIndexBuffer(); + indexType = sectionBuffers.getIndexType(); + } + + BlockPos blockPos = renderSection.getRenderOrigin(); + arrayList.add( + new RenderPass.Draw( + 0, + sectionBuffers.getVertexBuffer(), + gpuBuffer, + indexType, + 0, + sectionBuffers.getIndexCount(), + uniformUploader -> uniformUploader.upload("ModelOffset", (float)(blockPos.getX() - x), (float)(blockPos.getY() - y), (float)(blockPos.getZ() - z)) + ) + ); + } + } + + GpuBuffer gpuBuffer2 = i == 0 ? null : autoStorageIndexBuffer.getBuffer(i); + VertexFormat.IndexType indexType2 = i == 0 ? null : autoStorageIndexBuffer.type(); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass( + renderType.getRenderTarget().getColorTexture(), OptionalInt.empty(), renderType.getRenderTarget().getDepthTexture(), OptionalDouble.empty() + )) { + renderPass.setPipeline(renderPipeline); + + for (int j = 0; j < 12; j++) { + GpuTexture gpuTexture = RenderSystem.getShaderTexture(j); + if (gpuTexture != null) { + renderPass.bindSampler("Sampler" + j, gpuTexture); } } - if (uniform != null) { - uniform.set(0.0F, 0.0F, 0.0F); - } - - compiledShaderProgram.clear(); - VertexBuffer.unbind(); - zone.close(); - renderType.clearRenderState(); + renderPass.drawMultipleIndexed(arrayList, gpuBuffer2, indexType2); } + + zone.close(); + renderType.clearRenderState(); } public void captureFrustum() { @@ -1044,40 +1047,40 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void addSkyPass(FrameGraphBuilder frameGraphBuilder, Camera camera, float f, FogParameters fogParameters) { + private void addSkyPass(FrameGraphBuilder frameGraphBuilder, Camera camera, float partialTick, FogParameters fog) { FogType fogType = camera.getFluidInCamera(); if (fogType != FogType.POWDER_SNOW && fogType != FogType.LAVA && !this.doesMobEffectBlockSky(camera)) { DimensionSpecialEffects dimensionSpecialEffects = this.level.effects(); - DimensionSpecialEffects.SkyType skyType = dimensionSpecialEffects.skyType(); - if (skyType != DimensionSpecialEffects.SkyType.NONE) { + SkyType skyType = dimensionSpecialEffects.skyType(); + if (skyType != SkyType.NONE) { FramePass framePass = frameGraphBuilder.addPass("sky"); this.targets.main = framePass.readsAndWrites(this.targets.main); framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); - RenderStateShard.MAIN_TARGET.setupRenderState(); - PoseStack poseStack = new PoseStack(); - if (skyType == DimensionSpecialEffects.SkyType.END) { - this.skyRenderer.renderEndSky(poseStack); + RenderSystem.setShaderFog(fog); + if (skyType == SkyType.END) { + this.skyRenderer.renderEndSky(); } else { - Tesselator tesselator = Tesselator.getInstance(); - float g = this.level.getSunAngle(f); - float h = this.level.getTimeOfDay(f); - float i = 1.0F - this.level.getRainLevel(f); - float j = this.level.getStarBrightness(f) * i; + PoseStack poseStack = new PoseStack(); + float g = this.level.getSunAngle(partialTick); + float h = this.level.getTimeOfDay(partialTick); + float i = 1.0F - this.level.getRainLevel(partialTick); + float j = this.level.getStarBrightness(partialTick) * i; int k = dimensionSpecialEffects.getSunriseOrSunsetColor(h); int l = this.level.getMoonPhase(); - int m = this.level.getSkyColor(this.minecraft.gameRenderer.getMainCamera().getPosition(), f); - float n = ARGB.from8BitChannel(ARGB.red(m)); - float o = ARGB.from8BitChannel(ARGB.green(m)); - float p = ARGB.from8BitChannel(ARGB.blue(m)); + int m = this.level.getSkyColor(this.minecraft.gameRenderer.getMainCamera().getPosition(), partialTick); + float n = ARGB.redFloat(m); + float o = ARGB.greenFloat(m); + float p = ARGB.blueFloat(m); this.skyRenderer.renderSkyDisc(n, o, p); + BufferSource bufferSource = this.renderBuffers.bufferSource(); if (dimensionSpecialEffects.isSunriseOrSunset(h)) { - this.skyRenderer.renderSunriseAndSunset(poseStack, tesselator, g, k); + this.skyRenderer.renderSunriseAndSunset(poseStack, bufferSource, g, k); } - this.skyRenderer.renderSunMoonAndStars(poseStack, tesselator, h, l, i, j, fogParameters); - if (this.shouldRenderDarkDisc(f)) { - this.skyRenderer.renderDarkDisc(poseStack); + this.skyRenderer.renderSunMoonAndStars(poseStack, bufferSource, h, l, i, j, fog); + bufferSource.endBatch(); + if (this.shouldRenderDarkDisc(partialTick)) { + this.skyRenderer.renderDarkDisc(); } } }); @@ -1085,8 +1088,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private boolean shouldRenderDarkDisc(float f) { - return this.minecraft.player.getEyePosition(f).y - this.level.getLevelData().getHorizonHeight(this.level) < 0.0; + private boolean shouldRenderDarkDisc(float partialTick) { + return this.minecraft.player.getEyePosition(partialTick).y - this.level.getLevelData().getHorizonHeight(this.level) < 0.0; } private boolean doesMobEffectBlockSky(Camera camera) { @@ -1098,17 +1101,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab private void compileSections(Camera camera) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("populate_sections_to_compile"); - LevelLightEngine levelLightEngine = this.level.getLightEngine(); RenderRegionCache renderRegionCache = new RenderRegionCache(); BlockPos blockPos = camera.getBlockPosition(); List list = Lists.newArrayList(); for (SectionRenderDispatcher.RenderSection renderSection : this.visibleSections) { - long l = renderSection.getSectionNode(); - if (renderSection.isDirty() && renderSection.hasAllNeighbors() && isLightOnInSectionAndNeighbors(levelLightEngine, l)) { + if (renderSection.isDirty() && renderSection.hasAllNeighbors()) { boolean bl = false; if (this.minecraft.options.prioritizeChunkUpdates().get() == PrioritizeChunkUpdates.NEARBY) { - BlockPos blockPos2 = renderSection.getOrigin().offset(8, 8, 8); + BlockPos blockPos2 = SectionPos.of(renderSection.getSectionNode()).center(); bl = blockPos2.distSqr(blockPos) < 768.0 || renderSection.isDirtyFromPlayer(); } else if (this.minecraft.options.prioritizeChunkUpdates().get() == PrioritizeChunkUpdates.PLAYER_AFFECTED) { bl = renderSection.isDirtyFromPlayer(); @@ -1138,32 +1139,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.scheduleTranslucentSectionResort(camera.getPosition()); } - private static boolean isLightOnInSectionAndNeighbors(LevelLightEngine levelLightEngine, long l) { - int i = SectionPos.z(l); - int j = SectionPos.x(l); - - for (int k = i - 1; k <= i + 1; k++) { - for (int m = j - 1; m <= j + 1; m++) { - if (!levelLightEngine.lightOnInColumn(SectionPos.getZeroNode(m, k))) { - return false; - } - } - } - - return true; - } - private void renderHitOutline( - PoseStack poseStack, VertexConsumer vertexConsumer, Entity entity, double d, double e, double f, BlockPos blockPos, BlockState blockState, int i + PoseStack poseStack, VertexConsumer buffer, Entity entity, double camX, double camY, double camZ, BlockPos pos, BlockState state, int color ) { ShapeRenderer.renderShape( - poseStack, - vertexConsumer, - blockState.getShape(this.level, blockPos, CollisionContext.of(entity)), - blockPos.getX() - d, - blockPos.getY() - e, - blockPos.getZ() - f, - i + poseStack, buffer, state.getShape(this.level, pos, CollisionContext.of(entity)), pos.getX() - camX, pos.getY() - camY, pos.getZ() - camZ, color ); } @@ -1204,11 +1184,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.setSectionRangeDirty(sectionX - 1, sectionY - 1, sectionZ - 1, sectionX + 1, sectionY + 1, sectionZ + 1); } - public void setSectionRangeDirty(int i, int j, int k, int l, int m, int n) { - for (int o = k; o <= n; o++) { - for (int p = i; p <= l; p++) { - for (int q = j; q <= m; q++) { - this.setSectionDirty(p, q, o); + public void setSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) { + for (int i = minZ; i <= maxZ; i++) { + for (int j = minY; j <= maxY; j++) { + for (int k = minX; k <= maxX; k++) { + this.setSectionDirty(j, k, i); } } } @@ -1222,8 +1202,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.viewArea.setDirty(sectionX, sectionY, sectionZ, reRenderOnMainThread); } - public void onSectionBecomingNonEmpty(long l) { - SectionRenderDispatcher.RenderSection renderSection = this.viewArea.getRenderSection(l); + public void onSectionBecomingNonEmpty(long sectionPos) { + SectionRenderDispatcher.RenderSection renderSection = this.viewArea.getRenderSection(sectionPos); if (renderSection != null) { this.sectionOcclusionGraph.schedulePropagationFrom(renderSection); } @@ -1289,9 +1269,9 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private ParticleStatus calculateParticleLevel(boolean bl) { + private ParticleStatus calculateParticleLevel(boolean decreased) { ParticleStatus particleStatus = this.minecraft.options.particles().get(); - if (bl && particleStatus == ParticleStatus.MINIMAL && this.level.random.nextInt(10) == 0) { + if (decreased && particleStatus == ParticleStatus.MINIMAL && this.level.random.nextInt(10) == 0) { particleStatus = ParticleStatus.DECREASED; } @@ -1337,8 +1317,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab return this.sectionRenderDispatcher.isQueueEmpty(); } - public void onChunkLoaded(ChunkPos chunkPos) { - this.sectionOcclusionGraph.onChunkLoaded(chunkPos); + public void onChunkReadyToRender(ChunkPos chunkPos) { + this.sectionOcclusionGraph.onChunkReadyToRender(chunkPos); } public void needsUpdate() { @@ -1354,21 +1334,22 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } public static int getLightColor(BlockAndTintGetter level, BlockPos pos) { - return getLightColor(level, level.getBlockState(pos), pos); + return getLightColor(LevelRenderer.BrightnessGetter.DEFAULT, level, level.getBlockState(pos), pos); } - public static int getLightColor(BlockAndTintGetter level, BlockState state, BlockPos pos) { + public static int getLightColor(LevelRenderer.BrightnessGetter brightnessGetter, BlockAndTintGetter level, BlockState state, BlockPos pos) { if (state.emissiveRendering(level, pos)) { return 15728880; } else { - int i = level.getBrightness(LightLayer.SKY, pos); - int j = level.getBrightness(LightLayer.BLOCK, pos); + int i = brightnessGetter.packedBrightness(level, pos); + int j = LightTexture.block(i); int k = state.getLightEmission(); if (j < k) { - j = k; + int l = LightTexture.sky(i); + return LightTexture.pack(k, l); + } else { + return i; } - - return i << 20 | j << 4; } } @@ -1425,4 +1406,16 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab public CloudRenderer getCloudRenderer() { return this.cloudRenderer; } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface BrightnessGetter { + LevelRenderer.BrightnessGetter DEFAULT = (blockAndTintGetter, blockPos) -> { + int i = blockAndTintGetter.getBrightness(LightLayer.SKY, blockPos); + int j = blockAndTintGetter.getBrightness(LightLayer.BLOCK, blockPos); + return Brightness.pack(j, i); + }; + + int packedBrightness(BlockAndTintGetter blockAndTintGetter, BlockPos blockPos); + } } diff --git a/net/minecraft/client/renderer/LevelTargetBundle.java b/net/minecraft/client/renderer/LevelTargetBundle.java index 46ad0a0a..fe1fac6a 100644 --- a/net/minecraft/client/renderer/LevelTargetBundle.java +++ b/net/minecraft/client/renderer/LevelTargetBundle.java @@ -37,45 +37,45 @@ public class LevelTargetBundle implements PostChain.TargetBundle { public ResourceHandle entityOutline; @Override - public void replace(ResourceLocation resourceLocation, ResourceHandle resourceHandle) { - if (resourceLocation.equals(MAIN_TARGET_ID)) { - this.main = resourceHandle; - } else if (resourceLocation.equals(TRANSLUCENT_TARGET_ID)) { - this.translucent = resourceHandle; - } else if (resourceLocation.equals(ITEM_ENTITY_TARGET_ID)) { - this.itemEntity = resourceHandle; - } else if (resourceLocation.equals(PARTICLES_TARGET_ID)) { - this.particles = resourceHandle; - } else if (resourceLocation.equals(WEATHER_TARGET_ID)) { - this.weather = resourceHandle; - } else if (resourceLocation.equals(CLOUDS_TARGET_ID)) { - this.clouds = resourceHandle; + public void replace(ResourceLocation id, ResourceHandle handle) { + if (id.equals(MAIN_TARGET_ID)) { + this.main = handle; + } else if (id.equals(TRANSLUCENT_TARGET_ID)) { + this.translucent = handle; + } else if (id.equals(ITEM_ENTITY_TARGET_ID)) { + this.itemEntity = handle; + } else if (id.equals(PARTICLES_TARGET_ID)) { + this.particles = handle; + } else if (id.equals(WEATHER_TARGET_ID)) { + this.weather = handle; + } else if (id.equals(CLOUDS_TARGET_ID)) { + this.clouds = handle; } else { - if (!resourceLocation.equals(ENTITY_OUTLINE_TARGET_ID)) { - throw new IllegalArgumentException("No target with id " + resourceLocation); + if (!id.equals(ENTITY_OUTLINE_TARGET_ID)) { + throw new IllegalArgumentException("No target with id " + id); } - this.entityOutline = resourceHandle; + this.entityOutline = handle; } } @Nullable @Override - public ResourceHandle get(ResourceLocation resourceLocation) { - if (resourceLocation.equals(MAIN_TARGET_ID)) { + public ResourceHandle get(ResourceLocation id) { + if (id.equals(MAIN_TARGET_ID)) { return this.main; - } else if (resourceLocation.equals(TRANSLUCENT_TARGET_ID)) { + } else if (id.equals(TRANSLUCENT_TARGET_ID)) { return this.translucent; - } else if (resourceLocation.equals(ITEM_ENTITY_TARGET_ID)) { + } else if (id.equals(ITEM_ENTITY_TARGET_ID)) { return this.itemEntity; - } else if (resourceLocation.equals(PARTICLES_TARGET_ID)) { + } else if (id.equals(PARTICLES_TARGET_ID)) { return this.particles; - } else if (resourceLocation.equals(WEATHER_TARGET_ID)) { + } else if (id.equals(WEATHER_TARGET_ID)) { return this.weather; - } else if (resourceLocation.equals(CLOUDS_TARGET_ID)) { + } else if (id.equals(CLOUDS_TARGET_ID)) { return this.clouds; } else { - return resourceLocation.equals(ENTITY_OUTLINE_TARGET_ID) ? this.entityOutline : null; + return id.equals(ENTITY_OUTLINE_TARGET_ID) ? this.entityOutline : null; } } diff --git a/net/minecraft/client/renderer/LightTexture.java b/net/minecraft/client/renderer/LightTexture.java index 6a904dfe..ebfae217 100644 --- a/net/minecraft/client/renderer/LightTexture.java +++ b/net/minecraft/client/renderer/LightTexture.java @@ -1,12 +1,14 @@ package net.minecraft.client.renderer; -import com.mojang.blaze3d.pipeline.TextureTarget; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.systems.GpuDevice; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; +import com.mojang.blaze3d.textures.TextureFormat; import com.mojang.blaze3d.vertex.VertexFormat; -import java.util.Objects; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; @@ -14,7 +16,6 @@ import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.util.Mth; import net.minecraft.util.profiling.Profiler; import net.minecraft.util.profiling.ProfilerFiller; -import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.dimension.DimensionType; @@ -26,7 +27,7 @@ public class LightTexture implements AutoCloseable { public static final int FULL_SKY = 15728640; public static final int FULL_BLOCK = 240; private static final int TEXTURE_SIZE = 16; - private final TextureTarget target; + private final GpuTexture texture; private boolean updateLightTexture; private float blockLightRedFlicker; private final GameRenderer renderer; @@ -35,14 +36,18 @@ public class LightTexture implements AutoCloseable { public LightTexture(GameRenderer renderer, Minecraft minecraft) { this.renderer = renderer; this.minecraft = minecraft; - this.target = new TextureTarget(16, 16, false); - this.target.setFilterMode(9729); - this.target.setClearColor(1.0F, 1.0F, 1.0F, 1.0F); - this.target.clear(); + GpuDevice gpuDevice = RenderSystem.getDevice(); + this.texture = gpuDevice.createTexture("Light Texture", TextureFormat.RGBA8, 16, 16, 1); + this.texture.setTextureFilter(FilterMode.LINEAR, false); + gpuDevice.createCommandEncoder().clearColorTexture(this.texture, -1); + } + + public GpuTexture getTarget() { + return this.texture; } public void close() { - this.target.destroyBuffers(); + this.texture.close(); } public void tick() { @@ -52,16 +57,11 @@ public class LightTexture implements AutoCloseable { } public void turnOffLightLayer() { - RenderSystem.setShaderTexture(2, 0); + RenderSystem.setShaderTexture(2, null); } public void turnOnLightLayer() { - RenderSystem.setShaderTexture(2, this.target.getColorTextureId()); - } - - private float getDarknessGamma(float partialTick) { - MobEffectInstance mobEffectInstance = this.minecraft.player.getEffect(MobEffects.DARKNESS); - return mobEffectInstance != null ? mobEffectInstance.getBlendFactor(this.minecraft.player, partialTick) : 0.0F; + RenderSystem.setShaderTexture(2, this.texture); } private float calculateDarknessScale(LivingEntity entity, float gamma, float partialTick) { @@ -85,7 +85,7 @@ public class LightTexture implements AutoCloseable { } float h = this.minecraft.options.darknessEffectScale().get().floatValue(); - float i = this.getDarknessGamma(partialTicks) * h; + float i = this.minecraft.player.getEffectBlendFactor(MobEffects.DARKNESS, partialTicks) * h; float j = this.calculateDarknessScale(this.minecraft.player, i, partialTicks) * h; float k = this.minecraft.player.getWaterVision(); float l; @@ -102,26 +102,25 @@ public class LightTexture implements AutoCloseable { float n = clientLevel.dimensionType().ambientLight(); boolean bl = clientLevel.effects().forceBrightLightmap(); float o = this.minecraft.options.gamma().get().floatValue(); - CompiledShaderProgram compiledShaderProgram = (CompiledShaderProgram)Objects.requireNonNull( - RenderSystem.setShader(CoreShaders.LIGHTMAP), "Lightmap shader not loaded" - ); - compiledShaderProgram.safeGetUniform("AmbientLightFactor").set(n); - compiledShaderProgram.safeGetUniform("SkyFactor").set(g); - compiledShaderProgram.safeGetUniform("BlockFactor").set(m); - compiledShaderProgram.safeGetUniform("UseBrightLightmap").set(bl ? 1 : 0); - compiledShaderProgram.safeGetUniform("SkyLightColor").set(vector3f); - compiledShaderProgram.safeGetUniform("NightVisionFactor").set(l); - compiledShaderProgram.safeGetUniform("DarknessScale").set(j); - compiledShaderProgram.safeGetUniform("DarkenWorldFactor").set(this.renderer.getDarkenWorldAmount(partialTicks)); - compiledShaderProgram.safeGetUniform("BrightnessFactor").set(Math.max(0.0F, o - i)); - this.target.bindWrite(true); - BufferBuilder bufferBuilder = RenderSystem.renderThreadTesselator().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLIT_SCREEN); - bufferBuilder.addVertex(0.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(1.0F, 0.0F, 0.0F); - bufferBuilder.addVertex(1.0F, 1.0F, 0.0F); - bufferBuilder.addVertex(0.0F, 1.0F, 0.0F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - this.target.unbindWrite(); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer = autoStorageIndexBuffer.getBuffer(6); + + try (RenderPass renderPass = RenderSystem.getDevice().createCommandEncoder().createRenderPass(this.texture, OptionalInt.empty())) { + renderPass.setPipeline(RenderPipelines.LIGHTMAP); + renderPass.setUniform("AmbientLightFactor", n); + renderPass.setUniform("SkyFactor", g); + renderPass.setUniform("BlockFactor", m); + renderPass.setUniform("UseBrightLightmap", bl ? 1 : 0); + renderPass.setUniform("SkyLightColor", vector3f.x, vector3f.y, vector3f.z); + renderPass.setUniform("NightVisionFactor", l); + renderPass.setUniform("DarknessScale", j); + renderPass.setUniform("DarkenWorldFactor", this.renderer.getDarkenWorldAmount(partialTicks)); + renderPass.setUniform("BrightnessFactor", Math.max(0.0F, o - i)); + renderPass.setVertexBuffer(0, RenderSystem.getQuadVertexBuffer()); + renderPass.setIndexBuffer(gpuBuffer, autoStorageIndexBuffer.type()); + renderPass.drawIndexed(0, 6); + } + profilerFiller.pop(); } } @@ -131,10 +130,10 @@ public class LightTexture implements AutoCloseable { return getBrightness(dimensionType.ambientLight(), lightLevel); } - public static float getBrightness(float f, int i) { - float g = i / 15.0F; - float h = g / (4.0F - 3.0F * g); - return Mth.lerp(f, h, 1.0F); + public static float getBrightness(float ambientLight, int lightLevel) { + float f = lightLevel / 15.0F; + float g = f / (4.0F - 3.0F * f); + return Mth.lerp(ambientLight, g, 1.0F); } public static int pack(int blockLight, int skyLight) { @@ -149,13 +148,13 @@ public class LightTexture implements AutoCloseable { return packedLight >>> 20 & 15; } - public static int lightCoordsWithEmission(int i, int j) { - if (j == 0) { - return i; + public static int lightCoordsWithEmission(int packedLight, int emmision) { + if (emmision == 0) { + return packedLight; } else { - int k = Math.max(sky(i), j); - int l = Math.max(block(i), j); - return pack(l, k); + int i = Math.max(sky(packedLight), emmision); + int j = Math.max(block(packedLight), emmision); + return pack(j, i); } } } diff --git a/net/minecraft/client/renderer/MapRenderer.java b/net/minecraft/client/renderer/MapRenderer.java index 14118240..e80a7bff 100644 --- a/net/minecraft/client/renderer/MapRenderer.java +++ b/net/minecraft/client/renderer/MapRenderer.java @@ -7,7 +7,9 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.Font.DisplayMode; import net.minecraft.client.renderer.state.MapRenderState; +import net.minecraft.client.renderer.state.MapRenderState.MapDecorationRenderState; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.MapDecorationTextureManager; import net.minecraft.client.resources.MapTextureManager; @@ -27,22 +29,22 @@ public class MapRenderer { private final MapTextureManager mapTextureManager; private final MapDecorationTextureManager decorationTextures; - public MapRenderer(MapDecorationTextureManager mapDecorationTextureManager, MapTextureManager mapTextureManager) { - this.decorationTextures = mapDecorationTextureManager; + public MapRenderer(MapDecorationTextureManager decorationTextures, MapTextureManager mapTextureManager) { + this.decorationTextures = decorationTextures; this.mapTextureManager = mapTextureManager; } - public void render(MapRenderState mapRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, boolean bl, int i) { + public void render(MapRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, boolean active, int packedLight) { Matrix4f matrix4f = poseStack.last().pose(); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.text(mapRenderState.texture)); - vertexConsumer.addVertex(matrix4f, 0.0F, 128.0F, -0.01F).setColor(-1).setUv(0.0F, 1.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 128.0F, 128.0F, -0.01F).setColor(-1).setUv(1.0F, 1.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 128.0F, 0.0F, -0.01F).setColor(-1).setUv(1.0F, 0.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 0.0F, 0.0F, -0.01F).setColor(-1).setUv(0.0F, 0.0F).setLight(i); - int j = 0; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.text(renderState.texture)); + vertexConsumer.addVertex(matrix4f, 0.0F, 128.0F, -0.01F).setColor(-1).setUv(0.0F, 1.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 128.0F, 128.0F, -0.01F).setColor(-1).setUv(1.0F, 1.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 128.0F, 0.0F, -0.01F).setColor(-1).setUv(1.0F, 0.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 0.0F, 0.0F, -0.01F).setColor(-1).setUv(0.0F, 0.0F).setLight(packedLight); + int i = 0; - for (MapRenderState.MapDecorationRenderState mapDecorationRenderState : mapRenderState.decorations) { - if (!bl || mapDecorationRenderState.renderOnFrame) { + for (MapDecorationRenderState mapDecorationRenderState : renderState.decorations) { + if (!active || mapDecorationRenderState.renderOnFrame) { poseStack.pushPose(); poseStack.translate(mapDecorationRenderState.x / 2.0F + 64.0F, mapDecorationRenderState.y / 2.0F + 64.0F, -0.02F); poseStack.mulPose(Axis.ZP.rotationDegrees(mapDecorationRenderState.rot * 360 / 16.0F)); @@ -51,11 +53,23 @@ public class MapRenderer { Matrix4f matrix4f2 = poseStack.last().pose(); TextureAtlasSprite textureAtlasSprite = mapDecorationRenderState.atlasSprite; if (textureAtlasSprite != null) { - VertexConsumer vertexConsumer2 = multiBufferSource.getBuffer(RenderType.text(textureAtlasSprite.atlasLocation())); - vertexConsumer2.addVertex(matrix4f2, -1.0F, 1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV0()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, 1.0F, 1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV0()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, 1.0F, -1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV1()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, -1.0F, -1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV1()).setLight(i); + VertexConsumer vertexConsumer2 = bufferSource.getBuffer(RenderType.text(textureAtlasSprite.atlasLocation())); + vertexConsumer2.addVertex(matrix4f2, -1.0F, 1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV0()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, 1.0F, 1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV0()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, 1.0F, -1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV1()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, -1.0F, -1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV1()) + .setLight(packedLight); poseStack.popPose(); } @@ -68,33 +82,33 @@ public class MapRenderer { poseStack.scale(g, g, 1.0F); poseStack.translate(0.0F, 0.0F, -0.1F); font.drawInBatch( - mapDecorationRenderState.name, 0.0F, 0.0F, -1, false, poseStack.last().pose(), multiBufferSource, Font.DisplayMode.NORMAL, Integer.MIN_VALUE, i, false + mapDecorationRenderState.name, 0.0F, 0.0F, -1, false, poseStack.last().pose(), bufferSource, DisplayMode.NORMAL, Integer.MIN_VALUE, packedLight, false ); poseStack.popPose(); } - j++; + i++; } } } - public void extractRenderState(MapId mapId, MapItemSavedData mapItemSavedData, MapRenderState mapRenderState) { - mapRenderState.texture = this.mapTextureManager.prepareMapTexture(mapId, mapItemSavedData); - mapRenderState.decorations.clear(); + public void extractRenderState(MapId id, MapItemSavedData savedData, MapRenderState renderState) { + renderState.texture = this.mapTextureManager.prepareMapTexture(id, savedData); + renderState.decorations.clear(); - for (MapDecoration mapDecoration : mapItemSavedData.getDecorations()) { - mapRenderState.decorations.add(this.extractDecorationRenderState(mapDecoration)); + for (MapDecoration mapDecoration : savedData.getDecorations()) { + renderState.decorations.add(this.extractDecorationRenderState(mapDecoration)); } } - private MapRenderState.MapDecorationRenderState extractDecorationRenderState(MapDecoration mapDecoration) { - MapRenderState.MapDecorationRenderState mapDecorationRenderState = new MapRenderState.MapDecorationRenderState(); - mapDecorationRenderState.atlasSprite = this.decorationTextures.get(mapDecoration); - mapDecorationRenderState.x = mapDecoration.x(); - mapDecorationRenderState.y = mapDecoration.y(); - mapDecorationRenderState.rot = mapDecoration.rot(); - mapDecorationRenderState.name = (Component)mapDecoration.name().orElse(null); - mapDecorationRenderState.renderOnFrame = mapDecoration.renderOnFrame(); + private MapDecorationRenderState extractDecorationRenderState(MapDecoration decoration) { + MapDecorationRenderState mapDecorationRenderState = new MapDecorationRenderState(); + mapDecorationRenderState.atlasSprite = this.decorationTextures.get(decoration); + mapDecorationRenderState.x = decoration.x(); + mapDecorationRenderState.y = decoration.y(); + mapDecorationRenderState.rot = decoration.rot(); + mapDecorationRenderState.name = (Component)decoration.name().orElse(null); + mapDecorationRenderState.renderOnFrame = decoration.renderOnFrame(); return mapDecorationRenderState; } } diff --git a/net/minecraft/client/renderer/MaterialMapper.java b/net/minecraft/client/renderer/MaterialMapper.java new file mode 100644 index 00000000..4cc7593a --- /dev/null +++ b/net/minecraft/client/renderer/MaterialMapper.java @@ -0,0 +1,17 @@ +package net.minecraft.client.renderer; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.resources.model.Material; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +public record MaterialMapper(ResourceLocation sheet, String prefix) { + public Material apply(ResourceLocation name) { + return new Material(this.sheet, name.withPrefix(this.prefix + "/")); + } + + public Material defaultNamespaceApply(String name) { + return this.apply(ResourceLocation.withDefaultNamespace(name)); + } +} diff --git a/net/minecraft/client/renderer/Octree.java b/net/minecraft/client/renderer/Octree.java index 338a68f5..ea214a09 100644 --- a/net/minecraft/client/renderer/Octree.java +++ b/net/minecraft/client/renderer/Octree.java @@ -16,34 +16,34 @@ public class Octree { private final Octree.Branch root; final BlockPos cameraSectionCenter; - public Octree(SectionPos sectionPos, int i, int j, int k) { - int l = i * 2 + 1; - int m = Mth.smallestEncompassingPowerOfTwo(l); - int n = i * 16; - BlockPos blockPos = sectionPos.origin(); - this.cameraSectionCenter = sectionPos.center(); - int o = blockPos.getX() - n; - int p = o + m * 16 - 1; - int q = m >= j ? k : blockPos.getY() - n; - int r = q + m * 16 - 1; - int s = blockPos.getZ() - n; - int t = s + m * 16 - 1; - this.root = new Octree.Branch(new BoundingBox(o, q, s, p, r, t)); + public Octree(SectionPos cameraSectionPos, int viewDistance, int sectionGridSizeY, int minY) { + int i = viewDistance * 2 + 1; + int j = Mth.smallestEncompassingPowerOfTwo(i); + int k = viewDistance * 16; + BlockPos blockPos = cameraSectionPos.origin(); + this.cameraSectionCenter = cameraSectionPos.center(); + int l = blockPos.getX() - k; + int m = l + j * 16 - 1; + int n = j >= sectionGridSizeY ? minY : blockPos.getY() - k; + int o = n + j * 16 - 1; + int p = blockPos.getZ() - k; + int q = p + j * 16 - 1; + this.root = new Octree.Branch(new BoundingBox(l, n, p, m, o, q)); } - public boolean add(SectionRenderDispatcher.RenderSection renderSection) { - return this.root.add(renderSection); + public boolean add(SectionRenderDispatcher.RenderSection section) { + return this.root.add(section); } - public void visitNodes(Octree.OctreeVisitor octreeVisitor, Frustum frustum, int i) { - this.root.visitNodes(octreeVisitor, false, frustum, 0, i, true); + public void visitNodes(Octree.OctreeVisitor visitor, Frustum frustum, int nearbyRadius) { + this.root.visitNodes(visitor, false, frustum, 0, nearbyRadius, true); } - boolean isClose(double d, double e, double f, double g, double h, double i, int j) { - int k = this.cameraSectionCenter.getX(); - int l = this.cameraSectionCenter.getY(); - int m = this.cameraSectionCenter.getZ(); - return k > d - j && k < g + j && l > e - j && l < h + j && m > f - j && m < i + j; + boolean isClose(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, int radius) { + int i = this.cameraSectionCenter.getX(); + int j = this.cameraSectionCenter.getY(); + int k = this.cameraSectionCenter.getZ(); + return i > minX - radius && i < maxX + radius && j > minY - radius && j < maxY + radius && k > minZ - radius && k < maxZ + radius; } @Environment(EnvType.CLIENT) @@ -59,19 +59,19 @@ public class Octree { final int yShift; final int zShift; - private AxisSorting(final int j, final int k, final int l) { - this.xShift = j; - this.yShift = k; - this.zShift = l; + private AxisSorting(final int xShift, final int yShift, final int zShift) { + this.xShift = xShift; + this.yShift = yShift; + this.zShift = zShift; } - public static Octree.AxisSorting getAxisSorting(int i, int j, int k) { - if (i > j && i > k) { - return j > k ? XYZ : XZY; - } else if (j > i && j > k) { - return i > k ? YXZ : YZX; + public static Octree.AxisSorting getAxisSorting(int xDiff, int yDiff, int zDiff) { + if (xDiff > yDiff && xDiff > zDiff) { + return yDiff > zDiff ? XYZ : XZY; + } else if (yDiff > xDiff && yDiff > zDiff) { + return xDiff > zDiff ? YXZ : YZX; } else { - return i > j ? ZXY : ZYX; + return xDiff > yDiff ? ZXY : ZYX; } } } @@ -102,41 +102,42 @@ public class Octree { this.cameraZDiffNegative = k < 0; } - public boolean add(SectionRenderDispatcher.RenderSection renderSection) { - boolean bl = renderSection.getOrigin().getX() - this.bbCenterX < 0; - boolean bl2 = renderSection.getOrigin().getY() - this.bbCenterY < 0; - boolean bl3 = renderSection.getOrigin().getZ() - this.bbCenterZ < 0; + public boolean add(SectionRenderDispatcher.RenderSection section) { + long l = section.getSectionNode(); + boolean bl = SectionPos.sectionToBlockCoord(SectionPos.x(l)) - this.bbCenterX < 0; + boolean bl2 = SectionPos.sectionToBlockCoord(SectionPos.y(l)) - this.bbCenterY < 0; + boolean bl3 = SectionPos.sectionToBlockCoord(SectionPos.z(l)) - this.bbCenterZ < 0; boolean bl4 = bl != this.cameraXDiffNegative; boolean bl5 = bl2 != this.cameraYDiffNegative; boolean bl6 = bl3 != this.cameraZDiffNegative; int i = getNodeIndex(this.sorting, bl4, bl5, bl6); if (this.areChildrenLeaves()) { boolean bl7 = this.nodes[i] != null; - this.nodes[i] = Octree.this.new Leaf(renderSection); + this.nodes[i] = Octree.this.new Leaf(section); return !bl7; } else if (this.nodes[i] != null) { Octree.Branch branch = (Octree.Branch)this.nodes[i]; - return branch.add(renderSection); + return branch.add(section); } else { BoundingBox boundingBox = this.createChildBoundingBox(bl, bl2, bl3); Octree.Branch branch2 = Octree.this.new Branch(boundingBox); this.nodes[i] = branch2; - return branch2.add(renderSection); + return branch2.add(section); } } - private static int getNodeIndex(Octree.AxisSorting axisSorting, boolean bl, boolean bl2, boolean bl3) { + private static int getNodeIndex(Octree.AxisSorting sorting, boolean xDiffNegative, boolean yDiffNegative, boolean zDiffNegative) { int i = 0; - if (bl) { - i += axisSorting.xShift; + if (xDiffNegative) { + i += sorting.xShift; } - if (bl2) { - i += axisSorting.yShift; + if (yDiffNegative) { + i += sorting.yShift; } - if (bl3) { - i += axisSorting.zShift; + if (zDiffNegative) { + i += sorting.zShift; } return i; @@ -146,10 +147,10 @@ public class Octree { return this.boundingBox.getXSpan() == 32; } - private BoundingBox createChildBoundingBox(boolean bl, boolean bl2, boolean bl3) { + private BoundingBox createChildBoundingBox(boolean xDiffNegative, boolean yDiffNegative, boolean zDiffNegative) { int i; int j; - if (bl) { + if (xDiffNegative) { i = this.boundingBox.minX(); j = this.bbCenterX - 1; } else { @@ -159,7 +160,7 @@ public class Octree { int k; int l; - if (bl2) { + if (yDiffNegative) { k = this.boundingBox.minY(); l = this.bbCenterY - 1; } else { @@ -169,7 +170,7 @@ public class Octree { int m; int n; - if (bl3) { + if (zDiffNegative) { m = this.boundingBox.minZ(); n = this.bbCenterZ - 1; } else { @@ -181,24 +182,30 @@ public class Octree { } @Override - public void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2) { - boolean bl3 = bl; - if (!bl) { - int k = frustum.cubeInFrustum(this.boundingBox); - bl = k == -2; - bl3 = k == -2 || k == -1; + public void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby) { + boolean bl = isLeafNode; + if (!isLeafNode) { + int i = frustum.cubeInFrustum(this.boundingBox); + isLeafNode = i == -2; + bl = i == -2 || i == -1; } - if (bl3) { - bl2 = bl2 + if (bl) { + isNearby = isNearby && Octree.this.isClose( - this.boundingBox.minX(), this.boundingBox.minY(), this.boundingBox.minZ(), this.boundingBox.maxX(), this.boundingBox.maxY(), this.boundingBox.maxZ(), j + this.boundingBox.minX(), + this.boundingBox.minY(), + this.boundingBox.minZ(), + this.boundingBox.maxX(), + this.boundingBox.maxY(), + this.boundingBox.maxZ(), + nearbyRadius ); - octreeVisitor.visit(this, bl, i, bl2); + visitor.visit(this, isLeafNode, recursionDepth, isNearby); for (Octree.Node node : this.nodes) { if (node != null) { - node.visitNodes(octreeVisitor, bl, frustum, i + 1, j, bl2); + node.visitNodes(visitor, isLeafNode, frustum, recursionDepth + 1, nearbyRadius, isNearby); } } } @@ -227,16 +234,16 @@ public class Octree { final class Leaf implements Octree.Node { private final SectionRenderDispatcher.RenderSection section; - Leaf(final SectionRenderDispatcher.RenderSection renderSection) { - this.section = renderSection; + Leaf(final SectionRenderDispatcher.RenderSection section) { + this.section = section; } @Override - public void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2) { + public void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby) { AABB aABB = this.section.getBoundingBox(); - if (bl || frustum.isVisible(this.getSection().getBoundingBox())) { - bl2 = bl2 && Octree.this.isClose(aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, j); - octreeVisitor.visit(this, bl, i, bl2); + if (isLeafNode || frustum.isVisible(this.getSection().getBoundingBox())) { + isNearby = isNearby && Octree.this.isClose(aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, nearbyRadius); + visitor.visit(this, isLeafNode, recursionDepth, isNearby); } } @@ -253,7 +260,7 @@ public class Octree { @Environment(EnvType.CLIENT) public interface Node { - void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2); + void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby); @Nullable SectionRenderDispatcher.RenderSection getSection(); diff --git a/net/minecraft/client/renderer/OutlineBufferSource.java b/net/minecraft/client/renderer/OutlineBufferSource.java index 6c52aa5e..d5078f4f 100644 --- a/net/minecraft/client/renderer/OutlineBufferSource.java +++ b/net/minecraft/client/renderer/OutlineBufferSource.java @@ -6,18 +6,19 @@ import com.mojang.blaze3d.vertex.VertexMultiConsumer; import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.ARGB; @Environment(EnvType.CLIENT) public class OutlineBufferSource implements MultiBufferSource { - private final MultiBufferSource.BufferSource bufferSource; - private final MultiBufferSource.BufferSource outlineBufferSource = MultiBufferSource.immediate(new ByteBufferBuilder(1536)); + private final BufferSource bufferSource; + private final BufferSource outlineBufferSource = MultiBufferSource.immediate(new ByteBufferBuilder(1536)); private int teamR = 255; private int teamG = 255; private int teamB = 255; private int teamA = 255; - public OutlineBufferSource(MultiBufferSource.BufferSource bufferSource) { + public OutlineBufferSource(BufferSource bufferSource) { this.bufferSource = bufferSource; } diff --git a/net/minecraft/client/renderer/PostChain.java b/net/minecraft/client/renderer/PostChain.java index 67e0be9e..250381d8 100644 --- a/net/minecraft/client/renderer/PostChain.java +++ b/net/minecraft/client/renderer/PostChain.java @@ -4,16 +4,22 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.google.common.collect.ImmutableList.Builder; import com.mojang.blaze3d.framegraph.FrameGraphBuilder; +import com.mojang.blaze3d.pipeline.CompiledRenderPipeline; +import com.mojang.blaze3d.pipeline.RenderPipeline; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.resource.GraphicsResourceAllocator; import com.mojang.blaze3d.resource.RenderTargetDescriptor; import com.mojang.blaze3d.resource.ResourceHandle; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.RenderSystem; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.Map.Entry; +import java.util.function.Consumer; import java.util.function.UnaryOperator; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -33,58 +39,67 @@ public class PostChain { private final Map internalTargets; private final Set externalTargets; - private PostChain(List list, Map map, Set set) { - this.passes = list; - this.internalTargets = map; - this.externalTargets = set; + private PostChain(List passes, Map internalTargets, Set externalTargets) { + this.passes = passes; + this.internalTargets = internalTargets; + this.externalTargets = externalTargets; } - public static PostChain load(PostChainConfig postChainConfig, TextureManager textureManager, ShaderManager shaderManager, Set set) throws ShaderManager.CompilationException { - Stream stream = postChainConfig.passes() - .stream() - .flatMap(passx -> passx.inputs().stream()) - .flatMap(input -> input.referencedTargets().stream()); - Set set2 = (Set)stream.filter(resourceLocation -> !postChainConfig.internalTargets().containsKey(resourceLocation)) + public static PostChain load(PostChainConfig config, TextureManager textureManager, Set externalTargets, ResourceLocation name) throws ShaderManager.CompilationException { + Stream stream = config.passes().stream().flatMap(PostChainConfig.Pass::referencedTargets); + Set set = (Set)stream.filter(resourceLocation -> !config.internalTargets().containsKey(resourceLocation)) .collect(Collectors.toSet()); - Set set3 = Sets.difference(set2, set); - if (!set3.isEmpty()) { - throw new ShaderManager.CompilationException("Referenced external targets are not available in this context: " + set3); + Set set2 = Sets.difference(set, externalTargets); + if (!set2.isEmpty()) { + throw new ShaderManager.CompilationException("Referenced external targets are not available in this context: " + set2); } else { Builder builder = ImmutableList.builder(); - for (PostChainConfig.Pass pass : postChainConfig.passes()) { - builder.add(createPass(textureManager, shaderManager, pass)); + for (int i = 0; i < config.passes().size(); i++) { + PostChainConfig.Pass pass = (PostChainConfig.Pass)config.passes().get(i); + builder.add(createPass(textureManager, pass, name.withSuffix("/" + i))); } - return new PostChain(builder.build(), postChainConfig.internalTargets(), set2); + return new PostChain(builder.build(), config.internalTargets(), set); } } - private static PostPass createPass(TextureManager textureManager, ShaderManager shaderManager, PostChainConfig.Pass pass) throws ShaderManager.CompilationException { - ResourceLocation resourceLocation = pass.program(); - CompiledShaderProgram compiledShaderProgram = shaderManager.getProgramForLoading( - new ShaderProgram(resourceLocation, DefaultVertexFormat.POSITION, ShaderDefines.EMPTY) - ); + private static PostPass createPass(TextureManager textureManager, PostChainConfig.Pass pass, ResourceLocation location) throws ShaderManager.CompilationException { + RenderPipeline.Builder builder = RenderPipeline.builder(RenderPipelines.POST_PROCESSING_SNIPPET) + .withFragmentShader(pass.fragmentShaderId()) + .withVertexShader(pass.vertexShaderId()) + .withLocation(location); + + for (PostChainConfig.Input input : pass.inputs()) { + builder.withSampler(input.samplerName() + "Sampler"); + builder.withUniform(input.samplerName() + "Size", UniformType.VEC2); + } for (PostChainConfig.Uniform uniform : pass.uniforms()) { - String string = uniform.name(); - if (compiledShaderProgram.getUniform(string) == null) { - throw new ShaderManager.CompilationException("Uniform '" + string + "' does not exist for " + resourceLocation); + builder.withUniform(uniform.name(), (UniformType)Objects.requireNonNull((UniformType)UniformType.CODEC.byName(uniform.type()))); + } + + RenderPipeline renderPipeline = builder.build(); + CompiledRenderPipeline compiledRenderPipeline = RenderSystem.getDevice().precompilePipeline(renderPipeline); + + for (PostChainConfig.Uniform uniform2 : pass.uniforms()) { + String string = uniform2.name(); + if (!compiledRenderPipeline.containsUniform(string)) { + throw new ShaderManager.CompilationException("Uniform '" + string + "' does not exist for " + location); } } - String string2 = resourceLocation.toString(); - PostPass postPass = new PostPass(string2, compiledShaderProgram, pass.outputTarget(), pass.uniforms()); + PostPass postPass = new PostPass(renderPipeline, pass.outputTarget(), pass.uniforms()); - for (PostChainConfig.Input input : pass.inputs()) { - switch (input) { - case PostChainConfig.TextureInput(String var35, ResourceLocation var36, int var37, int var38, boolean var39): - AbstractTexture abstractTexture = textureManager.getTexture(var36.withPath((UnaryOperator)(stringx -> "textures/effect/" + stringx + ".png"))); - abstractTexture.setFilter(var39, false); - postPass.addInput(new PostPass.TextureInput(var35, abstractTexture, var37, var38)); + for (PostChainConfig.Input input2 : pass.inputs()) { + switch (input2) { + case PostChainConfig.TextureInput(String var39, ResourceLocation var40, int var41, int var42, boolean var43): + AbstractTexture abstractTexture = textureManager.getTexture(var40.withPath((UnaryOperator)(string -> "textures/effect/" + string + ".png"))); + abstractTexture.setFilter(var43, false); + postPass.addInput(new PostPass.TextureInput(var39, abstractTexture, var41, var42)); break; - case PostChainConfig.TargetInput(String var22, ResourceLocation var41, boolean var42, boolean var43): - postPass.addInput(new PostPass.TargetInput(var22, var41, var42, var43)); + case PostChainConfig.TargetInput(String var22, ResourceLocation var45, boolean var46, boolean var47): + postPass.addInput(new PostPass.TargetInput(var22, var45, var46, var47)); break; default: throw new MatchException(null, null); @@ -94,8 +109,10 @@ public class PostChain { return postPass; } - public void addToFrame(FrameGraphBuilder frameGraphBuilder, int i, int j, PostChain.TargetBundle targetBundle) { - Matrix4f matrix4f = new Matrix4f().setOrtho(0.0F, i, 0.0F, j, 0.1F, 1000.0F); + public void addToFrame( + FrameGraphBuilder frameGraphBuilder, int width, int height, PostChain.TargetBundle targetBundle, @Nullable Consumer uniformSetter + ) { + Matrix4f matrix4f = new Matrix4f().setOrtho(0.0F, width, 0.0F, height, 0.1F, 1000.0F); Map> map = new HashMap(this.internalTargets.size() + this.externalTargets.size()); for (ResourceLocation resourceLocation : this.externalTargets) { @@ -106,15 +123,15 @@ public class PostChain { ResourceLocation resourceLocation2 = (ResourceLocation)entry.getKey(); RenderTargetDescriptor renderTargetDescriptor = switch ((PostChainConfig.InternalTarget)entry.getValue()) { - case PostChainConfig.FixedSizedTarget(int var25, int var26) -> new RenderTargetDescriptor(var25, var26, true); - case PostChainConfig.FullScreenTarget var16 -> new RenderTargetDescriptor(i, j, true); + case PostChainConfig.FixedSizedTarget(int var26, int var27) -> new RenderTargetDescriptor(var26, var27, true, 0); + case PostChainConfig.FullScreenTarget var17 -> new RenderTargetDescriptor(width, height, true, 0); default -> throw new MatchException(null, null); }; map.put(resourceLocation2, frameGraphBuilder.createInternal(resourceLocation2.toString(), renderTargetDescriptor)); } for (PostPass postPass : this.passes) { - postPass.addToFrame(frameGraphBuilder, map, matrix4f); + postPass.addToFrame(frameGraphBuilder, map, matrix4f, uniformSetter); } for (ResourceLocation resourceLocation : this.externalTargets) { @@ -123,34 +140,28 @@ public class PostChain { } @Deprecated - public void process(RenderTarget renderTarget, GraphicsResourceAllocator graphicsResourceAllocator) { + public void process(RenderTarget renderTarget, GraphicsResourceAllocator allocator, @Nullable Consumer uniformSetter) { FrameGraphBuilder frameGraphBuilder = new FrameGraphBuilder(); PostChain.TargetBundle targetBundle = PostChain.TargetBundle.of(MAIN_TARGET_ID, frameGraphBuilder.importExternal("main", renderTarget)); - this.addToFrame(frameGraphBuilder, renderTarget.width, renderTarget.height, targetBundle); - frameGraphBuilder.execute(graphicsResourceAllocator); - } - - public void setUniform(String name, float backgroundBlurriness) { - for (PostPass postPass : this.passes) { - postPass.getShader().safeGetUniform(name).set(backgroundBlurriness); - } + this.addToFrame(frameGraphBuilder, renderTarget.width, renderTarget.height, targetBundle, uniformSetter); + frameGraphBuilder.execute(allocator); } @Environment(EnvType.CLIENT) public interface TargetBundle { - static PostChain.TargetBundle of(ResourceLocation resourceLocation, ResourceHandle resourceHandle) { - return new 1(resourceHandle, resourceLocation); + static PostChain.TargetBundle of(ResourceLocation id, ResourceHandle handle) { + return new 1(handle, id); } - void replace(ResourceLocation resourceLocation, ResourceHandle resourceHandle); + void replace(ResourceLocation id, ResourceHandle handle); @Nullable - ResourceHandle get(ResourceLocation resourceLocation); + ResourceHandle get(ResourceLocation id); - default ResourceHandle getOrThrow(ResourceLocation resourceLocation) { - ResourceHandle resourceHandle = this.get(resourceLocation); + default ResourceHandle getOrThrow(ResourceLocation id) { + ResourceHandle resourceHandle = this.get(id); if (resourceHandle == null) { - throw new IllegalArgumentException("Missing target with id " + resourceLocation); + throw new IllegalArgumentException("Missing target with id " + id); } else { return resourceHandle; } diff --git a/net/minecraft/client/renderer/PostChainConfig.java b/net/minecraft/client/renderer/PostChainConfig.java index 6cc78ed9..7e65f5c8 100644 --- a/net/minecraft/client/renderer/PostChainConfig.java +++ b/net/minecraft/client/renderer/PostChainConfig.java @@ -1,14 +1,19 @@ package net.minecraft.client.renderer; +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.datafixers.util.Either; import com.mojang.serialization.Codec; import com.mojang.serialization.DataResult; import com.mojang.serialization.codecs.RecordCodecBuilder; import it.unimi.dsi.fastutil.objects.ObjectArraySet; +import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.function.Function; +import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.resources.ResourceLocation; @@ -71,7 +76,13 @@ public record PostChainConfig(Map inputs, ResourceLocation outputTarget, List uniforms) { + public record Pass( + ResourceLocation vertexShaderId, + ResourceLocation fragmentShaderId, + List inputs, + ResourceLocation outputTarget, + List uniforms + ) { private static final Codec> INPUTS_CODEC = PostChainConfig.Input.CODEC.listOf().validate(list -> { Set set = new ObjectArraySet<>(list.size()); @@ -85,13 +96,19 @@ public record PostChainConfig(Map CODEC = RecordCodecBuilder.create( instance -> instance.group( - ResourceLocation.CODEC.fieldOf("program").forGetter(PostChainConfig.Pass::program), + ResourceLocation.CODEC.fieldOf("vertex_shader").forGetter(PostChainConfig.Pass::vertexShaderId), + ResourceLocation.CODEC.fieldOf("fragment_shader").forGetter(PostChainConfig.Pass::fragmentShaderId), INPUTS_CODEC.optionalFieldOf("inputs", List.of()).forGetter(PostChainConfig.Pass::inputs), ResourceLocation.CODEC.fieldOf("output").forGetter(PostChainConfig.Pass::outputTarget), PostChainConfig.Uniform.CODEC.listOf().optionalFieldOf("uniforms", List.of()).forGetter(PostChainConfig.Pass::uniforms) ) .apply(instance, PostChainConfig.Pass::new) ); + + public Stream referencedTargets() { + Stream stream = this.inputs.stream().flatMap(input -> input.referencedTargets().stream()); + return Stream.concat(stream, Stream.of(this.outputTarget)); + } } @Environment(EnvType.CLIENT) @@ -132,13 +149,35 @@ public record PostChainConfig(Map values) { + public record Uniform(String name, String type, Optional> values) { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( Codec.STRING.fieldOf("name").forGetter(PostChainConfig.Uniform::name), - Codec.FLOAT.sizeLimitedListOf(4).fieldOf("values").forGetter(PostChainConfig.Uniform::values) + Codec.STRING.fieldOf("type").forGetter(PostChainConfig.Uniform::type), + Codec.FLOAT.sizeLimitedListOf(4).optionalFieldOf("values").forGetter(PostChainConfig.Uniform::values) ) .apply(instance, PostChainConfig.Uniform::new) ); + + public void setOnRenderPass(RenderPass renderPass) { + UniformType uniformType = (UniformType)UniformType.CODEC.byName(this.type); + if (!this.values.isEmpty() && uniformType != null && !((List)this.values.get()).isEmpty()) { + List list = (List)this.values.get(); + if (uniformType.isIntStorage()) { + renderPass.setUniform(this.name, (int)((Float)list.getFirst()).floatValue()); + } else { + float[] fs = new float[uniformType.getCount()]; + if (list.size() == 1) { + Arrays.fill(fs, (Float)list.getFirst()); + } else { + for (int i = 0; i < Math.min(list.size(), uniformType.getCount()); i++) { + fs[i] = (Float)list.get(i); + } + } + + renderPass.setUniform(this.name, fs); + } + } + } } } diff --git a/net/minecraft/client/renderer/PostPass.java b/net/minecraft/client/renderer/PostPass.java index 2a948a53..219ff1e9 100644 --- a/net/minecraft/client/renderer/PostPass.java +++ b/net/minecraft/client/renderer/PostPass.java @@ -1,130 +1,125 @@ package net.minecraft.client.renderer; import com.mojang.blaze3d.ProjectionType; +import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.framegraph.FrameGraphBuilder; import com.mojang.blaze3d.framegraph.FramePass; +import com.mojang.blaze3d.pipeline.RenderPipeline; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.resource.ResourceHandle; -import com.mojang.blaze3d.shaders.Uniform; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.VertexFormat; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.OptionalDouble; +import java.util.OptionalInt; +import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; import org.joml.Matrix4f; @Environment(EnvType.CLIENT) public class PostPass { private final String name; - private final CompiledShaderProgram shader; + private final RenderPipeline pipeline; private final ResourceLocation outputTargetId; private final List uniforms; private final List inputs = new ArrayList(); - public PostPass(String string, CompiledShaderProgram compiledShaderProgram, ResourceLocation resourceLocation, List list) { - this.name = string; - this.shader = compiledShaderProgram; - this.outputTargetId = resourceLocation; - this.uniforms = list; + public PostPass(RenderPipeline pipeline, ResourceLocation outputTargetId, List uniforms) { + this.pipeline = pipeline; + this.name = pipeline.getLocation().toString(); + this.outputTargetId = outputTargetId; + this.uniforms = uniforms; } public void addInput(PostPass.Input input) { this.inputs.add(input); } - public void addToFrame(FrameGraphBuilder frameGraphBuilder, Map> map, Matrix4f matrix4f) { + public void addToFrame( + FrameGraphBuilder frameGraphBuilder, + Map> targets, + Matrix4f projectionMatrix, + @Nullable Consumer uniformSetter + ) { FramePass framePass = frameGraphBuilder.addPass(this.name); for (PostPass.Input input : this.inputs) { - input.addToPass(framePass, map); + input.addToPass(framePass, targets); } - ResourceHandle resourceHandle = (ResourceHandle)map.computeIfPresent( + ResourceHandle resourceHandle = (ResourceHandle)targets.computeIfPresent( this.outputTargetId, (resourceLocation, resourceHandlex) -> framePass.readsAndWrites(resourceHandlex) ); if (resourceHandle == null) { throw new IllegalStateException("Missing handle for target " + this.outputTargetId); } else { - framePass.executes(() -> { - RenderTarget renderTarget = resourceHandle.get(); - RenderSystem.viewport(0, 0, renderTarget.width, renderTarget.height); + framePass.executes( + () -> { + RenderTarget renderTarget = resourceHandle.get(); + RenderSystem.backupProjectionMatrix(); + RenderSystem.setProjectionMatrix(projectionMatrix, ProjectionType.ORTHOGRAPHIC); + GpuBuffer gpuBuffer = RenderSystem.getQuadVertexBuffer(); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer2 = autoStorageIndexBuffer.getBuffer(6); - for (PostPass.Input inputx : this.inputs) { - inputx.bindTo(this.shader, map); - } + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass( + renderTarget.getColorTexture(), OptionalInt.empty(), renderTarget.useDepth ? renderTarget.getDepthTexture() : null, OptionalDouble.empty() + )) { + renderPass.setPipeline(this.pipeline); + renderPass.setUniform("OutSize", (float)renderTarget.width, (float)renderTarget.height); + renderPass.setVertexBuffer(0, gpuBuffer); + renderPass.setIndexBuffer(gpuBuffer2, autoStorageIndexBuffer.type()); - this.shader.safeGetUniform("OutSize").set((float)renderTarget.width, (float)renderTarget.height); + for (PostPass.Input inputx : this.inputs) { + inputx.bindTo(renderPass, targets); + } - for (PostChainConfig.Uniform uniform : this.uniforms) { - Uniform uniform2 = this.shader.getUniform(uniform.name()); - if (uniform2 != null) { - uniform2.setFromConfig(uniform.values(), uniform.values().size()); + if (uniformSetter != null) { + uniformSetter.accept(renderPass); + } + + for (PostChainConfig.Uniform uniform : this.uniforms) { + uniform.setOnRenderPass(renderPass); + } + + renderPass.drawIndexed(0, 6); + } + + RenderSystem.restoreProjectionMatrix(); + + for (PostPass.Input input2 : this.inputs) { + input2.cleanup(targets); } } - - renderTarget.setClearColor(0.0F, 0.0F, 0.0F, 0.0F); - renderTarget.clear(); - renderTarget.bindWrite(false); - RenderSystem.depthFunc(519); - RenderSystem.setShader(this.shader); - RenderSystem.backupProjectionMatrix(); - RenderSystem.setProjectionMatrix(matrix4f, ProjectionType.ORTHOGRAPHIC); - BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION); - bufferBuilder.addVertex(0.0F, 0.0F, 500.0F); - bufferBuilder.addVertex(renderTarget.width, 0.0F, 500.0F); - bufferBuilder.addVertex(renderTarget.width, renderTarget.height, 500.0F); - bufferBuilder.addVertex(0.0F, renderTarget.height, 500.0F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.depthFunc(515); - RenderSystem.restoreProjectionMatrix(); - renderTarget.unbindWrite(); - - for (PostPass.Input input2 : this.inputs) { - input2.cleanup(map); - } - - this.restoreDefaultUniforms(); - }); + ); } } - private void restoreDefaultUniforms() { - for (PostChainConfig.Uniform uniform : this.uniforms) { - String string = uniform.name(); - Uniform uniform2 = this.shader.getUniform(string); - ShaderProgramConfig.Uniform uniform3 = this.shader.getUniformConfig(string); - if (uniform2 != null && uniform3 != null && !uniform.values().equals(uniform3.values())) { - uniform2.setFromConfig(uniform3); - } - } - } - - public CompiledShaderProgram getShader() { - return this.shader; - } - @Environment(EnvType.CLIENT) public interface Input { - void addToPass(FramePass framePass, Map> map); + void addToPass(FramePass pass, Map> targets); - void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map); + void bindTo(RenderPass renderPass, Map> targets); - default void cleanup(Map> map) { + default void cleanup(Map> targets) { } } @Environment(EnvType.CLIENT) public record TargetInput(String samplerName, ResourceLocation targetId, boolean depthBuffer, boolean bilinear) implements PostPass.Input { - private ResourceHandle getHandle(Map> map) { - ResourceHandle resourceHandle = (ResourceHandle)map.get(this.targetId); + private ResourceHandle getHandle(Map> targets) { + ResourceHandle resourceHandle = (ResourceHandle)targets.get(this.targetId); if (resourceHandle == null) { throw new IllegalStateException("Missing handle for target " + this.targetId); } else { @@ -133,23 +128,28 @@ public class PostPass { } @Override - public void addToPass(FramePass framePass, Map> map) { - framePass.reads(this.getHandle(map)); + public void addToPass(FramePass pass, Map> targets) { + pass.reads(this.getHandle(targets)); } @Override - public void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map) { - ResourceHandle resourceHandle = this.getHandle(map); + public void bindTo(RenderPass renderPass, Map> targets) { + ResourceHandle resourceHandle = this.getHandle(targets); RenderTarget renderTarget = resourceHandle.get(); - renderTarget.setFilterMode(this.bilinear ? 9729 : 9728); - compiledShaderProgram.bindSampler(this.samplerName + "Sampler", this.depthBuffer ? renderTarget.getDepthTextureId() : renderTarget.getColorTextureId()); - compiledShaderProgram.safeGetUniform(this.samplerName + "Size").set((float)renderTarget.width, (float)renderTarget.height); + renderTarget.setFilterMode(this.bilinear ? FilterMode.LINEAR : FilterMode.NEAREST); + GpuTexture gpuTexture = this.depthBuffer ? renderTarget.getDepthTexture() : renderTarget.getColorTexture(); + if (gpuTexture == null) { + throw new IllegalStateException("Missing " + (this.depthBuffer ? "depth" : "color") + "texture for target " + this.targetId); + } else { + renderPass.bindSampler(this.samplerName + "Sampler", gpuTexture); + renderPass.setUniform(this.samplerName + "Size", (float)renderTarget.width, (float)renderTarget.height); + } } @Override - public void cleanup(Map> map) { + public void cleanup(Map> targets) { if (this.bilinear) { - this.getHandle(map).get().setFilterMode(9728); + this.getHandle(targets).get().setFilterMode(FilterMode.NEAREST); } } } @@ -157,13 +157,13 @@ public class PostPass { @Environment(EnvType.CLIENT) public record TextureInput(String samplerName, AbstractTexture texture, int width, int height) implements PostPass.Input { @Override - public void addToPass(FramePass framePass, Map> map) { + public void addToPass(FramePass pass, Map> targets) { } @Override - public void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map) { - compiledShaderProgram.bindSampler(this.samplerName + "Sampler", this.texture.getId()); - compiledShaderProgram.safeGetUniform(this.samplerName + "Size").set((float)this.width, (float)this.height); + public void bindTo(RenderPass renderPass, Map> targets) { + renderPass.bindSampler(this.samplerName + "Sampler", this.texture.getTexture()); + renderPass.setUniform(this.samplerName + "Size", (float)this.width, (float)this.height); } } } diff --git a/net/minecraft/client/renderer/RenderPipelines.java b/net/minecraft/client/renderer/RenderPipelines.java new file mode 100644 index 00000000..d20399cd --- /dev/null +++ b/net/minecraft/client/renderer/RenderPipelines.java @@ -0,0 +1,759 @@ +package net.minecraft.client.renderer; + +import com.mojang.blaze3d.pipeline.BlendFunction; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.platform.DepthTestFunction; +import com.mojang.blaze3d.platform.DestFactor; +import com.mojang.blaze3d.platform.LogicOp; +import com.mojang.blaze3d.platform.PolygonMode; +import com.mojang.blaze3d.platform.SourceFactor; +import com.mojang.blaze3d.shaders.UniformType; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.vertex.VertexFormat; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +public class RenderPipelines { + private static final Map PIPELINES_BY_LOCATION = new HashMap(); + private static final RenderPipeline.Snippet MATRICES_SNIPPET = RenderPipeline.builder() + .withUniform("ModelViewMat", UniformType.MATRIX4X4) + .withUniform("ProjMat", UniformType.MATRIX4X4) + .buildSnippet(); + private static final RenderPipeline.Snippet FOG_NO_COLOR_SNIPPET = RenderPipeline.builder() + .withUniform("FogStart", UniformType.FLOAT) + .withUniform("FogEnd", UniformType.FLOAT) + .withUniform("FogShape", UniformType.INT) + .buildSnippet(); + private static final RenderPipeline.Snippet FOG_SNIPPET = RenderPipeline.builder(FOG_NO_COLOR_SNIPPET) + .withUniform("FogColor", UniformType.VEC4) + .buildSnippet(); + private static final RenderPipeline.Snippet MATRICES_COLOR_SNIPPET = RenderPipeline.builder(MATRICES_SNIPPET) + .withUniform("ColorModulator", UniformType.VEC4) + .buildSnippet(); + private static final RenderPipeline.Snippet MATRICES_COLOR_FOG_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET, FOG_SNIPPET).buildSnippet(); + private static final RenderPipeline.Snippet MATRICES_COLOR_FOG_OFFSET_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withUniform("ModelOffset", UniformType.VEC3) + .buildSnippet(); + private static final RenderPipeline.Snippet MATRICES_COLOR_FOG_LIGHT_DIR_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET, FOG_SNIPPET) + .withUniform("Light0_Direction", UniformType.VEC3) + .withUniform("Light1_Direction", UniformType.VEC3) + .buildSnippet(); + private static final RenderPipeline.Snippet TERRAIN_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_OFFSET_SNIPPET) + .withVertexShader("core/terrain") + .withFragmentShader("core/terrain") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withVertexFormat(DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet ENTITY_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_LIGHT_DIR_SNIPPET) + .withVertexShader("core/entity") + .withFragmentShader("core/entity") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet BEACON_BEAM_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withVertexShader("core/rendertype_beacon_beam") + .withFragmentShader("core/rendertype_beacon_beam") + .withSampler("Sampler0") + .withVertexFormat(DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet TEXT_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet END_PORTAL_SNIPPET = RenderPipeline.builder(MATRICES_SNIPPET, FOG_SNIPPET) + .withVertexShader("core/rendertype_end_portal") + .withFragmentShader("core/rendertype_end_portal") + .withSampler("Sampler0") + .withSampler("Sampler1") + .withUniform("GameTime", UniformType.FLOAT) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet CLOUDS_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_OFFSET_SNIPPET) + .withVertexShader("core/rendertype_clouds") + .withFragmentShader("core/rendertype_clouds") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet LINES_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withVertexShader("core/rendertype_lines") + .withFragmentShader("core/rendertype_lines") + .withUniform("LineWidth", UniformType.FLOAT) + .withUniform("ScreenSize", UniformType.VEC2) + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL, VertexFormat.Mode.LINES) + .buildSnippet(); + private static final RenderPipeline.Snippet DEBUG_FILLED_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withVertexShader("core/position_color") + .withFragmentShader("core/position_color") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet PARTICLE_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withVertexShader("core/particle") + .withFragmentShader("core/particle") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withVertexFormat(DefaultVertexFormat.PARTICLE, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet WEATHER_SNIPPET = RenderPipeline.builder(PARTICLE_SNIPPET) + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .buildSnippet(); + private static final RenderPipeline.Snippet GUI_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withVertexShader("core/gui") + .withFragmentShader("core/gui") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet GUI_TEXTURED_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withVertexShader("core/position_tex_color") + .withFragmentShader("core/position_tex_color") + .withSampler("Sampler0") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX_COLOR, VertexFormat.Mode.QUADS) + .buildSnippet(); + private static final RenderPipeline.Snippet OUTLINE_SNIPPET = RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withVertexShader("core/rendertype_outline") + .withFragmentShader("core/rendertype_outline") + .withSampler("Sampler0") + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX_COLOR, VertexFormat.Mode.QUADS) + .buildSnippet(); + public static final RenderPipeline.Snippet POST_PROCESSING_SNIPPET = RenderPipeline.builder() + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .withUniform("ProjMat", UniformType.MATRIX4X4) + .withUniform("OutSize", UniformType.VEC2) + .buildSnippet(); + public static final RenderPipeline SOLID = register(RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/solid").build()); + public static final RenderPipeline WIREFRAME = register( + RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/wireframe").withPolygonMode(PolygonMode.WIREFRAME).build() + ); + public static final RenderPipeline CUTOUT_MIPPED = register( + RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/cutout_mipped").withShaderDefine("ALPHA_CUTOUT", 0.5F).build() + ); + public static final RenderPipeline CUTOUT = register( + RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/cutout").withShaderDefine("ALPHA_CUTOUT", 0.1F).build() + ); + public static final RenderPipeline TRANSLUCENT = register( + RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/translucent").withBlend(BlendFunction.TRANSLUCENT).build() + ); + public static final RenderPipeline TRIPWIRE = register( + RenderPipeline.builder(TERRAIN_SNIPPET).withLocation("pipeline/tripwire").withShaderDefine("ALPHA_CUTOUT", 0.1F).withBlend(BlendFunction.TRANSLUCENT).build() + ); + public static final RenderPipeline TRANSLUCENT_MOVING_BLOCK = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/translucent_moving_block") + .withVertexShader("core/rendertype_translucent_moving_block") + .withFragmentShader("core/rendertype_translucent_moving_block") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline ARMOR_CUTOUT_NO_CULL = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/armor_cutout_no_cull") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("NO_OVERLAY") + .withCull(false) + .build() + ); + public static final RenderPipeline ARMOR_DECAL_CUTOUT_NO_CULL = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/armor_decal_cutout_no_cull") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("NO_OVERLAY") + .withCull(false) + .withDepthTestFunction(DepthTestFunction.EQUAL_DEPTH_TEST) + .build() + ); + public static final RenderPipeline ARMOR_TRANSLUCENT = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/armor_translucent") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("NO_OVERLAY") + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .build() + ); + public static final RenderPipeline ENTITY_SOLID = register( + RenderPipeline.builder(ENTITY_SNIPPET).withLocation("pipeline/entity_solid").withSampler("Sampler1").build() + ); + public static final RenderPipeline ENTITY_SOLID_Z_OFFSET_FORWARD = register( + RenderPipeline.builder(ENTITY_SNIPPET).withLocation("pipeline/entity_solid_offset_forward").withSampler("Sampler1").build() + ); + public static final RenderPipeline ENTITY_CUTOUT = register( + RenderPipeline.builder(ENTITY_SNIPPET).withLocation("pipeline/entity_cutout").withShaderDefine("ALPHA_CUTOUT", 0.1F).withSampler("Sampler1").build() + ); + public static final RenderPipeline ENTITY_CUTOUT_NO_CULL = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_cutout_no_cull") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withSampler("Sampler1") + .withCull(false) + .build() + ); + public static final RenderPipeline ENTITY_CUTOUT_NO_CULL_Z_OFFSET = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_cutout_no_cull_z_offset") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withSampler("Sampler1") + .withCull(false) + .build() + ); + public static final RenderPipeline ENTITY_TRANSLUCENT = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_translucent") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withSampler("Sampler1") + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .build() + ); + public static final RenderPipeline ENTITY_TRANSLUCENT_EMISSIVE = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_translucent_emissive") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("EMISSIVE") + .withSampler("Sampler1") + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline ENTITY_SMOOTH_CUTOUT = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_smooth_cutout") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withSampler("Sampler1") + .withCull(false) + .build() + ); + public static final RenderPipeline ENTITY_NO_OUTLINE = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/entity_no_outline") + .withShaderDefine("NO_OVERLAY") + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline BREEZE_WIND = register( + RenderPipeline.builder(ENTITY_SNIPPET) + .withLocation("pipeline/breeze_wind") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("APPLY_TEXTURE_MATRIX") + .withShaderDefine("NO_OVERLAY") + .withShaderDefine("NO_CARDINAL_LIGHTING") + .withUniform("TextureMat", UniformType.MATRIX4X4) + .withBlend(BlendFunction.TRANSLUCENT) + .withCull(false) + .build() + ); + public static final RenderPipeline ENERGY_SWIRL = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/energy_swirl") + .withVertexShader("core/entity") + .withFragmentShader("core/entity") + .withShaderDefine("ALPHA_CUTOUT", 0.1F) + .withShaderDefine("EMISSIVE") + .withShaderDefine("NO_OVERLAY") + .withShaderDefine("NO_CARDINAL_LIGHTING") + .withShaderDefine("APPLY_TEXTURE_MATRIX") + .withSampler("Sampler0") + .withUniform("TextureMat", UniformType.MATRIX4X4) + .withBlend(BlendFunction.ADDITIVE) + .withCull(false) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline EYES = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/eyes") + .withVertexShader("core/entity") + .withFragmentShader("core/entity") + .withShaderDefine("EMISSIVE") + .withShaderDefine("NO_OVERLAY") + .withShaderDefine("NO_CARDINAL_LIGHTING") + .withSampler("Sampler0") + .withBlend(BlendFunction.TRANSLUCENT) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline ENTITY_DECAL = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_LIGHT_DIR_SNIPPET) + .withLocation("pipeline/entity_decal") + .withVertexShader("core/rendertype_entity_decal") + .withFragmentShader("core/rendertype_entity_decal") + .withSampler("Sampler0") + .withSampler("Sampler1") + .withSampler("Sampler2") + .withDepthTestFunction(DepthTestFunction.EQUAL_DEPTH_TEST) + .withCull(false) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline ENTITY_SHADOW = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/entity_shadow") + .withVertexShader("core/rendertype_entity_shadow") + .withFragmentShader("core/rendertype_entity_shadow") + .withSampler("Sampler0") + .withBlend(BlendFunction.TRANSLUCENT) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline ITEM_ENTITY_TRANSLUCENT_CULL = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_LIGHT_DIR_SNIPPET) + .withLocation("pipeline/item_entity_translucent_cull") + .withVertexShader("core/rendertype_item_entity_translucent_cull") + .withFragmentShader("core/rendertype_item_entity_translucent_cull") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withBlend(BlendFunction.TRANSLUCENT) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline BEACON_BEAM_OPAQUE = register( + RenderPipeline.builder(BEACON_BEAM_SNIPPET).withLocation("pipeline/beacon_beam_opaque").build() + ); + public static final RenderPipeline BEACON_BEAM_TRANSLUCENT = register( + RenderPipeline.builder(BEACON_BEAM_SNIPPET) + .withLocation("pipeline/beacon_beam_translucent") + .withDepthWrite(false) + .withBlend(BlendFunction.TRANSLUCENT) + .build() + ); + public static final RenderPipeline DRAGON_EXPLOSION_ALPHA = register( + RenderPipeline.builder(MATRICES_SNIPPET) + .withLocation("pipeline/dragon_explosion_alpha") + .withVertexShader("core/rendertype_entity_alpha") + .withFragmentShader("core/rendertype_entity_alpha") + .withSampler("Sampler0") + .withCull(false) + .withVertexFormat(DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline LEASH = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/leash") + .withVertexShader("core/rendertype_leash") + .withFragmentShader("core/rendertype_leash") + .withSampler("Sampler2") + .withCull(false) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, VertexFormat.Mode.TRIANGLE_STRIP) + .build() + ); + public static final RenderPipeline WATER_MASK = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/water_mask") + .withVertexShader("core/rendertype_water_mask") + .withFragmentShader("core/rendertype_water_mask") + .withColorWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline GLINT = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET, FOG_NO_COLOR_SNIPPET) + .withLocation("pipeline/glint") + .withVertexShader("core/glint") + .withFragmentShader("core/glint") + .withSampler("Sampler0") + .withUniform("TextureMat", UniformType.MATRIX4X4) + .withUniform("GlintAlpha", UniformType.FLOAT) + .withDepthWrite(false) + .withCull(false) + .withDepthTestFunction(DepthTestFunction.EQUAL_DEPTH_TEST) + .withBlend(BlendFunction.GLINT) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline CRUMBLING = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/crumbling") + .withVertexShader("core/rendertype_crumbling") + .withFragmentShader("core/rendertype_crumbling") + .withSampler("Sampler0") + .withBlend(new BlendFunction(SourceFactor.DST_COLOR, DestFactor.SRC_COLOR, SourceFactor.ONE, DestFactor.ZERO)) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS) + .withDepthBias(-1.0F, -10.0F) + .build() + ); + public static final RenderPipeline TEXT = register( + RenderPipeline.builder(TEXT_SNIPPET, FOG_SNIPPET) + .withLocation("pipeline/text") + .withVertexShader("core/rendertype_text") + .withFragmentShader("core/rendertype_text") + .withSampler("Sampler0") + .withSampler("Sampler2") + .build() + ); + public static final RenderPipeline TEXT_BACKGROUND = register( + RenderPipeline.builder(TEXT_SNIPPET, FOG_SNIPPET) + .withLocation("pipeline/text_background") + .withVertexShader("core/rendertype_text_background") + .withFragmentShader("core/rendertype_text_background") + .withSampler("Sampler2") + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline TEXT_INTENSITY = register( + RenderPipeline.builder(TEXT_SNIPPET, FOG_SNIPPET) + .withLocation("pipeline/text_intensity") + .withVertexShader("core/rendertype_text_intensity") + .withFragmentShader("core/rendertype_text_intensity") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withDepthBias(-1.0F, -10.0F) + .build() + ); + public static final RenderPipeline TEXT_POLYGON_OFFSET = register( + RenderPipeline.builder(TEXT_SNIPPET, FOG_SNIPPET) + .withLocation("pipeline/text_polygon_offset") + .withVertexShader("core/rendertype_text") + .withFragmentShader("core/rendertype_text") + .withSampler("Sampler0") + .withSampler("Sampler2") + .withDepthBias(-1.0F, -10.0F) + .build() + ); + public static final RenderPipeline TEXT_SEE_THROUGH = register( + RenderPipeline.builder(TEXT_SNIPPET) + .withLocation("pipeline/text_see_through") + .withVertexShader("core/rendertype_text_see_through") + .withFragmentShader("core/rendertype_text_see_through") + .withSampler("Sampler0") + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .build() + ); + public static final RenderPipeline TEXT_BACKGROUND_SEE_THROUGH = register( + RenderPipeline.builder(TEXT_SNIPPET) + .withLocation("pipeline/text_background_see_through") + .withVertexShader("core/rendertype_text_background_see_through") + .withFragmentShader("core/rendertype_text_background_see_through") + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline TEXT_INTENSITY_SEE_THROUGH = register( + RenderPipeline.builder(TEXT_SNIPPET) + .withLocation("pipeline/text_intensity_see_through") + .withVertexShader("core/rendertype_text_intensity_see_through") + .withFragmentShader("core/rendertype_text_intensity_see_through") + .withSampler("Sampler0") + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .build() + ); + public static final RenderPipeline LIGHTNING = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/lightning") + .withVertexShader("core/rendertype_lightning") + .withFragmentShader("core/rendertype_lightning") + .withBlend(BlendFunction.LIGHTNING) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline DRAGON_RAYS = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/dragon_rays") + .withVertexShader("core/rendertype_lightning") + .withFragmentShader("core/rendertype_lightning") + .withDepthWrite(false) + .withBlend(BlendFunction.LIGHTNING) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.TRIANGLES) + .build() + ); + public static final RenderPipeline DRAGON_RAYS_DEPTH = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/dragon_rays_depth") + .withVertexShader("core/position") + .withFragmentShader("core/position") + .withColorWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.TRIANGLES) + .build() + ); + public static final RenderPipeline END_PORTAL = register( + RenderPipeline.builder(END_PORTAL_SNIPPET).withLocation("pipeline/end_portal").withShaderDefine("PORTAL_LAYERS", 15).build() + ); + public static final RenderPipeline END_GATEWAY = register( + RenderPipeline.builder(END_PORTAL_SNIPPET).withLocation("pipeline/end_gateway").withShaderDefine("PORTAL_LAYERS", 16).build() + ); + public static final RenderPipeline FLAT_CLOUDS = register(RenderPipeline.builder(CLOUDS_SNIPPET).withLocation("pipeline/flat_clouds").withCull(false).build()); + public static final RenderPipeline CLOUDS = register(RenderPipeline.builder(CLOUDS_SNIPPET).withLocation("pipeline/clouds").build()); + public static final RenderPipeline CLOUDS_DEPTH_ONLY = register( + RenderPipeline.builder(CLOUDS_SNIPPET).withLocation("pipeline/clouds_depth_only").withColorWrite(false).build() + ); + public static final RenderPipeline LINES = register(RenderPipeline.builder(LINES_SNIPPET).withLocation("pipeline/lines").build()); + public static final RenderPipeline SECONDARY_BLOCK_OUTLINE = register( + RenderPipeline.builder(LINES_SNIPPET).withLocation("pipeline/secondary_block_outline").withDepthWrite(false).build() + ); + public static final RenderPipeline LINE_STRIP = register( + RenderPipeline.builder(LINES_SNIPPET) + .withLocation("pipeline/line_strip") + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL, VertexFormat.Mode.LINE_STRIP) + .build() + ); + public static final RenderPipeline DEBUG_LINE_STRIP = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/debug_line_strip") + .withVertexShader("core/position_color") + .withFragmentShader("core/position_color") + .withCull(false) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.DEBUG_LINE_STRIP) + .build() + ); + public static final RenderPipeline DEBUG_FILLED_BOX = register( + RenderPipeline.builder(DEBUG_FILLED_SNIPPET) + .withLocation("pipeline/debug_filled_box") + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.TRIANGLE_STRIP) + .build() + ); + public static final RenderPipeline DEBUG_QUADS = register( + RenderPipeline.builder(DEBUG_FILLED_SNIPPET).withLocation("pipeline/debug_quads").withCull(false).build() + ); + public static final RenderPipeline DEBUG_TRIANGLE_FAN = register( + RenderPipeline.builder(DEBUG_FILLED_SNIPPET) + .withLocation("pipeline/debug_triangle_fan") + .withCull(false) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.TRIANGLE_FAN) + .build() + ); + public static final RenderPipeline DEBUG_STRUCTURE_QUADS = register( + RenderPipeline.builder(DEBUG_FILLED_SNIPPET).withLocation("pipeline/debug_structure_quads").withCull(false).withDepthWrite(false).build() + ); + public static final RenderPipeline DEBUG_SECTION_QUADS = register( + RenderPipeline.builder(DEBUG_FILLED_SNIPPET).withLocation("pipeline/debug_section_quads").build() + ); + public static final RenderPipeline WORLD_BORDER = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/world_border") + .withVertexShader("core/rendertype_world_border") + .withFragmentShader("core/rendertype_world_border") + .withSampler("Sampler0") + .withUniform("TextureMat", UniformType.MATRIX4X4) + .withUniform("ModelOffset", UniformType.VEC3) + .withBlend(BlendFunction.OVERLAY) + .withCull(false) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX, VertexFormat.Mode.QUADS) + .withDepthBias(-3.0F, -3.0F) + .build() + ); + public static final RenderPipeline OPAQUE_PARTICLE = register(RenderPipeline.builder(PARTICLE_SNIPPET).withLocation("pipeline/opaque_particle").build()); + public static final RenderPipeline TRANSLUCENT_PARTICLE = register( + RenderPipeline.builder(PARTICLE_SNIPPET).withLocation("pipeline/translucent_particle").withBlend(BlendFunction.TRANSLUCENT).build() + ); + public static final RenderPipeline WEATHER_DEPTH_WRITE = register(RenderPipeline.builder(WEATHER_SNIPPET).withLocation("pipeline/weather_depth_write").build()); + public static final RenderPipeline WEATHER_NO_DEPTH_WRITE = register( + RenderPipeline.builder(WEATHER_SNIPPET).withLocation("pipeline/weather_no_depth_write").withDepthWrite(false).build() + ); + public static final RenderPipeline SKY = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/sky") + .withVertexShader("core/position") + .withFragmentShader("core/position") + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.TRIANGLE_FAN) + .build() + ); + public static final RenderPipeline END_SKY = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/end_sky") + .withVertexShader("core/position_tex_color") + .withFragmentShader("core/position_tex_color") + .withSampler("Sampler0") + .withBlend(BlendFunction.TRANSLUCENT) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX_COLOR, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline SUNRISE_SUNSET = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/sunrise_sunset") + .withVertexShader("core/position_color") + .withFragmentShader("core/position_color") + .withBlend(BlendFunction.TRANSLUCENT) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION_COLOR, VertexFormat.Mode.TRIANGLE_FAN) + .build() + ); + public static final RenderPipeline STARS = register( + RenderPipeline.builder(MATRICES_COLOR_FOG_SNIPPET) + .withLocation("pipeline/stars") + .withVertexShader("core/position") + .withFragmentShader("core/position") + .withBlend(BlendFunction.OVERLAY) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline CELESTIAL = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/celestial") + .withVertexShader("core/position_tex_color") + .withFragmentShader("core/position_tex_color") + .withSampler("Sampler0") + .withBlend(BlendFunction.OVERLAY) + .withDepthWrite(false) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX_COLOR, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline GUI = register(RenderPipeline.builder(GUI_SNIPPET).withLocation("pipeline/gui").build()); + public static final RenderPipeline GUI_OVERLAY = register( + RenderPipeline.builder(GUI_SNIPPET).withLocation("pipeline/gui_overlay").withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST).withDepthWrite(false).build() + ); + public static final RenderPipeline GUI_TEXT_HIGHLIGHT = register( + RenderPipeline.builder(GUI_SNIPPET) + .withLocation("pipeline/gui_text_highlight") + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withColorLogic(LogicOp.OR_REVERSE) + .build() + ); + public static final RenderPipeline GUI_GHOST_RECIPE_OVERLAY = register( + RenderPipeline.builder(GUI_SNIPPET) + .withLocation("pipeline/gui_ghost_recipe_overlay") + .withDepthTestFunction(DepthTestFunction.GREATER_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline GUI_TEXTURED = register(RenderPipeline.builder(GUI_TEXTURED_SNIPPET).withLocation("pipeline/gui_textured").build()); + public static final RenderPipeline GUI_TEXTURED_OVERLAY = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/gui_textured_overlay") + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline BLOCK_SCREEN_EFFECT = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/block_screen_effect") + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline FIRE_SCREEN_EFFECT = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/fire_screen_effect") + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline GUI_OPAQUE_TEXTURED_BACKGROUND = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET).withLocation("pipeline/gui_opaque_textured_background").withoutBlend().build() + ); + public static final RenderPipeline GUI_NAUSEA_OVERLAY = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/gui_nausea_overlay") + .withBlend(BlendFunction.ADDITIVE) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline VIGNETTE = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/vignette") + .withBlend(new BlendFunction(SourceFactor.ZERO, DestFactor.ONE_MINUS_SRC_COLOR)) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline CROSSHAIR = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/crosshair") + .withBlend(new BlendFunction(SourceFactor.ONE_MINUS_DST_COLOR, DestFactor.ONE_MINUS_SRC_COLOR, SourceFactor.ONE, DestFactor.ZERO)) + .build() + ); + public static final RenderPipeline MOJANG_LOGO = register( + RenderPipeline.builder(GUI_TEXTURED_SNIPPET) + .withLocation("pipeline/mojang_logo") + .withBlend(new BlendFunction(SourceFactor.SRC_ALPHA, DestFactor.ONE)) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withDepthWrite(false) + .build() + ); + public static final RenderPipeline ENTITY_OUTLINE_BLIT = register( + RenderPipeline.builder() + .withLocation("pipeline/entity_outline_blit") + .withVertexShader("core/blit_screen") + .withFragmentShader("core/blit_screen") + .withSampler("InSampler") + .withBlend(BlendFunction.ENTITY_OUTLINE_BLIT) + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withColorWrite(true, false) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline TRACY_BLIT = register( + RenderPipeline.builder() + .withLocation("pipeline/tracy_blit") + .withVertexShader("core/blit_screen") + .withFragmentShader("core/blit_screen") + .withSampler("InSampler") + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline PANORAMA = register( + RenderPipeline.builder(MATRICES_COLOR_SNIPPET) + .withLocation("pipeline/panorama") + .withVertexShader("core/position_tex") + .withFragmentShader("core/position_tex") + .withSampler("Sampler0") + .withDepthWrite(false) + .withColorWrite(true, false) + .withBlend(BlendFunction.PANORAMA) + .withVertexFormat(DefaultVertexFormat.POSITION_TEX, VertexFormat.Mode.QUADS) + .build() + ); + public static final RenderPipeline OUTLINE_CULL = register(RenderPipeline.builder(OUTLINE_SNIPPET).withLocation("pipeline/outline_cull").build()); + public static final RenderPipeline OUTLINE_NO_CULL = register( + RenderPipeline.builder(OUTLINE_SNIPPET).withLocation("pipeline/outline_no_cull").withCull(false).build() + ); + public static final RenderPipeline LIGHTMAP = register( + RenderPipeline.builder() + .withLocation("pipeline/lightmap") + .withVertexShader("core/blit_screen") + .withFragmentShader("core/lightmap") + .withUniform("AmbientLightFactor", UniformType.FLOAT) + .withUniform("SkyFactor", UniformType.FLOAT) + .withUniform("BlockFactor", UniformType.FLOAT) + .withUniform("UseBrightLightmap", UniformType.INT) + .withUniform("SkyLightColor", UniformType.VEC3) + .withUniform("NightVisionFactor", UniformType.FLOAT) + .withUniform("DarknessScale", UniformType.FLOAT) + .withUniform("DarkenWorldFactor", UniformType.FLOAT) + .withUniform("BrightnessFactor", UniformType.FLOAT) + .withVertexFormat(DefaultVertexFormat.POSITION, VertexFormat.Mode.QUADS) + .withDepthWrite(false) + .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST) + .build() + ); + + private static RenderPipeline register(RenderPipeline pipeline) { + PIPELINES_BY_LOCATION.put(pipeline.getLocation(), pipeline); + return pipeline; + } + + public static List getStaticPipelines() { + return PIPELINES_BY_LOCATION.values().stream().toList(); + } +} diff --git a/net/minecraft/client/renderer/RenderStateShard.java b/net/minecraft/client/renderer/RenderStateShard.java index 78934e6c..3db33c64 100644 --- a/net/minecraft/client/renderer/RenderStateShard.java +++ b/net/minecraft/client/renderer/RenderStateShard.java @@ -1,23 +1,23 @@ package net.minecraft.client.renderer; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.pipeline.RenderTarget; -import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; +import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.OptionalDouble; +import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderStateShard.MultiTextureStateShard.Builder; +import net.minecraft.client.renderer.RenderStateShard.MultiTextureStateShard.Entry; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.TriState; -import org.apache.commons.lang3.tuple.Triple; import org.joml.Matrix4f; import org.joml.Matrix4fStack; @@ -27,242 +27,6 @@ public abstract class RenderStateShard { protected final String name; private final Runnable setupState; private final Runnable clearState; - protected static final RenderStateShard.TransparencyStateShard NO_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "no_transparency", () -> RenderSystem.disableBlend(), () -> {} - ); - protected static final RenderStateShard.TransparencyStateShard ADDITIVE_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "additive_transparency", () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE); - }, () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard LIGHTNING_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "lightning_transparency", () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE); - }, () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard GLINT_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "glint_transparency", - () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.SRC_COLOR, GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE - ); - }, - () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard CRUMBLING_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "crumbling_transparency", - () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.DST_COLOR, GlStateManager.DestFactor.SRC_COLOR, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO - ); - }, - () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard TRANSLUCENT_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "translucent_transparency", - () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.SRC_ALPHA, - GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, - GlStateManager.SourceFactor.ONE, - GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA - ); - }, - () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard VIGNETTE_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "vignette_transparency", () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFunc(GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE_MINUS_SRC_COLOR); - }, () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard CROSSHAIR_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "crosshair_transparency", - () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.ONE_MINUS_DST_COLOR, - GlStateManager.DestFactor.ONE_MINUS_SRC_COLOR, - GlStateManager.SourceFactor.ONE, - GlStateManager.DestFactor.ZERO - ); - }, - () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard MOJANG_LOGO_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "mojang_logo_transparency", () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFunc(770, 1); - }, () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.TransparencyStateShard NAUSEA_OVERLAY_TRANSPARENCY = new RenderStateShard.TransparencyStateShard( - "nausea_overlay_transparency", - () -> { - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE - ); - }, - () -> { - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - } - ); - protected static final RenderStateShard.ShaderStateShard NO_SHADER = new RenderStateShard.ShaderStateShard(); - protected static final RenderStateShard.ShaderStateShard POSITION_COLOR_LIGHTMAP_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.POSITION_COLOR_LIGHTMAP - ); - protected static final RenderStateShard.ShaderStateShard POSITION_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.POSITION); - protected static final RenderStateShard.ShaderStateShard POSITION_TEX_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.POSITION_TEX); - protected static final RenderStateShard.ShaderStateShard POSITION_COLOR_TEX_LIGHTMAP_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.POSITION_COLOR_TEX_LIGHTMAP - ); - protected static final RenderStateShard.ShaderStateShard POSITION_COLOR_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.POSITION_COLOR); - protected static final RenderStateShard.ShaderStateShard POSITION_TEXTURE_COLOR_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.POSITION_TEX_COLOR); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_SOLID_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_SOLID); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_CUTOUT_MIPPED_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_CUTOUT_MIPPED - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_CUTOUT_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_CUTOUT); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TRANSLUCENT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TRANSLUCENT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TRANSLUCENT_MOVING_BLOCK_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TRANSLUCENT_MOVING_BLOCK - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ARMOR_CUTOUT_NO_CULL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ARMOR_CUTOUT_NO_CULL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ARMOR_TRANSLUCENT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ARMOR_TRANSLUCENT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_SOLID_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_SOLID - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_CUTOUT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_CUTOUT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_CUTOUT_NO_CULL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_CUTOUT_NO_CULL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_CUTOUT_NO_CULL_Z_OFFSET_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_CUTOUT_NO_CULL_Z_OFFSET - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ITEM_ENTITY_TRANSLUCENT_CULL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ITEM_ENTITY_TRANSLUCENT_CULL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_TRANSLUCENT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_TRANSLUCENT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_TRANSLUCENT_EMISSIVE_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_TRANSLUCENT_EMISSIVE - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_SMOOTH_CUTOUT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_SMOOTH_CUTOUT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_BEACON_BEAM_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_BEACON_BEAM - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_DECAL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_DECAL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_NO_OUTLINE_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_NO_OUTLINE - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_SHADOW_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_SHADOW - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_ALPHA_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_ALPHA - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_EYES_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_EYES); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENERGY_SWIRL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENERGY_SWIRL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_LEASH_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_LEASH); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_WATER_MASK_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_WATER_MASK - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_OUTLINE_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_OUTLINE); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ARMOR_ENTITY_GLINT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ARMOR_ENTITY_GLINT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GLINT_TRANSLUCENT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_GLINT_TRANSLUCENT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GLINT_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_GLINT); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_ENTITY_GLINT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_ENTITY_GLINT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_CRUMBLING_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_CRUMBLING); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_TEXT); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_BACKGROUND_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TEXT_BACKGROUND - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_INTENSITY_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TEXT_INTENSITY - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_SEE_THROUGH_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TEXT_SEE_THROUGH - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_BACKGROUND_SEE_THROUGH_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TEXT_BACKGROUND_SEE_THROUGH - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TEXT_INTENSITY_SEE_THROUGH_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_TEXT_INTENSITY_SEE_THROUGH - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_LIGHTNING_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_LIGHTNING); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_TRIPWIRE_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_TRIPWIRE); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_END_PORTAL_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_END_PORTAL - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_END_GATEWAY_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_END_GATEWAY - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_CLOUDS_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_CLOUDS); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_LINES_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_LINES); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GUI_SHADER = new RenderStateShard.ShaderStateShard(CoreShaders.RENDERTYPE_GUI); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GUI_OVERLAY_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_GUI_OVERLAY - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GUI_TEXT_HIGHLIGHT_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_GUI_TEXT_HIGHLIGHT - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_GUI_GHOST_RECIPE_OVERLAY_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_GUI_GHOST_RECIPE_OVERLAY - ); - protected static final RenderStateShard.ShaderStateShard RENDERTYPE_BREEZE_WIND_SHADER = new RenderStateShard.ShaderStateShard( - CoreShaders.RENDERTYPE_BREEZE_WIND - ); protected static final RenderStateShard.TextureStateShard BLOCK_SHEET_MIPPED = new RenderStateShard.TextureStateShard( TextureAtlas.LOCATION_BLOCKS, TriState.FALSE, true ); @@ -274,34 +38,19 @@ public abstract class RenderStateShard { "default_texturing", () -> {}, () -> {} ); protected static final RenderStateShard.TexturingStateShard GLINT_TEXTURING = new RenderStateShard.TexturingStateShard( - "glint_texturing", () -> setupGlintTexturing(8.0F), () -> RenderSystem.resetTextureMatrix() + "glint_texturing", () -> setupGlintTexturing(8.0F), RenderSystem::resetTextureMatrix ); protected static final RenderStateShard.TexturingStateShard ENTITY_GLINT_TEXTURING = new RenderStateShard.TexturingStateShard( - "entity_glint_texturing", () -> setupGlintTexturing(0.16F), () -> RenderSystem.resetTextureMatrix() + "entity_glint_texturing", () -> setupGlintTexturing(0.5F), RenderSystem::resetTextureMatrix + ); + protected static final RenderStateShard.TexturingStateShard ARMOR_ENTITY_GLINT_TEXTURING = new RenderStateShard.TexturingStateShard( + "armor_entity_glint_texturing", () -> setupGlintTexturing(0.16F), RenderSystem::resetTextureMatrix ); protected static final RenderStateShard.LightmapStateShard LIGHTMAP = new RenderStateShard.LightmapStateShard(true); protected static final RenderStateShard.LightmapStateShard NO_LIGHTMAP = new RenderStateShard.LightmapStateShard(false); protected static final RenderStateShard.OverlayStateShard OVERLAY = new RenderStateShard.OverlayStateShard(true); protected static final RenderStateShard.OverlayStateShard NO_OVERLAY = new RenderStateShard.OverlayStateShard(false); - protected static final RenderStateShard.CullStateShard CULL = new RenderStateShard.CullStateShard(true); - protected static final RenderStateShard.CullStateShard NO_CULL = new RenderStateShard.CullStateShard(false); - protected static final RenderStateShard.DepthTestStateShard NO_DEPTH_TEST = new RenderStateShard.DepthTestStateShard("always", 519); - protected static final RenderStateShard.DepthTestStateShard EQUAL_DEPTH_TEST = new RenderStateShard.DepthTestStateShard("==", 514); - protected static final RenderStateShard.DepthTestStateShard LEQUAL_DEPTH_TEST = new RenderStateShard.DepthTestStateShard("<=", 515); - protected static final RenderStateShard.DepthTestStateShard GREATER_DEPTH_TEST = new RenderStateShard.DepthTestStateShard(">", 516); - protected static final RenderStateShard.WriteMaskStateShard COLOR_DEPTH_WRITE = new RenderStateShard.WriteMaskStateShard(true, true); - protected static final RenderStateShard.WriteMaskStateShard COLOR_WRITE = new RenderStateShard.WriteMaskStateShard(true, false); - protected static final RenderStateShard.WriteMaskStateShard DEPTH_WRITE = new RenderStateShard.WriteMaskStateShard(false, true); protected static final RenderStateShard.LayeringStateShard NO_LAYERING = new RenderStateShard.LayeringStateShard("no_layering", () -> {}, () -> {}); - protected static final RenderStateShard.LayeringStateShard POLYGON_OFFSET_LAYERING = new RenderStateShard.LayeringStateShard( - "polygon_offset_layering", () -> { - RenderSystem.polygonOffset(-1.0F, -10.0F); - RenderSystem.enablePolygonOffset(); - }, () -> { - RenderSystem.polygonOffset(0.0F, 0.0F); - RenderSystem.disablePolygonOffset(); - } - ); protected static final RenderStateShard.LayeringStateShard VIEW_OFFSET_Z_LAYERING = new RenderStateShard.LayeringStateShard("view_offset_z_layering", () -> { Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); @@ -321,64 +70,29 @@ public abstract class RenderStateShard { } ); protected static final RenderStateShard.OutputStateShard MAIN_TARGET = new RenderStateShard.OutputStateShard( - "main_target", () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false), () -> {} + "main_target", () -> Minecraft.getInstance().getMainRenderTarget() ); protected static final RenderStateShard.OutputStateShard OUTLINE_TARGET = new RenderStateShard.OutputStateShard("outline_target", () -> { RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.entityOutlineTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); + return renderTarget != null ? renderTarget : Minecraft.getInstance().getMainRenderTarget(); + }); protected static final RenderStateShard.OutputStateShard TRANSLUCENT_TARGET = new RenderStateShard.OutputStateShard("translucent_target", () -> { RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.getTranslucentTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); + return renderTarget != null ? renderTarget : Minecraft.getInstance().getMainRenderTarget(); + }); protected static final RenderStateShard.OutputStateShard PARTICLES_TARGET = new RenderStateShard.OutputStateShard("particles_target", () -> { RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.getParticlesTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); + return renderTarget != null ? renderTarget : Minecraft.getInstance().getMainRenderTarget(); + }); protected static final RenderStateShard.OutputStateShard WEATHER_TARGET = new RenderStateShard.OutputStateShard("weather_target", () -> { RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.getWeatherTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); - protected static final RenderStateShard.OutputStateShard CLOUDS_TARGET = new RenderStateShard.OutputStateShard("clouds_target", () -> { - RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.getCloudsTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); + return renderTarget != null ? renderTarget : Minecraft.getInstance().getMainRenderTarget(); + }); protected static final RenderStateShard.OutputStateShard ITEM_ENTITY_TARGET = new RenderStateShard.OutputStateShard("item_entity_target", () -> { RenderTarget renderTarget = Minecraft.getInstance().levelRenderer.getItemEntityTarget(); - if (renderTarget != null) { - renderTarget.bindWrite(false); - } else { - Minecraft.getInstance().getMainRenderTarget().bindWrite(false); - } - }, () -> Minecraft.getInstance().getMainRenderTarget().bindWrite(false)); + return renderTarget != null ? renderTarget : Minecraft.getInstance().getMainRenderTarget(); + }); protected static final RenderStateShard.LineStateShard DEFAULT_LINE = new RenderStateShard.LineStateShard(OptionalDouble.of(1.0)); - protected static final RenderStateShard.ColorLogicStateShard NO_COLOR_LOGIC = new RenderStateShard.ColorLogicStateShard( - "no_color_logic", () -> RenderSystem.disableColorLogicOp(), () -> {} - ); - protected static final RenderStateShard.ColorLogicStateShard OR_REVERSE_COLOR_LOGIC = new RenderStateShard.ColorLogicStateShard("or_reverse", () -> { - RenderSystem.enableColorLogicOp(); - RenderSystem.logicOp(GlStateManager.LogicOp.OR_REVERSE); - }, () -> RenderSystem.disableColorLogicOp()); public RenderStateShard(String name, Runnable setupState, Runnable clearState) { this.name = name; @@ -398,6 +112,10 @@ public abstract class RenderStateShard { return this.name; } + public String getName() { + return this.name; + } + private static void setupGlintTexturing(float scale) { long l = (long)(Util.getMillis() * Minecraft.getInstance().options.glintSpeed().get() * 8.0); float f = (float)(l % 110000L) / 110000.0F; @@ -422,53 +140,6 @@ public abstract class RenderStateShard { } } - @Environment(EnvType.CLIENT) - protected static class ColorLogicStateShard extends RenderStateShard { - public ColorLogicStateShard(String string, Runnable runnable, Runnable runnable2) { - super(string, runnable, runnable2); - } - } - - @Environment(EnvType.CLIENT) - protected static class CullStateShard extends RenderStateShard.BooleanStateShard { - public CullStateShard(boolean useCull) { - super("cull", () -> { - if (!useCull) { - RenderSystem.disableCull(); - } - }, () -> { - if (!useCull) { - RenderSystem.enableCull(); - } - }, useCull); - } - } - - @Environment(EnvType.CLIENT) - protected static class DepthTestStateShard extends RenderStateShard { - private final String functionName; - - public DepthTestStateShard(String functionName, int depthFunc) { - super("depth_test", () -> { - if (depthFunc != 519) { - RenderSystem.enableDepthTest(); - RenderSystem.depthFunc(depthFunc); - } - }, () -> { - if (depthFunc != 519) { - RenderSystem.disableDepthTest(); - RenderSystem.depthFunc(515); - } - }); - this.functionName = functionName; - } - - @Override - public String toString() { - return this.name + "[" + this.functionName + "]"; - } - } - @Environment(EnvType.CLIENT) protected static class EmptyTextureStateShard extends RenderStateShard { public EmptyTextureStateShard(Runnable setupState, Runnable clearState) { @@ -537,17 +208,17 @@ public abstract class RenderStateShard { protected static class MultiTextureStateShard extends RenderStateShard.EmptyTextureStateShard { private final Optional cutoutTexture; - MultiTextureStateShard(ImmutableList> textures) { + MultiTextureStateShard(List entries) { super(() -> { - int i = 0; - - for (Triple triple : textures) { + for (int i = 0; i < entries.size(); i++) { + Entry entry = (Entry)entries.get(i); TextureManager textureManager = Minecraft.getInstance().getTextureManager(); - textureManager.getTexture(triple.getLeft()).setFilter(triple.getMiddle(), triple.getRight()); - RenderSystem.setShaderTexture(i++, triple.getLeft()); + AbstractTexture abstractTexture = textureManager.getTexture(entry.id); + abstractTexture.setFilter(entry.blur, entry.mipmap); + RenderSystem.setShaderTexture(i, abstractTexture.getTexture()); } }, () -> {}); - this.cutoutTexture = textures.stream().findFirst().map(Triple::getLeft); + this.cutoutTexture = entries.isEmpty() ? Optional.empty() : Optional.of(((Entry)entries.getFirst()).id); } @Override @@ -569,8 +240,15 @@ public abstract class RenderStateShard { @Environment(EnvType.CLIENT) protected static class OutputStateShard extends RenderStateShard { - public OutputStateShard(String string, Runnable runnable, Runnable runnable2) { - super(string, runnable, runnable2); + private final Supplier renderTargetSupplier; + + public OutputStateShard(String name, Supplier renderTargetSupplier) { + super(name, () -> {}, () -> {}); + this.renderTargetSupplier = renderTargetSupplier; + } + + public RenderTarget getRenderTarget() { + return (RenderTarget)this.renderTargetSupplier.get(); } } @@ -589,42 +267,22 @@ public abstract class RenderStateShard { } } - @Environment(EnvType.CLIENT) - protected static class ShaderStateShard extends RenderStateShard { - private final Optional shader; - - public ShaderStateShard(ShaderProgram shaderProgram) { - super("shader", () -> RenderSystem.setShader(shaderProgram), () -> {}); - this.shader = Optional.of(shaderProgram); - } - - public ShaderStateShard() { - super("shader", RenderSystem::clearShader, () -> {}); - this.shader = Optional.empty(); - } - - @Override - public String toString() { - return this.name + "[" + this.shader + "]"; - } - } - @Environment(EnvType.CLIENT) protected static class TextureStateShard extends RenderStateShard.EmptyTextureStateShard { private final Optional texture; private final TriState blur; private final boolean mipmap; - public TextureStateShard(ResourceLocation resourceLocation, TriState triState, boolean bl) { + public TextureStateShard(ResourceLocation texture, TriState blur, boolean mipmap) { super(() -> { TextureManager textureManager = Minecraft.getInstance().getTextureManager(); - AbstractTexture abstractTexture = textureManager.getTexture(resourceLocation); - abstractTexture.setFilter(triState.toBoolean(abstractTexture.getDefaultBlur()), bl); - RenderSystem.setShaderTexture(0, resourceLocation); + AbstractTexture abstractTexture = textureManager.getTexture(texture); + abstractTexture.setFilter(blur, mipmap); + RenderSystem.setShaderTexture(0, abstractTexture.getTexture()); }, () -> {}); - this.texture = Optional.of(resourceLocation); - this.blur = triState; - this.mipmap = bl; + this.texture = Optional.of(texture); + this.blur = blur; + this.mipmap = mipmap; } @Override @@ -644,44 +302,4 @@ public abstract class RenderStateShard { super(string, runnable, runnable2); } } - - @Environment(EnvType.CLIENT) - protected static class TransparencyStateShard extends RenderStateShard { - public TransparencyStateShard(String string, Runnable runnable, Runnable runnable2) { - super(string, runnable, runnable2); - } - } - - @Environment(EnvType.CLIENT) - protected static class WriteMaskStateShard extends RenderStateShard { - private final boolean writeColor; - private final boolean writeDepth; - - public WriteMaskStateShard(boolean writeColor, boolean writeDepth) { - super("write_mask_state", () -> { - if (!writeDepth) { - RenderSystem.depthMask(writeDepth); - } - - if (!writeColor) { - RenderSystem.colorMask(writeColor, writeColor, writeColor, writeColor); - } - }, () -> { - if (!writeDepth) { - RenderSystem.depthMask(true); - } - - if (!writeColor) { - RenderSystem.colorMask(true, true, true, true); - } - }); - this.writeColor = writeColor; - this.writeDepth = writeDepth; - } - - @Override - public String toString() { - return this.name + "[writeColor=" + this.writeColor + ", writeDepth=" + this.writeDepth + "]"; - } - } } diff --git a/net/minecraft/client/renderer/RenderType.java b/net/minecraft/client/renderer/RenderType.java index 2d4e1bc4..ad48c1d6 100644 --- a/net/minecraft/client/renderer/RenderType.java +++ b/net/minecraft/client/renderer/RenderType.java @@ -1,13 +1,18 @@ package net.minecraft.client.renderer; import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.pipeline.RenderTarget; +import com.mojang.blaze3d.systems.RenderPass; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.VertexFormat; import java.util.List; import java.util.Optional; import java.util.OptionalDouble; +import java.util.OptionalInt; import java.util.function.BiFunction; import java.util.function.Function; import net.fabricmc.api.EnvType; @@ -29,346 +34,262 @@ public abstract class RenderType extends RenderStateShard { public static final int TRANSIENT_BUFFER_SIZE = 1536; private static final RenderType SOLID = create( "solid", - DefaultVertexFormat.BLOCK, - VertexFormat.Mode.QUADS, 4194304, true, false, - RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_SOLID_SHADER) - .setTextureState(BLOCK_SHEET_MIPPED) - .createCompositeState(true) + RenderPipelines.SOLID, + RenderType.CompositeState.builder().setLightmapState(LIGHTMAP).setTextureState(BLOCK_SHEET_MIPPED).createCompositeState(true) ); private static final RenderType CUTOUT_MIPPED = create( "cutout_mipped", - DefaultVertexFormat.BLOCK, - VertexFormat.Mode.QUADS, 4194304, true, false, - RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_CUTOUT_MIPPED_SHADER) - .setTextureState(BLOCK_SHEET_MIPPED) - .createCompositeState(true) + RenderPipelines.CUTOUT_MIPPED, + RenderType.CompositeState.builder().setLightmapState(LIGHTMAP).setTextureState(BLOCK_SHEET_MIPPED).createCompositeState(true) ); private static final RenderType CUTOUT = create( "cutout", - DefaultVertexFormat.BLOCK, - VertexFormat.Mode.QUADS, 786432, true, false, - RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_CUTOUT_SHADER) - .setTextureState(BLOCK_SHEET) - .createCompositeState(true) + RenderPipelines.CUTOUT, + RenderType.CompositeState.builder().setLightmapState(LIGHTMAP).setTextureState(BLOCK_SHEET).createCompositeState(true) ); private static final RenderType TRANSLUCENT = create( - "translucent", DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS, 786432, true, true, translucentState(RENDERTYPE_TRANSLUCENT_SHADER) + "translucent", + 786432, + true, + true, + RenderPipelines.TRANSLUCENT, + RenderType.CompositeState.builder() + .setLightmapState(LIGHTMAP) + .setTextureState(BLOCK_SHEET_MIPPED) + .setOutputState(TRANSLUCENT_TARGET) + .createCompositeState(true) ); private static final RenderType TRANSLUCENT_MOVING_BLOCK = create( - "translucent_moving_block", DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS, 786432, false, true, translucentMovingBlockState() + "translucent_moving_block", + 786432, + false, + true, + RenderPipelines.TRANSLUCENT_MOVING_BLOCK, + RenderType.CompositeState.builder() + .setLightmapState(LIGHTMAP) + .setTextureState(BLOCK_SHEET_MIPPED) + .setOutputState(ITEM_ENTITY_TARGET) + .createCompositeState(true) ); private static final Function ARMOR_CUTOUT_NO_CULL = Util.memoize( - (Function)(resourceLocation -> createArmorCutoutNoCull("armor_cutout_no_cull", resourceLocation, false)) - ); - private static final Function ARMOR_TRANSLUCENT = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ARMOR_TRANSLUCENT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .setLayeringState(VIEW_OFFSET_Z_LAYERING) .createCompositeState(true); - return create("armor_translucent", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, true, compositeState); + return create("armor_cutout_no_cull", 1536, true, false, RenderPipelines.ARMOR_CUTOUT_NO_CULL, compositeState); + }) + ); + private static final Function ARMOR_TRANSLUCENT = Util.memoize( + (Function)(resourceLocation -> { + RenderType.CompositeState compositeState = RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .setLightmapState(LIGHTMAP) + .setOverlayState(OVERLAY) + .setLayeringState(VIEW_OFFSET_Z_LAYERING) + .createCompositeState(true); + return create("armor_translucent", 1536, true, true, RenderPipelines.ARMOR_TRANSLUCENT, compositeState); }) ); private static final Function ENTITY_SOLID = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_SOLID_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(true); - return create("entity_solid", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); + return create("entity_solid", 1536, true, false, RenderPipelines.ENTITY_SOLID, compositeState); }) ); private static final Function ENTITY_SOLID_Z_OFFSET_FORWARD = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_SOLID_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .setLayeringState(VIEW_OFFSET_Z_LAYERING_FORWARD) .createCompositeState(true); - return create("entity_solid_z_offset_forward", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); + return create("entity_solid_z_offset_forward", 1536, true, false, RenderPipelines.ENTITY_SOLID_Z_OFFSET_FORWARD, compositeState); }) ); private static final Function ENTITY_CUTOUT = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_CUTOUT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(true); - return create("entity_cutout", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); + return create("entity_cutout", 1536, true, false, RenderPipelines.ENTITY_CUTOUT, compositeState); }) ); private static final BiFunction ENTITY_CUTOUT_NO_CULL = Util.memoize( (BiFunction)((resourceLocation, boolean_) -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_CUTOUT_NO_CULL_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(boolean_); - return create("entity_cutout_no_cull", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); + return create("entity_cutout_no_cull", 1536, true, false, RenderPipelines.ENTITY_CUTOUT_NO_CULL, compositeState); }) ); private static final BiFunction ENTITY_CUTOUT_NO_CULL_Z_OFFSET = Util.memoize( (BiFunction)((resourceLocation, boolean_) -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_CUTOUT_NO_CULL_Z_OFFSET_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .setLayeringState(VIEW_OFFSET_Z_LAYERING) .createCompositeState(boolean_); - return create("entity_cutout_no_cull_z_offset", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); + return create("entity_cutout_no_cull_z_offset", 1536, true, false, RenderPipelines.ENTITY_CUTOUT_NO_CULL_Z_OFFSET, compositeState); }) ); private static final Function ITEM_ENTITY_TRANSLUCENT_CULL = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ITEM_ENTITY_TRANSLUCENT_CULL_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setOutputState(ITEM_ENTITY_TARGET) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) - .setWriteMaskState(COLOR_DEPTH_WRITE) .createCompositeState(true); - return create("item_entity_translucent_cull", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, true, compositeState); + return create("item_entity_translucent_cull", 1536, true, true, RenderPipelines.ITEM_ENTITY_TRANSLUCENT_CULL, compositeState); }) ); private static final BiFunction ENTITY_TRANSLUCENT = Util.memoize( (BiFunction)((resourceLocation, boolean_) -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_TRANSLUCENT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(boolean_); - return create("entity_translucent", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, true, compositeState); + return create("entity_translucent", 1536, true, true, RenderPipelines.ENTITY_TRANSLUCENT, compositeState); }) ); private static final BiFunction ENTITY_TRANSLUCENT_EMISSIVE = Util.memoize( (BiFunction)((resourceLocation, boolean_) -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_TRANSLUCENT_EMISSIVE_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) - .setWriteMaskState(COLOR_WRITE) .setOverlayState(OVERLAY) .createCompositeState(boolean_); - return create("entity_translucent_emissive", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, true, compositeState); + return create("entity_translucent_emissive", 1536, true, true, RenderPipelines.ENTITY_TRANSLUCENT_EMISSIVE, compositeState); }) ); private static final Function ENTITY_SMOOTH_CUTOUT = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_SMOOTH_CUTOUT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) + .setOverlayState(OVERLAY) .createCompositeState(true); - return create("entity_smooth_cutout", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, compositeState); + return create("entity_smooth_cutout", 1536, RenderPipelines.ENTITY_SMOOTH_CUTOUT, compositeState); }) ); private static final BiFunction BEACON_BEAM = Util.memoize( (BiFunction)((resourceLocation, boolean_) -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_BEACON_BEAM_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(boolean_ ? TRANSLUCENT_TRANSPARENCY : NO_TRANSPARENCY) - .setWriteMaskState(boolean_ ? COLOR_WRITE : COLOR_DEPTH_WRITE) .createCompositeState(false); - return create("beacon_beam", DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS, 1536, false, true, compositeState); + return create("beacon_beam", 1536, false, true, boolean_ ? RenderPipelines.BEACON_BEAM_TRANSLUCENT : RenderPipelines.BEACON_BEAM_OPAQUE, compositeState); }) ); private static final Function ENTITY_DECAL = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_DECAL_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setDepthTestState(EQUAL_DEPTH_TEST) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(false); - return create("entity_decal", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, compositeState); + return create("entity_decal", 1536, RenderPipelines.ENTITY_DECAL, compositeState); }) ); private static final Function ENTITY_NO_OUTLINE = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_NO_OUTLINE_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false); - return create("entity_no_outline", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, false, true, compositeState); + return create("entity_no_outline", 1536, false, true, RenderPipelines.ENTITY_NO_OUTLINE, compositeState); }) ); private static final Function ENTITY_SHADOW = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_SHADOW_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) - .setWriteMaskState(COLOR_WRITE) - .setDepthTestState(LEQUAL_DEPTH_TEST) .setLayeringState(VIEW_OFFSET_Z_LAYERING) .createCompositeState(false); - return create("entity_shadow", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, false, false, compositeState); + return create("entity_shadow", 1536, false, false, RenderPipelines.ENTITY_SHADOW, compositeState); }) ); private static final Function DRAGON_EXPLOSION_ALPHA = Util.memoize( (Function)(resourceLocation -> { RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_ALPHA_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setCullState(NO_CULL) .createCompositeState(true); - return create("entity_alpha", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, compositeState); + return create("entity_alpha", 1536, RenderPipelines.DRAGON_EXPLOSION_ALPHA, compositeState); }) ); - private static final BiFunction EYES = Util.memoize( - (BiFunction)((resourceLocation, transparencyStateShard) -> { + private static final Function EYES = Util.memoize( + (Function)(resourceLocation -> { RenderStateShard.TextureStateShard textureStateShard = new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false); return create( - "eyes", - DefaultVertexFormat.NEW_ENTITY, - VertexFormat.Mode.QUADS, - 1536, - false, - true, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_EYES_SHADER) - .setTextureState(textureStateShard) - .setTransparencyState(transparencyStateShard) - .setWriteMaskState(COLOR_WRITE) - .createCompositeState(false) + "eyes", 1536, false, true, RenderPipelines.EYES, RenderType.CompositeState.builder().setTextureState(textureStateShard).createCompositeState(false) ); }) ); private static final RenderType LEASH = create( - "leash", - DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, - VertexFormat.Mode.TRIANGLE_STRIP, - 1536, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LEASH_SHADER) - .setTextureState(NO_TEXTURE) - .setCullState(NO_CULL) - .setLightmapState(LIGHTMAP) - .createCompositeState(false) + "leash", 1536, RenderPipelines.LEASH, RenderType.CompositeState.builder().setTextureState(NO_TEXTURE).setLightmapState(LIGHTMAP).createCompositeState(false) ); private static final RenderType WATER_MASK = create( - "water_mask", - DefaultVertexFormat.POSITION, - VertexFormat.Mode.QUADS, - 1536, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_WATER_MASK_SHADER) - .setTextureState(NO_TEXTURE) - .setWriteMaskState(DEPTH_WRITE) - .createCompositeState(false) + "water_mask", 1536, RenderPipelines.WATER_MASK, RenderType.CompositeState.builder().setTextureState(NO_TEXTURE).createCompositeState(false) ); private static final RenderType ARMOR_ENTITY_GLINT = create( "armor_entity_glint", - DefaultVertexFormat.POSITION_TEX, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GLINT, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ARMOR_ENTITY_GLINT_SHADER) - .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ENTITY, TriState.DEFAULT, false)) - .setWriteMaskState(COLOR_WRITE) - .setCullState(NO_CULL) - .setDepthTestState(EQUAL_DEPTH_TEST) - .setTransparencyState(GLINT_TRANSPARENCY) - .setTexturingState(ENTITY_GLINT_TEXTURING) + .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ARMOR, TriState.DEFAULT, false)) + .setTexturingState(ARMOR_ENTITY_GLINT_TEXTURING) .setLayeringState(VIEW_OFFSET_Z_LAYERING) .createCompositeState(false) ); private static final RenderType GLINT_TRANSLUCENT = create( "glint_translucent", - DefaultVertexFormat.POSITION_TEX, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GLINT, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GLINT_TRANSLUCENT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ITEM, TriState.DEFAULT, false)) - .setWriteMaskState(COLOR_WRITE) - .setCullState(NO_CULL) - .setDepthTestState(EQUAL_DEPTH_TEST) - .setTransparencyState(GLINT_TRANSPARENCY) .setTexturingState(GLINT_TEXTURING) .setOutputState(ITEM_ENTITY_TARGET) .createCompositeState(false) ); private static final RenderType GLINT = create( "glint", - DefaultVertexFormat.POSITION_TEX, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GLINT, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GLINT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ITEM, TriState.DEFAULT, false)) - .setWriteMaskState(COLOR_WRITE) - .setCullState(NO_CULL) - .setDepthTestState(EQUAL_DEPTH_TEST) - .setTransparencyState(GLINT_TRANSPARENCY) .setTexturingState(GLINT_TEXTURING) .createCompositeState(false) ); private static final RenderType ENTITY_GLINT = create( "entity_glint", - DefaultVertexFormat.POSITION_TEX, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GLINT, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENTITY_GLINT_SHADER) - .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ENTITY, TriState.DEFAULT, false)) - .setWriteMaskState(COLOR_WRITE) - .setCullState(NO_CULL) - .setDepthTestState(EQUAL_DEPTH_TEST) - .setTransparencyState(GLINT_TRANSPARENCY) + .setTextureState(new RenderStateShard.TextureStateShard(ItemRenderer.ENCHANTED_GLINT_ITEM, TriState.DEFAULT, false)) .setTexturingState(ENTITY_GLINT_TEXTURING) .createCompositeState(false) ); @@ -377,63 +298,44 @@ public abstract class RenderType extends RenderStateShard { RenderStateShard.TextureStateShard textureStateShard = new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false); return create( "crumbling", - DefaultVertexFormat.BLOCK, - VertexFormat.Mode.QUADS, 1536, false, true, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_CRUMBLING_SHADER) - .setTextureState(textureStateShard) - .setTransparencyState(CRUMBLING_TRANSPARENCY) - .setWriteMaskState(COLOR_WRITE) - .setLayeringState(POLYGON_OFFSET_LAYERING) - .createCompositeState(false) + RenderPipelines.CRUMBLING, + RenderType.CompositeState.builder().setTextureState(textureStateShard).createCompositeState(false) ); }) ); private static final Function TEXT = Util.memoize( (Function)(resourceLocation -> create( "text", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 786432, false, false, + RenderPipelines.TEXT, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) .createCompositeState(false) )) ); private static final RenderType TEXT_BACKGROUND = create( "text_background", - DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, true, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_BACKGROUND_SHADER) - .setTextureState(NO_TEXTURE) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setLightmapState(LIGHTMAP) - .createCompositeState(false) + RenderPipelines.TEXT_BACKGROUND, + RenderType.CompositeState.builder().setTextureState(NO_TEXTURE).setLightmapState(LIGHTMAP).createCompositeState(false) ); private static final Function TEXT_INTENSITY = Util.memoize( (Function)(resourceLocation -> create( "text_intensity", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 786432, false, false, + RenderPipelines.TEXT_INTENSITY, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_INTENSITY_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) .createCompositeState(false) )) @@ -441,135 +343,87 @@ public abstract class RenderType extends RenderStateShard { private static final Function TEXT_POLYGON_OFFSET = Util.memoize( (Function)(resourceLocation -> create( "text_polygon_offset", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, true, + RenderPipelines.TEXT_POLYGON_OFFSET, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) - .setLayeringState(POLYGON_OFFSET_LAYERING) .createCompositeState(false) )) ); private static final Function TEXT_INTENSITY_POLYGON_OFFSET = Util.memoize( (Function)(resourceLocation -> create( "text_intensity_polygon_offset", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, true, + RenderPipelines.TEXT_INTENSITY, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_INTENSITY_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) - .setLayeringState(POLYGON_OFFSET_LAYERING) .createCompositeState(false) )) ); private static final Function TEXT_SEE_THROUGH = Util.memoize( (Function)(resourceLocation -> create( "text_see_through", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, false, + RenderPipelines.TEXT_SEE_THROUGH, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_SEE_THROUGH_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) )) ); private static final RenderType TEXT_BACKGROUND_SEE_THROUGH = create( "text_background_see_through", - DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, true, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_BACKGROUND_SEE_THROUGH_SHADER) - .setTextureState(NO_TEXTURE) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setLightmapState(LIGHTMAP) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) - .createCompositeState(false) + RenderPipelines.TEXT_BACKGROUND_SEE_THROUGH, + RenderType.CompositeState.builder().setTextureState(NO_TEXTURE).setLightmapState(LIGHTMAP).createCompositeState(false) ); private static final Function TEXT_INTENSITY_SEE_THROUGH = Util.memoize( (Function)(resourceLocation -> create( "text_intensity_see_through", - DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP, - VertexFormat.Mode.QUADS, 1536, false, true, + RenderPipelines.TEXT_INTENSITY_SEE_THROUGH, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_TEXT_INTENSITY_SEE_THROUGH_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setLightmapState(LIGHTMAP) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) )) ); private static final RenderType LIGHTNING = create( - "lightning", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - false, - true, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LIGHTNING_SHADER) - .setWriteMaskState(COLOR_DEPTH_WRITE) - .setTransparencyState(LIGHTNING_TRANSPARENCY) - .setOutputState(WEATHER_TARGET) - .createCompositeState(false) + "lightning", 1536, false, true, RenderPipelines.LIGHTNING, RenderType.CompositeState.builder().setOutputState(WEATHER_TARGET).createCompositeState(false) ); private static final RenderType DRAGON_RAYS = create( - "dragon_rays", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.TRIANGLES, - 1536, - false, - false, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LIGHTNING_SHADER) - .setWriteMaskState(COLOR_WRITE) - .setTransparencyState(LIGHTNING_TRANSPARENCY) - .createCompositeState(false) + "dragon_rays", 1536, false, false, RenderPipelines.DRAGON_RAYS, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType DRAGON_RAYS_DEPTH = create( - "dragon_rays_depth", - DefaultVertexFormat.POSITION, - VertexFormat.Mode.TRIANGLES, - 1536, - false, - false, - RenderType.CompositeState.builder().setShaderState(POSITION_SHADER).setWriteMaskState(DEPTH_WRITE).createCompositeState(false) + "dragon_rays_depth", 1536, false, false, RenderPipelines.DRAGON_RAYS_DEPTH, RenderType.CompositeState.builder().createCompositeState(false) + ); + private static final RenderType TRIPWIRE = create( + "tripwire", + 1536, + true, + true, + RenderPipelines.TRIPWIRE, + RenderType.CompositeState.builder().setLightmapState(LIGHTMAP).setTextureState(BLOCK_SHEET_MIPPED).setOutputState(WEATHER_TARGET).createCompositeState(true) ); - private static final RenderType TRIPWIRE = create("tripwire", DefaultVertexFormat.BLOCK, VertexFormat.Mode.QUADS, 1536, true, true, tripwireState()); private static final RenderType END_PORTAL = create( "end_portal", - DefaultVertexFormat.POSITION, - VertexFormat.Mode.QUADS, 1536, false, false, + RenderPipelines.END_PORTAL, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_END_PORTAL_SHADER) .setTextureState( RenderStateShard.MultiTextureStateShard.builder() .add(TheEndPortalRenderer.END_SKY_LOCATION, false, false) @@ -580,13 +434,11 @@ public abstract class RenderType extends RenderStateShard { ); private static final RenderType END_GATEWAY = create( "end_gateway", - DefaultVertexFormat.POSITION, - VertexFormat.Mode.QUADS, 1536, false, false, + RenderPipelines.END_GATEWAY, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_END_GATEWAY_SHADER) .setTextureState( RenderStateShard.MultiTextureStateShard.builder() .add(TheEndPortalRenderer.END_SKY_LOCATION, false, false) @@ -595,283 +447,224 @@ public abstract class RenderType extends RenderStateShard { ) .createCompositeState(false) ); - private static final RenderType FLAT_CLOUDS = createClouds(false, false); - private static final RenderType CLOUDS = createClouds(false, true); - private static final RenderType CLOUDS_DEPTH_ONLY = createClouds(true, true); public static final RenderType.CompositeRenderType LINES = create( "lines", - DefaultVertexFormat.POSITION_COLOR_NORMAL, - VertexFormat.Mode.LINES, 1536, + RenderPipelines.LINES, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LINES_SHADER) .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.empty())) .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setOutputState(ITEM_ENTITY_TARGET) - .setWriteMaskState(COLOR_DEPTH_WRITE) - .setCullState(NO_CULL) .createCompositeState(false) ); public static final RenderType.CompositeRenderType SECONDARY_BLOCK_OUTLINE = create( "secondary_block_outline", - DefaultVertexFormat.POSITION_COLOR_NORMAL, - VertexFormat.Mode.LINES, 1536, + RenderPipelines.SECONDARY_BLOCK_OUTLINE, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LINES_SHADER) .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(7.0))) .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setTransparencyState(RenderStateShard.TRANSLUCENT_TRANSPARENCY) .setOutputState(ITEM_ENTITY_TARGET) - .setWriteMaskState(COLOR_WRITE) - .setCullState(NO_CULL) .createCompositeState(false) ); public static final RenderType.CompositeRenderType LINE_STRIP = create( "line_strip", - DefaultVertexFormat.POSITION_COLOR_NORMAL, - VertexFormat.Mode.LINE_STRIP, 1536, + RenderPipelines.LINE_STRIP, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_LINES_SHADER) .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.empty())) .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) .setOutputState(ITEM_ENTITY_TARGET) - .setWriteMaskState(COLOR_DEPTH_WRITE) - .setCullState(NO_CULL) .createCompositeState(false) ); private static final Function DEBUG_LINE_STRIP = Util.memoize( (Function)(double_ -> create( "debug_line_strip", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.DEBUG_LINE_STRIP, 1536, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(double_))) - .setTransparencyState(NO_TRANSPARENCY) - .setCullState(NO_CULL) - .createCompositeState(false) + RenderPipelines.DEBUG_LINE_STRIP, + RenderType.CompositeState.builder().setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(double_))).createCompositeState(false) + )) + ); + private static final Function DEBUG_LINE = Util.memoize( + (Function)(double_ -> create( + "debug_line", + 1536, + RenderPipelines.LINES, + RenderType.CompositeState.builder().setLineState(new RenderStateShard.LineStateShard(OptionalDouble.of(double_))).createCompositeState(false) )) ); private static final RenderType.CompositeRenderType DEBUG_FILLED_BOX = create( "debug_filled_box", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.TRIANGLE_STRIP, 1536, false, true, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .createCompositeState(false) + RenderPipelines.DEBUG_FILLED_BOX, + RenderType.CompositeState.builder().setLayeringState(VIEW_OFFSET_Z_LAYERING).createCompositeState(false) ); private static final RenderType.CompositeRenderType DEBUG_QUADS = create( - "debug_quads", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - false, - true, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) - .createCompositeState(false) + "debug_quads", 1536, false, true, RenderPipelines.DEBUG_QUADS, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType.CompositeRenderType DEBUG_TRIANGLE_FAN = create( - "debug_triangle_fan", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.TRIANGLE_FAN, - 1536, - false, - true, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) - .createCompositeState(false) + "debug_triangle_fan", 1536, false, true, RenderPipelines.DEBUG_TRIANGLE_FAN, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType.CompositeRenderType DEBUG_STRUCTURE_QUADS = create( - "debug_structure_quads", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - false, - true, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) - .setDepthTestState(LEQUAL_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) - .createCompositeState(false) + "debug_structure_quads", 1536, false, true, RenderPipelines.DEBUG_STRUCTURE_QUADS, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType.CompositeRenderType DEBUG_SECTION_QUADS = create( "debug_section_quads", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, 1536, false, true, - RenderType.CompositeState.builder() - .setShaderState(POSITION_COLOR_SHADER) - .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(CULL) - .createCompositeState(false) + RenderPipelines.DEBUG_SECTION_QUADS, + RenderType.CompositeState.builder().setLayeringState(VIEW_OFFSET_Z_LAYERING).createCompositeState(false) + ); + private static final Function OPAQUE_PARTICLE = Util.memoize( + (Function)(resourceLocation -> create( + "opaque_particle", + 1536, + false, + false, + RenderPipelines.OPAQUE_PARTICLE, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .setLightmapState(LIGHTMAP) + .createCompositeState(false) + )) + ); + private static final Function TRANSLUCENT_PARTICLE = Util.memoize( + (Function)(resourceLocation -> create( + "translucent_particle", + 1536, + false, + false, + RenderPipelines.TRANSLUCENT_PARTICLE, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .setOutputState(PARTICLES_TARGET) + .setLightmapState(LIGHTMAP) + .createCompositeState(false) + )) + ); + private static final Function WEATHER_DEPTH_WRITE = createWeather(RenderPipelines.WEATHER_DEPTH_WRITE); + private static final Function WEATHER_NO_DEPTH_WRITE = createWeather(RenderPipelines.WEATHER_NO_DEPTH_WRITE); + private static final RenderType SUNRISE_SUNSET = create( + "sunrise_sunset", 1536, false, false, RenderPipelines.SUNRISE_SUNSET, RenderType.CompositeState.builder().createCompositeState(false) + ); + private static final Function CELESTIAL = Util.memoize( + (Function)(resourceLocation -> create( + "celestial", + 1536, + false, + false, + RenderPipelines.CELESTIAL, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .createCompositeState(false) + )) + ); + private static final Function BLOCK_SCREEN_EFFECT = Util.memoize( + (Function)(resourceLocation -> create( + "block_screen_effect", + 1536, + false, + false, + RenderPipelines.BLOCK_SCREEN_EFFECT, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .createCompositeState(false) + )) + ); + private static final Function FIRE_SCREEN_EFFECT = Util.memoize( + (Function)(resourceLocation -> create( + "fire_screen_effect", + 1536, + false, + false, + RenderPipelines.FIRE_SCREEN_EFFECT, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .createCompositeState(false) + )) ); private static final RenderType.CompositeRenderType GUI = create( - "gui", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 786432, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GUI_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(LEQUAL_DEPTH_TEST) - .createCompositeState(false) + "gui", 786432, RenderPipelines.GUI, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType.CompositeRenderType GUI_OVERLAY = create( - "gui_overlay", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GUI_OVERLAY_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) - .createCompositeState(false) + "gui_overlay", 1536, RenderPipelines.GUI_OVERLAY, RenderType.CompositeState.builder().createCompositeState(false) ); private static final Function GUI_TEXTURED_OVERLAY = Util.memoize( (Function)(resourceLocation -> create( "gui_textured_overlay", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GUI_TEXTURED_OVERLAY, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.DEFAULT, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) )) ); private static final Function GUI_OPAQUE_TEXTURED_BACKGROUND = Util.memoize( (Function)(resourceLocation -> create( "gui_opaque_textured_background", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 786432, + RenderPipelines.GUI_OPAQUE_TEXTURED_BACKGROUND, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(NO_TRANSPARENCY) - .setDepthTestState(LEQUAL_DEPTH_TEST) .createCompositeState(false) )) ); private static final RenderType.CompositeRenderType GUI_NAUSEA_OVERLAY = create( "gui_nausea_overlay", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 1536, + RenderPipelines.GUI_NAUSEA_OVERLAY, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(Gui.NAUSEA_LOCATION, TriState.DEFAULT, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(NAUSEA_OVERLAY_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) ); private static final RenderType.CompositeRenderType GUI_TEXT_HIGHLIGHT = create( - "gui_text_highlight", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GUI_TEXT_HIGHLIGHT_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setColorLogicState(OR_REVERSE_COLOR_LOGIC) - .createCompositeState(false) + "gui_text_highlight", 1536, RenderPipelines.GUI_TEXT_HIGHLIGHT, RenderType.CompositeState.builder().createCompositeState(false) ); private static final RenderType.CompositeRenderType GUI_GHOST_RECIPE_OVERLAY = create( - "gui_ghost_recipe_overlay", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 1536, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_GUI_GHOST_RECIPE_OVERLAY_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(GREATER_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) - .createCompositeState(false) + "gui_ghost_recipe_overlay", 1536, RenderPipelines.GUI_GHOST_RECIPE_OVERLAY, RenderType.CompositeState.builder().createCompositeState(false) ); private static final Function GUI_TEXTURED = Util.memoize( (Function)(resourceLocation -> create( "gui_textured", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 786432, + RenderPipelines.GUI_TEXTURED, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setDepthTestState(LEQUAL_DEPTH_TEST) .createCompositeState(false) )) ); private static final Function VIGNETTE = Util.memoize( (Function)(resourceLocation -> create( "vignette", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 786432, + RenderPipelines.VIGNETTE, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.DEFAULT, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(VIGNETTE_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) )) ); private static final Function CROSSHAIR = Util.memoize( (Function)(resourceLocation -> create( "crosshair", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 786432, + RenderPipelines.CROSSHAIR, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(CROSSHAIR_TRANSPARENCY) .createCompositeState(false) )) ); private static final RenderType.CompositeRenderType MOJANG_LOGO = create( "mojang_logo", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 786432, + RenderPipelines.MOJANG_LOGO, RenderType.CompositeState.builder() .setTextureState(new RenderStateShard.TextureStateShard(LoadingOverlay.MOJANG_STUDIOS_LOGO_LOCATION, TriState.DEFAULT, false)) - .setShaderState(POSITION_TEXTURE_COLOR_SHADER) - .setTransparencyState(MOJANG_LOGO_TRANSPARENCY) - .setDepthTestState(NO_DEPTH_TEST) - .setWriteMaskState(COLOR_WRITE) .createCompositeState(false) ); private static final ImmutableList CHUNK_BUFFER_LAYERS = ImmutableList.of(solid(), cutoutMipped(), cutout(), translucent(), tripwire()); - private final VertexFormat format; - private final VertexFormat.Mode mode; private final int bufferSize; private final boolean affectsCrumbling; private final boolean sortOnUpload; @@ -888,66 +681,38 @@ public abstract class RenderType extends RenderStateShard { return CUTOUT; } - private static RenderType.CompositeState translucentState(RenderStateShard.ShaderStateShard state) { - return RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(state) - .setTextureState(BLOCK_SHEET_MIPPED) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setOutputState(TRANSLUCENT_TARGET) - .createCompositeState(true); - } - public static RenderType translucent() { return TRANSLUCENT; } - private static RenderType.CompositeState translucentMovingBlockState() { - return RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_TRANSLUCENT_MOVING_BLOCK_SHADER) - .setTextureState(BLOCK_SHEET_MIPPED) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setOutputState(ITEM_ENTITY_TARGET) - .createCompositeState(true); - } - public static RenderType translucentMovingBlock() { return TRANSLUCENT_MOVING_BLOCK; } - private static RenderType.CompositeRenderType createArmorCutoutNoCull(String name, ResourceLocation id, boolean equalDepthTest) { - RenderType.CompositeState compositeState = RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ARMOR_CUTOUT_NO_CULL_SHADER) - .setTextureState(new RenderStateShard.TextureStateShard(id, TriState.FALSE, false)) - .setTransparencyState(NO_TRANSPARENCY) - .setCullState(NO_CULL) - .setLightmapState(LIGHTMAP) - .setOverlayState(OVERLAY) - .setLayeringState(VIEW_OFFSET_Z_LAYERING) - .setDepthTestState(equalDepthTest ? EQUAL_DEPTH_TEST : LEQUAL_DEPTH_TEST) - .createCompositeState(true); - return create(name, DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 1536, true, false, compositeState); - } - public static RenderType armorCutoutNoCull(ResourceLocation location) { return (RenderType)ARMOR_CUTOUT_NO_CULL.apply(location); } public static RenderType createArmorDecalCutoutNoCull(ResourceLocation id) { - return createArmorCutoutNoCull("armor_decal_cutout_no_cull", id, true); + RenderType.CompositeState compositeState = RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(id, TriState.FALSE, false)) + .setLightmapState(LIGHTMAP) + .setOverlayState(OVERLAY) + .setLayeringState(VIEW_OFFSET_Z_LAYERING) + .createCompositeState(true); + return create("armor_decal_cutout_no_cull", 1536, true, false, RenderPipelines.ARMOR_DECAL_CUTOUT_NO_CULL, compositeState); } - public static RenderType armorTranslucent(ResourceLocation resourceLocation) { - return (RenderType)ARMOR_TRANSLUCENT.apply(resourceLocation); + public static RenderType armorTranslucent(ResourceLocation id) { + return (RenderType)ARMOR_TRANSLUCENT.apply(id); } public static RenderType entitySolid(ResourceLocation location) { return (RenderType)ENTITY_SOLID.apply(location); } - public static RenderType entitySolidZOffsetForward(ResourceLocation resourceLocation) { - return (RenderType)ENTITY_SOLID_Z_OFFSET_FORWARD.apply(resourceLocation); + public static RenderType entitySolidZOffsetForward(ResourceLocation location) { + return (RenderType)ENTITY_SOLID_Z_OFFSET_FORWARD.apply(location); } public static RenderType entityCutout(ResourceLocation location) { @@ -1015,7 +780,7 @@ public abstract class RenderType extends RenderStateShard { } public static RenderType eyes(ResourceLocation location) { - return (RenderType)EYES.apply(location, TRANSLUCENT_TRANSPARENCY); + return (RenderType)EYES.apply(location); } public static RenderType breezeEyes(ResourceLocation location) { @@ -1025,17 +790,13 @@ public abstract class RenderType extends RenderStateShard { public static RenderType breezeWind(ResourceLocation location, float u, float v) { return create( "breeze_wind", - DefaultVertexFormat.NEW_ENTITY, - VertexFormat.Mode.QUADS, 1536, false, true, + RenderPipelines.BREEZE_WIND, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_BREEZE_WIND_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(location, TriState.FALSE, false)) .setTexturingState(new RenderStateShard.OffsetTexturingStateShard(u, v)) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(NO_OVERLAY) .createCompositeState(false) @@ -1045,17 +806,13 @@ public abstract class RenderType extends RenderStateShard { public static RenderType energySwirl(ResourceLocation location, float u, float v) { return create( "energy_swirl", - DefaultVertexFormat.NEW_ENTITY, - VertexFormat.Mode.QUADS, 1536, false, true, + RenderPipelines.ENERGY_SWIRL, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_ENERGY_SWIRL_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(location, TriState.FALSE, false)) .setTexturingState(new RenderStateShard.OffsetTexturingStateShard(u, v)) - .setTransparencyState(ADDITIVE_TRANSPARENCY) - .setCullState(NO_CULL) .setLightmapState(LIGHTMAP) .setOverlayState(OVERLAY) .createCompositeState(false) @@ -1071,7 +828,7 @@ public abstract class RenderType extends RenderStateShard { } public static RenderType outline(ResourceLocation location) { - return (RenderType)RenderType.CompositeRenderType.OUTLINE.apply(location, NO_CULL); + return (RenderType)RenderType.CompositeRenderType.OUTLINE.apply(location, false); } public static RenderType armorEntityGlint() { @@ -1138,16 +895,6 @@ public abstract class RenderType extends RenderStateShard { return DRAGON_RAYS_DEPTH; } - private static RenderType.CompositeState tripwireState() { - return RenderType.CompositeState.builder() - .setLightmapState(LIGHTMAP) - .setShaderState(RENDERTYPE_TRIPWIRE_SHADER) - .setTextureState(BLOCK_SHEET_MIPPED) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setOutputState(WEATHER_TARGET) - .createCompositeState(true); - } - public static RenderType tripwire() { return TRIPWIRE; } @@ -1160,36 +907,6 @@ public abstract class RenderType extends RenderStateShard { return END_GATEWAY; } - private static RenderType.CompositeRenderType createClouds(boolean bl, boolean bl2) { - return create( - "clouds", - DefaultVertexFormat.POSITION_COLOR, - VertexFormat.Mode.QUADS, - 786432, - false, - false, - RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_CLOUDS_SHADER) - .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(bl2 ? CULL : NO_CULL) - .setWriteMaskState(bl ? DEPTH_WRITE : COLOR_DEPTH_WRITE) - .setOutputState(CLOUDS_TARGET) - .createCompositeState(true) - ); - } - - public static RenderType flatClouds() { - return FLAT_CLOUDS; - } - - public static RenderType clouds() { - return CLOUDS; - } - - public static RenderType cloudsDepthOnly() { - return CLOUDS_DEPTH_ONLY; - } - public static RenderType lines() { return LINES; } @@ -1206,6 +923,10 @@ public abstract class RenderType extends RenderStateShard { return (RenderType)DEBUG_LINE_STRIP.apply(width); } + public static RenderType debugLine(double width) { + return (RenderType)DEBUG_LINE.apply(width); + } + public static RenderType debugFilledBox() { return DEBUG_FILLED_BOX; } @@ -1226,6 +947,51 @@ public abstract class RenderType extends RenderStateShard { return DEBUG_SECTION_QUADS; } + public static RenderType opaqueParticle(ResourceLocation texture) { + return (RenderType)OPAQUE_PARTICLE.apply(texture); + } + + public static RenderType translucentParticle(ResourceLocation texture) { + return (RenderType)TRANSLUCENT_PARTICLE.apply(texture); + } + + private static Function createWeather(RenderPipeline renderPipeline) { + return Util.memoize( + (Function)(resourceLocation -> create( + "weather", + 1536, + false, + false, + renderPipeline, + RenderType.CompositeState.builder() + .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) + .setOutputState(WEATHER_TARGET) + .setLightmapState(LIGHTMAP) + .createCompositeState(false) + )) + ); + } + + public static RenderType weather(ResourceLocation texture, boolean depthWrite) { + return (RenderType)(depthWrite ? WEATHER_DEPTH_WRITE : WEATHER_NO_DEPTH_WRITE).apply(texture); + } + + public static RenderType sunriseSunset() { + return SUNRISE_SUNSET; + } + + public static RenderType celestial(ResourceLocation texture) { + return (RenderType)CELESTIAL.apply(texture); + } + + public static RenderType blockScreenEffect(ResourceLocation texture) { + return (RenderType)BLOCK_SCREEN_EFFECT.apply(texture); + } + + public static RenderType fireScreenEffect(ResourceLocation texture) { + return (RenderType)FIRE_SCREEN_EFFECT.apply(texture); + } + public static RenderType gui() { return GUI; } @@ -1234,12 +1000,12 @@ public abstract class RenderType extends RenderStateShard { return GUI_OVERLAY; } - public static RenderType guiTexturedOverlay(ResourceLocation resourceLocation) { - return (RenderType)GUI_TEXTURED_OVERLAY.apply(resourceLocation); + public static RenderType guiTexturedOverlay(ResourceLocation location) { + return (RenderType)GUI_TEXTURED_OVERLAY.apply(location); } - public static RenderType guiOpaqueTexturedBackground(ResourceLocation resourceLocation) { - return (RenderType)GUI_OPAQUE_TEXTURED_BACKGROUND.apply(resourceLocation); + public static RenderType guiOpaqueTexturedBackground(ResourceLocation location) { + return (RenderType)GUI_OPAQUE_TEXTURED_BACKGROUND.apply(location); } public static RenderType guiNauseaOverlay() { @@ -1254,60 +1020,44 @@ public abstract class RenderType extends RenderStateShard { return GUI_GHOST_RECIPE_OVERLAY; } - public static RenderType guiTextured(ResourceLocation resourceLocation) { - return (RenderType)GUI_TEXTURED.apply(resourceLocation); + public static RenderType guiTextured(ResourceLocation location) { + return (RenderType)GUI_TEXTURED.apply(location); } - public static RenderType vignette(ResourceLocation resourceLocation) { - return (RenderType)VIGNETTE.apply(resourceLocation); + public static RenderType vignette(ResourceLocation location) { + return (RenderType)VIGNETTE.apply(location); } - public static RenderType crosshair(ResourceLocation resourceLocation) { - return (RenderType)CROSSHAIR.apply(resourceLocation); + public static RenderType crosshair(ResourceLocation location) { + return (RenderType)CROSSHAIR.apply(location); } public static RenderType mojangLogo() { return MOJANG_LOGO; } - public RenderType( - String name, - VertexFormat format, - VertexFormat.Mode mode, - int bufferSize, - boolean affectsCrumbling, - boolean sortOnUpload, - Runnable setupState, - Runnable clearState - ) { + public RenderType(String name, int bufferSize, boolean affectsCrumbling, boolean sortOnUpload, Runnable setupState, Runnable clearState) { super(name, setupState, clearState); - this.format = format; - this.mode = mode; this.bufferSize = bufferSize; this.affectsCrumbling = affectsCrumbling; this.sortOnUpload = sortOnUpload; } - static RenderType.CompositeRenderType create(String name, VertexFormat format, VertexFormat.Mode mode, int bufferSize, RenderType.CompositeState state) { - return create(name, format, mode, bufferSize, false, false, state); + static RenderType.CompositeRenderType create(String name, int bufferSize, RenderPipeline renderPipeline, RenderType.CompositeState state) { + return create(name, bufferSize, false, false, renderPipeline, state); } private static RenderType.CompositeRenderType create( - String name, VertexFormat format, VertexFormat.Mode mode, int bufferSize, boolean affectsCrumbling, boolean sortOnUpload, RenderType.CompositeState state + String name, int bufferSize, boolean affectsCrumbling, boolean sortOnUpload, RenderPipeline renderPipeline, RenderType.CompositeState state ) { - return new RenderType.CompositeRenderType(name, format, mode, bufferSize, affectsCrumbling, sortOnUpload, state); + return new RenderType.CompositeRenderType(name, bufferSize, affectsCrumbling, sortOnUpload, renderPipeline, state); } - public void draw(MeshData meshData) { - this.setupRenderState(); - BufferUploader.drawWithShader(meshData); - this.clearRenderState(); - } + public abstract void draw(MeshData meshData); - @Override - public String toString() { - return this.name; - } + public abstract RenderTarget getRenderTarget(); + + public abstract RenderPipeline getRenderPipeline(); public static List chunkBufferLayers() { return CHUNK_BUFFER_LAYERS; @@ -1317,13 +1067,9 @@ public abstract class RenderType extends RenderStateShard { return this.bufferSize; } - public VertexFormat format() { - return this.format; - } + public abstract VertexFormat format(); - public VertexFormat.Mode mode() { - return this.mode; - } + public abstract VertexFormat.Mode mode(); public Optional outline() { return Optional.empty(); @@ -1338,7 +1084,7 @@ public abstract class RenderType extends RenderStateShard { } public boolean canConsolidateConsecutiveGeometry() { - return !this.mode.connectedPrimitives; + return !this.mode().connectedPrimitives; } public boolean sortOnUpload() { @@ -1347,32 +1093,27 @@ public abstract class RenderType extends RenderStateShard { @Environment(EnvType.CLIENT) static final class CompositeRenderType extends RenderType { - static final BiFunction OUTLINE = Util.memoize( - (BiFunction)((resourceLocation, cullStateShard) -> RenderType.create( + static final BiFunction OUTLINE = Util.memoize( + (BiFunction)((resourceLocation, boolean_) -> RenderType.create( "outline", - DefaultVertexFormat.POSITION_TEX_COLOR, - VertexFormat.Mode.QUADS, 1536, + boolean_ ? RenderPipelines.OUTLINE_CULL : RenderPipelines.OUTLINE_NO_CULL, RenderType.CompositeState.builder() - .setShaderState(RENDERTYPE_OUTLINE_SHADER) .setTextureState(new RenderStateShard.TextureStateShard(resourceLocation, TriState.FALSE, false)) - .setCullState(cullStateShard) - .setDepthTestState(NO_DEPTH_TEST) .setOutputState(OUTLINE_TARGET) .createCompositeState(RenderType.OutlineProperty.IS_OUTLINE) )) ); private final RenderType.CompositeState state; + private final RenderPipeline renderPipeline; private final Optional outline; private final boolean isOutline; CompositeRenderType( - String name, VertexFormat format, VertexFormat.Mode mode, int bufferSize, boolean affectsCrumbling, boolean sortOnUpload, RenderType.CompositeState state + String name, int bufferSize, boolean affectsCrumbling, boolean sortOnUpload, RenderPipeline renderPipeline, RenderType.CompositeState state ) { super( name, - format, - mode, bufferSize, affectsCrumbling, sortOnUpload, @@ -1380,8 +1121,9 @@ public abstract class RenderType extends RenderStateShard { () -> state.states.forEach(RenderStateShard::clearRenderState) ); this.state = state; + this.renderPipeline = renderPipeline; this.outline = state.outlineProperty == RenderType.OutlineProperty.AFFECTS_OUTLINE - ? state.textureState.cutoutTexture().map(resourceLocation -> (RenderType)OUTLINE.apply(resourceLocation, state.cullState)) + ? state.textureState.cutoutTexture().map(resourceLocation -> (RenderType)OUTLINE.apply(resourceLocation, renderPipeline.isCull())) : Optional.empty(); this.isOutline = state.outlineProperty == RenderType.OutlineProperty.IS_OUTLINE; } @@ -1396,8 +1138,85 @@ public abstract class RenderType extends RenderStateShard { return this.isOutline; } - protected final RenderType.CompositeState state() { - return this.state; + @Override + public RenderPipeline getRenderPipeline() { + return this.renderPipeline; + } + + @Override + public VertexFormat format() { + return this.renderPipeline.getVertexFormat(); + } + + @Override + public VertexFormat.Mode mode() { + return this.renderPipeline.getVertexFormatMode(); + } + + @Override + public void draw(MeshData meshData) { + RenderPipeline renderPipeline = this.getRenderPipeline(); + this.setupRenderState(); + MeshData var3 = meshData; + + try { + GpuBuffer gpuBuffer = renderPipeline.getVertexFormat().uploadImmediateVertexBuffer(meshData.vertexBuffer()); + GpuBuffer gpuBuffer2; + VertexFormat.IndexType indexType; + if (meshData.indexBuffer() == null) { + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(meshData.drawState().mode()); + gpuBuffer2 = autoStorageIndexBuffer.getBuffer(meshData.drawState().indexCount()); + indexType = autoStorageIndexBuffer.type(); + } else { + gpuBuffer2 = renderPipeline.getVertexFormat().uploadImmediateIndexBuffer(meshData.indexBuffer()); + indexType = meshData.drawState().indexType(); + } + + RenderTarget renderTarget = this.state.outputState.getRenderTarget(); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass( + renderTarget.getColorTexture(), OptionalInt.empty(), renderTarget.useDepth ? renderTarget.getDepthTexture() : null, OptionalDouble.empty() + )) { + renderPass.setPipeline(renderPipeline); + renderPass.setVertexBuffer(0, gpuBuffer); + if (RenderSystem.SCISSOR_STATE.isEnabled()) { + renderPass.enableScissor(RenderSystem.SCISSOR_STATE); + } + + for (int i = 0; i < 12; i++) { + GpuTexture gpuTexture = RenderSystem.getShaderTexture(i); + if (gpuTexture != null) { + renderPass.bindSampler("Sampler" + i, gpuTexture); + } + } + + renderPass.setIndexBuffer(gpuBuffer2, indexType); + renderPass.drawIndexed(0, meshData.drawState().indexCount()); + } + } catch (Throwable var14) { + if (meshData != null) { + try { + var3.close(); + } catch (Throwable var11) { + var14.addSuppressed(var11); + } + } + + throw var14; + } + + if (meshData != null) { + meshData.close(); + } + + this.clearRenderState(); + } + + @Override + public RenderTarget getRenderTarget() { + return this.state.outputState.getRenderTarget(); } @Override @@ -1409,66 +1228,24 @@ public abstract class RenderType extends RenderStateShard { @Environment(EnvType.CLIENT) protected static final class CompositeState { final RenderStateShard.EmptyTextureStateShard textureState; - private final RenderStateShard.ShaderStateShard shaderState; - private final RenderStateShard.TransparencyStateShard transparencyState; - private final RenderStateShard.DepthTestStateShard depthTestState; - final RenderStateShard.CullStateShard cullState; - private final RenderStateShard.LightmapStateShard lightmapState; - private final RenderStateShard.OverlayStateShard overlayState; - private final RenderStateShard.LayeringStateShard layeringState; - private final RenderStateShard.OutputStateShard outputState; - private final RenderStateShard.TexturingStateShard texturingState; - private final RenderStateShard.WriteMaskStateShard writeMaskState; - private final RenderStateShard.LineStateShard lineState; - private final RenderStateShard.ColorLogicStateShard colorLogicState; + final RenderStateShard.OutputStateShard outputState; final RenderType.OutlineProperty outlineProperty; final ImmutableList states; CompositeState( RenderStateShard.EmptyTextureStateShard textureState, - RenderStateShard.ShaderStateShard shaderState, - RenderStateShard.TransparencyStateShard transparencyState, - RenderStateShard.DepthTestStateShard depthState, - RenderStateShard.CullStateShard cullState, RenderStateShard.LightmapStateShard lightmapState, RenderStateShard.OverlayStateShard overlayState, RenderStateShard.LayeringStateShard layeringState, RenderStateShard.OutputStateShard outputState, RenderStateShard.TexturingStateShard texturingState, - RenderStateShard.WriteMaskStateShard writeMaskState, RenderStateShard.LineStateShard lineState, - RenderStateShard.ColorLogicStateShard colorLogicState, RenderType.OutlineProperty outlineProperty ) { this.textureState = textureState; - this.shaderState = shaderState; - this.transparencyState = transparencyState; - this.depthTestState = depthState; - this.cullState = cullState; - this.lightmapState = lightmapState; - this.overlayState = overlayState; - this.layeringState = layeringState; this.outputState = outputState; - this.texturingState = texturingState; - this.writeMaskState = writeMaskState; - this.lineState = lineState; - this.colorLogicState = colorLogicState; this.outlineProperty = outlineProperty; - this.states = ImmutableList.of( - this.textureState, - this.shaderState, - this.transparencyState, - this.depthTestState, - this.cullState, - this.lightmapState, - this.overlayState, - this.layeringState, - this.outputState, - this.texturingState, - this.writeMaskState, - this.colorLogicState, - this.lineState - ); + this.states = ImmutableList.of(textureState, lightmapState, overlayState, layeringState, outputState, texturingState, lineState); } public String toString() { @@ -1481,7 +1258,7 @@ public abstract class RenderType extends RenderStateShard { } @Environment(EnvType.CLIENT) - static enum OutlineProperty { + protected static enum OutlineProperty { NONE("none"), IS_OUTLINE("is_outline"), AFFECTS_OUTLINE("affects_outline"); diff --git a/net/minecraft/client/renderer/ScreenEffectRenderer.java b/net/minecraft/client/renderer/ScreenEffectRenderer.java index fd1de629..c066a5be 100644 --- a/net/minecraft/client/renderer/ScreenEffectRenderer.java +++ b/net/minecraft/client/renderer/ScreenEffectRenderer.java @@ -1,12 +1,7 @@ package net.minecraft.client.renderer; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -16,6 +11,7 @@ import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.core.BlockPos; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.FluidTags; +import net.minecraft.util.ARGB; import net.minecraft.util.Mth; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.RenderShape; @@ -27,22 +23,22 @@ import org.joml.Matrix4f; public class ScreenEffectRenderer { private static final ResourceLocation UNDERWATER_LOCATION = ResourceLocation.withDefaultNamespace("textures/misc/underwater.png"); - public static void renderScreenEffect(Minecraft minecraft, PoseStack poseStack) { + public static void renderScreenEffect(Minecraft minecraft, PoseStack poseStack, MultiBufferSource bufferSource) { Player player = minecraft.player; if (!player.noPhysics) { BlockState blockState = getViewBlockingState(player); if (blockState != null) { - renderTex(minecraft.getBlockRenderer().getBlockModelShaper().getParticleIcon(blockState), poseStack); + renderTex(minecraft.getBlockRenderer().getBlockModelShaper().getParticleIcon(blockState), poseStack, bufferSource); } } if (!minecraft.player.isSpectator()) { if (minecraft.player.isEyeInFluid(FluidTags.WATER)) { - renderWater(minecraft, poseStack); + renderWater(minecraft, poseStack, bufferSource); } if (minecraft.player.isOnFire()) { - renderFire(minecraft, poseStack); + renderFire(poseStack, bufferSource); } } } @@ -65,61 +61,49 @@ public class ScreenEffectRenderer { return null; } - private static void renderTex(TextureAtlasSprite texture, PoseStack poseStack) { - RenderSystem.setShaderTexture(0, texture.atlasLocation()); - RenderSystem.setShader(CoreShaders.POSITION_TEX_COLOR); + private static void renderTex(TextureAtlasSprite texture, PoseStack poseStack, MultiBufferSource bufferSource) { float f = 0.1F; + int i = ARGB.colorFromFloat(1.0F, 0.1F, 0.1F, 0.1F); float g = -1.0F; float h = 1.0F; - float i = -1.0F; - float j = 1.0F; - float k = -0.5F; - float l = texture.getU0(); - float m = texture.getU1(); - float n = texture.getV0(); - float o = texture.getV1(); - Matrix4f matrix4f = poseStack.last().pose(); - BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - bufferBuilder.addVertex(matrix4f, -1.0F, -1.0F, -0.5F).setUv(m, o).setColor(0.1F, 0.1F, 0.1F, 1.0F); - bufferBuilder.addVertex(matrix4f, 1.0F, -1.0F, -0.5F).setUv(l, o).setColor(0.1F, 0.1F, 0.1F, 1.0F); - bufferBuilder.addVertex(matrix4f, 1.0F, 1.0F, -0.5F).setUv(l, n).setColor(0.1F, 0.1F, 0.1F, 1.0F); - bufferBuilder.addVertex(matrix4f, -1.0F, 1.0F, -0.5F).setUv(m, n).setColor(0.1F, 0.1F, 0.1F, 1.0F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - } - - private static void renderWater(Minecraft minecraft, PoseStack poseStack) { - RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.setShaderTexture(0, UNDERWATER_LOCATION); - BlockPos blockPos = BlockPos.containing(minecraft.player.getX(), minecraft.player.getEyeY(), minecraft.player.getZ()); - float f = LightTexture.getBrightness(minecraft.player.level().dimensionType(), minecraft.player.level().getMaxLocalRawBrightness(blockPos)); - RenderSystem.enableBlend(); - RenderSystem.setShaderColor(f, f, f, 0.1F); - float g = 4.0F; - float h = -1.0F; - float i = 1.0F; float j = -1.0F; float k = 1.0F; float l = -0.5F; - float m = -minecraft.player.getYRot() / 64.0F; - float n = minecraft.player.getXRot() / 64.0F; + float m = texture.getU0(); + float n = texture.getU1(); + float o = texture.getV0(); + float p = texture.getV1(); Matrix4f matrix4f = poseStack.last().pose(); - BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); - bufferBuilder.addVertex(matrix4f, -1.0F, -1.0F, -0.5F).setUv(4.0F + m, 4.0F + n); - bufferBuilder.addVertex(matrix4f, 1.0F, -1.0F, -0.5F).setUv(0.0F + m, 4.0F + n); - bufferBuilder.addVertex(matrix4f, 1.0F, 1.0F, -0.5F).setUv(0.0F + m, 0.0F + n); - bufferBuilder.addVertex(matrix4f, -1.0F, 1.0F, -0.5F).setUv(4.0F + m, 0.0F + n); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.disableBlend(); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.blockScreenEffect(texture.atlasLocation())); + vertexConsumer.addVertex(matrix4f, -1.0F, -1.0F, -0.5F).setUv(n, p).setColor(i); + vertexConsumer.addVertex(matrix4f, 1.0F, -1.0F, -0.5F).setUv(m, p).setColor(i); + vertexConsumer.addVertex(matrix4f, 1.0F, 1.0F, -0.5F).setUv(m, o).setColor(i); + vertexConsumer.addVertex(matrix4f, -1.0F, 1.0F, -0.5F).setUv(n, o).setColor(i); } - private static void renderFire(Minecraft minecraft, PoseStack poseStack) { - RenderSystem.setShader(CoreShaders.POSITION_TEX_COLOR); - RenderSystem.depthFunc(519); - RenderSystem.depthMask(false); - RenderSystem.enableBlend(); + private static void renderWater(Minecraft mnecraft, PoseStack poseStack, MultiBufferSource bufferSource) { + BlockPos blockPos = BlockPos.containing(mnecraft.player.getX(), mnecraft.player.getEyeY(), mnecraft.player.getZ()); + float f = LightTexture.getBrightness(mnecraft.player.level().dimensionType(), mnecraft.player.level().getMaxLocalRawBrightness(blockPos)); + int i = ARGB.colorFromFloat(0.1F, f, f, f); + float g = 4.0F; + float h = -1.0F; + float j = 1.0F; + float k = -1.0F; + float l = 1.0F; + float m = -0.5F; + float n = -mnecraft.player.getYRot() / 64.0F; + float o = mnecraft.player.getXRot() / 64.0F; + Matrix4f matrix4f = poseStack.last().pose(); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.blockScreenEffect(UNDERWATER_LOCATION)); + vertexConsumer.addVertex(matrix4f, -1.0F, -1.0F, -0.5F).setUv(4.0F + n, 4.0F + o).setColor(i); + vertexConsumer.addVertex(matrix4f, 1.0F, -1.0F, -0.5F).setUv(0.0F + n, 4.0F + o).setColor(i); + vertexConsumer.addVertex(matrix4f, 1.0F, 1.0F, -0.5F).setUv(0.0F + n, 0.0F + o).setColor(i); + vertexConsumer.addVertex(matrix4f, -1.0F, 1.0F, -0.5F).setUv(4.0F + n, 0.0F + o).setColor(i); + } + + private static void renderFire(PoseStack poseStack, MultiBufferSource bufferSource) { TextureAtlasSprite textureAtlasSprite = ModelBakery.FIRE_1.sprite(); - RenderSystem.setShaderTexture(0, textureAtlasSprite.atlasLocation()); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.fireScreenEffect(textureAtlasSprite.atlasLocation())); float f = textureAtlasSprite.getU0(); float g = textureAtlasSprite.getU1(); float h = (f + g) / 2.0F; @@ -143,17 +127,11 @@ public class ScreenEffectRenderer { poseStack.translate(-(r * 2 - 1) * 0.24F, -0.3F, 0.0F); poseStack.mulPose(Axis.YP.rotationDegrees((r * 2 - 1) * 10.0F)); Matrix4f matrix4f = poseStack.last().pose(); - BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - bufferBuilder.addVertex(matrix4f, -0.5F, -0.5F, -0.5F).setUv(n, p).setColor(1.0F, 1.0F, 1.0F, 0.9F); - bufferBuilder.addVertex(matrix4f, 0.5F, -0.5F, -0.5F).setUv(m, p).setColor(1.0F, 1.0F, 1.0F, 0.9F); - bufferBuilder.addVertex(matrix4f, 0.5F, 0.5F, -0.5F).setUv(m, o).setColor(1.0F, 1.0F, 1.0F, 0.9F); - bufferBuilder.addVertex(matrix4f, -0.5F, 0.5F, -0.5F).setUv(n, o).setColor(1.0F, 1.0F, 1.0F, 0.9F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); + vertexConsumer.addVertex(matrix4f, -0.5F, -0.5F, -0.5F).setUv(n, p).setColor(1.0F, 1.0F, 1.0F, 0.9F); + vertexConsumer.addVertex(matrix4f, 0.5F, -0.5F, -0.5F).setUv(m, p).setColor(1.0F, 1.0F, 1.0F, 0.9F); + vertexConsumer.addVertex(matrix4f, 0.5F, 0.5F, -0.5F).setUv(m, o).setColor(1.0F, 1.0F, 1.0F, 0.9F); + vertexConsumer.addVertex(matrix4f, -0.5F, 0.5F, -0.5F).setUv(n, o).setColor(1.0F, 1.0F, 1.0F, 0.9F); poseStack.popPose(); } - - RenderSystem.disableBlend(); - RenderSystem.depthMask(true); - RenderSystem.depthFunc(515); } } diff --git a/net/minecraft/client/renderer/SectionOcclusionGraph.java b/net/minecraft/client/renderer/SectionOcclusionGraph.java index 0e920aaf..667ce5eb 100644 --- a/net/minecraft/client/renderer/SectionOcclusionGraph.java +++ b/net/minecraft/client/renderer/SectionOcclusionGraph.java @@ -36,6 +36,7 @@ import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.LevelHeightAccessor; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; +import org.joml.Vector3d; import org.slf4j.Logger; @Environment(EnvType.CLIENT) @@ -43,6 +44,7 @@ public class SectionOcclusionGraph { private static final Logger LOGGER = LogUtils.getLogger(); private static final Direction[] DIRECTIONS = Direction.values(); private static final int MINIMUM_ADVANCED_CULLING_DISTANCE = 60; + private static final int MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE = SectionPos.blockToSectionCoord(60); private static final double CEILED_SECTION_DIAGONAL = Math.ceil(Math.sqrt(3.0) * 16.0); private boolean needsFullUpdate = true; @Nullable @@ -76,13 +78,15 @@ public class SectionOcclusionGraph { this.needsFullUpdate = true; } - public void addSectionsInFrustum(Frustum frustum, List list, List list2) { + public void addSectionsInFrustum( + Frustum frustum, List visibleSections, List nearbyVisibleSections + ) { ((SectionOcclusionGraph.GraphState)this.currentGraph.get()).storage().sectionTree.visitNodes((node, bl, i, bl2) -> { SectionRenderDispatcher.RenderSection renderSection = node.getSection(); if (renderSection != null) { - list.add(renderSection); + visibleSections.add(renderSection); if (bl2) { - list2.add(renderSection); + nearbyVisibleSections.add(renderSection); } } }, frustum, 32); @@ -92,7 +96,7 @@ public class SectionOcclusionGraph { return this.needsFrustumUpdate.compareAndSet(true, false); } - public void onChunkLoaded(ChunkPos chunkPos) { + public void onChunkReadyToRender(ChunkPos chunkPos) { SectionOcclusionGraph.GraphEvents graphEvents = (SectionOcclusionGraph.GraphEvents)this.nextGraphEvents.get(); if (graphEvents != null) { this.addNeighbors(graphEvents, chunkPos); @@ -104,44 +108,48 @@ public class SectionOcclusionGraph { } } - public void schedulePropagationFrom(SectionRenderDispatcher.RenderSection renderSection) { + public void schedulePropagationFrom(SectionRenderDispatcher.RenderSection section) { SectionOcclusionGraph.GraphEvents graphEvents = (SectionOcclusionGraph.GraphEvents)this.nextGraphEvents.get(); if (graphEvents != null) { - graphEvents.sectionsToPropagateFrom.add(renderSection); + graphEvents.sectionsToPropagateFrom.add(section); } SectionOcclusionGraph.GraphEvents graphEvents2 = ((SectionOcclusionGraph.GraphState)this.currentGraph.get()).events; if (graphEvents2 != graphEvents) { - graphEvents2.sectionsToPropagateFrom.add(renderSection); + graphEvents2.sectionsToPropagateFrom.add(section); } } - public void update(boolean bl, Camera camera, Frustum frustum, List list, LongOpenHashSet longOpenHashSet) { + public void update( + boolean smartCull, Camera camera, Frustum frustum, List visibleSections, LongOpenHashSet loadedEmptySections + ) { Vec3 vec3 = camera.getPosition(); if (this.needsFullUpdate && (this.fullUpdateTask == null || this.fullUpdateTask.isDone())) { - this.scheduleFullUpdate(bl, camera, vec3, longOpenHashSet); + this.scheduleFullUpdate(smartCull, camera, vec3, loadedEmptySections); } - this.runPartialUpdate(bl, frustum, list, vec3, longOpenHashSet); + this.runPartialUpdate(smartCull, frustum, visibleSections, vec3, loadedEmptySections); } - private void scheduleFullUpdate(boolean bl, Camera camera, Vec3 vec3, LongOpenHashSet longOpenHashSet) { + private void scheduleFullUpdate(boolean smartCull, Camera camera, Vec3 cameraPosition, LongOpenHashSet loadedEmptySections) { this.needsFullUpdate = false; - LongOpenHashSet longOpenHashSet2 = longOpenHashSet.clone(); + LongOpenHashSet longOpenHashSet = loadedEmptySections.clone(); this.fullUpdateTask = CompletableFuture.runAsync(() -> { SectionOcclusionGraph.GraphState graphState = new SectionOcclusionGraph.GraphState(this.viewArea); this.nextGraphEvents.set(graphState.events); Queue queue = Queues.newArrayDeque(); this.initializeQueueForFullUpdate(camera, queue); queue.forEach(node -> graphState.storage.sectionToNodeMap.put(node.section, node)); - this.runUpdates(graphState.storage, vec3, queue, bl, renderSection -> {}, longOpenHashSet2); + this.runUpdates(graphState.storage, cameraPosition, queue, smartCull, renderSection -> {}, longOpenHashSet); this.currentGraph.set(graphState); this.nextGraphEvents.set(null); this.needsFrustumUpdate.set(true); }, Util.backgroundExecutor()); } - private void runPartialUpdate(boolean bl, Frustum frustum, List list, Vec3 vec3, LongOpenHashSet longOpenHashSet) { + private void runPartialUpdate( + boolean smartCull, Frustum frustum, List visibleSections, Vec3 cameraPosition, LongOpenHashSet loadedEmptySections + ) { SectionOcclusionGraph.GraphState graphState = (SectionOcclusionGraph.GraphState)this.currentGraph.get(); this.queueSectionsWithNewNeighbors(graphState); if (!graphState.events.sectionsToPropagateFrom.isEmpty()) { @@ -161,7 +169,7 @@ public class SectionOcclusionGraph { this.needsFrustumUpdate.set(true); } }; - this.runUpdates(graphState.storage, vec3, queue, bl, consumer, longOpenHashSet); + this.runUpdates(graphState.storage, cameraPosition, queue, smartCull, consumer, loadedEmptySections); } } @@ -185,6 +193,10 @@ public class SectionOcclusionGraph { graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x, chunkPos.z - 1)); graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x + 1, chunkPos.z)); graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x, chunkPos.z + 1)); + graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x - 1, chunkPos.z - 1)); + graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x - 1, chunkPos.z + 1)); + graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x + 1, chunkPos.z - 1)); + graphEvents.chunksWhichReceivedNeighbors.add(ChunkPos.asLong(chunkPos.x + 1, chunkPos.z + 1)); } private void initializeQueueForFullUpdate(Camera camera, Queue nodeQueue) { @@ -225,7 +237,7 @@ public class SectionOcclusionGraph { } } - list.sort(Comparator.comparingDouble(nodex -> blockPos.distSqr(nodex.section.getOrigin().offset(8, 8, 8)))); + list.sort(Comparator.comparingDouble(nodex -> blockPos.distSqr(SectionPos.of(nodex.section.getSectionNode()).center()))); nodeQueue.addAll(list); } else { nodeQueue.add(new SectionOcclusionGraph.Node(renderSection, null, 0)); @@ -233,83 +245,83 @@ public class SectionOcclusionGraph { } private void runUpdates( - SectionOcclusionGraph.GraphStorage graphStorage, - Vec3 vec3, + SectionOcclusionGraph.GraphStorage storage, + Vec3 cameraPosition, Queue queue, - boolean bl, - Consumer consumer, - LongOpenHashSet longOpenHashSet + boolean smartCull, + Consumer visibleSectionConsumer, + LongOpenHashSet loadedEmptySection ) { - int i = 16; - BlockPos blockPos = new BlockPos(Mth.floor(vec3.x / 16.0) * 16, Mth.floor(vec3.y / 16.0) * 16, Mth.floor(vec3.z / 16.0) * 16); - long l = SectionPos.asLong(blockPos); - BlockPos blockPos2 = blockPos.offset(8, 8, 8); + SectionPos sectionPos = SectionPos.of(cameraPosition); + long l = sectionPos.asLong(); + BlockPos blockPos = sectionPos.center(); while (!queue.isEmpty()) { SectionOcclusionGraph.Node node = (SectionOcclusionGraph.Node)queue.poll(); SectionRenderDispatcher.RenderSection renderSection = node.section; - if (!longOpenHashSet.contains(node.section.getSectionNode())) { - if (graphStorage.sectionTree.add(node.section)) { - consumer.accept(node.section); + if (!loadedEmptySection.contains(node.section.getSectionNode())) { + if (storage.sectionTree.add(node.section)) { + visibleSectionConsumer.accept(node.section); } } else { node.section.compiled.compareAndSet(SectionRenderDispatcher.CompiledSection.UNCOMPILED, SectionRenderDispatcher.CompiledSection.EMPTY); } - boolean bl2 = Math.abs(renderSection.getOrigin().getX() - blockPos.getX()) > 60 - || Math.abs(renderSection.getOrigin().getY() - blockPos.getY()) > 60 - || Math.abs(renderSection.getOrigin().getZ() - blockPos.getZ()) > 60; + long m = renderSection.getSectionNode(); + boolean bl = Math.abs(SectionPos.x(m) - sectionPos.x()) > MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE + || Math.abs(SectionPos.y(m) - sectionPos.y()) > MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE + || Math.abs(SectionPos.z(m) - sectionPos.z()) > MINIMUM_ADVANCED_CULLING_SECTION_DISTANCE; for (Direction direction : DIRECTIONS) { SectionRenderDispatcher.RenderSection renderSection2 = this.getRelativeFrom(l, renderSection, direction); - if (renderSection2 != null && (!bl || !node.hasDirection(direction.getOpposite()))) { - if (bl && node.hasSourceDirections()) { + if (renderSection2 != null && (!smartCull || !node.hasDirection(direction.getOpposite()))) { + if (smartCull && node.hasSourceDirections()) { SectionRenderDispatcher.CompiledSection compiledSection = renderSection.getCompiled(); - boolean bl3 = false; + boolean bl2 = false; - for (int j = 0; j < DIRECTIONS.length; j++) { - if (node.hasSourceDirection(j) && compiledSection.facesCanSeeEachother(DIRECTIONS[j].getOpposite(), direction)) { - bl3 = true; + for (int i = 0; i < DIRECTIONS.length; i++) { + if (node.hasSourceDirection(i) && compiledSection.facesCanSeeEachother(DIRECTIONS[i].getOpposite(), direction)) { + bl2 = true; break; } } - if (!bl3) { + if (!bl2) { continue; } } - if (bl && bl2) { - BlockPos blockPos3 = renderSection2.getOrigin(); - BlockPos blockPos4 = blockPos3.offset( - (direction.getAxis() == Direction.Axis.X ? blockPos2.getX() <= blockPos3.getX() : blockPos2.getX() >= blockPos3.getX()) ? 0 : 16, - (direction.getAxis() == Direction.Axis.Y ? blockPos2.getY() <= blockPos3.getY() : blockPos2.getY() >= blockPos3.getY()) ? 0 : 16, - (direction.getAxis() == Direction.Axis.Z ? blockPos2.getZ() <= blockPos3.getZ() : blockPos2.getZ() >= blockPos3.getZ()) ? 0 : 16 - ); - Vec3 vec32 = new Vec3(blockPos4.getX(), blockPos4.getY(), blockPos4.getZ()); - Vec3 vec33 = vec3.subtract(vec32).normalize().scale(CEILED_SECTION_DIAGONAL); - boolean bl4 = true; + if (smartCull && bl) { + int j = SectionPos.sectionToBlockCoord(SectionPos.x(m)); + int k = SectionPos.sectionToBlockCoord(SectionPos.y(m)); + int ix = SectionPos.sectionToBlockCoord(SectionPos.z(m)); + boolean bl3 = direction.getAxis() == Direction.Axis.X ? blockPos.getX() > j : blockPos.getX() < j; + boolean bl4 = direction.getAxis() == Direction.Axis.Y ? blockPos.getY() > k : blockPos.getY() < k; + boolean bl5 = direction.getAxis() == Direction.Axis.Z ? blockPos.getZ() > ix : blockPos.getZ() < ix; + Vector3d vector3d = new Vector3d(j + (bl3 ? 16 : 0), k + (bl4 ? 16 : 0), ix + (bl5 ? 16 : 0)); + Vector3d vector3d2 = new Vector3d(cameraPosition.x, cameraPosition.y, cameraPosition.z).sub(vector3d).normalize().mul(CEILED_SECTION_DIAGONAL); + boolean bl6 = true; - while (vec3.subtract(vec32).lengthSqr() > 3600.0) { - vec32 = vec32.add(vec33); + while (vector3d.distanceSquared(cameraPosition.x, cameraPosition.y, cameraPosition.z) > 3600.0) { + vector3d.add(vector3d2); LevelHeightAccessor levelHeightAccessor = this.viewArea.getLevelHeightAccessor(); - if (vec32.y > levelHeightAccessor.getMaxY() || vec32.y < levelHeightAccessor.getMinY()) { + if (vector3d.y > levelHeightAccessor.getMaxY() || vector3d.y < levelHeightAccessor.getMinY()) { break; } - SectionRenderDispatcher.RenderSection renderSection3 = this.viewArea.getRenderSectionAt(BlockPos.containing(vec32.x, vec32.y, vec32.z)); - if (renderSection3 == null || graphStorage.sectionToNodeMap.get(renderSection3) == null) { - bl4 = false; + SectionRenderDispatcher.RenderSection renderSection3 = this.viewArea.getRenderSectionAt(BlockPos.containing(vector3d.x, vector3d.y, vector3d.z)); + if (renderSection3 == null || storage.sectionToNodeMap.get(renderSection3) == null) { + bl6 = false; break; } } - if (!bl4) { + if (!bl6) { continue; } } - SectionOcclusionGraph.Node node2 = graphStorage.sectionToNodeMap.get(renderSection2); + SectionOcclusionGraph.Node node2 = storage.sectionToNodeMap.get(renderSection2); if (node2 != null) { node2.addSourceDirection(direction); } else { @@ -317,13 +329,12 @@ public class SectionOcclusionGraph { node3.setDirections(node.directions, direction); if (renderSection2.hasAllNeighbors()) { queue.add(node3); - graphStorage.sectionToNodeMap.put(renderSection2, node3); + storage.sectionToNodeMap.put(renderSection2, node3); } else if (this.isInViewDistance(l, renderSection2.getSectionNode())) { - graphStorage.sectionToNodeMap.put(renderSection2, node3); - graphStorage.chunksWaitingForNeighbors - .computeIfAbsent( - ChunkPos.asLong(renderSection2.getOrigin()), (Long2ObjectFunction>)(lx -> new ArrayList()) - ) + storage.sectionToNodeMap.put(renderSection2, node3); + long n = SectionPos.sectionToChunk(renderSection2.getSectionNode()); + storage.chunksWaitingForNeighbors + .computeIfAbsent(n, (Long2ObjectFunction>)(lx -> new ArrayList())) .add(renderSection2); } } @@ -332,17 +343,19 @@ public class SectionOcclusionGraph { } } - private boolean isInViewDistance(long l, long m) { - return ChunkTrackingView.isInViewDistance(SectionPos.x(l), SectionPos.z(l), this.viewArea.getViewDistance(), SectionPos.x(m), SectionPos.z(m)); + private boolean isInViewDistance(long centerPos, long pos) { + return ChunkTrackingView.isInViewDistance( + SectionPos.x(centerPos), SectionPos.z(centerPos), this.viewArea.getViewDistance(), SectionPos.x(pos), SectionPos.z(pos) + ); } @Nullable - private SectionRenderDispatcher.RenderSection getRelativeFrom(long l, SectionRenderDispatcher.RenderSection renderSection, Direction direction) { - long m = renderSection.getNeighborSectionNode(direction); - if (!this.isInViewDistance(l, m)) { + private SectionRenderDispatcher.RenderSection getRelativeFrom(long sectionPos, SectionRenderDispatcher.RenderSection section, Direction direction) { + long l = section.getNeighborSectionNode(direction); + if (!this.isInViewDistance(sectionPos, l)) { return null; } else { - return Mth.abs(SectionPos.y(l) - SectionPos.y(m)) > this.viewArea.getViewDistance() ? null : this.viewArea.getRenderSection(m); + return Mth.abs(SectionPos.y(sectionPos) - SectionPos.y(l)) > this.viewArea.getViewDistance() ? null : this.viewArea.getRenderSection(l); } } diff --git a/net/minecraft/client/renderer/ShaderDefines.java b/net/minecraft/client/renderer/ShaderDefines.java index d39ffe7b..c37ef863 100644 --- a/net/minecraft/client/renderer/ShaderDefines.java +++ b/net/minecraft/client/renderer/ShaderDefines.java @@ -26,18 +26,18 @@ public record ShaderDefines(Map values, Set flags) { return new ShaderDefines.Builder(); } - public ShaderDefines withOverrides(ShaderDefines shaderDefines) { + public ShaderDefines withOverrides(ShaderDefines defines) { if (this.isEmpty()) { - return shaderDefines; - } else if (shaderDefines.isEmpty()) { + return defines; + } else if (defines.isEmpty()) { return this; } else { - ImmutableMap.Builder builder = ImmutableMap.builderWithExpectedSize(this.values.size() + shaderDefines.values.size()); + ImmutableMap.Builder builder = ImmutableMap.builderWithExpectedSize(this.values.size() + defines.values.size()); builder.putAll(this.values); - builder.putAll(shaderDefines.values); - ImmutableSet.Builder builder2 = ImmutableSet.builderWithExpectedSize(this.flags.size() + shaderDefines.flags.size()); + builder.putAll(defines.values); + ImmutableSet.Builder builder2 = ImmutableSet.builderWithExpectedSize(this.flags.size() + defines.flags.size()); builder2.addAll(this.flags); - builder2.addAll(shaderDefines.flags); + builder2.addAll(defines.flags); return new ShaderDefines(builder.buildKeepingLast(), builder2.build()); } } @@ -70,26 +70,31 @@ public record ShaderDefines(Map values, Set flags) { Builder() { } - public ShaderDefines.Builder define(String string, String string2) { - if (string2.isBlank()) { + public ShaderDefines.Builder define(String key, String value) { + if (value.isBlank()) { throw new IllegalArgumentException("Cannot define empty string"); } else { - this.values.put(string, escapeNewLines(string2)); + this.values.put(key, escapeNewLines(value)); return this; } } - private static String escapeNewLines(String string) { - return string.replaceAll("\n", "\\\\\n"); + private static String escapeNewLines(String str) { + return str.replaceAll("\n", "\\\\\n"); } - public ShaderDefines.Builder define(String string, float f) { - this.values.put(string, String.valueOf(f)); + public ShaderDefines.Builder define(String key, float value) { + this.values.put(key, String.valueOf(value)); return this; } - public ShaderDefines.Builder define(String string) { - this.flags.add(string); + public ShaderDefines.Builder define(String key, int value) { + this.values.put(key, String.valueOf(value)); + return this; + } + + public ShaderDefines.Builder define(String flag) { + this.flags.add(flag); return this; } diff --git a/net/minecraft/client/renderer/ShaderManager.java b/net/minecraft/client/renderer/ShaderManager.java index 36683c02..9f591966 100644 --- a/net/minecraft/client/renderer/ShaderManager.java +++ b/net/minecraft/client/renderer/ShaderManager.java @@ -6,15 +6,21 @@ import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; +import com.mojang.blaze3d.pipeline.CompiledRenderPipeline; +import com.mojang.blaze3d.pipeline.RenderPipeline; import com.mojang.blaze3d.preprocessor.GlslPreprocessor; -import com.mojang.blaze3d.shaders.CompiledShader; +import com.mojang.blaze3d.shaders.ShaderType; +import com.mojang.blaze3d.systems.GpuDevice; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.logging.LogUtils; import com.mojang.serialization.JsonOps; import it.unimi.dsi.fastutil.objects.ObjectArraySet; import java.io.IOException; import java.io.Reader; +import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -31,7 +37,6 @@ import net.minecraft.resources.FileToIdConverter; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.server.packs.resources.ResourceProvider; import net.minecraft.server.packs.resources.SimplePreparableReloadListener; import net.minecraft.util.profiling.ProfilerFiller; import org.apache.commons.io.IOUtils; @@ -41,60 +46,56 @@ import org.slf4j.Logger; @Environment(EnvType.CLIENT) public class ShaderManager extends SimplePreparableReloadListener implements AutoCloseable { static final Logger LOGGER = LogUtils.getLogger(); - public static final String SHADER_PATH = "shaders"; - public static final String SHADER_INCLUDE_PATH = "shaders/include/"; - private static final FileToIdConverter PROGRAM_ID_CONVERTER = FileToIdConverter.json("shaders"); - private static final FileToIdConverter POST_CHAIN_ID_CONVERTER = FileToIdConverter.json("post_effect"); public static final int MAX_LOG_LENGTH = 32768; + public static final String SHADER_PATH = "shaders"; + private static final String SHADER_INCLUDE_PATH = "shaders/include/"; + private static final FileToIdConverter POST_CHAIN_ID_CONVERTER = FileToIdConverter.json("post_effect"); final TextureManager textureManager; private final Consumer recoveryHandler; private ShaderManager.CompilationCache compilationCache = new ShaderManager.CompilationCache(ShaderManager.Configs.EMPTY); - public ShaderManager(TextureManager textureManager, Consumer consumer) { + public ShaderManager(TextureManager textureManager, Consumer recoveryHandler) { this.textureManager = textureManager; - this.recoveryHandler = consumer; + this.recoveryHandler = recoveryHandler; } protected ShaderManager.Configs prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { - Builder builder = ImmutableMap.builder(); - Builder builder2 = ImmutableMap.builder(); - Map map = resourceManager.listResources("shaders", resourceLocation -> isProgram(resourceLocation) || isShader(resourceLocation)); + Builder builder = ImmutableMap.builder(); + Map map = resourceManager.listResources("shaders", ShaderManager::isShader); for (Entry entry : map.entrySet()) { ResourceLocation resourceLocation = (ResourceLocation)entry.getKey(); - CompiledShader.Type type = CompiledShader.Type.byLocation(resourceLocation); - if (type != null) { - loadShader(resourceLocation, (Resource)entry.getValue(), type, map, builder2); - } else if (isProgram(resourceLocation)) { - loadProgram(resourceLocation, (Resource)entry.getValue(), builder); + ShaderType shaderType = ShaderType.byLocation(resourceLocation); + if (shaderType != null) { + loadShader(resourceLocation, (Resource)entry.getValue(), shaderType, map, builder); } } - Builder builder3 = ImmutableMap.builder(); + Builder builder2 = ImmutableMap.builder(); for (Entry entry2 : POST_CHAIN_ID_CONVERTER.listMatchingResources(resourceManager).entrySet()) { - loadPostChain((ResourceLocation)entry2.getKey(), (Resource)entry2.getValue(), builder3); + loadPostChain((ResourceLocation)entry2.getKey(), (Resource)entry2.getValue(), builder2); } - return new ShaderManager.Configs(builder.build(), builder2.build(), builder3.build()); + return new ShaderManager.Configs(builder.build(), builder2.build()); } private static void loadShader( - ResourceLocation resourceLocation, - Resource resource, - CompiledShader.Type type, - Map map, - Builder builder + ResourceLocation location, + Resource shader, + ShaderType type, + Map shaderResources, + Builder output ) { - ResourceLocation resourceLocation2 = type.idConverter().fileToId(resourceLocation); - GlslPreprocessor glslPreprocessor = createPreprocessor(map, resourceLocation); + ResourceLocation resourceLocation = type.idConverter().fileToId(location); + GlslPreprocessor glslPreprocessor = createPreprocessor(shaderResources, location); try { - Reader reader = resource.openAsReader(); + Reader reader = shader.openAsReader(); try { String string = IOUtils.toString(reader); - builder.put(new ShaderManager.ShaderSourceKey(resourceLocation2, type), String.join("", glslPreprocessor.process(string))); + output.put(new ShaderManager.ShaderSourceKey(resourceLocation, type), String.join("", glslPreprocessor.process(string))); } catch (Throwable var11) { if (reader != null) { try { @@ -111,12 +112,12 @@ public class ShaderManager extends SimplePreparableReloadListener map, ResourceLocation resourceLocation) { - final ResourceLocation resourceLocation2 = resourceLocation.withPath(FileUtil::getFullResourcePath); + private static GlslPreprocessor createPreprocessor(Map shaderResources, ResourceLocation shaderLocation) { + final ResourceLocation resourceLocation = shaderLocation.withPath(FileUtil::getFullResourcePath); return new GlslPreprocessor() { private final Set importedLocations = new ObjectArraySet<>(); @@ -125,7 +126,7 @@ public class ShaderManager extends SimplePreparableReloadListener)(string2 -> FileUtil.normalizeResourcePath(string2 + directory))); + resourceLocationx = resourceLocation.withPath((UnaryOperator)(string2 -> FileUtil.normalizeResourcePath(string2 + directory))); } else { resourceLocationx = ResourceLocation.parse(directory).withPrefix("shaders/include/"); } @@ -138,7 +139,7 @@ public class ShaderManager extends SimplePreparableReloadListener builder) { - ResourceLocation resourceLocation2 = PROGRAM_ID_CONVERTER.fileToId(resourceLocation); + private static void loadPostChain(ResourceLocation location, Resource postChain, Builder output) { + ResourceLocation resourceLocation = POST_CHAIN_ID_CONVERTER.fileToId(location); try { - Reader reader = resource.openAsReader(); + Reader reader = postChain.openAsReader(); try { JsonElement jsonElement = JsonParser.parseReader(reader); - ShaderProgramConfig shaderProgramConfig = ShaderProgramConfig.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonSyntaxException::new); - builder.put(resourceLocation2, shaderProgramConfig); + output.put(resourceLocation, PostChainConfig.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonSyntaxException::new)); } catch (Throwable var8) { if (reader != null) { try { @@ -195,67 +195,32 @@ public class ShaderManager extends SimplePreparableReloadListener builder) { - ResourceLocation resourceLocation2 = POST_CHAIN_ID_CONVERTER.fileToId(resourceLocation); - - try { - Reader reader = resource.openAsReader(); - - try { - JsonElement jsonElement = JsonParser.parseReader(reader); - builder.put(resourceLocation2, PostChainConfig.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonSyntaxException::new)); - } catch (Throwable var8) { - if (reader != null) { - try { - reader.close(); - } catch (Throwable var7) { - var8.addSuppressed(var7); - } - } - - throw var8; - } - - if (reader != null) { - reader.close(); - } - } catch (JsonParseException | IOException var9) { - LOGGER.error("Failed to parse post chain at {}", resourceLocation, var9); - } - } - - private static boolean isProgram(ResourceLocation resourceLocation) { - return resourceLocation.getPath().endsWith(".json"); - } - - private static boolean isShader(ResourceLocation resourceLocation) { - return CompiledShader.Type.byLocation(resourceLocation) != null || resourceLocation.getPath().endsWith(".glsl"); + private static boolean isShader(ResourceLocation location) { + return ShaderType.byLocation(location) != null || location.getPath().endsWith(".glsl"); } protected void apply(ShaderManager.Configs configs, ResourceManager resourceManager, ProfilerFiller profilerFiller) { ShaderManager.CompilationCache compilationCache = new ShaderManager.CompilationCache(configs); - Map map = new HashMap(); + Set set = new HashSet(RenderPipelines.getStaticPipelines()); + List list = new ArrayList(); + GpuDevice gpuDevice = RenderSystem.getDevice(); + gpuDevice.clearPipelineCache(); - for (ShaderProgram shaderProgram : CoreShaders.getProgramsToPreload()) { - try { - compilationCache.programs.put(shaderProgram, Optional.of(compilationCache.compileProgram(shaderProgram))); - } catch (ShaderManager.CompilationException var9) { - map.put(shaderProgram, var9); + for (RenderPipeline renderPipeline : set) { + CompiledRenderPipeline compiledRenderPipeline = gpuDevice.precompilePipeline(renderPipeline, compilationCache::getShaderSource); + if (!compiledRenderPipeline.isValid()) { + list.add(renderPipeline.getLocation()); } } - if (!map.isEmpty()) { - compilationCache.close(); + if (!list.isEmpty()) { + gpuDevice.clearPipelineCache(); throw new RuntimeException( - "Failed to load required shader programs:\n" - + (String)map.entrySet() - .stream() - .map(entry -> " - " + entry.getKey() + ": " + ((ShaderManager.CompilationException)entry.getValue()).getMessage()) - .collect(Collectors.joining("\n")) + "Failed to load required shader programs:\n" + (String)list.stream().map(resourceLocation -> " - " + resourceLocation).collect(Collectors.joining("\n")) ); } else { this.compilationCache.close(); @@ -268,106 +233,21 @@ public class ShaderManager extends SimplePreparableReloadListener externalTargets) { try { - return this.compilationCache.getOrCompileProgram(shaderProgram); - } catch (ShaderManager.CompilationException var3) { - LOGGER.error("Failed to load shader program: {}", shaderProgram, var3); - this.compilationCache.programs.put(shaderProgram, Optional.empty()); - this.recoveryHandler.accept(var3); - return null; - } - } - - public CompiledShaderProgram getProgramForLoading(ShaderProgram shaderProgram) throws ShaderManager.CompilationException { - CompiledShaderProgram compiledShaderProgram = this.compilationCache.getOrCompileProgram(shaderProgram); - if (compiledShaderProgram == null) { - throw new ShaderManager.CompilationException("Shader '" + shaderProgram + "' could not be found"); - } else { - return compiledShaderProgram; - } - } - - static CompiledShaderProgram linkProgram( - ShaderProgram shaderProgram, ShaderProgramConfig shaderProgramConfig, CompiledShader compiledShader, CompiledShader compiledShader2 - ) throws ShaderManager.CompilationException { - CompiledShaderProgram compiledShaderProgram = CompiledShaderProgram.link(compiledShader, compiledShader2, shaderProgram.vertexFormat()); - compiledShaderProgram.setupUniforms(shaderProgramConfig.uniforms(), shaderProgramConfig.samplers()); - return compiledShaderProgram; - } - - @Nullable - public PostChain getPostChain(ResourceLocation resourceLocation, Set set) { - try { - return this.compilationCache.getOrLoadPostChain(resourceLocation, set); + return this.compilationCache.getOrLoadPostChain(id, externalTargets); } catch (ShaderManager.CompilationException var4) { - LOGGER.error("Failed to load post chain: {}", resourceLocation, var4); - this.compilationCache.postChains.put(resourceLocation, Optional.empty()); - this.recoveryHandler.accept(var4); + LOGGER.error("Failed to load post chain: {}", id, var4); + this.compilationCache.postChains.put(id, Optional.empty()); + this.tryTriggerRecovery(var4); return null; } } @@ -376,120 +256,64 @@ public class ShaderManager extends SimplePreparableReloadListener> programs = new HashMap(); - final Map shaders = new HashMap(); final Map> postChains = new HashMap(); + boolean triggeredRecovery; CompilationCache(final ShaderManager.Configs configs) { this.configs = configs; } @Nullable - public CompiledShaderProgram getOrCompileProgram(ShaderProgram shaderProgram) throws ShaderManager.CompilationException { - Optional optional = (Optional)this.programs.get(shaderProgram); - if (optional != null) { - return (CompiledShaderProgram)optional.orElse(null); - } else { - CompiledShaderProgram compiledShaderProgram = this.compileProgram(shaderProgram); - this.programs.put(shaderProgram, Optional.of(compiledShaderProgram)); - return compiledShaderProgram; - } - } - - CompiledShaderProgram compileProgram(ShaderProgram shaderProgram) throws ShaderManager.CompilationException { - ShaderProgramConfig shaderProgramConfig = (ShaderProgramConfig)this.configs.programs.get(shaderProgram.configId()); - if (shaderProgramConfig == null) { - throw new ShaderManager.CompilationException("Could not find program with id: " + shaderProgram.configId()); - } else { - ShaderDefines shaderDefines = shaderProgramConfig.defines().withOverrides(shaderProgram.defines()); - CompiledShader compiledShader = this.getOrCompileShader(shaderProgramConfig.vertex(), CompiledShader.Type.VERTEX, shaderDefines); - CompiledShader compiledShader2 = this.getOrCompileShader(shaderProgramConfig.fragment(), CompiledShader.Type.FRAGMENT, shaderDefines); - return ShaderManager.linkProgram(shaderProgram, shaderProgramConfig, compiledShader, compiledShader2); - } - } - - private CompiledShader getOrCompileShader(ResourceLocation resourceLocation, CompiledShader.Type type, ShaderDefines shaderDefines) throws ShaderManager.CompilationException { - ShaderManager.ShaderCompilationKey shaderCompilationKey = new ShaderManager.ShaderCompilationKey(resourceLocation, type, shaderDefines); - CompiledShader compiledShader = (CompiledShader)this.shaders.get(shaderCompilationKey); - if (compiledShader == null) { - compiledShader = this.compileShader(shaderCompilationKey); - this.shaders.put(shaderCompilationKey, compiledShader); - } - - return compiledShader; - } - - private CompiledShader compileShader(ShaderManager.ShaderCompilationKey shaderCompilationKey) throws ShaderManager.CompilationException { - String string = (String)this.configs.shaderSources.get(new ShaderManager.ShaderSourceKey(shaderCompilationKey.id, shaderCompilationKey.type)); - if (string == null) { - throw new ShaderManager.CompilationException("Could not find shader: " + shaderCompilationKey); - } else { - String string2 = GlslPreprocessor.injectDefines(string, shaderCompilationKey.defines); - return CompiledShader.compile(shaderCompilationKey.id, shaderCompilationKey.type, string2); - } - } - - @Nullable - public PostChain getOrLoadPostChain(ResourceLocation resourceLocation, Set set) throws ShaderManager.CompilationException { - Optional optional = (Optional)this.postChains.get(resourceLocation); + public PostChain getOrLoadPostChain(ResourceLocation name, Set externalTargets) throws ShaderManager.CompilationException { + Optional optional = (Optional)this.postChains.get(name); if (optional != null) { return (PostChain)optional.orElse(null); } else { - PostChain postChain = this.loadPostChain(resourceLocation, set); - this.postChains.put(resourceLocation, Optional.of(postChain)); + PostChain postChain = this.loadPostChain(name, externalTargets); + this.postChains.put(name, Optional.of(postChain)); return postChain; } } - private PostChain loadPostChain(ResourceLocation resourceLocation, Set set) throws ShaderManager.CompilationException { - PostChainConfig postChainConfig = (PostChainConfig)this.configs.postChains.get(resourceLocation); + private PostChain loadPostChain(ResourceLocation name, Set externalTargets) throws ShaderManager.CompilationException { + PostChainConfig postChainConfig = (PostChainConfig)this.configs.postChains.get(name); if (postChainConfig == null) { - throw new ShaderManager.CompilationException("Could not find post chain with id: " + resourceLocation); + throw new ShaderManager.CompilationException("Could not find post chain with id: " + name); } else { - return PostChain.load(postChainConfig, ShaderManager.this.textureManager, ShaderManager.this, set); + return PostChain.load(postChainConfig, ShaderManager.this.textureManager, externalTargets, name); } } public void close() { - RenderSystem.assertOnRenderThread(); - this.programs.values().forEach(optional -> optional.ifPresent(CompiledShaderProgram::close)); - this.shaders.values().forEach(CompiledShader::close); - this.programs.clear(); - this.shaders.clear(); this.postChains.clear(); } + + public String getShaderSource(ResourceLocation id, ShaderType type) { + return (String)this.configs.shaderSources.get(new ShaderManager.ShaderSourceKey(id, type)); + } } @Environment(EnvType.CLIENT) public static class CompilationException extends Exception { - public CompilationException(String string) { - super(string); + public CompilationException(String message) { + super(message); } } @Environment(EnvType.CLIENT) - public record Configs( - Map programs, - Map shaderSources, - Map postChains - ) { - public static final ShaderManager.Configs EMPTY = new ShaderManager.Configs(Map.of(), Map.of(), Map.of()); + public record Configs(Map shaderSources, Map postChains) { + public static final ShaderManager.Configs EMPTY = new ShaderManager.Configs(Map.of(), Map.of()); } @Environment(EnvType.CLIENT) - record ShaderCompilationKey(ResourceLocation id, CompiledShader.Type type, ShaderDefines defines) { - - public String toString() { - String string = this.id + " (" + this.type + ")"; - return !this.defines.isEmpty() ? string + " with " + this.defines : string; - } - } - - @Environment(EnvType.CLIENT) - record ShaderSourceKey(ResourceLocation id, CompiledShader.Type type) { + record ShaderSourceKey(ResourceLocation id, ShaderType type) { public String toString() { return this.id + " (" + this.type + ")"; } diff --git a/net/minecraft/client/renderer/ShaderProgram.java b/net/minecraft/client/renderer/ShaderProgram.java deleted file mode 100644 index 41a74d0c..00000000 --- a/net/minecraft/client/renderer/ShaderProgram.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.minecraft.client.renderer; - -import com.mojang.blaze3d.vertex.VertexFormat; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public record ShaderProgram(ResourceLocation configId, VertexFormat vertexFormat, ShaderDefines defines) { - public String toString() { - String string = this.configId + " (" + this.vertexFormat + ")"; - return !this.defines.isEmpty() ? string + " with " + this.defines : string; - } -} diff --git a/net/minecraft/client/renderer/ShaderProgramConfig.java b/net/minecraft/client/renderer/ShaderProgramConfig.java deleted file mode 100644 index c95ed835..00000000 --- a/net/minecraft/client/renderer/ShaderProgramConfig.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.minecraft.client.renderer; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.DataResult; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public record ShaderProgramConfig( - ResourceLocation vertex, - ResourceLocation fragment, - List samplers, - List uniforms, - ShaderDefines defines -) { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - ResourceLocation.CODEC.fieldOf("vertex").forGetter(ShaderProgramConfig::vertex), - ResourceLocation.CODEC.fieldOf("fragment").forGetter(ShaderProgramConfig::fragment), - ShaderProgramConfig.Sampler.CODEC.listOf().optionalFieldOf("samplers", List.of()).forGetter(ShaderProgramConfig::samplers), - ShaderProgramConfig.Uniform.CODEC.listOf().optionalFieldOf("uniforms", List.of()).forGetter(ShaderProgramConfig::uniforms), - ShaderDefines.CODEC.optionalFieldOf("defines", ShaderDefines.EMPTY).forGetter(ShaderProgramConfig::defines) - ) - .apply(instance, ShaderProgramConfig::new) - ); - - @Environment(EnvType.CLIENT) - public record Sampler(String name) { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group(Codec.STRING.fieldOf("name").forGetter(ShaderProgramConfig.Sampler::name)).apply(instance, ShaderProgramConfig.Sampler::new) - ); - } - - @Environment(EnvType.CLIENT) - public record Uniform(String name, String type, int count, List values) { - public static final Codec CODEC = RecordCodecBuilder.create( - instance -> instance.group( - Codec.STRING.fieldOf("name").forGetter(ShaderProgramConfig.Uniform::name), - Codec.STRING.fieldOf("type").forGetter(ShaderProgramConfig.Uniform::type), - Codec.INT.fieldOf("count").forGetter(ShaderProgramConfig.Uniform::count), - Codec.FLOAT.listOf().fieldOf("values").forGetter(ShaderProgramConfig.Uniform::values) - ) - .apply(instance, ShaderProgramConfig.Uniform::new) - ) - .validate(ShaderProgramConfig.Uniform::validate); - - private static DataResult validate(ShaderProgramConfig.Uniform uniform) { - int i = uniform.count; - int j = uniform.values.size(); - return j != i && j > 1 - ? DataResult.error(() -> "Invalid amount of uniform values specified (expected " + i + ", found " + j + ")") - : DataResult.success(uniform); - } - } -} diff --git a/net/minecraft/client/renderer/ShapeRenderer.java b/net/minecraft/client/renderer/ShapeRenderer.java index a36638d8..162b571b 100644 --- a/net/minecraft/client/renderer/ShapeRenderer.java +++ b/net/minecraft/client/renderer/ShapeRenderer.java @@ -13,177 +13,210 @@ import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class ShapeRenderer { - public static void renderShape(PoseStack poseStack, VertexConsumer vertexConsumer, VoxelShape voxelShape, double d, double e, double f, int i) { + public static void renderShape(PoseStack poseStack, VertexConsumer buffer, VoxelShape shape, double x, double y, double z, int color) { PoseStack.Pose pose = poseStack.last(); - voxelShape.forAllEdges((g, h, j, k, l, m) -> { + shape.forAllEdges((g, h, j, k, l, m) -> { Vector3f vector3f = new Vector3f((float)(k - g), (float)(l - h), (float)(m - j)).normalize(); - vertexConsumer.addVertex(pose, (float)(g + d), (float)(h + e), (float)(j + f)).setColor(i).setNormal(pose, vector3f); - vertexConsumer.addVertex(pose, (float)(k + d), (float)(l + e), (float)(m + f)).setColor(i).setNormal(pose, vector3f); + buffer.addVertex(pose, (float)(g + x), (float)(h + y), (float)(j + z)).setColor(color).setNormal(pose, vector3f); + buffer.addVertex(pose, (float)(k + x), (float)(l + y), (float)(m + z)).setColor(color).setNormal(pose, vector3f); }); } - public static void renderLineBox(PoseStack poseStack, VertexConsumer vertexConsumer, AABB aABB, float f, float g, float h, float i) { - renderLineBox(poseStack, vertexConsumer, aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, f, g, h, i, f, g, h); - } - - public static void renderLineBox( - PoseStack poseStack, VertexConsumer vertexConsumer, double d, double e, double f, double g, double h, double i, float j, float k, float l, float m - ) { - renderLineBox(poseStack, vertexConsumer, d, e, f, g, h, i, j, k, l, m, j, k, l); + public static void renderLineBox(PoseStack poseStack, VertexConsumer buffer, AABB box, float red, float green, float blue, float alpha) { + renderLineBox(poseStack, buffer, box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ, red, green, blue, alpha, red, green, blue); } public static void renderLineBox( PoseStack poseStack, - VertexConsumer vertexConsumer, - double d, - double e, - double f, - double g, - double h, - double i, - float j, - float k, - float l, - float m, - float n, - float o, - float p + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha + ) { + renderLineBox(poseStack, buffer, minX, minY, minZ, maxX, maxY, maxZ, red, green, blue, alpha, red, green, blue); + } + + public static void renderLineBox( + PoseStack poseStack, + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha, + float red2, + float green2, + float blue2 ) { PoseStack.Pose pose = poseStack.last(); - float q = (float)d; - float r = (float)e; - float s = (float)f; - float t = (float)g; - float u = (float)h; - float v = (float)i; - vertexConsumer.addVertex(pose, q, r, s).setColor(j, o, p, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, o, p, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, s).setColor(n, k, p, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(n, k, p, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, s).setColor(n, o, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(n, o, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, -1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(j, k, l, m).setNormal(pose, -1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, -1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, -1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, -1.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, -1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); + float f = (float)minX; + float g = (float)minY; + float h = (float)minZ; + float i = (float)maxX; + float j = (float)maxY; + float k = (float)maxZ; + buffer.addVertex(pose, f, g, h).setColor(red, green2, blue2, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green2, blue2, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, g, h).setColor(red2, green, blue2, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red2, green, blue2, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, f, g, h).setColor(red2, green2, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, g, k).setColor(red2, green2, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, -1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red, green, blue, alpha).setNormal(pose, -1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, -1.0F, 0.0F); + buffer.addVertex(pose, f, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, -1.0F, 0.0F); + buffer.addVertex(pose, f, g, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, -1.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, -1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); } public static void addChainedFilledBoxVertices( - PoseStack poseStack, VertexConsumer vertexConsumer, double d, double e, double f, double g, double h, double i, float j, float k, float l, float m + PoseStack poseStack, + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha ) { - addChainedFilledBoxVertices(poseStack, vertexConsumer, (float)d, (float)e, (float)f, (float)g, (float)h, (float)i, j, k, l, m); + addChainedFilledBoxVertices(poseStack, buffer, (float)minX, (float)minY, (float)minZ, (float)maxX, (float)maxY, (float)maxZ, red, green, blue, alpha); } public static void addChainedFilledBoxVertices( - PoseStack poseStack, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o + PoseStack poseStack, + VertexConsumer buffer, + float minX, + float minY, + float minZ, + float maxX, + float maxY, + float maxZ, + float red, + float green, + float blue, + float alpha ) { Matrix4f matrix4f = poseStack.last().pose(); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); } public static void renderFace( PoseStack poseStack, - VertexConsumer vertexConsumer, - Direction direction, - float f, - float g, - float h, - float i, - float j, - float k, - float l, - float m, - float n, - float o + VertexConsumer buffer, + Direction face, + float x1, + float y1, + float z1, + float x2, + float y2, + float z2, + float red, + float green, + float blue, + float alpha ) { Matrix4f matrix4f = poseStack.last().pose(); - switch (direction) { + switch (face) { case DOWN: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); break; case UP: - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); break; case NORTH: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); break; case SOUTH: - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); break; case WEST: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); break; case EAST: - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); } } - public static void renderVector(PoseStack poseStack, VertexConsumer vertexConsumer, Vector3f vector3f, Vec3 vec3, int i) { + public static void renderVector(PoseStack poseStack, VertexConsumer buffer, Vector3f startPos, Vec3 vector, int color) { PoseStack.Pose pose = poseStack.last(); - vertexConsumer.addVertex(pose, vector3f).setColor(i).setNormal(pose, (float)vec3.x, (float)vec3.y, (float)vec3.z); - vertexConsumer.addVertex(pose, (float)(vector3f.x() + vec3.x), (float)(vector3f.y() + vec3.y), (float)(vector3f.z() + vec3.z)) - .setColor(i) - .setNormal(pose, (float)vec3.x, (float)vec3.y, (float)vec3.z); + buffer.addVertex(pose, startPos).setColor(color).setNormal(pose, (float)vector.x, (float)vector.y, (float)vector.z); + buffer.addVertex(pose, (float)(startPos.x() + vector.x), (float)(startPos.y() + vector.y), (float)(startPos.z() + vector.z)) + .setColor(color) + .setNormal(pose, (float)vector.x, (float)vector.y, (float)vector.z); } } diff --git a/net/minecraft/client/renderer/Sheets.java b/net/minecraft/client/renderer/Sheets.java index 15a78cfe..39bf7c15 100644 --- a/net/minecraft/client/renderer/Sheets.java +++ b/net/minecraft/client/renderer/Sheets.java @@ -8,12 +8,12 @@ import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.resources.model.Material; import net.minecraft.core.Holder; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -48,39 +48,48 @@ public class Sheets { private static final RenderType SOLID_BLOCK_SHEET = RenderType.entitySolid(TextureAtlas.LOCATION_BLOCKS); private static final RenderType CUTOUT_BLOCK_SHEET = RenderType.entityCutout(TextureAtlas.LOCATION_BLOCKS); private static final RenderType TRANSLUCENT_ITEM_CULL_BLOCK_SHEET = RenderType.itemEntityTranslucentCull(TextureAtlas.LOCATION_BLOCKS); - public static final Material DEFAULT_SHULKER_TEXTURE_LOCATION = new Material(SHULKER_SHEET, ResourceLocation.withDefaultNamespace("entity/shulker/shulker")); - public static final List SHULKER_TEXTURE_LOCATION = (List)Stream.of( - "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black" - ) - .map(string -> new Material(SHULKER_SHEET, ResourceLocation.withDefaultNamespace("entity/shulker/shulker_" + string))) + public static final MaterialMapper ITEMS_MAPPER = new MaterialMapper(TextureAtlas.LOCATION_BLOCKS, "item"); + public static final MaterialMapper BLOCKS_MAPPER = new MaterialMapper(TextureAtlas.LOCATION_BLOCKS, "block"); + public static final MaterialMapper BANNER_MAPPER = new MaterialMapper(BANNER_SHEET, "entity/banner"); + public static final MaterialMapper SHIELD_MAPPER = new MaterialMapper(SHIELD_SHEET, "entity/shield"); + public static final MaterialMapper CHEST_MAPPER = new MaterialMapper(CHEST_SHEET, "entity/chest"); + public static final MaterialMapper DECORATED_POT_MAPPER = new MaterialMapper(DECORATED_POT_SHEET, "entity/decorated_pot"); + public static final MaterialMapper BED_MAPPER = new MaterialMapper(BED_SHEET, "entity/bed"); + public static final MaterialMapper SHULKER_MAPPER = new MaterialMapper(SHULKER_SHEET, "entity/shulker"); + public static final MaterialMapper SIGN_MAPPER = new MaterialMapper(SIGN_SHEET, "entity/signs"); + public static final MaterialMapper HANGING_SIGN_MAPPER = new MaterialMapper(SIGN_SHEET, "entity/signs/hanging"); + public static final Material DEFAULT_SHULKER_TEXTURE_LOCATION = SHULKER_MAPPER.defaultNamespaceApply("shulker"); + public static final List SHULKER_TEXTURE_LOCATION = (List)Arrays.stream(DyeColor.values()) + .sorted(Comparator.comparingInt(DyeColor::getId)) + .map(Sheets::createShulkerMaterial) .collect(ImmutableList.toImmutableList()); public static final Map SIGN_MATERIALS = (Map)WoodType.values() .collect(Collectors.toMap(Function.identity(), Sheets::createSignMaterial)); public static final Map HANGING_SIGN_MATERIALS = (Map)WoodType.values() .collect(Collectors.toMap(Function.identity(), Sheets::createHangingSignMaterial)); - public static final Material BANNER_BASE = new Material(BANNER_SHEET, ResourceLocation.withDefaultNamespace("entity/banner/base")); - public static final Material SHIELD_BASE = new Material(SHIELD_SHEET, ResourceLocation.withDefaultNamespace("entity/shield/base")); + public static final Material BANNER_BASE = BANNER_MAPPER.defaultNamespaceApply("base"); + public static final Material SHIELD_BASE = SHIELD_MAPPER.defaultNamespaceApply("base"); private static final Map BANNER_MATERIALS = new HashMap(); private static final Map SHIELD_MATERIALS = new HashMap(); public static final Map, Material> DECORATED_POT_MATERIALS = (Map, Material>)BuiltInRegistries.DECORATED_POT_PATTERN .listElements() - .collect(Collectors.toMap(Holder.Reference::key, reference -> createDecoratedPotMaterial(((DecoratedPotPattern)reference.value()).assetId()))); - public static final Material DECORATED_POT_BASE = createDecoratedPotMaterial(ResourceLocation.withDefaultNamespace("decorated_pot_base")); - public static final Material DECORATED_POT_SIDE = createDecoratedPotMaterial(ResourceLocation.withDefaultNamespace("decorated_pot_side")); - public static final Material[] BED_TEXTURES = (Material[])Arrays.stream(DyeColor.values()) + .collect(Collectors.toMap(Reference::key, reference -> DECORATED_POT_MAPPER.apply(((DecoratedPotPattern)reference.value()).assetId()))); + public static final Material DECORATED_POT_BASE = DECORATED_POT_MAPPER.defaultNamespaceApply("decorated_pot_base"); + public static final Material DECORATED_POT_SIDE = DECORATED_POT_MAPPER.defaultNamespaceApply("decorated_pot_side"); + private static final Material[] BED_TEXTURES = (Material[])Arrays.stream(DyeColor.values()) .sorted(Comparator.comparingInt(DyeColor::getId)) - .map(dyeColor -> new Material(BED_SHEET, ResourceLocation.withDefaultNamespace("entity/bed/" + dyeColor.getName()))) + .map(Sheets::createBedMaterial) .toArray(Material[]::new); - public static final Material CHEST_TRAP_LOCATION = chestMaterial("trapped"); - public static final Material CHEST_TRAP_LOCATION_LEFT = chestMaterial("trapped_left"); - public static final Material CHEST_TRAP_LOCATION_RIGHT = chestMaterial("trapped_right"); - public static final Material CHEST_XMAS_LOCATION = chestMaterial("christmas"); - public static final Material CHEST_XMAS_LOCATION_LEFT = chestMaterial("christmas_left"); - public static final Material CHEST_XMAS_LOCATION_RIGHT = chestMaterial("christmas_right"); - public static final Material CHEST_LOCATION = chestMaterial("normal"); - public static final Material CHEST_LOCATION_LEFT = chestMaterial("normal_left"); - public static final Material CHEST_LOCATION_RIGHT = chestMaterial("normal_right"); - public static final Material ENDER_CHEST_LOCATION = chestMaterial("ender"); + public static final Material CHEST_TRAP_LOCATION = CHEST_MAPPER.defaultNamespaceApply("trapped"); + public static final Material CHEST_TRAP_LOCATION_LEFT = CHEST_MAPPER.defaultNamespaceApply("trapped_left"); + public static final Material CHEST_TRAP_LOCATION_RIGHT = CHEST_MAPPER.defaultNamespaceApply("trapped_right"); + public static final Material CHEST_XMAS_LOCATION = CHEST_MAPPER.defaultNamespaceApply("christmas"); + public static final Material CHEST_XMAS_LOCATION_LEFT = CHEST_MAPPER.defaultNamespaceApply("christmas_left"); + public static final Material CHEST_XMAS_LOCATION_RIGHT = CHEST_MAPPER.defaultNamespaceApply("christmas_right"); + public static final Material CHEST_LOCATION = CHEST_MAPPER.defaultNamespaceApply("normal"); + public static final Material CHEST_LOCATION_LEFT = CHEST_MAPPER.defaultNamespaceApply("normal_left"); + public static final Material CHEST_LOCATION_RIGHT = CHEST_MAPPER.defaultNamespaceApply("normal_right"); + public static final Material ENDER_CHEST_LOCATION = CHEST_MAPPER.defaultNamespaceApply("ender"); public static RenderType bannerSheet() { return BANNER_SHEET_TYPE; @@ -126,12 +135,36 @@ public class Sheets { return TRANSLUCENT_ITEM_CULL_BLOCK_SHEET; } + public static Material getBedMaterial(DyeColor color) { + return BED_TEXTURES[color.getId()]; + } + + public static ResourceLocation colorToResourceMaterial(DyeColor color) { + return ResourceLocation.withDefaultNamespace(color.getName()); + } + + public static Material createBedMaterial(DyeColor color) { + return BED_MAPPER.apply(colorToResourceMaterial(color)); + } + + public static Material getShulkerBoxMaterial(DyeColor color) { + return (Material)SHULKER_TEXTURE_LOCATION.get(color.getId()); + } + + public static ResourceLocation colorToShulkerMaterial(DyeColor color) { + return ResourceLocation.withDefaultNamespace("shulker_" + color.getName()); + } + + public static Material createShulkerMaterial(DyeColor color) { + return SHULKER_MAPPER.apply(colorToShulkerMaterial(color)); + } + private static Material createSignMaterial(WoodType woodType) { - return new Material(SIGN_SHEET, ResourceLocation.withDefaultNamespace("entity/signs/" + woodType.name())); + return SIGN_MAPPER.defaultNamespaceApply(woodType.name()); } private static Material createHangingSignMaterial(WoodType woodType) { - return new Material(SIGN_SHEET, ResourceLocation.withDefaultNamespace("entity/signs/hanging/" + woodType.name())); + return HANGING_SIGN_MAPPER.defaultNamespaceApply(woodType.name()); } public static Material getSignMaterial(WoodType woodType) { @@ -143,25 +176,11 @@ public class Sheets { } public static Material getBannerMaterial(Holder pattern) { - return (Material)BANNER_MATERIALS.computeIfAbsent(pattern.value().assetId(), resourceLocation -> { - ResourceLocation resourceLocation2 = resourceLocation.withPrefix("entity/banner/"); - return new Material(BANNER_SHEET, resourceLocation2); - }); + return (Material)BANNER_MATERIALS.computeIfAbsent(pattern.value().assetId(), BANNER_MAPPER::apply); } public static Material getShieldMaterial(Holder pattern) { - return (Material)SHIELD_MATERIALS.computeIfAbsent(pattern.value().assetId(), resourceLocation -> { - ResourceLocation resourceLocation2 = resourceLocation.withPrefix("entity/shield/"); - return new Material(SHIELD_SHEET, resourceLocation2); - }); - } - - private static Material chestMaterial(String chestName) { - return new Material(CHEST_SHEET, ResourceLocation.withDefaultNamespace("entity/chest/" + chestName)); - } - - private static Material createDecoratedPotMaterial(ResourceLocation assetId) { - return new Material(DECORATED_POT_SHEET, assetId.withPrefix("entity/decorated_pot/")); + return (Material)SHIELD_MATERIALS.computeIfAbsent(pattern.value().assetId(), SHIELD_MAPPER::apply); } @Nullable diff --git a/net/minecraft/client/renderer/SkyRenderer.java b/net/minecraft/client/renderer/SkyRenderer.java index 37986398..81723e9a 100644 --- a/net/minecraft/client/renderer/SkyRenderer.java +++ b/net/minecraft/client/renderer/SkyRenderer.java @@ -1,22 +1,33 @@ package net.minecraft.client.renderer; +import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; +import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexBuffer; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.math.Axis; +import java.util.OptionalDouble; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; +import net.minecraft.client.renderer.texture.AbstractTexture; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; +import net.minecraft.util.TriState; import org.joml.Matrix3f; import org.joml.Matrix4f; import org.joml.Matrix4fStack; @@ -26,258 +37,276 @@ import org.joml.Vector3f; public class SkyRenderer implements AutoCloseable { private static final ResourceLocation SUN_LOCATION = ResourceLocation.withDefaultNamespace("textures/environment/sun.png"); private static final ResourceLocation MOON_LOCATION = ResourceLocation.withDefaultNamespace("textures/environment/moon_phases.png"); - private static final ResourceLocation END_SKY_LOCATION = ResourceLocation.withDefaultNamespace("textures/environment/end_sky.png"); + public static final ResourceLocation END_SKY_LOCATION = ResourceLocation.withDefaultNamespace("textures/environment/end_sky.png"); private static final float SKY_DISC_RADIUS = 512.0F; - private final VertexBuffer starBuffer = this.createStarBuffer(); - private final VertexBuffer topSkyBuffer = this.createTopSkyBuffer(); - private final VertexBuffer bottomSkyBuffer = this.createBottomSkyBuffer(); + private static final int SKY_VERTICES = 10; + private static final int STAR_COUNT = 1500; + private static final int END_SKY_QUAD_COUNT = 6; + private final GpuBuffer starBuffer; + private final RenderSystem.AutoStorageIndexBuffer starIndices = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + private final GpuBuffer topSkyBuffer; + private final GpuBuffer bottomSkyBuffer; + private final GpuBuffer endSkyBuffer; + private int starIndexCount; - private VertexBuffer createStarBuffer() { - VertexBuffer vertexBuffer = new VertexBuffer(BufferUsage.STATIC_WRITE); - vertexBuffer.bind(); - vertexBuffer.upload(this.drawStars(Tesselator.getInstance())); - VertexBuffer.unbind(); - return vertexBuffer; + public SkyRenderer() { + this.starBuffer = this.buildStars(); + this.endSkyBuffer = buildEndSky(); + + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(10 * DefaultVertexFormat.POSITION.getVertexSize())) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION); + this.buildSkyDisc(bufferBuilder, 16.0F); + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + this.topSkyBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Top sky vertex buffer", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); + } + + bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION); + this.buildSkyDisc(bufferBuilder, -16.0F); + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + this.bottomSkyBuffer = RenderSystem.getDevice() + .createBuffer(() -> "Bottom sky vertex buffer", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); + } + } } - private VertexBuffer createTopSkyBuffer() { - VertexBuffer vertexBuffer = new VertexBuffer(BufferUsage.STATIC_WRITE); - vertexBuffer.bind(); - vertexBuffer.upload(this.buildSkyDisc(Tesselator.getInstance(), 16.0F)); - VertexBuffer.unbind(); - return vertexBuffer; - } - - private VertexBuffer createBottomSkyBuffer() { - VertexBuffer vertexBuffer = new VertexBuffer(BufferUsage.STATIC_WRITE); - vertexBuffer.bind(); - vertexBuffer.upload(this.buildSkyDisc(Tesselator.getInstance(), -16.0F)); - VertexBuffer.unbind(); - return vertexBuffer; - } - - private MeshData drawStars(Tesselator tesselator) { + private GpuBuffer buildStars() { RandomSource randomSource = RandomSource.create(10842L); - int i = 1500; float f = 100.0F; - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION); - for (int j = 0; j < 1500; j++) { - float g = randomSource.nextFloat() * 2.0F - 1.0F; - float h = randomSource.nextFloat() * 2.0F - 1.0F; - float k = randomSource.nextFloat() * 2.0F - 1.0F; - float l = 0.15F + randomSource.nextFloat() * 0.1F; - float m = Mth.lengthSquared(g, h, k); - if (!(m <= 0.010000001F) && !(m >= 1.0F)) { - Vector3f vector3f = new Vector3f(g, h, k).normalize(100.0F); - float n = (float)(randomSource.nextDouble() * (float) Math.PI * 2.0); - Matrix3f matrix3f = new Matrix3f().rotateTowards(new Vector3f(vector3f).negate(), new Vector3f(0.0F, 1.0F, 0.0F)).rotateZ(-n); - bufferBuilder.addVertex(new Vector3f(l, -l, 0.0F).mul(matrix3f).add(vector3f)); - bufferBuilder.addVertex(new Vector3f(l, l, 0.0F).mul(matrix3f).add(vector3f)); - bufferBuilder.addVertex(new Vector3f(-l, l, 0.0F).mul(matrix3f).add(vector3f)); - bufferBuilder.addVertex(new Vector3f(-l, -l, 0.0F).mul(matrix3f).add(vector3f)); + GpuBuffer var19; + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(DefaultVertexFormat.POSITION.getVertexSize() * 1500 * 4)) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION); + + for (int i = 0; i < 1500; i++) { + float g = randomSource.nextFloat() * 2.0F - 1.0F; + float h = randomSource.nextFloat() * 2.0F - 1.0F; + float j = randomSource.nextFloat() * 2.0F - 1.0F; + float k = 0.15F + randomSource.nextFloat() * 0.1F; + float l = Mth.lengthSquared(g, h, j); + if (!(l <= 0.010000001F) && !(l >= 1.0F)) { + Vector3f vector3f = new Vector3f(g, h, j).normalize(100.0F); + float m = (float)(randomSource.nextDouble() * (float) Math.PI * 2.0); + Matrix3f matrix3f = new Matrix3f().rotateTowards(new Vector3f(vector3f).negate(), new Vector3f(0.0F, 1.0F, 0.0F)).rotateZ(-m); + bufferBuilder.addVertex(new Vector3f(k, -k, 0.0F).mul(matrix3f).add(vector3f)); + bufferBuilder.addVertex(new Vector3f(k, k, 0.0F).mul(matrix3f).add(vector3f)); + bufferBuilder.addVertex(new Vector3f(-k, k, 0.0F).mul(matrix3f).add(vector3f)); + bufferBuilder.addVertex(new Vector3f(-k, -k, 0.0F).mul(matrix3f).add(vector3f)); + } + } + + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + this.starIndexCount = meshData.drawState().indexCount(); + var19 = RenderSystem.getDevice().createBuffer(() -> "Stars vertex buffer", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); } } - return bufferBuilder.buildOrThrow(); + return var19; } - private MeshData buildSkyDisc(Tesselator tesselator, float f) { - float g = Math.signum(f) * 512.0F; - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION); - bufferBuilder.addVertex(0.0F, f, 0.0F); + private void buildSkyDisc(VertexConsumer buffer, float y) { + float f = Math.signum(y) * 512.0F; + buffer.addVertex(0.0F, y, 0.0F); for (int i = -180; i <= 180; i += 45) { - bufferBuilder.addVertex(g * Mth.cos(i * (float) (Math.PI / 180.0)), f, 512.0F * Mth.sin(i * (float) (Math.PI / 180.0))); + buffer.addVertex(f * Mth.cos(i * (float) (Math.PI / 180.0)), y, 512.0F * Mth.sin(i * (float) (Math.PI / 180.0))); + } + } + + public void renderSkyDisc(float red, float green, float blue) { + RenderSystem.setShaderColor(red, green, blue, 1.0F); + GpuTexture gpuTexture = Minecraft.getInstance().getMainRenderTarget().getColorTexture(); + GpuTexture gpuTexture2 = Minecraft.getInstance().getMainRenderTarget().getDepthTexture(); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(RenderPipelines.SKY); + renderPass.setVertexBuffer(0, this.topSkyBuffer); + renderPass.draw(0, 10); } - return bufferBuilder.buildOrThrow(); - } - - public void renderSkyDisc(float f, float g, float h) { - RenderSystem.depthMask(false); - RenderSystem.setShader(CoreShaders.POSITION); - RenderSystem.setShaderColor(f, g, h, 1.0F); - this.topSkyBuffer.bind(); - this.topSkyBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); - VertexBuffer.unbind(); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.depthMask(true); } - public void renderDarkDisc(PoseStack poseStack) { - RenderSystem.depthMask(false); - RenderSystem.setShader(CoreShaders.POSITION); + public void renderDarkDisc() { RenderSystem.setShaderColor(0.0F, 0.0F, 0.0F, 1.0F); - poseStack.pushPose(); - poseStack.translate(0.0F, 12.0F, 0.0F); - this.bottomSkyBuffer.bind(); - this.bottomSkyBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); - VertexBuffer.unbind(); - poseStack.popPose(); + Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); + matrix4fStack.pushMatrix(); + matrix4fStack.translate(0.0F, 12.0F, 0.0F); + GpuTexture gpuTexture = Minecraft.getInstance().getMainRenderTarget().getColorTexture(); + GpuTexture gpuTexture2 = Minecraft.getInstance().getMainRenderTarget().getDepthTexture(); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(RenderPipelines.SKY); + renderPass.setVertexBuffer(0, this.bottomSkyBuffer); + renderPass.draw(0, 10); + } + + matrix4fStack.popMatrix(); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.depthMask(true); } - public void renderSunMoonAndStars(PoseStack poseStack, Tesselator tesselator, float f, int i, float g, float h, FogParameters fogParameters) { + public void renderSunMoonAndStars( + PoseStack poseStack, BufferSource bufferSource, float timeOfDay, int moonPhase, float rainLevel, float starBrightness, FogParameters fog + ) { poseStack.pushPose(); poseStack.mulPose(Axis.YP.rotationDegrees(-90.0F)); - poseStack.mulPose(Axis.XP.rotationDegrees(f * 360.0F)); - this.renderSun(g, tesselator, poseStack); - this.renderMoon(i, g, tesselator, poseStack); - if (h > 0.0F) { - this.renderStars(fogParameters, h, poseStack); + poseStack.mulPose(Axis.XP.rotationDegrees(timeOfDay * 360.0F)); + this.renderSun(rainLevel, bufferSource, poseStack); + this.renderMoon(moonPhase, rainLevel, bufferSource, poseStack); + bufferSource.endBatch(); + if (starBrightness > 0.0F) { + this.renderStars(fog, starBrightness, poseStack); } poseStack.popPose(); } - private void renderSun(float f, Tesselator tesselator, PoseStack poseStack) { - float g = 30.0F; - float h = 100.0F; - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); + private void renderSun(float alpha, MultiBufferSource bufferSource, PoseStack poseStack) { + float f = 30.0F; + float g = 100.0F; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.celestial(SUN_LOCATION)); + int i = ARGB.white(alpha); Matrix4f matrix4f = poseStack.last().pose(); - RenderSystem.depthMask(false); - RenderSystem.overlayBlendFunc(); - RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, f); - RenderSystem.setShaderTexture(0, SUN_LOCATION); - RenderSystem.enableBlend(); - bufferBuilder.addVertex(matrix4f, -30.0F, 100.0F, -30.0F).setUv(0.0F, 0.0F); - bufferBuilder.addVertex(matrix4f, 30.0F, 100.0F, -30.0F).setUv(1.0F, 0.0F); - bufferBuilder.addVertex(matrix4f, 30.0F, 100.0F, 30.0F).setUv(1.0F, 1.0F); - bufferBuilder.addVertex(matrix4f, -30.0F, 100.0F, 30.0F).setUv(0.0F, 1.0F); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.depthMask(true); + vertexConsumer.addVertex(matrix4f, -30.0F, 100.0F, -30.0F).setUv(0.0F, 0.0F).setColor(i); + vertexConsumer.addVertex(matrix4f, 30.0F, 100.0F, -30.0F).setUv(1.0F, 0.0F).setColor(i); + vertexConsumer.addVertex(matrix4f, 30.0F, 100.0F, 30.0F).setUv(1.0F, 1.0F).setColor(i); + vertexConsumer.addVertex(matrix4f, -30.0F, 100.0F, 30.0F).setUv(0.0F, 1.0F).setColor(i); } - private void renderMoon(int i, float f, Tesselator tesselator, PoseStack poseStack) { - float g = 20.0F; - int j = i % 4; - int k = i / 4 % 2; - float h = (j + 0) / 4.0F; - float l = (k + 0) / 2.0F; - float m = (j + 1) / 4.0F; - float n = (k + 1) / 2.0F; - float o = 100.0F; - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); - RenderSystem.depthMask(false); - RenderSystem.overlayBlendFunc(); - RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, f); - RenderSystem.setShaderTexture(0, MOON_LOCATION); - RenderSystem.enableBlend(); + private void renderMoon(int phase, float alpha, MultiBufferSource bufferSource, PoseStack poseStack) { + float f = 20.0F; + int i = phase % 4; + int j = phase / 4 % 2; + float g = (i + 0) / 4.0F; + float h = (j + 0) / 2.0F; + float k = (i + 1) / 4.0F; + float l = (j + 1) / 2.0F; + float m = 100.0F; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.celestial(MOON_LOCATION)); + int n = ARGB.white(alpha); Matrix4f matrix4f = poseStack.last().pose(); - bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, 20.0F).setUv(m, n); - bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, 20.0F).setUv(h, n); - bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, -20.0F).setUv(h, l); - bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, -20.0F).setUv(m, l); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.depthMask(true); + vertexConsumer.addVertex(matrix4f, -20.0F, -100.0F, 20.0F).setUv(k, l).setColor(n); + vertexConsumer.addVertex(matrix4f, 20.0F, -100.0F, 20.0F).setUv(g, l).setColor(n); + vertexConsumer.addVertex(matrix4f, 20.0F, -100.0F, -20.0F).setUv(g, h).setColor(n); + vertexConsumer.addVertex(matrix4f, -20.0F, -100.0F, -20.0F).setUv(k, h).setColor(n); } - private void renderStars(FogParameters fogParameters, float f, PoseStack poseStack) { + private void renderStars(FogParameters fog, float starBrightness, PoseStack poseStack) { Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); matrix4fStack.mul(poseStack.last().pose()); - RenderSystem.depthMask(false); - RenderSystem.overlayBlendFunc(); - RenderSystem.setShader(CoreShaders.POSITION); - RenderSystem.setShaderColor(f, f, f, f); - RenderSystem.enableBlend(); + RenderSystem.setShaderColor(starBrightness, starBrightness, starBrightness, starBrightness); RenderSystem.setShaderFog(FogParameters.NO_FOG); - this.starBuffer.bind(); - this.starBuffer.drawWithShader(matrix4fStack, RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); - VertexBuffer.unbind(); - RenderSystem.setShaderFog(fogParameters); + RenderPipeline renderPipeline = RenderPipelines.STARS; + GpuTexture gpuTexture = Minecraft.getInstance().getMainRenderTarget().getColorTexture(); + GpuTexture gpuTexture2 = Minecraft.getInstance().getMainRenderTarget().getDepthTexture(); + GpuBuffer gpuBuffer = this.starIndices.getBuffer(this.starIndexCount); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(renderPipeline); + renderPass.setVertexBuffer(0, this.starBuffer); + renderPass.setIndexBuffer(gpuBuffer, this.starIndices.type()); + renderPass.drawIndexed(0, this.starIndexCount); + } + + RenderSystem.setShaderFog(fog); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.depthMask(true); matrix4fStack.popMatrix(); } - public void renderSunriseAndSunset(PoseStack poseStack, Tesselator tesselator, float f, int i) { - RenderSystem.setShader(CoreShaders.POSITION_COLOR); - RenderSystem.depthMask(false); - RenderSystem.enableBlend(); + public void renderSunriseAndSunset(PoseStack poseStack, BufferSource bufferSource, float sunAngle, int color) { poseStack.pushPose(); poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); - float g = Mth.sin(f) < 0.0F ? 180.0F : 0.0F; - poseStack.mulPose(Axis.ZP.rotationDegrees(g)); + float f = Mth.sin(sunAngle) < 0.0F ? 180.0F : 0.0F; + poseStack.mulPose(Axis.ZP.rotationDegrees(f)); poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); Matrix4f matrix4f = poseStack.last().pose(); - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION_COLOR); - float h = ARGB.from8BitChannel(ARGB.alpha(i)); - bufferBuilder.addVertex(matrix4f, 0.0F, 100.0F, 0.0F).setColor(i); - int j = ARGB.transparent(i); - int k = 16; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.sunriseSunset()); + float g = ARGB.alphaFloat(color); + vertexConsumer.addVertex(matrix4f, 0.0F, 100.0F, 0.0F).setColor(color); + int i = ARGB.transparent(color); + int j = 16; - for (int l = 0; l <= 16; l++) { - float m = l * (float) (Math.PI * 2) / 16.0F; - float n = Mth.sin(m); - float o = Mth.cos(m); - bufferBuilder.addVertex(matrix4f, n * 120.0F, o * 120.0F, -o * 40.0F * h).setColor(j); + for (int k = 0; k <= 16; k++) { + float h = k * (float) (Math.PI * 2) / 16.0F; + float l = Mth.sin(h); + float m = Mth.cos(h); + vertexConsumer.addVertex(matrix4f, l * 120.0F, m * 120.0F, -m * 40.0F * g).setColor(i); } - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); poseStack.popPose(); - RenderSystem.disableBlend(); - RenderSystem.depthMask(true); } - public void renderEndSky(PoseStack poseStack) { - RenderSystem.enableBlend(); - RenderSystem.depthMask(false); - RenderSystem.setShader(CoreShaders.POSITION_TEX_COLOR); - RenderSystem.setShaderTexture(0, END_SKY_LOCATION); - Tesselator tesselator = Tesselator.getInstance(); + private static GpuBuffer buildEndSky() { + GpuBuffer var10; + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(24 * DefaultVertexFormat.POSITION_TEX_COLOR.getVertexSize())) { + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - for (int i = 0; i < 6; i++) { - poseStack.pushPose(); - if (i == 1) { - poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); + for (int i = 0; i < 6; i++) { + Matrix4f matrix4f = new Matrix4f(); + switch (i) { + case 1: + matrix4f.rotationX((float) (Math.PI / 2)); + break; + case 2: + matrix4f.rotationX((float) (-Math.PI / 2)); + break; + case 3: + matrix4f.rotationX((float) Math.PI); + break; + case 4: + matrix4f.rotationZ((float) (Math.PI / 2)); + break; + case 5: + matrix4f.rotationZ((float) (-Math.PI / 2)); + } + + bufferBuilder.addVertex(matrix4f, -100.0F, -100.0F, -100.0F).setUv(0.0F, 0.0F).setColor(-14145496); + bufferBuilder.addVertex(matrix4f, -100.0F, -100.0F, 100.0F).setUv(0.0F, 16.0F).setColor(-14145496); + bufferBuilder.addVertex(matrix4f, 100.0F, -100.0F, 100.0F).setUv(16.0F, 16.0F).setColor(-14145496); + bufferBuilder.addVertex(matrix4f, 100.0F, -100.0F, -100.0F).setUv(16.0F, 0.0F).setColor(-14145496); } - if (i == 2) { - poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F)); + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + var10 = RenderSystem.getDevice().createBuffer(() -> "End sky vertex buffer", BufferType.VERTICES, BufferUsage.STATIC_WRITE, meshData.vertexBuffer()); } - - if (i == 3) { - poseStack.mulPose(Axis.XP.rotationDegrees(180.0F)); - } - - if (i == 4) { - poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); - } - - if (i == 5) { - poseStack.mulPose(Axis.ZP.rotationDegrees(-90.0F)); - } - - Matrix4f matrix4f = poseStack.last().pose(); - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR); - bufferBuilder.addVertex(matrix4f, -100.0F, -100.0F, -100.0F).setUv(0.0F, 0.0F).setColor(-14145496); - bufferBuilder.addVertex(matrix4f, -100.0F, -100.0F, 100.0F).setUv(0.0F, 16.0F).setColor(-14145496); - bufferBuilder.addVertex(matrix4f, 100.0F, -100.0F, 100.0F).setUv(16.0F, 16.0F).setColor(-14145496); - bufferBuilder.addVertex(matrix4f, 100.0F, -100.0F, -100.0F).setUv(16.0F, 0.0F).setColor(-14145496); - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); - poseStack.popPose(); } - RenderSystem.depthMask(true); - RenderSystem.disableBlend(); + return var10; + } + + public void renderEndSky() { + TextureManager textureManager = Minecraft.getInstance().getTextureManager(); + AbstractTexture abstractTexture = textureManager.getTexture(END_SKY_LOCATION); + abstractTexture.setFilter(TriState.FALSE, false); + RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); + GpuBuffer gpuBuffer = autoStorageIndexBuffer.getBuffer(36); + GpuTexture gpuTexture = Minecraft.getInstance().getMainRenderTarget().getColorTexture(); + GpuTexture gpuTexture2 = Minecraft.getInstance().getMainRenderTarget().getDepthTexture(); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(RenderPipelines.END_SKY); + renderPass.bindSampler("Sampler0", abstractTexture.getTexture()); + renderPass.setVertexBuffer(0, this.endSkyBuffer); + renderPass.setIndexBuffer(gpuBuffer, autoStorageIndexBuffer.type()); + renderPass.drawIndexed(0, 36); + } } public void close() { this.starBuffer.close(); this.topSkyBuffer.close(); this.bottomSkyBuffer.close(); + this.endSkyBuffer.close(); } } diff --git a/net/minecraft/client/renderer/SpecialBlockModelRenderer.java b/net/minecraft/client/renderer/SpecialBlockModelRenderer.java new file mode 100644 index 00000000..471f5004 --- /dev/null +++ b/net/minecraft/client/renderer/SpecialBlockModelRenderer.java @@ -0,0 +1,34 @@ +package net.minecraft.client.renderer; + +import com.mojang.blaze3d.vertex.PoseStack; +import java.util.Map; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.special.SpecialModelRenderer; +import net.minecraft.client.renderer.special.SpecialModelRenderers; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class SpecialBlockModelRenderer { + public static final SpecialBlockModelRenderer EMPTY = new SpecialBlockModelRenderer(Map.of()); + private final Map> renderers; + + public SpecialBlockModelRenderer(Map> renderers) { + this.renderers = renderers; + } + + public static SpecialBlockModelRenderer vanilla(EntityModelSet modelSet) { + return new SpecialBlockModelRenderer(SpecialModelRenderers.createBlockRenderers(modelSet)); + } + + public void renderByBlock( + Block block, ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay + ) { + SpecialModelRenderer specialModelRenderer = (SpecialModelRenderer)this.renderers.get(block); + if (specialModelRenderer != null) { + specialModelRenderer.render(null, displayContext, poseStack, bufferSource, packedLight, packedOverlay, false); + } + } +} diff --git a/net/minecraft/client/renderer/ViewArea.java b/net/minecraft/client/renderer/ViewArea.java index d407b3eb..39a2c535 100644 --- a/net/minecraft/client/renderer/ViewArea.java +++ b/net/minecraft/client/renderer/ViewArea.java @@ -49,7 +49,7 @@ public class ViewArea { public void releaseAllBuffers() { for (SectionRenderDispatcher.RenderSection renderSection : this.sections) { - renderSection.releaseBuffers(); + renderSection.reset(); } } @@ -73,13 +73,13 @@ public class ViewArea { return this.level; } - public void repositionCamera(SectionPos sectionPos) { + public void repositionCamera(SectionPos newSectionPos) { for (int i = 0; i < this.sectionGridSizeX; i++) { - int j = sectionPos.x() - this.viewDistance; + int j = newSectionPos.x() - this.viewDistance; int k = j + Math.floorMod(i - j, this.sectionGridSizeX); for (int l = 0; l < this.sectionGridSizeZ; l++) { - int m = sectionPos.z() - this.viewDistance; + int m = newSectionPos.z() - this.viewDistance; int n = m + Math.floorMod(l - m, this.sectionGridSizeZ); for (int o = 0; o < this.sectionGridSizeY; o++) { @@ -93,7 +93,7 @@ public class ViewArea { } } - this.cameraSectionPos = sectionPos; + this.cameraSectionPos = newSectionPos; this.levelRenderer.getSectionOcclusionGraph().invalidate(); } @@ -114,30 +114,30 @@ public class ViewArea { } @Nullable - protected SectionRenderDispatcher.RenderSection getRenderSection(long l) { - int i = SectionPos.x(l); - int j = SectionPos.y(l); - int k = SectionPos.z(l); + protected SectionRenderDispatcher.RenderSection getRenderSection(long sectionPos) { + int i = SectionPos.x(sectionPos); + int j = SectionPos.y(sectionPos); + int k = SectionPos.z(sectionPos); return this.getRenderSection(i, j, k); } @Nullable - private SectionRenderDispatcher.RenderSection getRenderSection(int i, int j, int k) { - if (!this.containsSection(i, j, k)) { + private SectionRenderDispatcher.RenderSection getRenderSection(int x, int y, int z) { + if (!this.containsSection(x, y, z)) { return null; } else { - int l = j - this.level.getMinSectionY(); - int m = Math.floorMod(i, this.sectionGridSizeX); - int n = Math.floorMod(k, this.sectionGridSizeZ); - return this.sections[this.getSectionIndex(m, l, n)]; + int i = y - this.level.getMinSectionY(); + int j = Math.floorMod(x, this.sectionGridSizeX); + int k = Math.floorMod(z, this.sectionGridSizeZ); + return this.sections[this.getSectionIndex(j, i, k)]; } } - private boolean containsSection(int i, int j, int k) { - if (j >= this.level.getMinSectionY() && j <= this.level.getMaxSectionY()) { - return i < this.cameraSectionPos.x() - this.viewDistance || i > this.cameraSectionPos.x() + this.viewDistance + private boolean containsSection(int x, int y, int z) { + if (y >= this.level.getMinSectionY() && y <= this.level.getMaxSectionY()) { + return x < this.cameraSectionPos.x() - this.viewDistance || x > this.cameraSectionPos.x() + this.viewDistance ? false - : k >= this.cameraSectionPos.z() - this.viewDistance && k <= this.cameraSectionPos.z() + this.viewDistance; + : z >= this.cameraSectionPos.z() - this.viewDistance && z <= this.cameraSectionPos.z() + this.viewDistance; } else { return false; } diff --git a/net/minecraft/client/renderer/WeatherEffectRenderer.java b/net/minecraft/client/renderer/WeatherEffectRenderer.java index f1bfe763..dbce8aae 100644 --- a/net/minecraft/client/renderer/WeatherEffectRenderer.java +++ b/net/minecraft/client/renderer/WeatherEffectRenderer.java @@ -1,11 +1,6 @@ package net.minecraft.client.renderer; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; -import com.mojang.blaze3d.vertex.DefaultVertexFormat; -import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexFormat; +import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.ArrayList; import java.util.List; import net.fabricmc.api.EnvType; @@ -14,8 +9,8 @@ import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.core.SectionPos; +import net.minecraft.core.Direction.Axis; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.resources.ResourceLocation; @@ -31,7 +26,7 @@ import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.CampfireBlock; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.levelgen.Heightmap; +import net.minecraft.world.level.levelgen.Heightmap.Types; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.VoxelShape; @@ -60,44 +55,50 @@ public class WeatherEffectRenderer { } } - public void render(Level level, LightTexture lightTexture, int i, float f, Vec3 vec3) { - float g = level.getRainLevel(f); - if (!(g <= 0.0F)) { - int j = Minecraft.useFancyGraphics() ? 10 : 5; + public void render(Level level, MultiBufferSource bufferSource, int ticks, float partialTick, Vec3 cameraPosition) { + float f = level.getRainLevel(partialTick); + if (!(f <= 0.0F)) { + int i = Minecraft.useFancyGraphics() ? 10 : 5; List list = new ArrayList(); List list2 = new ArrayList(); - this.collectColumnInstances(level, i, f, vec3, j, list, list2); + this.collectColumnInstances(level, ticks, partialTick, cameraPosition, i, list, list2); if (!list.isEmpty() || !list2.isEmpty()) { - this.render(lightTexture, vec3, j, g, list, list2); + this.render(bufferSource, cameraPosition, i, f, list, list2); } } } private void collectColumnInstances( - Level level, int i, float f, Vec3 vec3, int j, List list, List list2 + Level level, + int ticks, + float partialTick, + Vec3 cameraPosition, + int radius, + List rainColumnInstances, + List snowColumnInstances ) { - int k = Mth.floor(vec3.x); - int l = Mth.floor(vec3.y); - int m = Mth.floor(vec3.z); + int i = Mth.floor(cameraPosition.x); + int j = Mth.floor(cameraPosition.y); + int k = Mth.floor(cameraPosition.z); BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); RandomSource randomSource = RandomSource.create(); - for (int n = m - j; n <= m + j; n++) { - for (int o = k - j; o <= k + j; o++) { - int p = level.getHeight(Heightmap.Types.MOTION_BLOCKING, o, n); - int q = Math.max(l - j, p); - int r = Math.max(l + j, p); - if (r - q != 0) { - Biome.Precipitation precipitation = this.getPrecipitationAt(level, mutableBlockPos.set(o, l, n)); + for (int l = k - radius; l <= k + radius; l++) { + for (int m = i - radius; m <= i + radius; m++) { + int n = level.getHeight(Types.MOTION_BLOCKING, m, l); + int o = Math.max(j - radius, n); + int p = Math.max(j + radius, n); + if (p - o != 0) { + Biome.Precipitation precipitation = this.getPrecipitationAt(level, mutableBlockPos.set(m, j, l)); if (precipitation != Biome.Precipitation.NONE) { - int s = o * o * 3121 + o * 45238971 ^ n * n * 418711 + n * 13761; - randomSource.setSeed(s); - int t = Math.max(l, p); - int u = LevelRenderer.getLightColor(level, mutableBlockPos.set(o, t, n)); + int q = m * m * 3121 + m * 45238971 ^ l * l * 418711 + l * 13761; + randomSource.setSeed(q); + int r = Math.max(j, n); + int s = LevelRenderer.getLightColor(level, mutableBlockPos.set(m, r, l)); if (precipitation == Biome.Precipitation.RAIN) { - list.add(this.createRainColumnInstance(randomSource, i, o, q, r, n, u, f)); + rainColumnInstances.add(this.createRainColumnInstance(randomSource, ticks, m, o, p, l, s, partialTick)); } else if (precipitation == Biome.Precipitation.SNOW) { - list2.add(this.createSnowColumnInstance(randomSource, i, o, q, r, n, u, f)); + snowColumnInstances.add(this.createSnowColumnInstance(randomSource, ticks, m, o, p, l, s, partialTick)); } } } @@ -106,96 +107,91 @@ public class WeatherEffectRenderer { } private void render( - LightTexture lightTexture, Vec3 vec3, int i, float f, List list, List list2 + MultiBufferSource bufferSource, + Vec3 cameraPosition, + int radius, + float rainLevel, + List rainColumnInstances, + List snowColumnInstances ) { - lightTexture.turnOnLightLayer(); - Tesselator tesselator = Tesselator.getInstance(); - RenderSystem.disableCull(); - RenderSystem.enableBlend(); - RenderSystem.enableDepthTest(); - RenderSystem.depthMask(Minecraft.useShaderTransparency()); - RenderSystem.setShader(CoreShaders.PARTICLE); - if (!list.isEmpty()) { - RenderSystem.setShaderTexture(0, RAIN_LOCATION); - this.renderInstances(tesselator, list, vec3, 1.0F, i, f); + if (!rainColumnInstances.isEmpty()) { + RenderType renderType = RenderType.weather(RAIN_LOCATION, Minecraft.useShaderTransparency()); + this.renderInstances(bufferSource.getBuffer(renderType), rainColumnInstances, cameraPosition, 1.0F, radius, rainLevel); } - if (!list2.isEmpty()) { - RenderSystem.setShaderTexture(0, SNOW_LOCATION); - this.renderInstances(tesselator, list2, vec3, 0.8F, i, f); + if (!snowColumnInstances.isEmpty()) { + RenderType renderType = RenderType.weather(SNOW_LOCATION, Minecraft.useShaderTransparency()); + this.renderInstances(bufferSource.getBuffer(renderType), snowColumnInstances, cameraPosition, 0.8F, radius, rainLevel); } - - RenderSystem.depthMask(true); - RenderSystem.enableCull(); - RenderSystem.disableBlend(); - lightTexture.turnOffLightLayer(); } - private WeatherEffectRenderer.ColumnInstance createRainColumnInstance(RandomSource randomSource, int i, int j, int k, int l, int m, int n, float f) { - int o = i & 131071; - int p = j * j * 3121 + j * 45238971 + m * m * 418711 + m * 13761 & 0xFF; - float g = 3.0F + randomSource.nextFloat(); - float h = -(o + p + f) / 32.0F * g; - float q = h % 32.0F; - return new WeatherEffectRenderer.ColumnInstance(j, m, k, l, 0.0F, q, n); + private WeatherEffectRenderer.ColumnInstance createRainColumnInstance( + RandomSource random, int ticks, int x, int bottomY, int topY, int z, int lightCoords, float partialTick + ) { + int i = ticks & 131071; + int j = x * x * 3121 + x * 45238971 + z * z * 418711 + z * 13761 & 0xFF; + float f = 3.0F + random.nextFloat(); + float g = -(i + j + partialTick) / 32.0F * f; + float h = g % 32.0F; + return new WeatherEffectRenderer.ColumnInstance(x, z, bottomY, topY, 0.0F, h, lightCoords); } - private WeatherEffectRenderer.ColumnInstance createSnowColumnInstance(RandomSource randomSource, int i, int j, int k, int l, int m, int n, float f) { - float g = i + f; - float h = (float)(randomSource.nextDouble() + g * 0.01F * (float)randomSource.nextGaussian()); - float o = (float)(randomSource.nextDouble() + g * (float)randomSource.nextGaussian() * 0.001F); - float p = -((i & 511) + f) / 512.0F; - int q = LightTexture.pack((LightTexture.block(n) * 3 + 15) / 4, (LightTexture.sky(n) * 3 + 15) / 4); - return new WeatherEffectRenderer.ColumnInstance(j, m, k, l, h, p + o, q); + private WeatherEffectRenderer.ColumnInstance createSnowColumnInstance( + RandomSource random, int ticks, int x, int bottomY, int topY, int z, int lightCoords, float partialTick + ) { + float f = ticks + partialTick; + float g = (float)(random.nextDouble() + f * 0.01F * (float)random.nextGaussian()); + float h = (float)(random.nextDouble() + f * (float)random.nextGaussian() * 0.001F); + float i = -((ticks & 511) + partialTick) / 512.0F; + int j = LightTexture.pack((LightTexture.block(lightCoords) * 3 + 15) / 4, (LightTexture.sky(lightCoords) * 3 + 15) / 4); + return new WeatherEffectRenderer.ColumnInstance(x, z, bottomY, topY, g, i + h, j); } - private void renderInstances(Tesselator tesselator, List list, Vec3 vec3, float f, int i, float g) { - BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - - for (WeatherEffectRenderer.ColumnInstance columnInstance : list) { - float h = (float)(columnInstance.x + 0.5 - vec3.x); - float j = (float)(columnInstance.z + 0.5 - vec3.z); - float k = (float)Mth.lengthSquared(h, j); - float l = Mth.lerp(k / (i * i), f, 0.5F) * g; - int m = ARGB.white(l); - int n = (columnInstance.z - Mth.floor(vec3.z) + 16) * 32 + columnInstance.x - Mth.floor(vec3.x) + 16; - float o = this.columnSizeX[n] / 2.0F; - float p = this.columnSizeZ[n] / 2.0F; - float q = h - o; - float r = h + o; - float s = (float)(columnInstance.topY - vec3.y); - float t = (float)(columnInstance.bottomY - vec3.y); - float u = j - p; - float v = j + p; - float w = columnInstance.uOffset + 0.0F; - float x = columnInstance.uOffset + 1.0F; - float y = columnInstance.bottomY * 0.25F + columnInstance.vOffset; - float z = columnInstance.topY * 0.25F + columnInstance.vOffset; - bufferBuilder.addVertex(q, s, u).setUv(w, y).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(r, s, v).setUv(x, y).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(r, t, v).setUv(x, z).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(q, t, u).setUv(w, z).setColor(m).setLight(columnInstance.lightCoords); + private void renderInstances( + VertexConsumer buffer, List columnInstances, Vec3 cameraPosition, float amount, int radius, float rainLevel + ) { + for (WeatherEffectRenderer.ColumnInstance columnInstance : columnInstances) { + float f = (float)(columnInstance.x + 0.5 - cameraPosition.x); + float g = (float)(columnInstance.z + 0.5 - cameraPosition.z); + float h = (float)Mth.lengthSquared(f, g); + float i = Mth.lerp(h / (radius * radius), amount, 0.5F) * rainLevel; + int j = ARGB.white(i); + int k = (columnInstance.z - Mth.floor(cameraPosition.z) + 16) * 32 + columnInstance.x - Mth.floor(cameraPosition.x) + 16; + float l = this.columnSizeX[k] / 2.0F; + float m = this.columnSizeZ[k] / 2.0F; + float n = f - l; + float o = f + l; + float p = (float)(columnInstance.topY - cameraPosition.y); + float q = (float)(columnInstance.bottomY - cameraPosition.y); + float r = g - m; + float s = g + m; + float t = columnInstance.uOffset + 0.0F; + float u = columnInstance.uOffset + 1.0F; + float v = columnInstance.bottomY * 0.25F + columnInstance.vOffset; + float w = columnInstance.topY * 0.25F + columnInstance.vOffset; + buffer.addVertex(n, p, r).setUv(t, v).setColor(j).setLight(columnInstance.lightCoords); + buffer.addVertex(o, p, s).setUv(u, v).setColor(j).setLight(columnInstance.lightCoords); + buffer.addVertex(o, q, s).setUv(u, w).setColor(j).setLight(columnInstance.lightCoords); + buffer.addVertex(n, q, r).setUv(t, w).setColor(j).setLight(columnInstance.lightCoords); } - - BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); } - public void tickRainParticles(ClientLevel clientLevel, Camera camera, int i, ParticleStatus particleStatus) { - float f = clientLevel.getRainLevel(1.0F) / (Minecraft.useFancyGraphics() ? 1.0F : 2.0F); + public void tickRainParticles(ClientLevel level, Camera camera, int ticks, ParticleStatus particleStatus) { + float f = level.getRainLevel(1.0F) / (Minecraft.useFancyGraphics() ? 1.0F : 2.0F); if (!(f <= 0.0F)) { - RandomSource randomSource = RandomSource.create(i * 312987231L); + RandomSource randomSource = RandomSource.create(ticks * 312987231L); BlockPos blockPos = BlockPos.containing(camera.getPosition()); BlockPos blockPos2 = null; - int j = (int)(100.0F * f * f) / (particleStatus == ParticleStatus.DECREASED ? 2 : 1); + int i = (int)(100.0F * f * f) / (particleStatus == ParticleStatus.DECREASED ? 2 : 1); - for (int k = 0; k < j; k++) { + for (int j = 0; j < i; j++) { + int k = randomSource.nextInt(21) - 10; int l = randomSource.nextInt(21) - 10; - int m = randomSource.nextInt(21) - 10; - BlockPos blockPos3 = clientLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos.offset(l, 0, m)); - if (blockPos3.getY() > clientLevel.getMinY() + BlockPos blockPos3 = level.getHeightmapPos(Types.MOTION_BLOCKING, blockPos.offset(k, 0, l)); + if (blockPos3.getY() > level.getMinY() && blockPos3.getY() <= blockPos.getY() + 10 && blockPos3.getY() >= blockPos.getY() - 10 - && this.getPrecipitationAt(clientLevel, blockPos3) == Biome.Precipitation.RAIN) { + && this.getPrecipitationAt(level, blockPos3) == Biome.Precipitation.RAIN) { blockPos2 = blockPos3.below(); if (particleStatus == ParticleStatus.MINIMAL) { break; @@ -203,37 +199,36 @@ public class WeatherEffectRenderer { double d = randomSource.nextDouble(); double e = randomSource.nextDouble(); - BlockState blockState = clientLevel.getBlockState(blockPos2); - FluidState fluidState = clientLevel.getFluidState(blockPos2); - VoxelShape voxelShape = blockState.getCollisionShape(clientLevel, blockPos2); - double g = voxelShape.max(Direction.Axis.Y, d, e); - double h = fluidState.getHeight(clientLevel, blockPos2); - double n = Math.max(g, h); + BlockState blockState = level.getBlockState(blockPos2); + FluidState fluidState = level.getFluidState(blockPos2); + VoxelShape voxelShape = blockState.getCollisionShape(level, blockPos2); + double g = voxelShape.max(Axis.Y, d, e); + double h = fluidState.getHeight(level, blockPos2); + double m = Math.max(g, h); ParticleOptions particleOptions = !fluidState.is(FluidTags.LAVA) && !blockState.is(Blocks.MAGMA_BLOCK) && !CampfireBlock.isLitCampfire(blockState) ? ParticleTypes.RAIN : ParticleTypes.SMOKE; - clientLevel.addParticle(particleOptions, blockPos2.getX() + d, blockPos2.getY() + n, blockPos2.getZ() + e, 0.0, 0.0, 0.0); + level.addParticle(particleOptions, blockPos2.getX() + d, blockPos2.getY() + m, blockPos2.getZ() + e, 0.0, 0.0, 0.0); } } if (blockPos2 != null && randomSource.nextInt(3) < this.rainSoundTime++) { this.rainSoundTime = 0; - if (blockPos2.getY() > blockPos.getY() + 1 - && clientLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos).getY() > Mth.floor((float)blockPos.getY())) { - clientLevel.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN_ABOVE, SoundSource.WEATHER, 0.1F, 0.5F, false); + if (blockPos2.getY() > blockPos.getY() + 1 && level.getHeightmapPos(Types.MOTION_BLOCKING, blockPos).getY() > Mth.floor((float)blockPos.getY())) { + level.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN_ABOVE, SoundSource.WEATHER, 0.1F, 0.5F, false); } else { - clientLevel.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN, SoundSource.WEATHER, 0.2F, 1.0F, false); + level.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN, SoundSource.WEATHER, 0.2F, 1.0F, false); } } } } - private Biome.Precipitation getPrecipitationAt(Level level, BlockPos blockPos) { - if (!level.getChunkSource().hasChunk(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ()))) { + private Biome.Precipitation getPrecipitationAt(Level level, BlockPos pos) { + if (!level.getChunkSource().hasChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ()))) { return Biome.Precipitation.NONE; } else { - Biome biome = level.getBiome(blockPos).value(); - return biome.getPrecipitationAt(blockPos, level.getSeaLevel()); + Biome biome = level.getBiome(pos).value(); + return biome.getPrecipitationAt(pos, level.getSeaLevel()); } } diff --git a/net/minecraft/client/renderer/WorldBorderRenderer.java b/net/minecraft/client/renderer/WorldBorderRenderer.java index f00e515a..78799ca5 100644 --- a/net/minecraft/client/renderer/WorldBorderRenderer.java +++ b/net/minecraft/client/renderer/WorldBorderRenderer.java @@ -1,133 +1,182 @@ package net.minecraft.client.renderer; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.buffers.BufferType; +import com.mojang.blaze3d.buffers.BufferUsage; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.pipeline.RenderPipeline; +import com.mojang.blaze3d.pipeline.RenderTarget; +import com.mojang.blaze3d.systems.RenderPass; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.BufferBuilder; -import com.mojang.blaze3d.vertex.BufferUploader; +import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.MeshData; -import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.blaze3d.vertex.VertexFormat; +import java.util.ArrayList; +import java.util.OptionalDouble; +import java.util.OptionalInt; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.AbstractTexture; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; +import net.minecraft.util.TriState; import net.minecraft.world.level.border.WorldBorder; import net.minecraft.world.phys.Vec3; +import org.joml.Matrix4f; @Environment(EnvType.CLIENT) public class WorldBorderRenderer { - private static final ResourceLocation FORCEFIELD_LOCATION = ResourceLocation.withDefaultNamespace("textures/misc/forcefield.png"); + public static final ResourceLocation FORCEFIELD_LOCATION = ResourceLocation.withDefaultNamespace("textures/misc/forcefield.png"); + private boolean needsRebuild = true; + private double lastMinX; + private double lastMinZ; + private double lastBorderMinX; + private double lastBorderMaxX; + private double lastBorderMinZ; + private double lastBorderMaxZ; + private final GpuBuffer worldBorderBuffer = RenderSystem.getDevice() + .createBuffer(() -> "World border vertex buffer", BufferType.VERTICES, BufferUsage.DYNAMIC_WRITE, 16 * DefaultVertexFormat.POSITION_TEX.getVertexSize()); + private final RenderSystem.AutoStorageIndexBuffer indices = RenderSystem.getSequentialBuffer(VertexFormat.Mode.QUADS); - public void render(WorldBorder worldBorder, Vec3 vec3, double d, double e) { - double f = worldBorder.getMinX(); - double g = worldBorder.getMaxX(); - double h = worldBorder.getMinZ(); - double i = worldBorder.getMaxZ(); - if (!(vec3.x < g - d) || !(vec3.x > f + d) || !(vec3.z < i - d) || !(vec3.z > h + d)) { - double j = 1.0 - worldBorder.getDistanceToBorder(vec3.x, vec3.z) / d; - j = Math.pow(j, 4.0); - j = Mth.clamp(j, 0.0, 1.0); - double k = vec3.x; - double l = vec3.z; - float m = (float)e; - RenderSystem.enableBlend(); - RenderSystem.enableDepthTest(); - RenderSystem.blendFuncSeparate( - GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO - ); - RenderSystem.setShaderTexture(0, FORCEFIELD_LOCATION); - RenderSystem.depthMask(Minecraft.useShaderTransparency()); - int n = worldBorder.getStatus().getColor(); - float o = ARGB.red(n) / 255.0F; - float p = ARGB.green(n) / 255.0F; - float q = ARGB.blue(n) / 255.0F; - RenderSystem.setShaderColor(o, p, q, (float)j); - RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.polygonOffset(-3.0F, -3.0F); - RenderSystem.enablePolygonOffset(); - RenderSystem.disableCull(); - float r = (float)(Util.getMillis() % 3000L) / 3000.0F; - float s = (float)(-Mth.frac(vec3.y * 0.5)); - float t = s + m; - BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); - double u = Math.max(Mth.floor(l - d), h); - double v = Math.min(Mth.ceil(l + d), i); - float w = (Mth.floor(u) & 1) * 0.5F; - if (k > g - d) { - float x = w; + private void rebuildWorldBorderBuffer(WorldBorder worldBorder, double renderDistance, double camZ, double camX, float farPlaneDepth, float vBottom, float vTop) { + try (ByteBufferBuilder byteBufferBuilder = new ByteBufferBuilder(DefaultVertexFormat.POSITION_TEX.getVertexSize() * 4)) { + double d = worldBorder.getMinX(); + double e = worldBorder.getMaxX(); + double f = worldBorder.getMinZ(); + double g = worldBorder.getMaxZ(); + double h = Math.max(Mth.floor(camZ - renderDistance), f); + double i = Math.min(Mth.ceil(camZ + renderDistance), g); + float j = (Mth.floor(h) & 1) * 0.5F; + float k = (float)(i - h) / 2.0F; + double l = Math.max(Mth.floor(camX - renderDistance), d); + double m = Math.min(Mth.ceil(camX + renderDistance), e); + float n = (Mth.floor(l) & 1) * 0.5F; + float o = (float)(m - l) / 2.0F; + BufferBuilder bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); + bufferBuilder.addVertex(0.0F, -farPlaneDepth, (float)(g - h)).setUv(n, vBottom); + bufferBuilder.addVertex((float)(m - l), -farPlaneDepth, (float)(g - h)).setUv(o + n, vBottom); + bufferBuilder.addVertex((float)(m - l), farPlaneDepth, (float)(g - h)).setUv(o + n, vTop); + bufferBuilder.addVertex(0.0F, farPlaneDepth, (float)(g - h)).setUv(n, vTop); + bufferBuilder.addVertex(0.0F, -farPlaneDepth, 0.0F).setUv(j, vBottom); + bufferBuilder.addVertex(0.0F, -farPlaneDepth, (float)(i - h)).setUv(k + j, vBottom); + bufferBuilder.addVertex(0.0F, farPlaneDepth, (float)(i - h)).setUv(k + j, vTop); + bufferBuilder.addVertex(0.0F, farPlaneDepth, 0.0F).setUv(j, vTop); + bufferBuilder.addVertex((float)(m - l), -farPlaneDepth, 0.0F).setUv(n, vBottom); + bufferBuilder.addVertex(0.0F, -farPlaneDepth, 0.0F).setUv(o + n, vBottom); + bufferBuilder.addVertex(0.0F, farPlaneDepth, 0.0F).setUv(o + n, vTop); + bufferBuilder.addVertex((float)(m - l), farPlaneDepth, 0.0F).setUv(n, vTop); + bufferBuilder.addVertex((float)(e - l), -farPlaneDepth, (float)(i - h)).setUv(j, vBottom); + bufferBuilder.addVertex((float)(e - l), -farPlaneDepth, 0.0F).setUv(k + j, vBottom); + bufferBuilder.addVertex((float)(e - l), farPlaneDepth, 0.0F).setUv(k + j, vTop); + bufferBuilder.addVertex((float)(e - l), farPlaneDepth, (float)(i - h)).setUv(j, vTop); - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(g - k), -m, (float)(y - l)).setUv(r - x, r + t); - bufferBuilder.addVertex((float)(g - k), -m, (float)(y + z - l)).setUv(r - (aa + x), r + t); - bufferBuilder.addVertex((float)(g - k), m, (float)(y + z - l)).setUv(r - (aa + x), r + s); - bufferBuilder.addVertex((float)(g - k), m, (float)(y - l)).setUv(r - x, r + s); - y++; - } + try (MeshData meshData = bufferBuilder.buildOrThrow()) { + RenderSystem.getDevice().createCommandEncoder().writeToBuffer(this.worldBorderBuffer, meshData.vertexBuffer(), 0); } - if (k < f + d) { - float x = w; - - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(f - k), -m, (float)(y - l)).setUv(r + x, r + t); - bufferBuilder.addVertex((float)(f - k), -m, (float)(y + z - l)).setUv(r + aa + x, r + t); - bufferBuilder.addVertex((float)(f - k), m, (float)(y + z - l)).setUv(r + aa + x, r + s); - bufferBuilder.addVertex((float)(f - k), m, (float)(y - l)).setUv(r + x, r + s); - y++; - } - } - - u = Math.max(Mth.floor(k - d), f); - v = Math.min(Mth.ceil(k + d), g); - w = (Mth.floor(u) & 1) * 0.5F; - if (l > i - d) { - float x = w; - - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(y - k), -m, (float)(i - l)).setUv(r + x, r + t); - bufferBuilder.addVertex((float)(y + z - k), -m, (float)(i - l)).setUv(r + aa + x, r + t); - bufferBuilder.addVertex((float)(y + z - k), m, (float)(i - l)).setUv(r + aa + x, r + s); - bufferBuilder.addVertex((float)(y - k), m, (float)(i - l)).setUv(r + x, r + s); - y++; - } - } - - if (l < h + d) { - float x = w; - - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(y - k), -m, (float)(h - l)).setUv(r - x, r + t); - bufferBuilder.addVertex((float)(y + z - k), -m, (float)(h - l)).setUv(r - (aa + x), r + t); - bufferBuilder.addVertex((float)(y + z - k), m, (float)(h - l)).setUv(r - (aa + x), r + s); - bufferBuilder.addVertex((float)(y - k), m, (float)(h - l)).setUv(r - x, r + s); - y++; - } - } - - MeshData meshData = bufferBuilder.build(); - if (meshData != null) { - BufferUploader.drawWithShader(meshData); - } - - RenderSystem.enableCull(); - RenderSystem.polygonOffset(0.0F, 0.0F); - RenderSystem.disablePolygonOffset(); - RenderSystem.disableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.depthMask(true); + this.lastBorderMinX = d; + this.lastBorderMaxX = e; + this.lastBorderMinZ = f; + this.lastBorderMaxZ = g; + this.lastMinX = l; + this.lastMinZ = h; + this.needsRebuild = false; } } + + public void render(WorldBorder worldBorder, Vec3 cameraPosition, double renderDistance, double farPlaneDepth) { + double d = worldBorder.getMinX(); + double e = worldBorder.getMaxX(); + double f = worldBorder.getMinZ(); + double g = worldBorder.getMaxZ(); + if (( + !(cameraPosition.x < e - renderDistance) + || !(cameraPosition.x > d + renderDistance) + || !(cameraPosition.z < g - renderDistance) + || !(cameraPosition.z > f + renderDistance) + ) + && !(cameraPosition.x < d - renderDistance) + && !(cameraPosition.x > e + renderDistance) + && !(cameraPosition.z < f - renderDistance) + && !(cameraPosition.z > g + renderDistance)) { + double h = 1.0 - worldBorder.getDistanceToBorder(cameraPosition.x, cameraPosition.z) / renderDistance; + h = Math.pow(h, 4.0); + h = Mth.clamp(h, 0.0, 1.0); + double i = cameraPosition.x; + double j = cameraPosition.z; + float k = (float)farPlaneDepth; + int l = worldBorder.getStatus().getColor(); + float m = ARGB.red(l) / 255.0F; + float n = ARGB.green(l) / 255.0F; + float o = ARGB.blue(l) / 255.0F; + RenderSystem.setShaderColor(m, n, o, (float)h); + float p = (float)(Util.getMillis() % 3000L) / 3000.0F; + RenderSystem.setTextureMatrix(new Matrix4f().translation(p, p, 0.0F)); + float q = (float)(-Mth.frac(cameraPosition.y * 0.5)); + float r = q + k; + if (this.shouldRebuildWorldBorderBuffer(worldBorder)) { + this.rebuildWorldBorderBuffer(worldBorder, renderDistance, j, i, k, r, q); + } + + RenderSystem.setModelOffset((float)(this.lastMinX - i), (float)(-cameraPosition.y), (float)(this.lastMinZ - j)); + TextureManager textureManager = Minecraft.getInstance().getTextureManager(); + AbstractTexture abstractTexture = textureManager.getTexture(FORCEFIELD_LOCATION); + abstractTexture.setFilter(TriState.FALSE, false); + RenderPipeline renderPipeline = RenderPipelines.WORLD_BORDER; + RenderTarget renderTarget = Minecraft.getInstance().getMainRenderTarget(); + RenderTarget renderTarget2 = Minecraft.getInstance().levelRenderer.getWeatherTarget(); + GpuTexture gpuTexture; + GpuTexture gpuTexture2; + if (renderTarget2 != null) { + gpuTexture = renderTarget2.getColorTexture(); + gpuTexture2 = renderTarget2.getDepthTexture(); + } else { + gpuTexture = renderTarget.getColorTexture(); + gpuTexture2 = renderTarget.getDepthTexture(); + } + + GpuBuffer gpuBuffer = this.indices.getBuffer(6); + + try (RenderPass renderPass = RenderSystem.getDevice() + .createCommandEncoder() + .createRenderPass(gpuTexture, OptionalInt.empty(), gpuTexture2, OptionalDouble.empty())) { + renderPass.setPipeline(renderPipeline); + renderPass.setIndexBuffer(gpuBuffer, this.indices.type()); + renderPass.bindSampler("Sampler0", abstractTexture.getTexture()); + renderPass.setVertexBuffer(0, this.worldBorderBuffer); + ArrayList arrayList = new ArrayList(); + + for (WorldBorder.DistancePerDirection distancePerDirection : worldBorder.closestBorder(i, j)) { + if (distancePerDirection.distance() < renderDistance) { + int s = distancePerDirection.direction().get2DDataValue(); + arrayList.add(new RenderPass.Draw(0, this.worldBorderBuffer, gpuBuffer, this.indices.type(), 6 * s, 6)); + } + } + + renderPass.drawMultipleIndexed(arrayList, null, null); + } + + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.resetTextureMatrix(); + RenderSystem.resetModelOffset(); + } + } + + public void invalidate() { + this.needsRebuild = true; + } + + private boolean shouldRebuildWorldBorderBuffer(WorldBorder worldBorder) { + return this.needsRebuild + || worldBorder.getMinX() != this.lastBorderMinX + || worldBorder.getMinZ() != this.lastBorderMinZ + || worldBorder.getMaxX() != this.lastBorderMaxX + || worldBorder.getMaxZ() != this.lastBorderMaxZ; + } } diff --git a/net/minecraft/client/renderer/block/BlockModelShaper.java b/net/minecraft/client/renderer/block/BlockModelShaper.java index a71e9047..0e940fc0 100644 --- a/net/minecraft/client/renderer/block/BlockModelShaper.java +++ b/net/minecraft/client/renderer/block/BlockModelShaper.java @@ -1,21 +1,16 @@ package net.minecraft.client.renderer.block; import java.util.Map; -import java.util.Map.Entry; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.client.resources.model.ModelManager; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.Property; @Environment(EnvType.CLIENT) public class BlockModelShaper { - private Map modelByStateCache = Map.of(); + private Map modelByStateCache = Map.of(); private final ModelManager modelManager; public BlockModelShaper(ModelManager modelManager) { @@ -23,52 +18,23 @@ public class BlockModelShaper { } public TextureAtlasSprite getParticleIcon(BlockState state) { - return this.getBlockModel(state).getParticleIcon(); + return this.getBlockModel(state).particleIcon(); } - public BakedModel getBlockModel(BlockState state) { - BakedModel bakedModel = (BakedModel)this.modelByStateCache.get(state); - if (bakedModel == null) { - bakedModel = this.modelManager.getMissingModel(); + public BlockStateModel getBlockModel(BlockState state) { + BlockStateModel blockStateModel = (BlockStateModel)this.modelByStateCache.get(state); + if (blockStateModel == null) { + blockStateModel = this.modelManager.getMissingBlockStateModel(); } - return bakedModel; + return blockStateModel; } public ModelManager getModelManager() { return this.modelManager; } - public void replaceCache(Map modelByStateCache) { + public void replaceCache(Map modelByStateCache) { this.modelByStateCache = modelByStateCache; } - - public static ModelResourceLocation stateToModelLocation(BlockState state) { - return stateToModelLocation(BuiltInRegistries.BLOCK.getKey(state.getBlock()), state); - } - - public static ModelResourceLocation stateToModelLocation(ResourceLocation location, BlockState state) { - return new ModelResourceLocation(location, statePropertiesToString(state.getValues())); - } - - public static String statePropertiesToString(Map, Comparable> propertyValues) { - StringBuilder stringBuilder = new StringBuilder(); - - for (Entry, Comparable> entry : propertyValues.entrySet()) { - if (stringBuilder.length() != 0) { - stringBuilder.append(','); - } - - Property property = (Property)entry.getKey(); - stringBuilder.append(property.getName()); - stringBuilder.append('='); - stringBuilder.append(getValue(property, (Comparable)entry.getValue())); - } - - return stringBuilder.toString(); - } - - private static > String getValue(Property property, Comparable value) { - return property.getName((T)value); - } } diff --git a/net/minecraft/client/renderer/block/BlockRenderDispatcher.java b/net/minecraft/client/renderer/block/BlockRenderDispatcher.java index d9c1974a..7f854019 100644 --- a/net/minecraft/client/renderer/block/BlockRenderDispatcher.java +++ b/net/minecraft/client/renderer/block/BlockRenderDispatcher.java @@ -2,23 +2,26 @@ package net.minecraft.client.renderer.block; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; import net.minecraft.ReportedException; import net.minecraft.client.color.block.BlockColors; -import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.SpecialBlockModelRenderer; +import net.minecraft.client.renderer.block.model.BlockModelPart; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.ResourceManagerReloadListener; import net.minecraft.util.RandomSource; import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; @@ -28,14 +31,15 @@ import net.minecraft.world.level.material.FluidState; public class BlockRenderDispatcher implements ResourceManagerReloadListener { private final BlockModelShaper blockModelShaper; private final ModelBlockRenderer modelRenderer; - private final BlockEntityWithoutLevelRenderer blockEntityRenderer; + private final Supplier specialBlockModelRenderer; private final LiquidBlockRenderer liquidBlockRenderer; - private final RandomSource random = RandomSource.create(); + private final RandomSource singleThreadRandom = RandomSource.create(); + private final List singleThreadPartList = new ArrayList(); private final BlockColors blockColors; - public BlockRenderDispatcher(BlockModelShaper blockModelShaper, BlockEntityWithoutLevelRenderer blockEntityRenderer, BlockColors blockColors) { + public BlockRenderDispatcher(BlockModelShaper blockModelShaper, Supplier specialBlockModelRenderer, BlockColors blockColors) { this.blockModelShaper = blockModelShaper; - this.blockEntityRenderer = blockEntityRenderer; + this.specialBlockModelRenderer = specialBlockModelRenderer; this.blockColors = blockColors; this.modelRenderer = new ModelBlockRenderer(this.blockColors); this.liquidBlockRenderer = new LiquidBlockRenderer(); @@ -47,18 +51,19 @@ public class BlockRenderDispatcher implements ResourceManagerReloadListener { public void renderBreakingTexture(BlockState state, BlockPos pos, BlockAndTintGetter level, PoseStack poseStack, VertexConsumer consumer) { if (state.getRenderShape() == RenderShape.MODEL) { - BakedModel bakedModel = this.blockModelShaper.getBlockModel(state); - long l = state.getSeed(pos); - this.modelRenderer.tesselateBlock(level, bakedModel, state, pos, poseStack, consumer, true, this.random, l, OverlayTexture.NO_OVERLAY); + BlockStateModel blockStateModel = this.blockModelShaper.getBlockModel(state); + this.singleThreadRandom.setSeed(state.getSeed(pos)); + this.singleThreadPartList.clear(); + blockStateModel.collectParts(this.singleThreadRandom, this.singleThreadPartList); + this.modelRenderer.tesselateBlock(level, this.singleThreadPartList, state, pos, poseStack, consumer, true, OverlayTexture.NO_OVERLAY); } } public void renderBatched( - BlockState state, BlockPos pos, BlockAndTintGetter level, PoseStack poseStack, VertexConsumer consumer, boolean checkSides, RandomSource random + BlockState state, BlockPos pos, BlockAndTintGetter level, PoseStack poseStack, VertexConsumer consumer, boolean checkSides, List parts ) { try { - this.modelRenderer - .tesselateBlock(level, this.getBlockModel(state), state, pos, poseStack, consumer, checkSides, random, state.getSeed(pos), OverlayTexture.NO_OVERLAY); + this.modelRenderer.tesselateBlock(level, parts, state, pos, poseStack, consumer, checkSides, OverlayTexture.NO_OVERLAY); } catch (Throwable var11) { CrashReport crashReport = CrashReport.forThrowable(var11, "Tesselating block in world"); CrashReportCategory crashReportCategory = crashReport.addCategory("Block being tesselated"); @@ -73,7 +78,7 @@ public class BlockRenderDispatcher implements ResourceManagerReloadListener { } catch (Throwable var9) { CrashReport crashReport = CrashReport.forThrowable(var9, "Tesselating liquid in world"); CrashReportCategory crashReportCategory = crashReport.addCategory("Block being tesselated"); - CrashReportCategory.populateBlockDetails(crashReportCategory, level, pos, null); + CrashReportCategory.populateBlockDetails(crashReportCategory, level, pos, blockState); throw new ReportedException(crashReport); } } @@ -82,26 +87,23 @@ public class BlockRenderDispatcher implements ResourceManagerReloadListener { return this.modelRenderer; } - public BakedModel getBlockModel(BlockState state) { + public BlockStateModel getBlockModel(BlockState state) { return this.blockModelShaper.getBlockModel(state); } public void renderSingleBlock(BlockState state, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { RenderShape renderShape = state.getRenderShape(); if (renderShape != RenderShape.INVISIBLE) { - switch (renderShape) { - case MODEL: - BakedModel bakedModel = this.getBlockModel(state); - int i = this.blockColors.getColor(state, null, null, 0); - float f = (i >> 16 & 0xFF) / 255.0F; - float g = (i >> 8 & 0xFF) / 255.0F; - float h = (i & 0xFF) / 255.0F; - this.modelRenderer - .renderModel(poseStack.last(), bufferSource.getBuffer(ItemBlockRenderTypes.getRenderType(state)), state, bakedModel, f, g, h, packedLight, packedOverlay); - break; - case ENTITYBLOCK_ANIMATED: - this.blockEntityRenderer.renderByItem(new ItemStack(state.getBlock()), ItemDisplayContext.NONE, poseStack, bufferSource, packedLight, packedOverlay); - } + BlockStateModel blockStateModel = this.getBlockModel(state); + int i = this.blockColors.getColor(state, null, null, 0); + float f = (i >> 16 & 0xFF) / 255.0F; + float g = (i >> 8 & 0xFF) / 255.0F; + float h = (i & 0xFF) / 255.0F; + ModelBlockRenderer.renderModel( + poseStack.last(), bufferSource.getBuffer(ItemBlockRenderTypes.getRenderType(state)), blockStateModel, f, g, h, packedLight, packedOverlay + ); + ((SpecialBlockModelRenderer)this.specialBlockModelRenderer.get()) + .renderByBlock(state.getBlock(), ItemDisplayContext.NONE, poseStack, bufferSource, packedLight, packedOverlay); } } diff --git a/net/minecraft/client/renderer/block/LiquidBlockRenderer.java b/net/minecraft/client/renderer/block/LiquidBlockRenderer.java index c7329871..5a10a46f 100644 --- a/net/minecraft/client/renderer/block/LiquidBlockRenderer.java +++ b/net/minecraft/client/renderer/block/LiquidBlockRenderer.java @@ -32,9 +32,9 @@ public class LiquidBlockRenderer { private TextureAtlasSprite waterOverlay; protected void setupSprites() { - this.lavaIcons[0] = Minecraft.getInstance().getModelManager().getBlockModelShaper().getBlockModel(Blocks.LAVA.defaultBlockState()).getParticleIcon(); + this.lavaIcons[0] = Minecraft.getInstance().getModelManager().getBlockModelShaper().getBlockModel(Blocks.LAVA.defaultBlockState()).particleIcon(); this.lavaIcons[1] = ModelBakery.LAVA_FLOW.sprite(); - this.waterIcons[0] = Minecraft.getInstance().getModelManager().getBlockModelShaper().getBlockModel(Blocks.WATER.defaultBlockState()).getParticleIcon(); + this.waterIcons[0] = Minecraft.getInstance().getModelManager().getBlockModelShaper().getBlockModel(Blocks.WATER.defaultBlockState()).particleIcon(); this.waterIcons[1] = ModelBakery.WATER_FLOW.sprite(); this.waterOverlay = ModelBakery.WATER_OVERLAY.sprite(); } @@ -43,29 +43,29 @@ public class LiquidBlockRenderer { return secondState.getType().isSame(firstState.getType()); } - private static boolean isFaceOccludedByState(Direction direction, float f, BlockState blockState) { - VoxelShape voxelShape = blockState.getFaceOcclusionShape(direction.getOpposite()); + private static boolean isFaceOccludedByState(Direction face, float height, BlockState state) { + VoxelShape voxelShape = state.getFaceOcclusionShape(face.getOpposite()); if (voxelShape == Shapes.empty()) { return false; } else if (voxelShape == Shapes.block()) { - boolean bl = f == 1.0F; - return direction != Direction.UP || bl; + boolean bl = height == 1.0F; + return face != Direction.UP || bl; } else { - VoxelShape voxelShape2 = Shapes.box(0.0, 0.0, 0.0, 1.0, f, 1.0); - return Shapes.blockOccudes(voxelShape2, voxelShape, direction); + VoxelShape voxelShape2 = Shapes.box(0.0, 0.0, 0.0, 1.0, height, 1.0); + return Shapes.blockOccludes(voxelShape2, voxelShape, face); } } - private static boolean isFaceOccludedByNeighbor(Direction direction, float f, BlockState blockState) { - return isFaceOccludedByState(direction, f, blockState); + private static boolean isFaceOccludedByNeighbor(Direction face, float height, BlockState state) { + return isFaceOccludedByState(face, height, state); } - private static boolean isFaceOccludedBySelf(BlockState blockState, Direction direction) { - return isFaceOccludedByState(direction.getOpposite(), 1.0F, blockState); + private static boolean isFaceOccludedBySelf(BlockState state, Direction face) { + return isFaceOccludedByState(face.getOpposite(), 1.0F, state); } - public static boolean shouldRenderFace(FluidState fluidState, BlockState blockState, Direction direction, FluidState fluidState2) { - return !isFaceOccludedBySelf(blockState, direction) && !isNeighborSameFluid(fluidState, fluidState2); + public static boolean shouldRenderFace(FluidState fluidState, BlockState blockState, Direction side, FluidState neighborFluid) { + return !isFaceOccludedBySelf(blockState, side) && !isNeighborSameFluid(fluidState, neighborFluid); } public void tesselate(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState blockState, FluidState fluidState) { diff --git a/net/minecraft/client/renderer/block/ModelBlockRenderer.java b/net/minecraft/client/renderer/block/ModelBlockRenderer.java index e5407d3d..3e1a14ad 100644 --- a/net/minecraft/client/renderer/block/ModelBlockRenderer.java +++ b/net/minecraft/client/renderer/block/ModelBlockRenderer.java @@ -4,7 +4,6 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import it.unimi.dsi.fastutil.longs.Long2FloatLinkedOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2IntLinkedOpenHashMap; -import java.util.BitSet; import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -18,21 +17,20 @@ import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.block.ModelBlockRenderer.Cache.1; import net.minecraft.client.renderer.block.ModelBlockRenderer.Cache.2; import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.renderer.block.model.BlockModelPart; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.util.ARGB; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ModelBlockRenderer { - private static final int FACE_CUBIC = 0; - private static final int FACE_PARTIAL = 1; - static final Direction[] DIRECTIONS = Direction.values(); + private static final Direction[] DIRECTIONS = Direction.values(); private final BlockColors blockColors; private static final int CACHE_SIZE = 100; static final ThreadLocal CACHE = ThreadLocal.withInitial(ModelBlockRenderer.Cache::new); @@ -41,118 +39,135 @@ public class ModelBlockRenderer { this.blockColors = blockColors; } - /** - * @param checkSides if {@code true}, only renders each side if {@link net.minecraft.world.level.block.Block#shouldRenderFace(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.BlockGetter, net.minecraft.core.BlockPos, net.minecraft.core.Direction, net.minecraft.core.BlockPos)} returns {@code true} - */ public void tesselateBlock( BlockAndTintGetter level, - BakedModel model, + List parts, BlockState state, BlockPos pos, PoseStack poseStack, VertexConsumer consumer, boolean checkSides, - RandomSource random, - long seed, int packedOverlay ) { - boolean bl = Minecraft.useAmbientOcclusion() && state.getLightEmission() == 0 && model.useAmbientOcclusion(); - poseStack.translate(state.getOffset(pos)); + if (!parts.isEmpty()) { + boolean bl = Minecraft.useAmbientOcclusion() && state.getLightEmission() == 0 && ((BlockModelPart)parts.getFirst()).useAmbientOcclusion(); + poseStack.translate(state.getOffset(pos)); - try { - if (bl) { - this.tesselateWithAO(level, model, state, pos, poseStack, consumer, checkSides, random, seed, packedOverlay); - } else { - this.tesselateWithoutAO(level, model, state, pos, poseStack, consumer, checkSides, random, seed, packedOverlay); + try { + if (bl) { + this.tesselateWithAO(level, parts, state, pos, poseStack, consumer, checkSides, packedOverlay); + } else { + this.tesselateWithoutAO(level, parts, state, pos, poseStack, consumer, checkSides, packedOverlay); + } + } catch (Throwable var13) { + CrashReport crashReport = CrashReport.forThrowable(var13, "Tesselating block model"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Block model being tesselated"); + CrashReportCategory.populateBlockDetails(crashReportCategory, level, pos, state); + crashReportCategory.setDetail("Using AO", bl); + throw new ReportedException(crashReport); } - } catch (Throwable var16) { - CrashReport crashReport = CrashReport.forThrowable(var16, "Tesselating block model"); - CrashReportCategory crashReportCategory = crashReport.addCategory("Block model being tesselated"); - CrashReportCategory.populateBlockDetails(crashReportCategory, level, pos, state); - crashReportCategory.setDetail("Using AO", bl); - throw new ReportedException(crashReport); } } - /** - * @param checkSides if {@code true}, only renders each side if {@link net.minecraft.world.level.block.Block#shouldRenderFace(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.BlockGetter, net.minecraft.core.BlockPos, net.minecraft.core.Direction, net.minecraft.core.BlockPos)} returns {@code true} - */ + private static boolean shouldRenderFace(BlockAndTintGetter level, BlockState state, boolean checkSides, Direction face, BlockPos pos) { + if (!checkSides) { + return true; + } else { + BlockState blockState = level.getBlockState(pos); + return Block.shouldRenderFace(state, blockState, face); + } + } + public void tesselateWithAO( BlockAndTintGetter level, - BakedModel model, + List parts, BlockState state, BlockPos pos, PoseStack poseStack, VertexConsumer consumer, boolean checkSides, - RandomSource random, - long seed, int packedOverlay ) { - float[] fs = new float[DIRECTIONS.length * 2]; - BitSet bitSet = new BitSet(3); - ModelBlockRenderer.AmbientOcclusionFace ambientOcclusionFace = new ModelBlockRenderer.AmbientOcclusionFace(); - BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); + ModelBlockRenderer.AmbientOcclusionRenderStorage ambientOcclusionRenderStorage = new ModelBlockRenderer.AmbientOcclusionRenderStorage(); + int i = 0; + int j = 0; - for (Direction direction : DIRECTIONS) { - random.setSeed(seed); - List list = model.getQuads(state, direction, random); - if (!list.isEmpty()) { - mutableBlockPos.setWithOffset(pos, direction); - if (!checkSides || Block.shouldRenderFace(state, level.getBlockState(mutableBlockPos), direction)) { - this.renderModelFaceAO(level, state, pos, poseStack, consumer, list, fs, bitSet, ambientOcclusionFace, packedOverlay); + for (BlockModelPart blockModelPart : parts) { + for (Direction direction : DIRECTIONS) { + int k = 1 << direction.ordinal(); + boolean bl = (i & k) == 1; + boolean bl2 = (j & k) == 1; + if (!bl || bl2) { + List list = blockModelPart.getQuads(direction); + if (!list.isEmpty()) { + if (!bl) { + bl2 = shouldRenderFace(level, state, checkSides, direction, ambientOcclusionRenderStorage.scratchPos.setWithOffset(pos, direction)); + i |= k; + if (bl2) { + j |= k; + } + } + + if (bl2) { + this.renderModelFaceAO(level, state, pos, poseStack, consumer, list, ambientOcclusionRenderStorage, packedOverlay); + } + } } } - } - random.setSeed(seed); - List list2 = model.getQuads(state, null, random); - if (!list2.isEmpty()) { - this.renderModelFaceAO(level, state, pos, poseStack, consumer, list2, fs, bitSet, ambientOcclusionFace, packedOverlay); + List list2 = blockModelPart.getQuads(null); + if (!list2.isEmpty()) { + this.renderModelFaceAO(level, state, pos, poseStack, consumer, list2, ambientOcclusionRenderStorage, packedOverlay); + } } } - /** - * @param checkSides if {@code true}, only renders each side if {@link net.minecraft.world.level.block.Block#shouldRenderFace(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.BlockGetter, net.minecraft.core.BlockPos, net.minecraft.core.Direction, net.minecraft.core.BlockPos)} returns {@code true} - */ public void tesselateWithoutAO( BlockAndTintGetter level, - BakedModel model, + List parts, BlockState state, BlockPos pos, PoseStack poseStack, VertexConsumer consumer, boolean checkSides, - RandomSource random, - long seed, int packedOverlay ) { - BitSet bitSet = new BitSet(3); - BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); + ModelBlockRenderer.CommonRenderStorage commonRenderStorage = new ModelBlockRenderer.CommonRenderStorage(); + int i = 0; + int j = 0; - for (Direction direction : DIRECTIONS) { - random.setSeed(seed); - List list = model.getQuads(state, direction, random); - if (!list.isEmpty()) { - mutableBlockPos.setWithOffset(pos, direction); - if (!checkSides || Block.shouldRenderFace(state, level.getBlockState(mutableBlockPos), direction)) { - int i = LevelRenderer.getLightColor(level, state, mutableBlockPos); - this.renderModelFaceFlat(level, state, pos, i, packedOverlay, false, poseStack, consumer, list, bitSet); + for (BlockModelPart blockModelPart : parts) { + for (Direction direction : DIRECTIONS) { + int k = 1 << direction.ordinal(); + boolean bl = (i & k) == 1; + boolean bl2 = (j & k) == 1; + if (!bl || bl2) { + List list = blockModelPart.getQuads(direction); + if (!list.isEmpty()) { + BlockPos blockPos = commonRenderStorage.scratchPos.setWithOffset(pos, direction); + if (!bl) { + bl2 = shouldRenderFace(level, state, checkSides, direction, blockPos); + i |= k; + if (bl2) { + j |= k; + } + } + + if (bl2) { + int l = commonRenderStorage.cache.getLightColor(state, level, blockPos); + this.renderModelFaceFlat(level, state, pos, l, packedOverlay, false, poseStack, consumer, list, commonRenderStorage); + } + } } } - } - random.setSeed(seed); - List list2 = model.getQuads(state, null, random); - if (!list2.isEmpty()) { - this.renderModelFaceFlat(level, state, pos, -1, packedOverlay, true, poseStack, consumer, list2, bitSet); + List list2 = blockModelPart.getQuads(null); + if (!list2.isEmpty()) { + this.renderModelFaceFlat(level, state, pos, -1, packedOverlay, true, poseStack, consumer, list2, commonRenderStorage); + } } } - /** - * @param shape the array, of length 12, to store the shape bounds in - * @param shapeFlags the bit set to store the shape flags in. The first bit will be {@code true} if the face should be offset, and the second if the face is less than a block in width and height. - */ private void renderModelFaceAO( BlockAndTintGetter level, BlockState state, @@ -160,31 +175,13 @@ public class ModelBlockRenderer { PoseStack poseStack, VertexConsumer consumer, List quads, - float[] shape, - BitSet shapeFlags, - ModelBlockRenderer.AmbientOcclusionFace aoFace, + ModelBlockRenderer.AmbientOcclusionRenderStorage renderStorage, int packedOverlay ) { for (BakedQuad bakedQuad : quads) { - this.calculateShape(level, state, pos, bakedQuad.getVertices(), bakedQuad.getDirection(), shape, shapeFlags); - aoFace.calculate(level, state, pos, bakedQuad.getDirection(), shape, shapeFlags, bakedQuad.isShade()); - this.putQuadData( - level, - state, - pos, - consumer, - poseStack.last(), - bakedQuad, - aoFace.brightness[0], - aoFace.brightness[1], - aoFace.brightness[2], - aoFace.brightness[3], - aoFace.lightmap[0], - aoFace.lightmap[1], - aoFace.lightmap[2], - aoFace.lightmap[3], - packedOverlay - ); + calculateShape(level, state, pos, bakedQuad.vertices(), bakedQuad.direction(), renderStorage); + renderStorage.calculate(level, state, pos, bakedQuad.direction(), bakedQuad.shade()); + this.putQuadData(level, state, pos, consumer, poseStack.last(), bakedQuad, renderStorage, packedOverlay); } } @@ -195,52 +192,37 @@ public class ModelBlockRenderer { VertexConsumer consumer, PoseStack.Pose pose, BakedQuad quad, - float brightness0, - float brightness1, - float brightness2, - float brightness3, - int lightmap0, - int lightmap1, - int lightmap2, - int lightmap3, + ModelBlockRenderer.CommonRenderStorage renderStorage, int packedOverlay ) { + int i = quad.tintIndex(); float f; float g; float h; - if (quad.isTinted()) { - int i = this.blockColors.getColor(state, level, pos, quad.getTintIndex()); - f = (i >> 16 & 0xFF) / 255.0F; - g = (i >> 8 & 0xFF) / 255.0F; - h = (i & 0xFF) / 255.0F; + if (i != -1) { + int j; + if (renderStorage.tintCacheIndex == i) { + j = renderStorage.tintCacheValue; + } else { + j = this.blockColors.getColor(state, level, pos, i); + renderStorage.tintCacheIndex = i; + renderStorage.tintCacheValue = j; + } + + f = ARGB.redFloat(j); + g = ARGB.greenFloat(j); + h = ARGB.blueFloat(j); } else { f = 1.0F; g = 1.0F; h = 1.0F; } - consumer.putBulkData( - pose, - quad, - new float[]{brightness0, brightness1, brightness2, brightness3}, - f, - g, - h, - 1.0F, - new int[]{lightmap0, lightmap1, lightmap2, lightmap3}, - packedOverlay, - true - ); + consumer.putBulkData(pose, quad, renderStorage.brightness, f, g, h, 1.0F, renderStorage.lightmap, packedOverlay, true); } - /** - * Calculates the shape and corresponding flags for the specified {@code direction} and {@code vertices}, storing the resulting shape in the specified {@code shape} array and the shape flags in {@code shapeFlags}. - * - * @param shape the array, of length 12, to store the shape bounds in, or {@code null} to only calculate shape flags - * @param shapeFlags the bit set to store the shape flags in. The first bit will be {@code true} if the face should be offset, and the second if the face is less than a block in width and height. - */ - private void calculateShape( - BlockAndTintGetter level, BlockState state, BlockPos pos, int[] vertices, Direction direction, @Nullable float[] shape, BitSet shapeFlags + private static void calculateShape( + BlockAndTintGetter level, BlockState state, BlockPos pos, int[] verticies, Direction direction, ModelBlockRenderer.CommonRenderStorage renderStorage ) { float f = 32.0F; float g = 32.0F; @@ -250,9 +232,9 @@ public class ModelBlockRenderer { float k = -32.0F; for (int l = 0; l < 4; l++) { - float m = Float.intBitsToFloat(vertices[l * 8]); - float n = Float.intBitsToFloat(vertices[l * 8 + 1]); - float o = Float.intBitsToFloat(vertices[l * 8 + 2]); + float m = Float.intBitsToFloat(verticies[l * 8]); + float n = Float.intBitsToFloat(verticies[l * 8 + 1]); + float o = Float.intBitsToFloat(verticies[l * 8 + 2]); f = Math.min(f, m); g = Math.min(g, n); h = Math.min(h, o); @@ -261,54 +243,42 @@ public class ModelBlockRenderer { k = Math.max(k, o); } - if (shape != null) { - shape[Direction.WEST.get3DDataValue()] = f; - shape[Direction.EAST.get3DDataValue()] = i; - shape[Direction.DOWN.get3DDataValue()] = g; - shape[Direction.UP.get3DDataValue()] = j; - shape[Direction.NORTH.get3DDataValue()] = h; - shape[Direction.SOUTH.get3DDataValue()] = k; - int l = DIRECTIONS.length; - shape[Direction.WEST.get3DDataValue() + l] = 1.0F - f; - shape[Direction.EAST.get3DDataValue() + l] = 1.0F - i; - shape[Direction.DOWN.get3DDataValue() + l] = 1.0F - g; - shape[Direction.UP.get3DDataValue() + l] = 1.0F - j; - shape[Direction.NORTH.get3DDataValue() + l] = 1.0F - h; - shape[Direction.SOUTH.get3DDataValue() + l] = 1.0F - k; + if (renderStorage instanceof ModelBlockRenderer.AmbientOcclusionRenderStorage ambientOcclusionRenderStorage) { + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.WEST.index] = f; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.EAST.index] = i; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.DOWN.index] = g; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.UP.index] = j; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.NORTH.index] = h; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.SOUTH.index] = k; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_WEST.index] = 1.0F - f; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_EAST.index] = 1.0F - i; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_DOWN.index] = 1.0F - g; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_UP.index] = 1.0F - j; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_NORTH.index] = 1.0F - h; + ambientOcclusionRenderStorage.faceShape[ModelBlockRenderer.SizeInfo.FLIP_SOUTH.index] = 1.0F - k; } float p = 1.0E-4F; float m = 0.9999F; - switch (direction) { - case DOWN: - shapeFlags.set(1, f >= 1.0E-4F || h >= 1.0E-4F || i <= 0.9999F || k <= 0.9999F); - shapeFlags.set(0, g == j && (g < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos))); - break; - case UP: - shapeFlags.set(1, f >= 1.0E-4F || h >= 1.0E-4F || i <= 0.9999F || k <= 0.9999F); - shapeFlags.set(0, g == j && (j > 0.9999F || state.isCollisionShapeFullBlock(level, pos))); - break; - case NORTH: - shapeFlags.set(1, f >= 1.0E-4F || g >= 1.0E-4F || i <= 0.9999F || j <= 0.9999F); - shapeFlags.set(0, h == k && (h < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos))); - break; - case SOUTH: - shapeFlags.set(1, f >= 1.0E-4F || g >= 1.0E-4F || i <= 0.9999F || j <= 0.9999F); - shapeFlags.set(0, h == k && (k > 0.9999F || state.isCollisionShapeFullBlock(level, pos))); - break; - case WEST: - shapeFlags.set(1, g >= 1.0E-4F || h >= 1.0E-4F || j <= 0.9999F || k <= 0.9999F); - shapeFlags.set(0, f == i && (f < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos))); - break; - case EAST: - shapeFlags.set(1, g >= 1.0E-4F || h >= 1.0E-4F || j <= 0.9999F || k <= 0.9999F); - shapeFlags.set(0, f == i && (i > 0.9999F || state.isCollisionShapeFullBlock(level, pos))); - } + + renderStorage.facePartial = switch (direction) { + case DOWN, UP -> f >= 1.0E-4F || h >= 1.0E-4F || i <= 0.9999F || k <= 0.9999F; + case NORTH, SOUTH -> f >= 1.0E-4F || g >= 1.0E-4F || i <= 0.9999F || j <= 0.9999F; + case WEST, EAST -> g >= 1.0E-4F || h >= 1.0E-4F || j <= 0.9999F || k <= 0.9999F; + }; + + renderStorage.faceCubic = switch (direction) { + case DOWN -> g == j && (g < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos)); + case UP -> g == j && (j > 0.9999F || state.isCollisionShapeFullBlock(level, pos)); + case NORTH -> h == k && (h < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos)); + case SOUTH -> h == k && (k > 0.9999F || state.isCollisionShapeFullBlock(level, pos)); + case WEST -> f == i && (f < 1.0E-4F || state.isCollisionShapeFullBlock(level, pos)); + case EAST -> f == i && (i > 0.9999F || state.isCollisionShapeFullBlock(level, pos)); + }; } /** * @param repackLight {@code true} if packed light should be re-calculated - * @param shapeFlags the bit set to store the shape flags in. The first bit will be {@code true} if the face should be offset, and the second if the face is less than a block in width and height. */ private void renderModelFaceFlat( BlockAndTintGetter level, @@ -320,41 +290,38 @@ public class ModelBlockRenderer { PoseStack poseStack, VertexConsumer consumer, List quads, - BitSet shapeFlags + ModelBlockRenderer.CommonRenderStorage renderStorage ) { for (BakedQuad bakedQuad : quads) { if (repackLight) { - this.calculateShape(level, state, pos, bakedQuad.getVertices(), bakedQuad.getDirection(), null, shapeFlags); - BlockPos blockPos = shapeFlags.get(0) ? pos.relative(bakedQuad.getDirection()) : pos; - packedLight = LevelRenderer.getLightColor(level, state, blockPos); + calculateShape(level, state, pos, bakedQuad.vertices(), bakedQuad.direction(), renderStorage); + BlockPos blockPos = (BlockPos)(renderStorage.faceCubic ? renderStorage.scratchPos.setWithOffset(pos, bakedQuad.direction()) : pos); + packedLight = renderStorage.cache.getLightColor(state, level, blockPos); } - float f = level.getShade(bakedQuad.getDirection(), bakedQuad.isShade()); - this.putQuadData(level, state, pos, consumer, poseStack.last(), bakedQuad, f, f, f, f, packedLight, packedLight, packedLight, packedLight, packedOverlay); + float f = level.getShade(bakedQuad.direction(), bakedQuad.shade()); + renderStorage.brightness[0] = f; + renderStorage.brightness[1] = f; + renderStorage.brightness[2] = f; + renderStorage.brightness[3] = f; + renderStorage.lightmap[0] = packedLight; + renderStorage.lightmap[1] = packedLight; + renderStorage.lightmap[2] = packedLight; + renderStorage.lightmap[3] = packedLight; + this.putQuadData(level, state, pos, consumer, poseStack.last(), bakedQuad, renderStorage, packedOverlay); } } - public void renderModel( - PoseStack.Pose pose, - VertexConsumer consumer, - @Nullable BlockState state, - BakedModel model, - float red, - float green, - float blue, - int packedLight, - int packedOverlay + public static void renderModel( + PoseStack.Pose pose, VertexConsumer consumer, BlockStateModel model, float red, float green, float blue, int packedLight, int packedOverlay ) { - RandomSource randomSource = RandomSource.create(); - long l = 42L; + for (BlockModelPart blockModelPart : model.collectParts(RandomSource.create(42L))) { + for (Direction direction : DIRECTIONS) { + renderQuadList(pose, consumer, red, green, blue, blockModelPart.getQuads(direction), packedLight, packedOverlay); + } - for (Direction direction : DIRECTIONS) { - randomSource.setSeed(42L); - renderQuadList(pose, consumer, red, green, blue, model.getQuads(state, direction, randomSource), packedLight, packedOverlay); + renderQuadList(pose, consumer, red, green, blue, blockModelPart.getQuads(null), packedLight, packedOverlay); } - - randomSource.setSeed(42L); - renderQuadList(pose, consumer, red, green, blue, model.getQuads(state, null, randomSource), packedLight, packedOverlay); } private static void renderQuadList( @@ -700,38 +667,32 @@ public class ModelBlockRenderer { } @Environment(EnvType.CLIENT) - static class AmbientOcclusionFace { - final float[] brightness = new float[4]; - final int[] lightmap = new int[4]; + static class AmbientOcclusionRenderStorage extends ModelBlockRenderer.CommonRenderStorage { + final float[] faceShape = new float[ModelBlockRenderer.SizeInfo.COUNT]; - public AmbientOcclusionFace() { + public AmbientOcclusionRenderStorage() { } - /** - * @param shape the array, of length 12, containing the shape bounds - * @param shapeFlags the bit set to store the shape flags in. The first bit will be {@code true} if the face should be offset, and the second if the face is less than a block in width and height. - */ - public void calculate(BlockAndTintGetter level, BlockState state, BlockPos pos, Direction direction, float[] shape, BitSet shapeFlags, boolean shade) { - BlockPos blockPos = shapeFlags.get(0) ? pos.relative(direction) : pos; + public void calculate(BlockAndTintGetter level, BlockState state, BlockPos pos, Direction direction, boolean shade) { + BlockPos blockPos = this.faceCubic ? pos.relative(direction) : pos; ModelBlockRenderer.AdjacencyInfo adjacencyInfo = ModelBlockRenderer.AdjacencyInfo.fromFacing(direction); - BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); - ModelBlockRenderer.Cache cache = (ModelBlockRenderer.Cache)ModelBlockRenderer.CACHE.get(); + BlockPos.MutableBlockPos mutableBlockPos = this.scratchPos; mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[0]); BlockState blockState = level.getBlockState(mutableBlockPos); - int i = cache.getLightColor(blockState, level, mutableBlockPos); - float f = cache.getShadeBrightness(blockState, level, mutableBlockPos); + int i = this.cache.getLightColor(blockState, level, mutableBlockPos); + float f = this.cache.getShadeBrightness(blockState, level, mutableBlockPos); mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[1]); BlockState blockState2 = level.getBlockState(mutableBlockPos); - int j = cache.getLightColor(blockState2, level, mutableBlockPos); - float g = cache.getShadeBrightness(blockState2, level, mutableBlockPos); + int j = this.cache.getLightColor(blockState2, level, mutableBlockPos); + float g = this.cache.getShadeBrightness(blockState2, level, mutableBlockPos); mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[2]); BlockState blockState3 = level.getBlockState(mutableBlockPos); - int k = cache.getLightColor(blockState3, level, mutableBlockPos); - float h = cache.getShadeBrightness(blockState3, level, mutableBlockPos); + int k = this.cache.getLightColor(blockState3, level, mutableBlockPos); + float h = this.cache.getShadeBrightness(blockState3, level, mutableBlockPos); mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[3]); BlockState blockState4 = level.getBlockState(mutableBlockPos); - int l = cache.getLightColor(blockState4, level, mutableBlockPos); - float m = cache.getShadeBrightness(blockState4, level, mutableBlockPos); + int l = this.cache.getLightColor(blockState4, level, mutableBlockPos); + float m = this.cache.getShadeBrightness(blockState4, level, mutableBlockPos); BlockState blockState5 = level.getBlockState(mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[0]).move(direction)); boolean bl = !blockState5.isViewBlocking(level, mutableBlockPos) || blockState5.getLightBlock() == 0; BlockState blockState6 = level.getBlockState(mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[1]).move(direction)); @@ -748,8 +709,8 @@ public class ModelBlockRenderer { } else { mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[0]).move(adjacencyInfo.corners[2]); BlockState blockState9 = level.getBlockState(mutableBlockPos); - n = cache.getShadeBrightness(blockState9, level, mutableBlockPos); - o = cache.getLightColor(blockState9, level, mutableBlockPos); + n = this.cache.getShadeBrightness(blockState9, level, mutableBlockPos); + o = this.cache.getLightColor(blockState9, level, mutableBlockPos); } float p; @@ -760,8 +721,8 @@ public class ModelBlockRenderer { } else { mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[0]).move(adjacencyInfo.corners[3]); BlockState blockState9 = level.getBlockState(mutableBlockPos); - p = cache.getShadeBrightness(blockState9, level, mutableBlockPos); - q = cache.getLightColor(blockState9, level, mutableBlockPos); + p = this.cache.getShadeBrightness(blockState9, level, mutableBlockPos); + q = this.cache.getLightColor(blockState9, level, mutableBlockPos); } float r; @@ -772,8 +733,8 @@ public class ModelBlockRenderer { } else { mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[1]).move(adjacencyInfo.corners[2]); BlockState blockState9 = level.getBlockState(mutableBlockPos); - r = cache.getShadeBrightness(blockState9, level, mutableBlockPos); - s = cache.getLightColor(blockState9, level, mutableBlockPos); + r = this.cache.getShadeBrightness(blockState9, level, mutableBlockPos); + s = this.cache.getLightColor(blockState9, level, mutableBlockPos); } float t; @@ -784,63 +745,63 @@ public class ModelBlockRenderer { } else { mutableBlockPos.setWithOffset(blockPos, adjacencyInfo.corners[1]).move(adjacencyInfo.corners[3]); BlockState blockState9 = level.getBlockState(mutableBlockPos); - t = cache.getShadeBrightness(blockState9, level, mutableBlockPos); - u = cache.getLightColor(blockState9, level, mutableBlockPos); + t = this.cache.getShadeBrightness(blockState9, level, mutableBlockPos); + u = this.cache.getLightColor(blockState9, level, mutableBlockPos); } - int v = cache.getLightColor(state, level, pos); + int v = this.cache.getLightColor(state, level, pos); mutableBlockPos.setWithOffset(pos, direction); BlockState blockState10 = level.getBlockState(mutableBlockPos); - if (shapeFlags.get(0) || !blockState10.isSolidRender()) { - v = cache.getLightColor(blockState10, level, mutableBlockPos); + if (this.faceCubic || !blockState10.isSolidRender()) { + v = this.cache.getLightColor(blockState10, level, mutableBlockPos); } - float w = shapeFlags.get(0) - ? cache.getShadeBrightness(level.getBlockState(blockPos), level, blockPos) - : cache.getShadeBrightness(level.getBlockState(pos), level, pos); + float w = this.faceCubic + ? this.cache.getShadeBrightness(level.getBlockState(blockPos), level, blockPos) + : this.cache.getShadeBrightness(level.getBlockState(pos), level, pos); ModelBlockRenderer.AmbientVertexRemap ambientVertexRemap = ModelBlockRenderer.AmbientVertexRemap.fromFacing(direction); - if (shapeFlags.get(1) && adjacencyInfo.doNonCubicWeight) { + if (this.facePartial && adjacencyInfo.doNonCubicWeight) { float x = (m + f + p + w) * 0.25F; float y = (h + f + n + w) * 0.25F; float z = (h + g + r + w) * 0.25F; float aa = (m + g + t + w) * 0.25F; - float ab = shape[adjacencyInfo.vert0Weights[0].shape] * shape[adjacencyInfo.vert0Weights[1].shape]; - float ac = shape[adjacencyInfo.vert0Weights[2].shape] * shape[adjacencyInfo.vert0Weights[3].shape]; - float ad = shape[adjacencyInfo.vert0Weights[4].shape] * shape[adjacencyInfo.vert0Weights[5].shape]; - float ae = shape[adjacencyInfo.vert0Weights[6].shape] * shape[adjacencyInfo.vert0Weights[7].shape]; - float af = shape[adjacencyInfo.vert1Weights[0].shape] * shape[adjacencyInfo.vert1Weights[1].shape]; - float ag = shape[adjacencyInfo.vert1Weights[2].shape] * shape[adjacencyInfo.vert1Weights[3].shape]; - float ah = shape[adjacencyInfo.vert1Weights[4].shape] * shape[adjacencyInfo.vert1Weights[5].shape]; - float ai = shape[adjacencyInfo.vert1Weights[6].shape] * shape[adjacencyInfo.vert1Weights[7].shape]; - float aj = shape[adjacencyInfo.vert2Weights[0].shape] * shape[adjacencyInfo.vert2Weights[1].shape]; - float ak = shape[adjacencyInfo.vert2Weights[2].shape] * shape[adjacencyInfo.vert2Weights[3].shape]; - float al = shape[adjacencyInfo.vert2Weights[4].shape] * shape[adjacencyInfo.vert2Weights[5].shape]; - float am = shape[adjacencyInfo.vert2Weights[6].shape] * shape[adjacencyInfo.vert2Weights[7].shape]; - float an = shape[adjacencyInfo.vert3Weights[0].shape] * shape[adjacencyInfo.vert3Weights[1].shape]; - float ao = shape[adjacencyInfo.vert3Weights[2].shape] * shape[adjacencyInfo.vert3Weights[3].shape]; - float ap = shape[adjacencyInfo.vert3Weights[4].shape] * shape[adjacencyInfo.vert3Weights[5].shape]; - float aq = shape[adjacencyInfo.vert3Weights[6].shape] * shape[adjacencyInfo.vert3Weights[7].shape]; + float ab = this.faceShape[adjacencyInfo.vert0Weights[0].index] * this.faceShape[adjacencyInfo.vert0Weights[1].index]; + float ac = this.faceShape[adjacencyInfo.vert0Weights[2].index] * this.faceShape[adjacencyInfo.vert0Weights[3].index]; + float ad = this.faceShape[adjacencyInfo.vert0Weights[4].index] * this.faceShape[adjacencyInfo.vert0Weights[5].index]; + float ae = this.faceShape[adjacencyInfo.vert0Weights[6].index] * this.faceShape[adjacencyInfo.vert0Weights[7].index]; + float af = this.faceShape[adjacencyInfo.vert1Weights[0].index] * this.faceShape[adjacencyInfo.vert1Weights[1].index]; + float ag = this.faceShape[adjacencyInfo.vert1Weights[2].index] * this.faceShape[adjacencyInfo.vert1Weights[3].index]; + float ah = this.faceShape[adjacencyInfo.vert1Weights[4].index] * this.faceShape[adjacencyInfo.vert1Weights[5].index]; + float ai = this.faceShape[adjacencyInfo.vert1Weights[6].index] * this.faceShape[adjacencyInfo.vert1Weights[7].index]; + float aj = this.faceShape[adjacencyInfo.vert2Weights[0].index] * this.faceShape[adjacencyInfo.vert2Weights[1].index]; + float ak = this.faceShape[adjacencyInfo.vert2Weights[2].index] * this.faceShape[adjacencyInfo.vert2Weights[3].index]; + float al = this.faceShape[adjacencyInfo.vert2Weights[4].index] * this.faceShape[adjacencyInfo.vert2Weights[5].index]; + float am = this.faceShape[adjacencyInfo.vert2Weights[6].index] * this.faceShape[adjacencyInfo.vert2Weights[7].index]; + float an = this.faceShape[adjacencyInfo.vert3Weights[0].index] * this.faceShape[adjacencyInfo.vert3Weights[1].index]; + float ao = this.faceShape[adjacencyInfo.vert3Weights[2].index] * this.faceShape[adjacencyInfo.vert3Weights[3].index]; + float ap = this.faceShape[adjacencyInfo.vert3Weights[4].index] * this.faceShape[adjacencyInfo.vert3Weights[5].index]; + float aq = this.faceShape[adjacencyInfo.vert3Weights[6].index] * this.faceShape[adjacencyInfo.vert3Weights[7].index]; this.brightness[ambientVertexRemap.vert0] = Math.clamp(x * ab + y * ac + z * ad + aa * ae, 0.0F, 1.0F); this.brightness[ambientVertexRemap.vert1] = Math.clamp(x * af + y * ag + z * ah + aa * ai, 0.0F, 1.0F); this.brightness[ambientVertexRemap.vert2] = Math.clamp(x * aj + y * ak + z * al + aa * am, 0.0F, 1.0F); this.brightness[ambientVertexRemap.vert3] = Math.clamp(x * an + y * ao + z * ap + aa * aq, 0.0F, 1.0F); - int ar = this.blend(l, i, q, v); - int as = this.blend(k, i, o, v); - int at = this.blend(k, j, s, v); - int au = this.blend(l, j, u, v); - this.lightmap[ambientVertexRemap.vert0] = this.blend(ar, as, at, au, ab, ac, ad, ae); - this.lightmap[ambientVertexRemap.vert1] = this.blend(ar, as, at, au, af, ag, ah, ai); - this.lightmap[ambientVertexRemap.vert2] = this.blend(ar, as, at, au, aj, ak, al, am); - this.lightmap[ambientVertexRemap.vert3] = this.blend(ar, as, at, au, an, ao, ap, aq); + int ar = blend(l, i, q, v); + int as = blend(k, i, o, v); + int at = blend(k, j, s, v); + int au = blend(l, j, u, v); + this.lightmap[ambientVertexRemap.vert0] = blend(ar, as, at, au, ab, ac, ad, ae); + this.lightmap[ambientVertexRemap.vert1] = blend(ar, as, at, au, af, ag, ah, ai); + this.lightmap[ambientVertexRemap.vert2] = blend(ar, as, at, au, aj, ak, al, am); + this.lightmap[ambientVertexRemap.vert3] = blend(ar, as, at, au, an, ao, ap, aq); } else { float x = (m + f + p + w) * 0.25F; float y = (h + f + n + w) * 0.25F; float z = (h + g + r + w) * 0.25F; float aa = (m + g + t + w) * 0.25F; - this.lightmap[ambientVertexRemap.vert0] = this.blend(l, i, q, v); - this.lightmap[ambientVertexRemap.vert1] = this.blend(k, i, o, v); - this.lightmap[ambientVertexRemap.vert2] = this.blend(k, j, s, v); - this.lightmap[ambientVertexRemap.vert3] = this.blend(l, j, u, v); + this.lightmap[ambientVertexRemap.vert0] = blend(l, i, q, v); + this.lightmap[ambientVertexRemap.vert1] = blend(k, i, o, v); + this.lightmap[ambientVertexRemap.vert2] = blend(k, j, s, v); + this.lightmap[ambientVertexRemap.vert3] = blend(l, j, u, v); this.brightness[ambientVertexRemap.vert0] = x; this.brightness[ambientVertexRemap.vert1] = y; this.brightness[ambientVertexRemap.vert2] = z; @@ -854,31 +815,34 @@ public class ModelBlockRenderer { } } - /** - * @return the ambient occlusion light color - */ - private int blend(int lightColor0, int lightColor1, int lightColor2, int lightColor3) { - if (lightColor0 == 0) { - lightColor0 = lightColor3; + private static int blend(int color1, int color2, int color3, int currentBlockColor) { + if (color1 == 0) { + color1 = currentBlockColor; } - if (lightColor1 == 0) { - lightColor1 = lightColor3; + if (color2 == 0) { + color2 = currentBlockColor; } - if (lightColor2 == 0) { - lightColor2 = lightColor3; + if (color3 == 0) { + color3 = currentBlockColor; } - return lightColor0 + lightColor1 + lightColor2 + lightColor3 >> 2 & 16711935; + return color1 + color2 + color3 + currentBlockColor >> 2 & 16711935; } - private int blend(int brightness0, int brightness1, int brightness2, int brightness3, float weight0, float weight1, float weight2, float weight3) { + private static int blend( + int color1, int color2, int color3, int blockLight, float color1Weight, float color2Weight, float color3Weight, float blockLightWeight + ) { int i = (int)( - (brightness0 >> 16 & 0xFF) * weight0 + (brightness1 >> 16 & 0xFF) * weight1 + (brightness2 >> 16 & 0xFF) * weight2 + (brightness3 >> 16 & 0xFF) * weight3 + (color1 >> 16 & 0xFF) * color1Weight + + (color2 >> 16 & 0xFF) * color2Weight + + (color3 >> 16 & 0xFF) * color3Weight + + (blockLight >> 16 & 0xFF) * blockLightWeight ) & 0xFF; - int j = (int)((brightness0 & 0xFF) * weight0 + (brightness1 & 0xFF) * weight1 + (brightness2 & 0xFF) * weight2 + (brightness3 & 0xFF) * weight3) & 0xFF; + int j = (int)((color1 & 0xFF) * color1Weight + (color2 & 0xFF) * color2Weight + (color3 & 0xFF) * color3Weight + (blockLight & 0xFF) * blockLightWeight) + & 0xFF; return i << 16 | j; } } @@ -930,6 +894,21 @@ public class ModelBlockRenderer { long2FloatLinkedOpenHashMap.defaultReturnValue(Float.NaN); return long2FloatLinkedOpenHashMap; }); + private final LevelRenderer.BrightnessGetter cachedBrightnessGetter = (blockAndTintGetter, blockPos) -> { + long l = blockPos.asLong(); + int i = this.colorCache.get(l); + if (i != Integer.MAX_VALUE) { + return i; + } else { + int j = LevelRenderer.BrightnessGetter.DEFAULT.packedBrightness(blockAndTintGetter, blockPos); + if (this.colorCache.size() == 100) { + this.colorCache.removeFirstInt(); + } + + this.colorCache.put(l, j); + return j; + } + }; private Cache() { } @@ -945,24 +924,7 @@ public class ModelBlockRenderer { } public int getLightColor(BlockState state, BlockAndTintGetter level, BlockPos pos) { - long l = pos.asLong(); - if (this.enabled) { - int i = this.colorCache.get(l); - if (i != Integer.MAX_VALUE) { - return i; - } - } - - int i = LevelRenderer.getLightColor(level, state, pos); - if (this.enabled) { - if (this.colorCache.size() == 100) { - this.colorCache.removeFirstInt(); - } - - this.colorCache.put(l, i); - } - - return i; + return LevelRenderer.getLightColor(this.enabled ? this.cachedBrightnessGetter : LevelRenderer.BrightnessGetter.DEFAULT, level, state, pos); } public float getShadeBrightness(BlockState state, BlockAndTintGetter level, BlockPos pos) { @@ -987,25 +949,38 @@ public class ModelBlockRenderer { } } + @Environment(EnvType.CLIENT) + static class CommonRenderStorage { + public final BlockPos.MutableBlockPos scratchPos = new BlockPos.MutableBlockPos(); + public boolean faceCubic; + public boolean facePartial; + public final float[] brightness = new float[4]; + public final int[] lightmap = new int[4]; + public int tintCacheIndex = -1; + public int tintCacheValue; + public final ModelBlockRenderer.Cache cache = (ModelBlockRenderer.Cache)ModelBlockRenderer.CACHE.get(); + } + @Environment(EnvType.CLIENT) protected static enum SizeInfo { - DOWN(Direction.DOWN, false), - UP(Direction.UP, false), - NORTH(Direction.NORTH, false), - SOUTH(Direction.SOUTH, false), - WEST(Direction.WEST, false), - EAST(Direction.EAST, false), - FLIP_DOWN(Direction.DOWN, true), - FLIP_UP(Direction.UP, true), - FLIP_NORTH(Direction.NORTH, true), - FLIP_SOUTH(Direction.SOUTH, true), - FLIP_WEST(Direction.WEST, true), - FLIP_EAST(Direction.EAST, true); + DOWN(0), + UP(1), + NORTH(2), + SOUTH(3), + WEST(4), + EAST(5), + FLIP_DOWN(6), + FLIP_UP(7), + FLIP_NORTH(8), + FLIP_SOUTH(9), + FLIP_WEST(10), + FLIP_EAST(11); - final int shape; + public static final int COUNT = values().length; + final int index; - private SizeInfo(final Direction direction, final boolean flip) { - this.shape = direction.get3DDataValue() + (flip ? ModelBlockRenderer.DIRECTIONS.length : 0); + private SizeInfo(final int index) { + this.index = index; } } } diff --git a/net/minecraft/client/renderer/block/model/BakedOverrides.java b/net/minecraft/client/renderer/block/model/BakedOverrides.java deleted file mode 100644 index 0e243b55..00000000 --- a/net/minecraft/client/renderer/block/model/BakedOverrides.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.minecraft.client.renderer.block.model; - -import com.google.common.collect.Lists; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.client.renderer.item.ItemProperties; -import net.minecraft.client.renderer.item.ItemPropertyFunction; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.BlockModelRotation; -import net.minecraft.client.resources.model.ModelBaker; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class BakedOverrides { - public static final BakedOverrides EMPTY = new BakedOverrides(); - public static final float NO_OVERRIDE = Float.NEGATIVE_INFINITY; - private final BakedOverrides.BakedOverride[] overrides; - private final ResourceLocation[] properties; - - private BakedOverrides() { - this.overrides = new BakedOverrides.BakedOverride[0]; - this.properties = new ResourceLocation[0]; - } - - public BakedOverrides(ModelBaker modelBaker, List list) { - this.properties = (ResourceLocation[])list.stream() - .flatMap(itemOverridex -> itemOverridex.predicates().stream()) - .map(ItemOverride.Predicate::property) - .distinct() - .toArray(ResourceLocation[]::new); - Object2IntMap object2IntMap = new Object2IntOpenHashMap<>(); - - for (int i = 0; i < this.properties.length; i++) { - object2IntMap.put(this.properties[i], i); - } - - List list2 = Lists.newArrayList(); - - for (int j = list.size() - 1; j >= 0; j--) { - ItemOverride itemOverride = (ItemOverride)list.get(j); - BakedModel bakedModel = modelBaker.bake(itemOverride.model(), BlockModelRotation.X0_Y0); - BakedOverrides.PropertyMatcher[] propertyMatchers = (BakedOverrides.PropertyMatcher[])itemOverride.predicates().stream().map(predicate -> { - int i = object2IntMap.getInt(predicate.property()); - return new BakedOverrides.PropertyMatcher(i, predicate.value()); - }).toArray(BakedOverrides.PropertyMatcher[]::new); - list2.add(new BakedOverrides.BakedOverride(propertyMatchers, bakedModel)); - } - - this.overrides = (BakedOverrides.BakedOverride[])list2.toArray(new BakedOverrides.BakedOverride[0]); - } - - @Nullable - public BakedModel findOverride(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i) { - int j = this.properties.length; - if (j != 0) { - float[] fs = new float[j]; - - for (int k = 0; k < j; k++) { - ResourceLocation resourceLocation = this.properties[k]; - ItemPropertyFunction itemPropertyFunction = ItemProperties.getProperty(itemStack, resourceLocation); - if (itemPropertyFunction != null) { - fs[k] = itemPropertyFunction.call(itemStack, clientLevel, livingEntity, i); - } else { - fs[k] = Float.NEGATIVE_INFINITY; - } - } - - for (BakedOverrides.BakedOverride bakedOverride : this.overrides) { - if (bakedOverride.test(fs)) { - return bakedOverride.model; - } - } - } - - return null; - } - - @Environment(EnvType.CLIENT) - record BakedOverride(BakedOverrides.PropertyMatcher[] matchers, @Nullable BakedModel model) { - - boolean test(float[] fs) { - for (BakedOverrides.PropertyMatcher propertyMatcher : this.matchers) { - float f = fs[propertyMatcher.index]; - if (f < propertyMatcher.value) { - return false; - } - } - - return true; - } - } - - @Environment(EnvType.CLIENT) - record PropertyMatcher(int index, float value) { - } -} diff --git a/net/minecraft/client/renderer/block/model/BakedQuad.java b/net/minecraft/client/renderer/block/model/BakedQuad.java index 380cd182..58b0c93e 100644 --- a/net/minecraft/client/renderer/block/model/BakedQuad.java +++ b/net/minecraft/client/renderer/block/model/BakedQuad.java @@ -6,51 +6,8 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.Direction; @Environment(EnvType.CLIENT) -public class BakedQuad { - /** - * Joined 4 vertex records, each stores packed data according to the VertexFormat of the quad. Vanilla minecraft uses DefaultVertexFormats.BLOCK, Forge uses (usually) ITEM, use BakedQuad.getFormat() to get the correct format. - */ - protected final int[] vertices; - protected final int tintIndex; - protected final Direction direction; - protected final TextureAtlasSprite sprite; - private final boolean shade; - private final int lightEmission; - - public BakedQuad(int[] is, int i, Direction direction, TextureAtlasSprite textureAtlasSprite, boolean bl, int j) { - this.vertices = is; - this.tintIndex = i; - this.direction = direction; - this.sprite = textureAtlasSprite; - this.shade = bl; - this.lightEmission = j; - } - - public TextureAtlasSprite getSprite() { - return this.sprite; - } - - public int[] getVertices() { - return this.vertices; - } - +public record BakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission) { public boolean isTinted() { return this.tintIndex != -1; } - - public int getTintIndex() { - return this.tintIndex; - } - - public Direction getDirection() { - return this.direction; - } - - public boolean isShade() { - return this.shade; - } - - public int getLightEmission() { - return this.lightEmission; - } } diff --git a/net/minecraft/client/renderer/block/model/BlockElement.java b/net/minecraft/client/renderer/block/model/BlockElement.java index 2e146dcb..677e9ff4 100644 --- a/net/minecraft/client/renderer/block/model/BlockElement.java +++ b/net/minecraft/client/renderer/block/model/BlockElement.java @@ -18,58 +18,18 @@ import net.minecraft.util.GsonHelper; import net.minecraft.util.Mth; import org.jetbrains.annotations.Nullable; import org.joml.Vector3f; +import org.joml.Vector3fc; @Environment(EnvType.CLIENT) -public class BlockElement { +public record BlockElement( + Vector3fc from, Vector3fc to, Map faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission +) { private static final boolean DEFAULT_RESCALE = false; private static final float MIN_EXTENT = -16.0F; private static final float MAX_EXTENT = 32.0F; - public final Vector3f from; - public final Vector3f to; - public final Map faces; - public final BlockElementRotation rotation; - public final boolean shade; - public final int lightEmission; - public BlockElement(Vector3f vector3f, Vector3f vector3f2, Map map) { - this(vector3f, vector3f2, map, null, true, 0); - } - - public BlockElement( - Vector3f vector3f, Vector3f vector3f2, Map map, @Nullable BlockElementRotation blockElementRotation, boolean bl, int i - ) { - this.from = vector3f; - this.to = vector3f2; - this.faces = map; - this.rotation = blockElementRotation; - this.shade = bl; - this.lightEmission = i; - this.fillUvs(); - } - - private void fillUvs() { - for (Entry entry : this.faces.entrySet()) { - float[] fs = this.uvsByFace((Direction)entry.getKey()); - ((BlockElementFace)entry.getValue()).uv().setMissingUv(fs); - } - } - - private float[] uvsByFace(Direction face) { - switch (face) { - case DOWN: - return new float[]{this.from.x(), 16.0F - this.to.z(), this.to.x(), 16.0F - this.from.z()}; - case UP: - return new float[]{this.from.x(), this.from.z(), this.to.x(), this.to.z()}; - case NORTH: - default: - return new float[]{16.0F - this.to.x(), 16.0F - this.to.y(), 16.0F - this.from.x(), 16.0F - this.from.y()}; - case SOUTH: - return new float[]{this.from.x(), 16.0F - this.to.y(), this.to.x(), 16.0F - this.from.y()}; - case WEST: - return new float[]{this.from.z(), 16.0F - this.to.y(), this.to.z(), 16.0F - this.from.y()}; - case EAST: - return new float[]{16.0F - this.to.z(), 16.0F - this.to.y(), 16.0F - this.from.z(), 16.0F - this.from.y()}; - } + public BlockElement(Vector3fc from, Vector3fc to, Map faces) { + this(from, to, faces, null, true, 0); } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/renderer/block/model/BlockElementFace.java b/net/minecraft/client/renderer/block/model/BlockElementFace.java index 5fb81c53..bbef9d87 100644 --- a/net/minecraft/client/renderer/block/model/BlockElementFace.java +++ b/net/minecraft/client/renderer/block/model/BlockElementFace.java @@ -1,10 +1,12 @@ package net.minecraft.client.renderer.block.model; +import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import com.mojang.math.Quadrant; import java.lang.reflect.Type; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -13,34 +15,78 @@ import net.minecraft.util.GsonHelper; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public record BlockElementFace(@Nullable Direction cullForDirection, int tintIndex, String texture, BlockFaceUV uv) { +public record BlockElementFace(@Nullable Direction cullForDirection, int tintIndex, String texture, @Nullable BlockElementFace.UVs uvs, Quadrant rotation) { public static final int NO_TINT = -1; + public static float getU(BlockElementFace.UVs uvs, Quadrant rotation, int vertexIndex) { + return uvs.getVertexU(rotation.rotateVertexIndex(vertexIndex)) / 16.0F; + } + + public static float getV(BlockElementFace.UVs uvs, Quadrant rotation, int vertexIndex) { + return uvs.getVertexV(rotation.rotateVertexIndex(vertexIndex)) / 16.0F; + } + @Environment(EnvType.CLIENT) protected static class Deserializer implements JsonDeserializer { private static final int DEFAULT_TINT_INDEX = -1; + private static final int DEFAULT_ROTATION = 0; public BlockElementFace deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { JsonObject jsonObject = json.getAsJsonObject(); - Direction direction = this.getCullFacing(jsonObject); - int i = this.getTintIndex(jsonObject); - String string = this.getTexture(jsonObject); - BlockFaceUV blockFaceUV = context.deserialize(jsonObject, BlockFaceUV.class); - return new BlockElementFace(direction, i, string, blockFaceUV); + Direction direction = getCullFacing(jsonObject); + int i = getTintIndex(jsonObject); + String string = getTexture(jsonObject); + BlockElementFace.UVs uVs = getUVs(jsonObject); + Quadrant quadrant = getRotation(jsonObject); + return new BlockElementFace(direction, i, string, uVs, quadrant); } - protected int getTintIndex(JsonObject json) { + private static int getTintIndex(JsonObject json) { return GsonHelper.getAsInt(json, "tintindex", -1); } - private String getTexture(JsonObject json) { + private static String getTexture(JsonObject json) { return GsonHelper.getAsString(json, "texture"); } @Nullable - private Direction getCullFacing(JsonObject json) { + private static Direction getCullFacing(JsonObject json) { String string = GsonHelper.getAsString(json, "cullface", ""); return Direction.byName(string); } + + private static Quadrant getRotation(JsonObject json) { + int i = GsonHelper.getAsInt(json, "rotation", 0); + return Quadrant.parseJson(i); + } + + @Nullable + private static BlockElementFace.UVs getUVs(JsonObject json) { + if (!json.has("uv")) { + return null; + } else { + JsonArray jsonArray = GsonHelper.getAsJsonArray(json, "uv"); + if (jsonArray.size() != 4) { + throw new JsonParseException("Expected 4 uv values, found: " + jsonArray.size()); + } else { + float f = GsonHelper.convertToFloat(jsonArray.get(0), "minU"); + float g = GsonHelper.convertToFloat(jsonArray.get(1), "minV"); + float h = GsonHelper.convertToFloat(jsonArray.get(2), "maxU"); + float i = GsonHelper.convertToFloat(jsonArray.get(3), "maxV"); + return new BlockElementFace.UVs(f, g, h, i); + } + } + } + } + + @Environment(EnvType.CLIENT) + public record UVs(float minU, float minV, float maxU, float maxV) { + public float getVertexU(int vertexIndex) { + return vertexIndex != 0 && vertexIndex != 1 ? this.maxU : this.minU; + } + + public float getVertexV(int vertexIndex) { + return vertexIndex != 0 && vertexIndex != 3 ? this.maxV : this.minV; + } } } diff --git a/net/minecraft/client/renderer/block/model/BlockFaceUV.java b/net/minecraft/client/renderer/block/model/BlockFaceUV.java deleted file mode 100644 index 907cdf86..00000000 --- a/net/minecraft/client/renderer/block/model/BlockFaceUV.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.minecraft.client.renderer.block.model; - -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import java.lang.reflect.Type; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.util.GsonHelper; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class BlockFaceUV { - public float[] uvs; - public final int rotation; - - public BlockFaceUV(@Nullable float[] uvs, int rotation) { - this.uvs = uvs; - this.rotation = rotation; - } - - public float getU(int index) { - if (this.uvs == null) { - throw new NullPointerException("uvs"); - } else { - int i = this.getShiftedIndex(index); - return this.uvs[i != 0 && i != 1 ? 2 : 0]; - } - } - - public float getV(int index) { - if (this.uvs == null) { - throw new NullPointerException("uvs"); - } else { - int i = this.getShiftedIndex(index); - return this.uvs[i != 0 && i != 3 ? 3 : 1]; - } - } - - private int getShiftedIndex(int index) { - return (index + this.rotation / 90) % 4; - } - - public int getReverseIndex(int index) { - return (index + 4 - this.rotation / 90) % 4; - } - - public void setMissingUv(float[] uvs) { - if (this.uvs == null) { - this.uvs = uvs; - } - } - - @Environment(EnvType.CLIENT) - protected static class Deserializer implements JsonDeserializer { - private static final int DEFAULT_ROTATION = 0; - - public BlockFaceUV deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - JsonObject jsonObject = json.getAsJsonObject(); - float[] fs = this.getUVs(jsonObject); - int i = this.getRotation(jsonObject); - return new BlockFaceUV(fs, i); - } - - protected int getRotation(JsonObject json) { - int i = GsonHelper.getAsInt(json, "rotation", 0); - if (i >= 0 && i % 90 == 0 && i / 90 <= 3) { - return i; - } else { - throw new JsonParseException("Invalid rotation " + i + " found, only 0/90/180/270 allowed"); - } - } - - @Nullable - private float[] getUVs(JsonObject json) { - if (!json.has("uv")) { - return null; - } else { - JsonArray jsonArray = GsonHelper.getAsJsonArray(json, "uv"); - if (jsonArray.size() != 4) { - throw new JsonParseException("Expected 4 uv values, found: " + jsonArray.size()); - } else { - float[] fs = new float[4]; - - for (int i = 0; i < fs.length; i++) { - fs[i] = GsonHelper.convertToFloat(jsonArray.get(i), "uv[" + i + "]"); - } - - return fs; - } - } - } - } -} diff --git a/net/minecraft/client/renderer/block/model/BlockModel.java b/net/minecraft/client/renderer/block/model/BlockModel.java index bba1d9c7..7bf7625b 100644 --- a/net/minecraft/client/renderer/block/model/BlockModel.java +++ b/net/minecraft/client/renderer/block/model/BlockModel.java @@ -1,9 +1,6 @@ package net.minecraft.client.renderer.block.model; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Joiner; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializationContext; @@ -11,292 +8,70 @@ import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; -import com.mojang.datafixers.util.Either; -import com.mojang.logging.LogUtils; import java.io.Reader; import java.lang.reflect.Type; +import java.util.ArrayList; import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Map.Entry; -import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.BuiltInModel; -import net.minecraft.client.resources.model.Material; -import net.minecraft.client.resources.model.ModelBaker; -import net.minecraft.client.resources.model.ModelState; -import net.minecraft.client.resources.model.SimpleBakedModel; -import net.minecraft.client.resources.model.SpecialModels; +import net.minecraft.client.resources.model.UnbakedGeometry; import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; -import net.minecraft.world.item.ItemDisplayContext; import org.jetbrains.annotations.Nullable; -import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class BlockModel implements UnbakedModel { - private static final Logger LOGGER = LogUtils.getLogger(); - private static final FaceBakery FACE_BAKERY = new FaceBakery(); +public record BlockModel( + @Nullable UnbakedGeometry geometry, + @Nullable UnbakedModel.GuiLight guiLight, + @Nullable Boolean ambientOcclusion, + @Nullable ItemTransforms transforms, + TextureSlots.Data textureSlots, + @Nullable ResourceLocation parent +) implements UnbakedModel { @VisibleForTesting static final Gson GSON = new GsonBuilder() .registerTypeAdapter(BlockModel.class, new BlockModel.Deserializer()) .registerTypeAdapter(BlockElement.class, new BlockElement.Deserializer()) .registerTypeAdapter(BlockElementFace.class, new BlockElementFace.Deserializer()) - .registerTypeAdapter(BlockFaceUV.class, new BlockFaceUV.Deserializer()) .registerTypeAdapter(ItemTransform.class, new ItemTransform.Deserializer()) .registerTypeAdapter(ItemTransforms.class, new ItemTransforms.Deserializer()) - .registerTypeAdapter(ItemOverride.class, new ItemOverride.Deserializer()) .create(); - private static final char REFERENCE_CHAR = '#'; - public static final String PARTICLE_TEXTURE_REFERENCE = "particle"; - private static final boolean DEFAULT_AMBIENT_OCCLUSION = true; - public static final Material MISSING_MATERIAL = new Material(TextureAtlas.LOCATION_BLOCKS, MissingTextureAtlasSprite.getLocation()); - private final List elements; - @Nullable - private final BlockModel.GuiLight guiLight; - @Nullable - private final Boolean hasAmbientOcclusion; - private final ItemTransforms transforms; - private final List overrides; - public String name = ""; - @VisibleForTesting - protected final Map> textureMap; - @Nullable - protected BlockModel parent; - @Nullable - protected ResourceLocation parentLocation; public static BlockModel fromStream(Reader reader) { return GsonHelper.fromJson(GSON, reader, BlockModel.class); } - public BlockModel( - @Nullable ResourceLocation parentLocation, - List elements, - Map> textureMap, - @Nullable Boolean hasAmbientOcclusion, - @Nullable BlockModel.GuiLight guiLight, - ItemTransforms transforms, - List overrides - ) { - this.elements = elements; - this.hasAmbientOcclusion = hasAmbientOcclusion; - this.guiLight = guiLight; - this.textureMap = textureMap; - this.parentLocation = parentLocation; - this.transforms = transforms; - this.overrides = overrides; - } - - public List getElements() { - return this.elements.isEmpty() && this.parent != null ? this.parent.getElements() : this.elements; - } - - public boolean hasAmbientOcclusion() { - if (this.hasAmbientOcclusion != null) { - return this.hasAmbientOcclusion; - } else { - return this.parent != null ? this.parent.hasAmbientOcclusion() : true; - } - } - - public BlockModel.GuiLight getGuiLight() { - if (this.guiLight != null) { - return this.guiLight; - } else { - return this.parent != null ? this.parent.getGuiLight() : BlockModel.GuiLight.SIDE; - } - } - - public boolean isResolved() { - return this.parentLocation == null || this.parent != null && this.parent.isResolved(); - } - - public List getOverrides() { - return this.overrides; - } - - @Override - public void resolveDependencies(UnbakedModel.Resolver resolver) { - if (this.parentLocation != null) { - if (!(resolver.resolve(this.parentLocation) instanceof BlockModel blockModel)) { - throw new IllegalStateException("BlockModel parent has to be a block model."); - } - - this.parent = blockModel; - } - } - - @Override - public BakedModel bake(ModelBaker baker, Function spriteGetter, ModelState state) { - return this.bake(spriteGetter, state, true); - } - - public BakedModel bake(Function function, ModelState modelState, boolean bl) { - TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)function.apply(this.getMaterial("particle")); - if (this.getRootModel() == SpecialModels.BLOCK_ENTITY_MARKER) { - return new BuiltInModel(this.getTransforms(), textureAtlasSprite, this.getGuiLight().lightLikeBlock()); - } else { - SimpleBakedModel.Builder builder = new SimpleBakedModel.Builder(this, bl).particle(textureAtlasSprite); - - for (BlockElement blockElement : this.getElements()) { - for (Direction direction : blockElement.faces.keySet()) { - BlockElementFace blockElementFace = (BlockElementFace)blockElement.faces.get(direction); - TextureAtlasSprite textureAtlasSprite2 = (TextureAtlasSprite)function.apply(this.getMaterial(blockElementFace.texture())); - if (blockElementFace.cullForDirection() == null) { - builder.addUnculledFace(bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, modelState)); - } else { - builder.addCulledFace( - Direction.rotate(modelState.getRotation().getMatrix(), blockElementFace.cullForDirection()), - bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, modelState) - ); - } - } - } - - return builder.build(); - } - } - - private static BakedQuad bakeFace(BlockElement element, BlockElementFace face, TextureAtlasSprite sprite, Direction facing, ModelState state) { - return FACE_BAKERY.bakeQuad(element.from, element.to, face, sprite, facing, state, element.rotation, element.shade, element.lightEmission); - } - - public boolean hasTexture(String textureName) { - return !MissingTextureAtlasSprite.getLocation().equals(this.getMaterial(textureName).texture()); - } - - public Material getMaterial(String name) { - if (isTextureReference(name)) { - name = name.substring(1); - } - - List list = Lists.newArrayList(); - - while (true) { - Either either = this.findTextureEntry(name); - Optional optional = either.left(); - if (optional.isPresent()) { - return (Material)optional.get(); - } - - name = (String)either.right().get(); - if (list.contains(name)) { - LOGGER.warn("Unable to resolve texture due to reference chain {}->{} in {}", Joiner.on("->").join(list), name, this.name); - return MISSING_MATERIAL; - } - - list.add(name); - } - } - - private Either findTextureEntry(String name) { - for (BlockModel blockModel = this; blockModel != null; blockModel = blockModel.parent) { - Either either = (Either)blockModel.textureMap.get(name); - if (either != null) { - return either; - } - } - - return Either.left(MISSING_MATERIAL); - } - - static boolean isTextureReference(String str) { - return str.charAt(0) == '#'; - } - - public BlockModel getRootModel() { - return this.parent == null ? this : this.parent.getRootModel(); - } - - public ItemTransforms getTransforms() { - ItemTransform itemTransform = this.getTransform(ItemDisplayContext.THIRD_PERSON_LEFT_HAND); - ItemTransform itemTransform2 = this.getTransform(ItemDisplayContext.THIRD_PERSON_RIGHT_HAND); - ItemTransform itemTransform3 = this.getTransform(ItemDisplayContext.FIRST_PERSON_LEFT_HAND); - ItemTransform itemTransform4 = this.getTransform(ItemDisplayContext.FIRST_PERSON_RIGHT_HAND); - ItemTransform itemTransform5 = this.getTransform(ItemDisplayContext.HEAD); - ItemTransform itemTransform6 = this.getTransform(ItemDisplayContext.GUI); - ItemTransform itemTransform7 = this.getTransform(ItemDisplayContext.GROUND); - ItemTransform itemTransform8 = this.getTransform(ItemDisplayContext.FIXED); - return new ItemTransforms(itemTransform, itemTransform2, itemTransform3, itemTransform4, itemTransform5, itemTransform6, itemTransform7, itemTransform8); - } - - private ItemTransform getTransform(ItemDisplayContext displayContext) { - return this.parent != null && !this.transforms.hasTransform(displayContext) - ? this.parent.getTransform(displayContext) - : this.transforms.getTransform(displayContext); - } - - public String toString() { - return this.name; - } - @Environment(EnvType.CLIENT) public static class Deserializer implements JsonDeserializer { public BlockModel deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { JsonObject jsonObject = json.getAsJsonObject(); - List list = this.getElements(context, jsonObject); + UnbakedGeometry unbakedGeometry = this.getElements(context, jsonObject); String string = this.getParentName(jsonObject); - Map> map = this.getTextureMap(jsonObject); + TextureSlots.Data data = this.getTextureMap(jsonObject); Boolean boolean_ = this.getAmbientOcclusion(jsonObject); - ItemTransforms itemTransforms = ItemTransforms.NO_TRANSFORMS; + ItemTransforms itemTransforms = null; if (jsonObject.has("display")) { JsonObject jsonObject2 = GsonHelper.getAsJsonObject(jsonObject, "display"); itemTransforms = context.deserialize(jsonObject2, ItemTransforms.class); } - List list2 = this.getOverrides(context, jsonObject); - BlockModel.GuiLight guiLight = null; + UnbakedModel.GuiLight guiLight = null; if (jsonObject.has("gui_light")) { - guiLight = BlockModel.GuiLight.getByName(GsonHelper.getAsString(jsonObject, "gui_light")); + guiLight = UnbakedModel.GuiLight.getByName(GsonHelper.getAsString(jsonObject, "gui_light")); } ResourceLocation resourceLocation = string.isEmpty() ? null : ResourceLocation.parse(string); - return new BlockModel(resourceLocation, list, map, boolean_, guiLight, itemTransforms, list2); + return new BlockModel(unbakedGeometry, guiLight, boolean_, itemTransforms, data, resourceLocation); } - protected List getOverrides(JsonDeserializationContext context, JsonObject json) { - List list = Lists.newArrayList(); - if (json.has("overrides")) { - for (JsonElement jsonElement : GsonHelper.getAsJsonArray(json, "overrides")) { - list.add((ItemOverride)context.deserialize(jsonElement, ItemOverride.class)); - } - } - - return list; - } - - private Map> getTextureMap(JsonObject json) { - ResourceLocation resourceLocation = TextureAtlas.LOCATION_BLOCKS; - Map> map = Maps.>newHashMap(); + private TextureSlots.Data getTextureMap(JsonObject json) { if (json.has("textures")) { JsonObject jsonObject = GsonHelper.getAsJsonObject(json, "textures"); - - for (Entry entry : jsonObject.entrySet()) { - map.put((String)entry.getKey(), parseTextureLocationOrReference(resourceLocation, ((JsonElement)entry.getValue()).getAsString())); - } - } - - return map; - } - - private static Either parseTextureLocationOrReference(ResourceLocation location, String name) { - if (BlockModel.isTextureReference(name)) { - return Either.right(name.substring(1)); + return TextureSlots.parseTextureMap(jsonObject, TextureAtlas.LOCATION_BLOCKS); } else { - ResourceLocation resourceLocation = ResourceLocation.tryParse(name); - if (resourceLocation == null) { - throw new JsonParseException(name + " is not valid resource location"); - } else { - return Either.left(new Material(location, resourceLocation)); - } + return TextureSlots.Data.EMPTY; } } @@ -309,41 +84,19 @@ public class BlockModel implements UnbakedModel { return json.has("ambientocclusion") ? GsonHelper.getAsBoolean(json, "ambientocclusion") : null; } - protected List getElements(JsonDeserializationContext context, JsonObject json) { - List list = Lists.newArrayList(); - if (json.has("elements")) { + @Nullable + protected UnbakedGeometry getElements(JsonDeserializationContext context, JsonObject json) { + if (!json.has("elements")) { + return null; + } else { + List list = new ArrayList(); + for (JsonElement jsonElement : GsonHelper.getAsJsonArray(json, "elements")) { list.add((BlockElement)context.deserialize(jsonElement, BlockElement.class)); } + + return new SimpleUnbakedGeometry(list); } - - return list; - } - } - - @Environment(EnvType.CLIENT) - public static enum GuiLight { - FRONT("front"), - SIDE("side"); - - private final String name; - - private GuiLight(final String name) { - this.name = name; - } - - public static BlockModel.GuiLight getByName(String name) { - for (BlockModel.GuiLight guiLight : values()) { - if (guiLight.name.equals(name)) { - return guiLight; - } - } - - throw new IllegalArgumentException("Invalid gui light: " + name); - } - - public boolean lightLikeBlock() { - return this == SIDE; } } } diff --git a/net/minecraft/client/renderer/block/model/BlockModelDefinition.java b/net/minecraft/client/renderer/block/model/BlockModelDefinition.java index 02397d1a..569e860f 100644 --- a/net/minecraft/client/renderer/block/model/BlockModelDefinition.java +++ b/net/minecraft/client/renderer/block/model/BlockModelDefinition.java @@ -1,168 +1,104 @@ package net.minecraft.client.renderer.block.model; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableList.Builder; import com.mojang.logging.LogUtils; -import java.io.Reader; -import java.lang.reflect.Type; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.Map.Entry; +import java.util.Optional; +import java.util.function.BiConsumer; +import java.util.function.Predicate; +import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.multipart.MultiPart; +import net.minecraft.client.renderer.block.model.multipart.MultiPartModel; import net.minecraft.client.renderer.block.model.multipart.Selector; -import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.util.GsonHelper; +import net.minecraft.util.ExtraCodecs; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; -import org.jetbrains.annotations.Nullable; +import net.minecraft.world.level.block.state.StateHolder; import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class BlockModelDefinition { - private static final Logger LOGGER = LogUtils.getLogger(); - public static final Gson GSON = new GsonBuilder() - .registerTypeAdapter(BlockModelDefinition.class, new BlockModelDefinition.Deserializer()) - .registerTypeAdapter(Variant.class, new Variant.Deserializer()) - .registerTypeAdapter(MultiVariant.class, new MultiVariant.Deserializer()) - .registerTypeAdapter(MultiPart.Definition.class, new MultiPart.Deserializer()) - .registerTypeAdapter(Selector.class, new Selector.Deserializer()) - .create(); - private final Map variants; - @Nullable - private final MultiPart.Definition multiPart; +public record BlockModelDefinition( + Optional simpleModels, Optional multiPart +) { + static final Logger LOGGER = LogUtils.getLogger(); + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + BlockModelDefinition.SimpleModelSelectors.CODEC.optionalFieldOf("variants").forGetter(BlockModelDefinition::simpleModels), + BlockModelDefinition.MultiPartDefinition.CODEC.optionalFieldOf("multipart").forGetter(BlockModelDefinition::multiPart) + ) + .apply(instance, BlockModelDefinition::new) + ) + .validate( + blockModelDefinition -> blockModelDefinition.simpleModels().isEmpty() && blockModelDefinition.multiPart().isEmpty() + ? DataResult.error(() -> "Neither 'variants' nor 'multipart' found") + : DataResult.success(blockModelDefinition) + ); - public static BlockModelDefinition fromStream(Reader reader) { - return GsonHelper.fromJson(GSON, reader, BlockModelDefinition.class); - } + public Map instantiate(StateDefinition stateDefinition, Supplier name) { + Map map = new IdentityHashMap(); + this.simpleModels.ifPresent(simpleModelSelectors -> simpleModelSelectors.instantiate(stateDefinition, name, (blockState, unbakedRoot) -> { + BlockStateModel.UnbakedRoot unbakedRoot2 = (BlockStateModel.UnbakedRoot)map.put(blockState, unbakedRoot); + if (unbakedRoot2 != null) { + throw new IllegalArgumentException("Overlapping definition on state: " + blockState); + } + })); + this.multiPart.ifPresent(multiPartDefinition -> { + List list = stateDefinition.getPossibleStates(); + BlockStateModel.UnbakedRoot unbakedRoot = multiPartDefinition.instantiate(stateDefinition); - public static BlockModelDefinition fromJsonElement(JsonElement jsonElement) { - return GSON.fromJson(jsonElement, BlockModelDefinition.class); - } - - public BlockModelDefinition(Map map, @Nullable MultiPart.Definition definition) { - this.multiPart = definition; - this.variants = map; - } - - @VisibleForTesting - public MultiVariant getVariant(String key) { - MultiVariant multiVariant = (MultiVariant)this.variants.get(key); - if (multiVariant == null) { - throw new BlockModelDefinition.MissingVariantException(); - } else { - return multiVariant; - } - } - - public boolean equals(Object object) { - if (this == object) { - return true; - } else { - return !(object instanceof BlockModelDefinition blockModelDefinition) - ? false - : this.variants.equals(blockModelDefinition.variants) && Objects.equals(this.multiPart, blockModelDefinition.multiPart); - } - } - - public int hashCode() { - return 31 * this.variants.hashCode() + (this.multiPart != null ? this.multiPart.hashCode() : 0); - } - - @VisibleForTesting - public Set getMultiVariants() { - Set set = Sets.newHashSet(this.variants.values()); - if (this.multiPart != null) { - set.addAll(this.multiPart.getMultiVariants()); - } - - return set; - } - - @Nullable - public MultiPart.Definition getMultiPart() { - return this.multiPart; - } - - public Map instantiate(StateDefinition stateDefinition, String string) { - Map map = new IdentityHashMap(); - List list = stateDefinition.getPossibleStates(); - MultiPart multiPart; - if (this.multiPart != null) { - multiPart = this.multiPart.instantiate(stateDefinition); - list.forEach(blockState -> map.put(blockState, multiPart)); - } else { - multiPart = null; - } - - this.variants.forEach((string2, multiVariant) -> { - try { - list.stream().filter(VariantSelector.predicate(stateDefinition, string2)).forEach(blockState -> { - UnbakedModel unbakedModel = (UnbakedModel)map.put(blockState, multiVariant); - if (unbakedModel != null && unbakedModel != multiPart) { - String stringxx = (String)((Entry)this.variants.entrySet().stream().filter(entry -> entry.getValue() == unbakedModel).findFirst().get()).getKey(); - throw new RuntimeException("Overlapping definition with: " + stringxx); - } - }); - } catch (Exception var9) { - LOGGER.warn("Exception loading blockstate definition: '{}' for variant: '{}': {}", string, string2, var9.getMessage()); + for (BlockState blockState : list) { + map.putIfAbsent(blockState, unbakedRoot); } }); return map; } @Environment(EnvType.CLIENT) - public static class Deserializer implements JsonDeserializer { - public BlockModelDefinition deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - JsonObject jsonObject = json.getAsJsonObject(); - Map map = this.getVariants(context, jsonObject); - MultiPart.Definition definition = this.getMultiPart(context, jsonObject); - if (map.isEmpty() && definition == null) { - throw new JsonParseException("Neither 'variants' nor 'multipart' found"); - } else { - return new BlockModelDefinition(map, definition); - } - } + public record MultiPartDefinition(List selectors) { + public static final Codec CODEC = ExtraCodecs.nonEmptyList(Selector.CODEC.listOf()) + .xmap(BlockModelDefinition.MultiPartDefinition::new, BlockModelDefinition.MultiPartDefinition::selectors); - protected Map getVariants(JsonDeserializationContext context, JsonObject json) { - Map map = Maps.newHashMap(); - if (json.has("variants")) { - JsonObject jsonObject = GsonHelper.getAsJsonObject(json, "variants"); + public MultiPartModel.Unbaked instantiate(StateDefinition stateDefinition) { + Builder> builder = ImmutableList.builderWithExpectedSize(this.selectors.size()); - for (Entry entry : jsonObject.entrySet()) { - map.put((String)entry.getKey(), (MultiVariant)context.deserialize((JsonElement)entry.getValue(), MultiVariant.class)); - } + for (Selector selector : this.selectors) { + builder.add(new MultiPartModel.Selector<>(selector.instantiate(stateDefinition), selector.variant())); } - return map; - } - - @Nullable - protected MultiPart.Definition getMultiPart(JsonDeserializationContext jsonDeserializationContext, JsonObject jsonObject) { - if (!jsonObject.has("multipart")) { - return null; - } else { - JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject, "multipart"); - return jsonDeserializationContext.deserialize(jsonArray, MultiPart.Definition.class); - } + return new MultiPartModel.Unbaked(builder.build()); } } @Environment(EnvType.CLIENT) - protected static class MissingVariantException extends RuntimeException { + public record SimpleModelSelectors(Map models) { + public static final Codec CODEC = ExtraCodecs.nonEmptyMap( + Codec.unboundedMap(Codec.STRING, BlockStateModel.Unbaked.CODEC) + ) + .xmap(BlockModelDefinition.SimpleModelSelectors::new, BlockModelDefinition.SimpleModelSelectors::models); + + public void instantiate(StateDefinition stateDefinition, Supplier name, BiConsumer output) { + this.models.forEach((string, unbaked) -> { + try { + Predicate> predicate = VariantSelector.predicate(stateDefinition, string); + BlockStateModel.UnbakedRoot unbakedRoot = unbaked.asRoot(); + + for (BlockState blockState : stateDefinition.getPossibleStates()) { + if (predicate.test(blockState)) { + output.accept(blockState, unbakedRoot); + } + } + } catch (Exception var9) { + BlockModelDefinition.LOGGER.warn("Exception loading blockstate definition: '{}' for variant: '{}': {}", name.get(), string, var9.getMessage()); + } + }); + } } } diff --git a/net/minecraft/client/renderer/block/model/BlockModelPart.java b/net/minecraft/client/renderer/block/model/BlockModelPart.java new file mode 100644 index 00000000..1a50f718 --- /dev/null +++ b/net/minecraft/client/renderer/block/model/BlockModelPart.java @@ -0,0 +1,24 @@ +package net.minecraft.client.renderer.block.model; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface BlockModelPart { + List getQuads(@Nullable Direction direction); + + boolean useAmbientOcclusion(); + + TextureAtlasSprite particleIcon(); + + @Environment(EnvType.CLIENT) + public interface Unbaked extends ResolvableModel { + BlockModelPart bake(ModelBaker modelBaker); + } +} diff --git a/net/minecraft/client/renderer/block/model/BlockStateModel.java b/net/minecraft/client/renderer/block/model/BlockStateModel.java new file mode 100644 index 00000000..620e329b --- /dev/null +++ b/net/minecraft/client/renderer/block/model/BlockStateModel.java @@ -0,0 +1,106 @@ +package net.minecraft.client.renderer.block.model; + +import com.google.common.collect.Lists; +import com.mojang.datafixers.util.Either; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import java.util.ArrayList; +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockStateModel.SimpleCachedUnbakedRoot.1; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.client.resources.model.WeightedVariants; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.util.RandomSource; +import net.minecraft.util.random.Weighted; +import net.minecraft.util.random.WeightedList; +import net.minecraft.world.level.block.state.BlockState; + +@Environment(EnvType.CLIENT) +public interface BlockStateModel { + void collectParts(RandomSource random, List output); + + default List collectParts(RandomSource random) { + List list = new ObjectArrayList<>(); + this.collectParts(random, list); + return list; + } + + TextureAtlasSprite particleIcon(); + + @Environment(EnvType.CLIENT) + public static class SimpleCachedUnbakedRoot implements BlockStateModel.UnbakedRoot { + final BlockStateModel.Unbaked contents; + private final ModelBaker.SharedOperationKey bakingKey = new 1(this); + + public SimpleCachedUnbakedRoot(BlockStateModel.Unbaked contents) { + this.contents = contents; + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.contents.resolveDependencies(resolver); + } + + @Override + public BlockStateModel bake(BlockState state, ModelBaker baker) { + return baker.compute(this.bakingKey); + } + + @Override + public Object visualEqualityGroup(BlockState state) { + return this; + } + } + + @Environment(EnvType.CLIENT) + public interface Unbaked extends ResolvableModel { + Codec> ELEMENT_CODEC = RecordCodecBuilder.create( + instance -> instance.group(Variant.MAP_CODEC.forGetter(Weighted::value), ExtraCodecs.POSITIVE_INT.optionalFieldOf("weight", 1).forGetter(Weighted::weight)) + .apply(instance, Weighted::new) + ); + Codec HARDCODED_WEIGHTED_CODEC = ExtraCodecs.nonEmptyList(ELEMENT_CODEC.listOf()) + .flatComapMap( + list -> new WeightedVariants.Unbaked(WeightedList.of(Lists.transform(list, weighted -> weighted.map(SingleVariant.Unbaked::new)))), unbaked -> { + List> list = unbaked.entries().unwrap(); + List> list2 = new ArrayList(list.size()); + + for (Weighted weighted : list) { + if (!(weighted.value() instanceof SingleVariant.Unbaked unbaked2)) { + return DataResult.error(() -> "Only single variants are supported"); + } + + list2.add(new Weighted<>(unbaked2.variant(), weighted.weight())); + } + + return DataResult.success(list2); + } + ); + Codec CODEC = Codec.either(HARDCODED_WEIGHTED_CODEC, SingleVariant.Unbaked.CODEC) + .flatComapMap(either -> either.map(unbaked -> unbaked, unbaked -> unbaked), unbaked -> { + return switch (unbaked) { + case SingleVariant.Unbaked unbaked3 -> DataResult.success(Either.right(unbaked3)); + case WeightedVariants.Unbaked unbaked4 -> DataResult.success(Either.left(unbaked4)); + default -> DataResult.error(() -> "Only a single variant or a list of variants are supported"); + }; + }); + + BlockStateModel bake(ModelBaker baker); + + default BlockStateModel.UnbakedRoot asRoot() { + return new BlockStateModel.SimpleCachedUnbakedRoot(this); + } + } + + @Environment(EnvType.CLIENT) + public interface UnbakedRoot extends ResolvableModel { + BlockStateModel bake(BlockState state, ModelBaker baker); + + Object visualEqualityGroup(BlockState state); + } +} diff --git a/net/minecraft/client/renderer/block/model/FaceBakery.java b/net/minecraft/client/renderer/block/model/FaceBakery.java index e4ea0239..808def79 100644 --- a/net/minecraft/client/renderer/block/model/FaceBakery.java +++ b/net/minecraft/client/renderer/block/model/FaceBakery.java @@ -1,6 +1,10 @@ package net.minecraft.client.renderer.block.model; +import com.google.common.annotations.VisibleForTesting; +import com.mojang.math.MatrixUtil; +import com.mojang.math.Quadrant; import com.mojang.math.Transformation; +import java.util.function.Consumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.FaceInfo; @@ -8,15 +12,14 @@ import net.minecraft.client.renderer.FaceInfo.Constants; import net.minecraft.client.renderer.FaceInfo.VertexInfo; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.ModelState; -import net.minecraft.core.BlockMath; import net.minecraft.core.Direction; -import net.minecraft.core.Vec3i; import net.minecraft.util.Mth; import org.jetbrains.annotations.Nullable; -import org.joml.Matrix3f; import org.joml.Matrix4f; +import org.joml.Matrix4fc; import org.joml.Quaternionf; import org.joml.Vector3f; +import org.joml.Vector3fc; import org.joml.Vector4f; @Environment(EnvType.CLIENT) @@ -28,136 +31,138 @@ public class FaceBakery { private static final int COLOR_INDEX = 3; public static final int UV_INDEX = 4; - public BakedQuad bakeQuad( - Vector3f vector3f, - Vector3f vector3f2, - BlockElementFace blockElementFace, - TextureAtlasSprite textureAtlasSprite, - Direction direction, + @VisibleForTesting + static BlockElementFace.UVs defaultFaceUV(Vector3fc posFrom, Vector3fc posTo, Direction facing) { + return switch (facing) { + case DOWN -> new BlockElementFace.UVs(posFrom.x(), 16.0F - posTo.z(), posTo.x(), 16.0F - posFrom.z()); + case UP -> new BlockElementFace.UVs(posFrom.x(), posFrom.z(), posTo.x(), posTo.z()); + case NORTH -> new BlockElementFace.UVs(16.0F - posTo.x(), 16.0F - posTo.y(), 16.0F - posFrom.x(), 16.0F - posFrom.y()); + case SOUTH -> new BlockElementFace.UVs(posFrom.x(), 16.0F - posTo.y(), posTo.x(), 16.0F - posFrom.y()); + case WEST -> new BlockElementFace.UVs(posFrom.z(), 16.0F - posTo.y(), posTo.z(), 16.0F - posFrom.y()); + case EAST -> new BlockElementFace.UVs(16.0F - posTo.z(), 16.0F - posTo.y(), 16.0F - posFrom.z(), 16.0F - posFrom.y()); + }; + } + + public static BakedQuad bakeQuad( + Vector3fc posFrom, + Vector3fc posTo, + BlockElementFace face, + TextureAtlasSprite sprite, + Direction facing, ModelState modelState, - @Nullable BlockElementRotation blockElementRotation, - boolean bl, - int i + @Nullable BlockElementRotation rotation, + boolean shade, + int lightEmission ) { - BlockFaceUV blockFaceUV = blockElementFace.uv(); - if (modelState.isUvLocked()) { - blockFaceUV = recomputeUVs(blockElementFace.uv(), direction, modelState.getRotation()); + BlockElementFace.UVs uVs = face.uvs(); + if (uVs == null) { + uVs = defaultFaceUV(posFrom, posTo, facing); } - float[] fs = new float[blockFaceUV.uvs.length]; - System.arraycopy(blockFaceUV.uvs, 0, fs, 0, fs.length); - float f = textureAtlasSprite.uvShrinkRatio(); - float g = (blockFaceUV.uvs[0] + blockFaceUV.uvs[0] + blockFaceUV.uvs[2] + blockFaceUV.uvs[2]) / 4.0F; - float h = (blockFaceUV.uvs[1] + blockFaceUV.uvs[1] + blockFaceUV.uvs[3] + blockFaceUV.uvs[3]) / 4.0F; - blockFaceUV.uvs[0] = Mth.lerp(f, blockFaceUV.uvs[0], g); - blockFaceUV.uvs[2] = Mth.lerp(f, blockFaceUV.uvs[2], g); - blockFaceUV.uvs[1] = Mth.lerp(f, blockFaceUV.uvs[1], h); - blockFaceUV.uvs[3] = Mth.lerp(f, blockFaceUV.uvs[3], h); - int[] is = this.makeVertices(blockFaceUV, textureAtlasSprite, direction, this.setupShape(vector3f, vector3f2), modelState.getRotation(), blockElementRotation); - Direction direction2 = calculateFacing(is); - System.arraycopy(fs, 0, blockFaceUV.uvs, 0, fs.length); - if (blockElementRotation == null) { - this.recalculateWinding(is, direction2); + uVs = shrinkUVs(sprite, uVs); + Matrix4fc matrix4fc = modelState.inverseFaceTransformation(facing); + int[] is = makeVertices(uVs, face.rotation(), matrix4fc, sprite, facing, setupShape(posFrom, posTo), modelState.transformation(), rotation); + Direction direction = calculateFacing(is); + if (rotation == null) { + recalculateWinding(is, direction); } - return new BakedQuad(is, blockElementFace.tintIndex(), direction2, textureAtlasSprite, bl, i); + return new BakedQuad(is, face.tintIndex(), direction, sprite, shade, lightEmission); } - public static BlockFaceUV recomputeUVs(BlockFaceUV uv, Direction facing, Transformation rotation) { - Matrix4f matrix4f = BlockMath.getUVLockTransform(rotation, facing).getMatrix(); - float f = uv.getU(uv.getReverseIndex(0)); - float g = uv.getV(uv.getReverseIndex(0)); - Vector4f vector4f = matrix4f.transform(new Vector4f(f / 16.0F, g / 16.0F, 0.0F, 1.0F)); - float h = 16.0F * vector4f.x(); - float i = 16.0F * vector4f.y(); - float j = uv.getU(uv.getReverseIndex(2)); - float k = uv.getV(uv.getReverseIndex(2)); - Vector4f vector4f2 = matrix4f.transform(new Vector4f(j / 16.0F, k / 16.0F, 0.0F, 1.0F)); - float l = 16.0F * vector4f2.x(); - float m = 16.0F * vector4f2.y(); - float n; - float o; - if (Math.signum(j - f) == Math.signum(l - h)) { - n = h; - o = l; - } else { - n = l; - o = h; - } - - float p; - float q; - if (Math.signum(k - g) == Math.signum(m - i)) { - p = i; - q = m; - } else { - p = m; - q = i; - } - - float r = (float)Math.toRadians(uv.rotation); - Matrix3f matrix3f = new Matrix3f(matrix4f); - Vector3f vector3f = matrix3f.transform(new Vector3f(Mth.cos(r), Mth.sin(r), 0.0F)); - int s = Math.floorMod(-((int)Math.round(Math.toDegrees(Math.atan2(vector3f.y(), vector3f.x())) / 90.0)) * 90, 360); - return new BlockFaceUV(new float[]{n, p, o, q}, s); + private static BlockElementFace.UVs shrinkUVs(TextureAtlasSprite sprite, BlockElementFace.UVs uvs) { + float f = uvs.minU(); + float g = uvs.minV(); + float h = uvs.maxU(); + float i = uvs.maxV(); + float j = sprite.uvShrinkRatio(); + float k = (f + f + h + h) / 4.0F; + float l = (g + g + i + i) / 4.0F; + return new BlockElementFace.UVs(Mth.lerp(j, f, k), Mth.lerp(j, g, l), Mth.lerp(j, h, k), Mth.lerp(j, i, l)); } - private int[] makeVertices( - BlockFaceUV blockFaceUV, - TextureAtlasSprite textureAtlasSprite, - Direction direction, - float[] fs, + private static int[] makeVertices( + BlockElementFace.UVs uvs, + Quadrant rotation, + Matrix4fc inverseFaceTransform, + TextureAtlasSprite sprite, + Direction facing, + float[] shape, Transformation transformation, - @Nullable BlockElementRotation blockElementRotation + @Nullable BlockElementRotation partRotation ) { + FaceInfo faceInfo = FaceInfo.fromFacing(facing); int[] is = new int[32]; for (int i = 0; i < 4; i++) { - this.bakeVertex(is, i, direction, blockFaceUV, fs, textureAtlasSprite, transformation, blockElementRotation); + bakeVertex(is, i, faceInfo, uvs, rotation, inverseFaceTransform, shape, sprite, transformation, partRotation); } return is; } - private float[] setupShape(Vector3f min, Vector3f max) { + private static float[] setupShape(Vector3fc posFrom, Vector3fc posTo) { float[] fs = new float[Direction.values().length]; - fs[Constants.MIN_X] = min.x() / 16.0F; - fs[Constants.MIN_Y] = min.y() / 16.0F; - fs[Constants.MIN_Z] = min.z() / 16.0F; - fs[Constants.MAX_X] = max.x() / 16.0F; - fs[Constants.MAX_Y] = max.y() / 16.0F; - fs[Constants.MAX_Z] = max.z() / 16.0F; + fs[Constants.MIN_X] = posFrom.x() / 16.0F; + fs[Constants.MIN_Y] = posFrom.y() / 16.0F; + fs[Constants.MIN_Z] = posFrom.z() / 16.0F; + fs[Constants.MAX_X] = posTo.x() / 16.0F; + fs[Constants.MAX_Y] = posTo.y() / 16.0F; + fs[Constants.MAX_Z] = posTo.z() / 16.0F; return fs; } - private void bakeVertex( - int[] is, - int i, - Direction direction, - BlockFaceUV blockFaceUV, - float[] fs, - TextureAtlasSprite textureAtlasSprite, + private static void bakeVertex( + int[] vertexData, + int vertexIndex, + FaceInfo faceInfo, + BlockElementFace.UVs uvs, + Quadrant rotation, + Matrix4fc inverseFaceTransform, + float[] shape, + TextureAtlasSprite sprite, Transformation transformation, - @Nullable BlockElementRotation blockElementRotation + @Nullable BlockElementRotation partRotation ) { - VertexInfo vertexInfo = FaceInfo.fromFacing(direction).getVertexInfo(i); - Vector3f vector3f = new Vector3f(fs[vertexInfo.xFace], fs[vertexInfo.yFace], fs[vertexInfo.zFace]); - this.applyElementRotation(vector3f, blockElementRotation); - this.applyModelRotation(vector3f, transformation); - this.fillVertex(is, i, vector3f, textureAtlasSprite, blockFaceUV); + VertexInfo vertexInfo = faceInfo.getVertexInfo(vertexIndex); + Vector3f vector3f = new Vector3f(shape[vertexInfo.xFace], shape[vertexInfo.yFace], shape[vertexInfo.zFace]); + applyElementRotation(vector3f, partRotation); + applyModelRotation(vector3f, transformation); + float f = BlockElementFace.getU(uvs, rotation, vertexIndex); + float g = BlockElementFace.getV(uvs, rotation, vertexIndex); + float i; + float h; + if (MatrixUtil.isIdentity(inverseFaceTransform)) { + h = f; + i = g; + } else { + Vector3f vector3f2 = inverseFaceTransform.transformPosition(new Vector3f(cornerToCenter(f), cornerToCenter(g), 0.0F)); + h = centerToCorner(vector3f2.x); + i = centerToCorner(vector3f2.y); + } + + fillVertex(vertexData, vertexIndex, vector3f, sprite, h, i); } - private void fillVertex(int[] vertexData, int vertexIndex, Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) { + private static float cornerToCenter(float coord) { + return coord - 0.5F; + } + + private static float centerToCorner(float coord) { + return coord + 0.5F; + } + + private static void fillVertex(int[] vertexData, int vertexIndex, Vector3f pos, TextureAtlasSprite sprite, float u, float v) { int i = vertexIndex * 8; - vertexData[i] = Float.floatToRawIntBits(vector.x()); - vertexData[i + 1] = Float.floatToRawIntBits(vector.y()); - vertexData[i + 2] = Float.floatToRawIntBits(vector.z()); + vertexData[i] = Float.floatToRawIntBits(pos.x()); + vertexData[i + 1] = Float.floatToRawIntBits(pos.y()); + vertexData[i + 2] = Float.floatToRawIntBits(pos.z()); vertexData[i + 3] = -1; - vertexData[i + 4] = Float.floatToRawIntBits(sprite.getU(blockFaceUV.getU(vertexIndex) / 16.0F)); - vertexData[i + 4 + 1] = Float.floatToRawIntBits(sprite.getV(blockFaceUV.getV(vertexIndex) / 16.0F)); + vertexData[i + 4] = Float.floatToRawIntBits(sprite.getU(u)); + vertexData[i + 4 + 1] = Float.floatToRawIntBits(sprite.getV(v)); } - private void applyElementRotation(Vector3f vec, @Nullable BlockElementRotation partRotation) { + private static void applyElementRotation(Vector3f vec, @Nullable BlockElementRotation partRotation) { if (partRotation != null) { Vector3f vector3f; Vector3f vector3f2; @@ -191,26 +196,26 @@ public class FaceBakery { vector3f2.set(1.0F, 1.0F, 1.0F); } - this.rotateVertexBy(vec, new Vector3f(partRotation.origin()), new Matrix4f().rotation(quaternionf), vector3f2); + rotateVertexBy(vec, new Vector3f(partRotation.origin()), new Matrix4f().rotation(quaternionf), vector3f2); } } - public void applyModelRotation(Vector3f pos, Transformation transform) { + private static void applyModelRotation(Vector3f pos, Transformation transform) { if (transform != Transformation.identity()) { - this.rotateVertexBy(pos, new Vector3f(0.5F, 0.5F, 0.5F), transform.getMatrix(), new Vector3f(1.0F, 1.0F, 1.0F)); + rotateVertexBy(pos, new Vector3f(0.5F, 0.5F, 0.5F), transform.getMatrix(), new Vector3f(1.0F, 1.0F, 1.0F)); } } - private void rotateVertexBy(Vector3f pos, Vector3f origin, Matrix4f transform, Vector3f scale) { + private static void rotateVertexBy(Vector3f pos, Vector3fc origin, Matrix4fc transform, Vector3fc scale) { Vector4f vector4f = transform.transform(new Vector4f(pos.x() - origin.x(), pos.y() - origin.y(), pos.z() - origin.z(), 1.0F)); vector4f.mul(new Vector4f(scale, 1.0F)); pos.set(vector4f.x() + origin.x(), vector4f.y() + origin.y(), vector4f.z() + origin.z()); } - public static Direction calculateFacing(int[] faceData) { - Vector3f vector3f = new Vector3f(Float.intBitsToFloat(faceData[0]), Float.intBitsToFloat(faceData[1]), Float.intBitsToFloat(faceData[2])); - Vector3f vector3f2 = new Vector3f(Float.intBitsToFloat(faceData[8]), Float.intBitsToFloat(faceData[9]), Float.intBitsToFloat(faceData[10])); - Vector3f vector3f3 = new Vector3f(Float.intBitsToFloat(faceData[16]), Float.intBitsToFloat(faceData[17]), Float.intBitsToFloat(faceData[18])); + private static Direction calculateFacing(int[] faceData) { + Vector3f vector3f = vectorFromData(faceData, 0); + Vector3f vector3f2 = vectorFromData(faceData, 8); + Vector3f vector3f3 = vectorFromData(faceData, 16); Vector3f vector3f4 = new Vector3f(vector3f).sub(vector3f2); Vector3f vector3f5 = new Vector3f(vector3f3).sub(vector3f2); Vector3f vector3f6 = new Vector3f(vector3f5).cross(vector3f4).normalize(); @@ -221,9 +226,7 @@ public class FaceBakery { float f = 0.0F; for (Direction direction2 : Direction.values()) { - Vec3i vec3i = direction2.getUnitVec3i(); - Vector3f vector3f7 = new Vector3f(vec3i.getX(), vec3i.getY(), vec3i.getZ()); - float g = vector3f6.dot(vector3f7); + float g = vector3f6.dot(direction2.getUnitVec3f()); if (g >= 0.0F && g > f) { f = g; direction = direction2; @@ -234,7 +237,23 @@ public class FaceBakery { } } - private void recalculateWinding(int[] vertices, Direction direction) { + private static float xFromData(int[] faceData, int index) { + return Float.intBitsToFloat(faceData[index]); + } + + private static float yFromData(int[] faceData, int index) { + return Float.intBitsToFloat(faceData[index + 1]); + } + + private static float zFromData(int[] faceData, int index) { + return Float.intBitsToFloat(faceData[index + 2]); + } + + private static Vector3f vectorFromData(int[] faceData, int index) { + return new Vector3f(xFromData(faceData, index), yFromData(faceData, index), zFromData(faceData, index)); + } + + private static void recalculateWinding(int[] vertices, Direction direction) { int[] is = new int[vertices.length]; System.arraycopy(vertices, 0, is, 0, vertices.length); float[] fs = new float[Direction.values().length]; @@ -247,9 +266,9 @@ public class FaceBakery { for (int i = 0; i < 4; i++) { int j = 8 * i; - float f = Float.intBitsToFloat(is[j]); - float g = Float.intBitsToFloat(is[j + 1]); - float h = Float.intBitsToFloat(is[j + 2]); + float f = xFromData(is, j); + float g = yFromData(is, j); + float h = zFromData(is, j); if (f < fs[Constants.MIN_X]) { fs[Constants.MIN_X] = f; } @@ -289,9 +308,9 @@ public class FaceBakery { for (int n = 0; n < 4; n++) { int o = 8 * n; - float p = Float.intBitsToFloat(is[o]); - float q = Float.intBitsToFloat(is[o + 1]); - float r = Float.intBitsToFloat(is[o + 2]); + float p = xFromData(is, o); + float q = yFromData(is, o); + float r = zFromData(is, o); if (Mth.equal(hx, p) && Mth.equal(l, q) && Mth.equal(m, r)) { vertices[k + 4] = is[o + 4]; vertices[k + 4 + 1] = is[o + 4 + 1]; @@ -299,4 +318,10 @@ public class FaceBakery { } } } + + public static void extractPositions(int[] faceData, Consumer output) { + for (int i = 0; i < 4; i++) { + output.accept(vectorFromData(faceData, 8 * i)); + } + } } diff --git a/net/minecraft/client/renderer/block/model/ItemModelGenerator.java b/net/minecraft/client/renderer/block/model/ItemModelGenerator.java index 05fb5ec1..e68965c8 100644 --- a/net/minecraft/client/renderer/block/model/ItemModelGenerator.java +++ b/net/minecraft/client/renderer/block/model/ItemModelGenerator.java @@ -1,63 +1,92 @@ package net.minecraft.client.renderer.block.model; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.mojang.datafixers.util.Either; +import com.mojang.math.Quadrant; +import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.TextureSlots.Data.Builder; import net.minecraft.client.renderer.texture.SpriteContents; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ModelDebugName; +import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.QuadCollection; +import net.minecraft.client.resources.model.SpriteGetter; +import net.minecraft.client.resources.model.UnbakedGeometry; +import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; import org.joml.Vector3f; @Environment(EnvType.CLIENT) -public class ItemModelGenerator { - public static final List LAYERS = Lists.newArrayList("layer0", "layer1", "layer2", "layer3", "layer4"); +public class ItemModelGenerator implements UnbakedModel { + public static final ResourceLocation GENERATED_ITEM_MODEL_ID = ResourceLocation.withDefaultNamespace("builtin/generated"); + public static final List LAYERS = List.of("layer0", "layer1", "layer2", "layer3", "layer4"); private static final float MIN_Z = 7.5F; private static final float MAX_Z = 8.5F; + private static final TextureSlots.Data TEXTURE_SLOTS = new Builder().addReference("particle", "layer0").build(); + private static final BlockElementFace.UVs SOUTH_FACE_UVS = new BlockElementFace.UVs(0.0F, 0.0F, 16.0F, 16.0F); + private static final BlockElementFace.UVs NORTH_FACE_UVS = new BlockElementFace.UVs(16.0F, 0.0F, 0.0F, 16.0F); - public BlockModel generateBlockModel(Function spriteGetter, BlockModel model) { - Map> map = Maps.>newHashMap(); - List list = Lists.newArrayList(); + @Override + public TextureSlots.Data textureSlots() { + return TEXTURE_SLOTS; + } + + @Override + public UnbakedGeometry geometry() { + return ItemModelGenerator::bake; + } + + @Nullable + @Override + public UnbakedModel.GuiLight guiLight() { + return UnbakedModel.GuiLight.FRONT; + } + + private static QuadCollection bake(TextureSlots textureSlots, ModelBaker baker, ModelState modelState, ModelDebugName debugName) { + return bake(textureSlots, baker.sprites(), modelState, debugName); + } + + private static QuadCollection bake(TextureSlots textureSlots, SpriteGetter sprites, ModelState modelState, ModelDebugName debugName) { + List list = new ArrayList(); for (int i = 0; i < LAYERS.size(); i++) { String string = (String)LAYERS.get(i); - if (!model.hasTexture(string)) { + Material material = textureSlots.getMaterial(string); + if (material == null) { break; } - Material material = model.getMaterial(string); - map.put(string, Either.left(material)); - SpriteContents spriteContents = ((TextureAtlasSprite)spriteGetter.apply(material)).contents(); - list.addAll(this.processFrames(i, string, spriteContents)); + SpriteContents spriteContents = sprites.get(material, debugName).contents(); + list.addAll(processFrames(i, string, spriteContents)); } - map.put("particle", model.hasTexture("particle") ? Either.left(model.getMaterial("particle")) : (Either)map.get("layer0")); - BlockModel blockModel = new BlockModel(null, list, map, false, model.getGuiLight(), model.getTransforms(), model.getOverrides()); - blockModel.name = model.name; - return blockModel; + return SimpleUnbakedGeometry.bake(list, textureSlots, sprites, modelState, debugName); } - private List processFrames(int tintIndex, String texture, SpriteContents sprite) { - Map map = Maps.newHashMap(); - map.put(Direction.SOUTH, new BlockElementFace(null, tintIndex, texture, new BlockFaceUV(new float[]{0.0F, 0.0F, 16.0F, 16.0F}, 0))); - map.put(Direction.NORTH, new BlockElementFace(null, tintIndex, texture, new BlockFaceUV(new float[]{16.0F, 0.0F, 0.0F, 16.0F}, 0))); - List list = Lists.newArrayList(); + private static List processFrames(int tintIndex, String texture, SpriteContents sprite) { + Map map = Map.of( + Direction.SOUTH, + new BlockElementFace(null, tintIndex, texture, SOUTH_FACE_UVS, Quadrant.R0), + Direction.NORTH, + new BlockElementFace(null, tintIndex, texture, NORTH_FACE_UVS, Quadrant.R0) + ); + List list = new ArrayList(); list.add(new BlockElement(new Vector3f(0.0F, 0.0F, 7.5F), new Vector3f(16.0F, 16.0F, 8.5F), map)); - list.addAll(this.createSideElements(sprite, texture, tintIndex)); + list.addAll(createSideElements(sprite, texture, tintIndex)); return list; } - private List createSideElements(SpriteContents sprite, String texture, int tintIndex) { + private static List createSideElements(SpriteContents sprite, String texture, int tintIndex) { float f = sprite.width(); float g = sprite.height(); - List list = Lists.newArrayList(); + List list = new ArrayList(); - for (ItemModelGenerator.Span span : this.getSpans(sprite)) { + for (ItemModelGenerator.Span span : getSpans(sprite)) { float h = 0.0F; float i = 0.0F; float j = 0.0F; @@ -120,8 +149,9 @@ public class ItemModelGenerator { m *= p; n *= q; o *= q; - Map map = Maps.newHashMap(); - map.put(spanFacing.getDirection(), new BlockElementFace(null, tintIndex, texture, new BlockFaceUV(new float[]{l, n, m, o}, 0))); + Map map = Map.of( + spanFacing.getDirection(), new BlockElementFace(null, tintIndex, texture, new BlockElementFace.UVs(l, n, m, o), Quadrant.R0) + ); switch (spanFacing) { case UP: list.add(new BlockElement(new Vector3f(h, i, 7.5F), new Vector3f(j, i, 8.5F), map)); @@ -140,25 +170,25 @@ public class ItemModelGenerator { return list; } - private List getSpans(SpriteContents sprite) { + private static List getSpans(SpriteContents sprite) { int i = sprite.width(); int j = sprite.height(); - List list = Lists.newArrayList(); + List list = new ArrayList(); sprite.getUniqueFrames().forEach(k -> { for (int l = 0; l < j; l++) { for (int m = 0; m < i; m++) { - boolean bl = !this.isTransparent(sprite, k, m, l, i, j); - this.checkTransition(ItemModelGenerator.SpanFacing.UP, list, sprite, k, m, l, i, j, bl); - this.checkTransition(ItemModelGenerator.SpanFacing.DOWN, list, sprite, k, m, l, i, j, bl); - this.checkTransition(ItemModelGenerator.SpanFacing.LEFT, list, sprite, k, m, l, i, j, bl); - this.checkTransition(ItemModelGenerator.SpanFacing.RIGHT, list, sprite, k, m, l, i, j, bl); + boolean bl = !isTransparent(sprite, k, m, l, i, j); + checkTransition(ItemModelGenerator.SpanFacing.UP, list, sprite, k, m, l, i, j, bl); + checkTransition(ItemModelGenerator.SpanFacing.DOWN, list, sprite, k, m, l, i, j, bl); + checkTransition(ItemModelGenerator.SpanFacing.LEFT, list, sprite, k, m, l, i, j, bl); + checkTransition(ItemModelGenerator.SpanFacing.RIGHT, list, sprite, k, m, l, i, j, bl); } } }); return list; } - private void checkTransition( + private static void checkTransition( ItemModelGenerator.SpanFacing spanFacing, List listSpans, SpriteContents contents, @@ -169,14 +199,14 @@ public class ItemModelGenerator { int spriteHeight, boolean transparent ) { - boolean bl = this.isTransparent(contents, frameIndex, pixelX + spanFacing.getXOffset(), pixelY + spanFacing.getYOffset(), spriteWidth, spriteHeight) + boolean bl = isTransparent(contents, frameIndex, pixelX + spanFacing.getXOffset(), pixelY + spanFacing.getYOffset(), spriteWidth, spriteHeight) && transparent; if (bl) { - this.createOrExpandSpan(listSpans, spanFacing, pixelX, pixelY); + createOrExpandSpan(listSpans, spanFacing, pixelX, pixelY); } } - private void createOrExpandSpan(List listSpans, ItemModelGenerator.SpanFacing spanFacing, int pixelX, int pixelY) { + private static void createOrExpandSpan(List listSpans, ItemModelGenerator.SpanFacing spanFacing, int pixelX, int pixelY) { ItemModelGenerator.Span span = null; for (ItemModelGenerator.Span span2 : listSpans) { @@ -198,7 +228,7 @@ public class ItemModelGenerator { } } - private boolean isTransparent(SpriteContents sprite, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight) { + private static boolean isTransparent(SpriteContents sprite, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight) { return pixelX >= 0 && pixelY >= 0 && pixelX < spriteWidth && pixelY < spriteHeight ? sprite.isTransparent(frameIndex, pixelX, pixelY) : true; } diff --git a/net/minecraft/client/renderer/block/model/ItemOverride.java b/net/minecraft/client/renderer/block/model/ItemOverride.java deleted file mode 100644 index cd13c2f4..00000000 --- a/net/minecraft/client/renderer/block/model/ItemOverride.java +++ /dev/null @@ -1,54 +0,0 @@ -package net.minecraft.client.renderer.block.model; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Maps; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import java.lang.reflect.Type; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.GsonHelper; - -@Environment(EnvType.CLIENT) -public record ItemOverride(ResourceLocation model, List predicates) { - public ItemOverride(ResourceLocation model, List predicates) { - predicates = List.copyOf(predicates); - this.model = model; - this.predicates = predicates; - } - - @Environment(EnvType.CLIENT) - protected static class Deserializer implements JsonDeserializer { - public ItemOverride deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - JsonObject jsonObject = json.getAsJsonObject(); - ResourceLocation resourceLocation = ResourceLocation.parse(GsonHelper.getAsString(jsonObject, "model")); - List list = this.getPredicates(jsonObject); - return new ItemOverride(resourceLocation, list); - } - - protected List getPredicates(JsonObject json) { - Map map = Maps.newLinkedHashMap(); - JsonObject jsonObject = GsonHelper.getAsJsonObject(json, "predicate"); - - for (Entry entry : jsonObject.entrySet()) { - map.put(ResourceLocation.parse((String)entry.getKey()), GsonHelper.convertToFloat((JsonElement)entry.getValue(), (String)entry.getKey())); - } - - return (List)map.entrySet() - .stream() - .map(entryx -> new ItemOverride.Predicate((ResourceLocation)entryx.getKey(), (Float)entryx.getValue())) - .collect(ImmutableList.toImmutableList()); - } - } - - @Environment(EnvType.CLIENT) - public record Predicate(ResourceLocation property, float value) { - } -} diff --git a/net/minecraft/client/renderer/block/model/ItemTransform.java b/net/minecraft/client/renderer/block/model/ItemTransform.java index 00206c72..b05025b0 100644 --- a/net/minecraft/client/renderer/block/model/ItemTransform.java +++ b/net/minecraft/client/renderer/block/model/ItemTransform.java @@ -14,54 +14,36 @@ import net.minecraft.util.GsonHelper; import net.minecraft.util.Mth; import org.joml.Quaternionf; import org.joml.Vector3f; +import org.joml.Vector3fc; @Environment(EnvType.CLIENT) -public class ItemTransform { +public record ItemTransform(Vector3fc rotation, Vector3fc translation, Vector3fc scale) { public static final ItemTransform NO_TRANSFORM = new ItemTransform(new Vector3f(), new Vector3f(), new Vector3f(1.0F, 1.0F, 1.0F)); - public final Vector3f rotation; - public final Vector3f translation; - public final Vector3f scale; - public ItemTransform(Vector3f rotation, Vector3f translation, Vector3f scale) { - this.rotation = new Vector3f(rotation); - this.translation = new Vector3f(translation); - this.scale = new Vector3f(scale); - } - - public void apply(boolean leftHand, PoseStack poseStack) { - if (this != NO_TRANSFORM) { - float f = this.rotation.x(); - float g = this.rotation.y(); - float h = this.rotation.z(); + public void apply(boolean leftHand, PoseStack.Pose pose) { + if (this == NO_TRANSFORM) { + pose.translate(-0.5F, -0.5F, -0.5F); + } else { + float f; + float g; + float h; if (leftHand) { - g = -g; - h = -h; + f = -this.translation.x(); + g = -this.rotation.y(); + h = -this.rotation.z(); + } else { + f = this.translation.x(); + g = this.rotation.y(); + h = this.rotation.z(); } - int i = leftHand ? -1 : 1; - poseStack.translate(i * this.translation.x(), this.translation.y(), this.translation.z()); - poseStack.mulPose(new Quaternionf().rotationXYZ(f * (float) (Math.PI / 180.0), g * (float) (Math.PI / 180.0), h * (float) (Math.PI / 180.0))); - poseStack.scale(this.scale.x(), this.scale.y(), this.scale.z()); + pose.translate(f, this.translation.y(), this.translation.z()); + pose.rotate(new Quaternionf().rotationXYZ(this.rotation.x() * (float) (Math.PI / 180.0), g * (float) (Math.PI / 180.0), h * (float) (Math.PI / 180.0))); + pose.scale(this.scale.x(), this.scale.y(), this.scale.z()); + pose.translate(-0.5F, -0.5F, -0.5F); } } - public boolean equals(Object object) { - if (this == object) { - return true; - } else if (this.getClass() != object.getClass()) { - return false; - } else { - ItemTransform itemTransform = (ItemTransform)object; - return this.rotation.equals(itemTransform.rotation) && this.scale.equals(itemTransform.scale) && this.translation.equals(itemTransform.translation); - } - } - - public int hashCode() { - int i = this.rotation.hashCode(); - i = 31 * i + this.translation.hashCode(); - return 31 * i + this.scale.hashCode(); - } - @Environment(EnvType.CLIENT) protected static class Deserializer implements JsonDeserializer { private static final Vector3f DEFAULT_ROTATION = new Vector3f(0.0F, 0.0F, 0.0F); diff --git a/net/minecraft/client/renderer/block/model/ItemTransforms.java b/net/minecraft/client/renderer/block/model/ItemTransforms.java index 246d50e1..cde13e19 100644 --- a/net/minecraft/client/renderer/block/model/ItemTransforms.java +++ b/net/minecraft/client/renderer/block/model/ItemTransforms.java @@ -11,60 +11,26 @@ import net.fabricmc.api.Environment; import net.minecraft.world.item.ItemDisplayContext; @Environment(EnvType.CLIENT) -public class ItemTransforms { - public static final ItemTransforms NO_TRANSFORMS = new ItemTransforms(); - public final ItemTransform thirdPersonLeftHand; - public final ItemTransform thirdPersonRightHand; - public final ItemTransform firstPersonLeftHand; - public final ItemTransform firstPersonRightHand; - public final ItemTransform head; - public final ItemTransform gui; - public final ItemTransform ground; - public final ItemTransform fixed; - - private ItemTransforms() { - this( - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM, - ItemTransform.NO_TRANSFORM - ); - } - - public ItemTransforms(ItemTransforms transforms) { - this.thirdPersonLeftHand = transforms.thirdPersonLeftHand; - this.thirdPersonRightHand = transforms.thirdPersonRightHand; - this.firstPersonLeftHand = transforms.firstPersonLeftHand; - this.firstPersonRightHand = transforms.firstPersonRightHand; - this.head = transforms.head; - this.gui = transforms.gui; - this.ground = transforms.ground; - this.fixed = transforms.fixed; - } - - public ItemTransforms( - ItemTransform thirdPersonLeftHand, - ItemTransform thirdPersonRightHand, - ItemTransform firstPersonLeftHand, - ItemTransform firstPersonRightHand, - ItemTransform head, - ItemTransform gui, - ItemTransform ground, - ItemTransform fixed - ) { - this.thirdPersonLeftHand = thirdPersonLeftHand; - this.thirdPersonRightHand = thirdPersonRightHand; - this.firstPersonLeftHand = firstPersonLeftHand; - this.firstPersonRightHand = firstPersonRightHand; - this.head = head; - this.gui = gui; - this.ground = ground; - this.fixed = fixed; - } +public record ItemTransforms( + ItemTransform thirdPersonLeftHand, + ItemTransform thirdPersonRightHand, + ItemTransform firstPersonLeftHand, + ItemTransform firstPersonRightHand, + ItemTransform head, + ItemTransform gui, + ItemTransform ground, + ItemTransform fixed +) { + public static final ItemTransforms NO_TRANSFORMS = new ItemTransforms( + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM, + ItemTransform.NO_TRANSFORM + ); public ItemTransform getTransform(ItemDisplayContext displayContext) { return switch (displayContext) { @@ -80,10 +46,6 @@ public class ItemTransforms { }; } - public boolean hasTransform(ItemDisplayContext displayContext) { - return this.getTransform(displayContext) != ItemTransform.NO_TRANSFORM; - } - @Environment(EnvType.CLIENT) protected static class Deserializer implements JsonDeserializer { public ItemTransforms deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { diff --git a/net/minecraft/client/renderer/block/model/MultiVariant.java b/net/minecraft/client/renderer/block/model/MultiVariant.java deleted file mode 100644 index 58c5346a..00000000 --- a/net/minecraft/client/renderer/block/model/MultiVariant.java +++ /dev/null @@ -1,82 +0,0 @@ -package net.minecraft.client.renderer.block.model; - -import com.google.common.collect.Lists; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import java.lang.reflect.Type; -import java.util.List; -import java.util.function.Function; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.Material; -import net.minecraft.client.resources.model.ModelBaker; -import net.minecraft.client.resources.model.ModelState; -import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.client.resources.model.WeightedBakedModel; -import net.minecraft.util.random.SimpleWeightedRandomList; -import net.minecraft.util.random.SimpleWeightedRandomList.Builder; -import net.minecraft.world.level.block.state.BlockState; - -@Environment(EnvType.CLIENT) -public record MultiVariant(List variants) implements UnbakedBlockStateModel { - public MultiVariant(List variants) { - if (variants.isEmpty()) { - throw new IllegalArgumentException("Variant list must contain at least one element"); - } else { - this.variants = variants; - } - } - - @Override - public Object visualEqualityGroup(BlockState blockState) { - return this; - } - - @Override - public void resolveDependencies(UnbakedModel.Resolver resolver) { - this.variants.forEach(variant -> resolver.resolve(variant.getModelLocation())); - } - - @Override - public BakedModel bake(ModelBaker baker, Function spriteGetter, ModelState state) { - if (this.variants.size() == 1) { - Variant variant = (Variant)this.variants.getFirst(); - return baker.bake(variant.getModelLocation(), variant); - } else { - Builder builder = SimpleWeightedRandomList.builder(); - - for (Variant variant2 : this.variants) { - BakedModel bakedModel = baker.bake(variant2.getModelLocation(), variant2); - builder.add(bakedModel, variant2.getWeight()); - } - - return new WeightedBakedModel(builder.build()); - } - } - - @Environment(EnvType.CLIENT) - public static class Deserializer implements JsonDeserializer { - public MultiVariant deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - List list = Lists.newArrayList(); - if (json.isJsonArray()) { - JsonArray jsonArray = json.getAsJsonArray(); - if (jsonArray.isEmpty()) { - throw new JsonParseException("Empty variant array"); - } - - for (JsonElement jsonElement : jsonArray) { - list.add((Variant)context.deserialize(jsonElement, Variant.class)); - } - } else { - list.add((Variant)context.deserialize(json, Variant.class)); - } - - return new MultiVariant(list); - } - } -} diff --git a/net/minecraft/client/renderer/block/model/SimpleModelWrapper.java b/net/minecraft/client/renderer/block/model/SimpleModelWrapper.java new file mode 100644 index 00000000..707cd7c7 --- /dev/null +++ b/net/minecraft/client/renderer/block/model/SimpleModelWrapper.java @@ -0,0 +1,30 @@ +package net.minecraft.client.renderer.block.model; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.QuadCollection; +import net.minecraft.client.resources.model.ResolvedModel; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) implements BlockModelPart { + public static SimpleModelWrapper bake(ModelBaker baker, ResourceLocation modelLocation, ModelState modelState) { + ResolvedModel resolvedModel = baker.getModel(modelLocation); + TextureSlots textureSlots = resolvedModel.getTopTextureSlots(); + boolean bl = resolvedModel.getTopAmbientOcclusion(); + TextureAtlasSprite textureAtlasSprite = resolvedModel.resolveParticleSprite(textureSlots, baker); + QuadCollection quadCollection = resolvedModel.bakeTopGeometry(textureSlots, baker, modelState); + return new SimpleModelWrapper(quadCollection, bl, textureAtlasSprite); + } + + @Override + public List getQuads(@Nullable Direction direction) { + return this.quads.getQuads(direction); + } +} diff --git a/net/minecraft/client/renderer/block/model/SimpleUnbakedGeometry.java b/net/minecraft/client/renderer/block/model/SimpleUnbakedGeometry.java new file mode 100644 index 00000000..56fdd7eb --- /dev/null +++ b/net/minecraft/client/renderer/block/model/SimpleUnbakedGeometry.java @@ -0,0 +1,50 @@ +package net.minecraft.client.renderer.block.model; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ModelDebugName; +import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.QuadCollection; +import net.minecraft.client.resources.model.SpriteGetter; +import net.minecraft.client.resources.model.UnbakedGeometry; +import net.minecraft.core.Direction; + +@Environment(EnvType.CLIENT) +public record SimpleUnbakedGeometry(List elements) implements UnbakedGeometry { + @Override + public QuadCollection bake(TextureSlots textureSlots, ModelBaker modelBaker, ModelState modelState, ModelDebugName modelDebugName) { + return bake(this.elements, textureSlots, modelBaker.sprites(), modelState, modelDebugName); + } + + public static QuadCollection bake( + List elements, TextureSlots textureSlots, SpriteGetter sprites, ModelState modelState, ModelDebugName debugName + ) { + QuadCollection.Builder builder = new QuadCollection.Builder(); + + for (BlockElement blockElement : elements) { + blockElement.faces() + .forEach( + (direction, blockElementFace) -> { + TextureAtlasSprite textureAtlasSprite = sprites.resolveSlot(textureSlots, blockElementFace.texture(), debugName); + if (blockElementFace.cullForDirection() == null) { + builder.addUnculledFace(bakeFace(blockElement, blockElementFace, textureAtlasSprite, direction, modelState)); + } else { + builder.addCulledFace( + Direction.rotate(modelState.transformation().getMatrix(), blockElementFace.cullForDirection()), + bakeFace(blockElement, blockElementFace, textureAtlasSprite, direction, modelState) + ); + } + } + ); + } + + return builder.build(); + } + + private static BakedQuad bakeFace(BlockElement element, BlockElementFace face, TextureAtlasSprite sprite, Direction direction, ModelState modelState) { + return FaceBakery.bakeQuad(element.from(), element.to(), face, sprite, direction, modelState, element.rotation(), element.shade(), element.lightEmission()); + } +} diff --git a/net/minecraft/client/renderer/block/model/SingleVariant.java b/net/minecraft/client/renderer/block/model/SingleVariant.java new file mode 100644 index 00000000..53994a22 --- /dev/null +++ b/net/minecraft/client/renderer/block/model/SingleVariant.java @@ -0,0 +1,44 @@ +package net.minecraft.client.renderer.block.model; + +import com.mojang.serialization.Codec; +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.util.RandomSource; + +@Environment(EnvType.CLIENT) +public class SingleVariant implements BlockStateModel { + private final BlockModelPart model; + + public SingleVariant(BlockModelPart model) { + this.model = model; + } + + @Override + public void collectParts(RandomSource random, List output) { + output.add(this.model); + } + + @Override + public TextureAtlasSprite particleIcon() { + return this.model.particleIcon(); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(Variant variant) implements BlockStateModel.Unbaked { + public static final Codec CODEC = Variant.CODEC.xmap(SingleVariant.Unbaked::new, SingleVariant.Unbaked::variant); + + @Override + public BlockStateModel bake(ModelBaker baker) { + return new SingleVariant(this.variant.bake(baker)); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.variant.resolveDependencies(resolver); + } + } +} diff --git a/net/minecraft/client/renderer/block/model/TextureSlots.java b/net/minecraft/client/renderer/block/model/TextureSlots.java new file mode 100644 index 00000000..b641c3db --- /dev/null +++ b/net/minecraft/client/renderer/block/model/TextureSlots.java @@ -0,0 +1,166 @@ +package net.minecraft.client.renderer.block.model; + +import com.google.common.collect.Lists; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.mojang.logging.LogUtils; +import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectMaps; +import it.unimi.dsi.fastutil.objects.ObjectIterator; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.stream.Collectors; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.TextureSlots.Data.Builder; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelDebugName; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class TextureSlots { + public static final TextureSlots EMPTY = new TextureSlots(Map.of()); + private static final char REFERENCE_CHAR = '#'; + private final Map resolvedValues; + + TextureSlots(Map resolvedValues) { + this.resolvedValues = resolvedValues; + } + + @Nullable + public Material getMaterial(String name) { + if (isTextureReference(name)) { + name = name.substring(1); + } + + return (Material)this.resolvedValues.get(name); + } + + private static boolean isTextureReference(String name) { + return name.charAt(0) == '#'; + } + + public static TextureSlots.Data parseTextureMap(JsonObject json, ResourceLocation atlas) { + Builder builder = new Builder(); + + for (Entry entry : json.entrySet()) { + parseEntry(atlas, (String)entry.getKey(), ((JsonElement)entry.getValue()).getAsString(), builder); + } + + return builder.build(); + } + + private static void parseEntry(ResourceLocation atlas, String name, String material, Builder builder) { + if (isTextureReference(material)) { + builder.addReference(name, material.substring(1)); + } else { + ResourceLocation resourceLocation = ResourceLocation.tryParse(material); + if (resourceLocation == null) { + throw new JsonParseException(material + " is not valid resource location"); + } + + builder.addTexture(name, new Material(atlas, resourceLocation)); + } + } + + @Environment(EnvType.CLIENT) + public record Data(Map values) { + public static final TextureSlots.Data EMPTY = new TextureSlots.Data(Map.of()); + } + + @Environment(EnvType.CLIENT) + record Reference(String target) implements TextureSlots.SlotContents { + } + + @Environment(EnvType.CLIENT) + public static class Resolver { + private static final Logger LOGGER = LogUtils.getLogger(); + private final List entries = new ArrayList(); + + public TextureSlots.Resolver addLast(TextureSlots.Data data) { + this.entries.addLast(data); + return this; + } + + public TextureSlots.Resolver addFirst(TextureSlots.Data data) { + this.entries.addFirst(data); + return this; + } + + public TextureSlots resolve(ModelDebugName name) { + if (this.entries.isEmpty()) { + return TextureSlots.EMPTY; + } else { + Object2ObjectMap object2ObjectMap = new Object2ObjectArrayMap<>(); + Object2ObjectMap object2ObjectMap2 = new Object2ObjectArrayMap<>(); + + for (TextureSlots.Data data : Lists.reverse(this.entries)) { + data.values.forEach((string, slotContents) -> { + switch (slotContents) { + case TextureSlots.Value value: + object2ObjectMap2.remove(string); + object2ObjectMap.put(string, value.material()); + break; + case TextureSlots.Reference reference: + object2ObjectMap.remove(string); + object2ObjectMap2.put(string, reference); + break; + default: + throw new MatchException(null, null); + } + }); + } + + if (object2ObjectMap2.isEmpty()) { + return new TextureSlots(object2ObjectMap); + } else { + boolean bl = true; + + while (bl) { + bl = false; + ObjectIterator> objectIterator = Object2ObjectMaps.fastIterator( + object2ObjectMap2 + ); + + while (objectIterator.hasNext()) { + it.unimi.dsi.fastutil.objects.Object2ObjectMap.Entry entry = (it.unimi.dsi.fastutil.objects.Object2ObjectMap.Entry)objectIterator.next(); + Material material = object2ObjectMap.get(((TextureSlots.Reference)entry.getValue()).target); + if (material != null) { + object2ObjectMap.put((String)entry.getKey(), material); + objectIterator.remove(); + bl = true; + } + } + } + + if (!object2ObjectMap2.isEmpty()) { + LOGGER.warn( + "Unresolved texture references in {}:\n{}", + name.debugName(), + object2ObjectMap2.entrySet() + .stream() + .map(entryx -> "\t#" + (String)entryx.getKey() + "-> #" + ((TextureSlots.Reference)entryx.getValue()).target + "\n") + .collect(Collectors.joining()) + ); + } + + return new TextureSlots(object2ObjectMap); + } + } + } + } + + @Environment(EnvType.CLIENT) + public sealed interface SlotContents permits TextureSlots.Value, TextureSlots.Reference { + } + + @Environment(EnvType.CLIENT) + record Value(Material material) implements TextureSlots.SlotContents { + } +} diff --git a/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java b/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java deleted file mode 100644 index d4dc3723..00000000 --- a/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.minecraft.client.renderer.block.model; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.world.level.block.state.BlockState; - -@Environment(EnvType.CLIENT) -public interface UnbakedBlockStateModel extends UnbakedModel { - Object visualEqualityGroup(BlockState blockState); -} diff --git a/net/minecraft/client/renderer/block/model/Variant.java b/net/minecraft/client/renderer/block/model/Variant.java index 6b75fc5d..fde0eab3 100644 --- a/net/minecraft/client/renderer/block/model/Variant.java +++ b/net/minecraft/client/renderer/block/model/Variant.java @@ -1,123 +1,92 @@ package net.minecraft.client.renderer.block.model; -import com.google.common.annotations.VisibleForTesting; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.mojang.math.Transformation; -import java.lang.reflect.Type; -import java.util.Objects; +import com.mojang.math.Quadrant; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.resources.model.BlockModelRotation; +import net.minecraft.client.resources.model.ModelBaker; import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.ResolvableModel; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.GsonHelper; @Environment(EnvType.CLIENT) -public class Variant implements ModelState { - private final ResourceLocation modelLocation; - private final Transformation rotation; - private final boolean uvLock; - private final int weight; +public record Variant(ResourceLocation modelLocation, Variant.SimpleModelState modelState) implements BlockModelPart.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("model").forGetter(Variant::modelLocation), Variant.SimpleModelState.MAP_CODEC.forGetter(Variant::modelState) + ) + .apply(instance, Variant::new) + ); + public static final Codec CODEC = MAP_CODEC.codec(); - public Variant(ResourceLocation modelLocation, Transformation rotation, boolean uvLock, int weight) { - this.modelLocation = modelLocation; - this.rotation = rotation; - this.uvLock = uvLock; - this.weight = weight; + public Variant(ResourceLocation modelLocation) { + this(modelLocation, Variant.SimpleModelState.DEFAULT); } - public ResourceLocation getModelLocation() { - return this.modelLocation; + public Variant withXRot(Quadrant xRot) { + return this.withState(this.modelState.withX(xRot)); + } + + public Variant withYRot(Quadrant yRot) { + return this.withState(this.modelState.withY(yRot)); + } + + public Variant withUvLock(boolean uvLock) { + return this.withState(this.modelState.withUvLock(uvLock)); + } + + public Variant withModel(ResourceLocation modelLocation) { + return new Variant(modelLocation, this.modelState); + } + + public Variant withState(Variant.SimpleModelState modelState) { + return new Variant(this.modelLocation, modelState); + } + + public Variant with(VariantMutator mutator) { + return (Variant)mutator.apply(this); } @Override - public Transformation getRotation() { - return this.rotation; + public BlockModelPart bake(ModelBaker modelBaker) { + return SimpleModelWrapper.bake(modelBaker, this.modelLocation, this.modelState.asModelState()); } @Override - public boolean isUvLocked() { - return this.uvLock; - } - - public int getWeight() { - return this.weight; - } - - public String toString() { - return "Variant{modelLocation=" + this.modelLocation + ", rotation=" + this.rotation + ", uvLock=" + this.uvLock + ", weight=" + this.weight + "}"; - } - - public boolean equals(Object object) { - if (this == object) { - return true; - } else { - return !(object instanceof Variant variant) - ? false - : this.modelLocation.equals(variant.modelLocation) - && Objects.equals(this.rotation, variant.rotation) - && this.uvLock == variant.uvLock - && this.weight == variant.weight; - } - } - - public int hashCode() { - int i = this.modelLocation.hashCode(); - i = 31 * i + this.rotation.hashCode(); - i = 31 * i + Boolean.valueOf(this.uvLock).hashCode(); - return 31 * i + this.weight; + public void resolveDependencies(ResolvableModel.Resolver resolver) { + resolver.markDependency(this.modelLocation); } @Environment(EnvType.CLIENT) - public static class Deserializer implements JsonDeserializer { - @VisibleForTesting - static final boolean DEFAULT_UVLOCK = false; - @VisibleForTesting - static final int DEFAULT_WEIGHT = 1; - @VisibleForTesting - static final int DEFAULT_X_ROTATION = 0; - @VisibleForTesting - static final int DEFAULT_Y_ROTATION = 0; + public record SimpleModelState(Quadrant x, Quadrant y, boolean uvLock) { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + Quadrant.CODEC.optionalFieldOf("x", Quadrant.R0).forGetter(Variant.SimpleModelState::x), + Quadrant.CODEC.optionalFieldOf("y", Quadrant.R0).forGetter(Variant.SimpleModelState::y), + Codec.BOOL.optionalFieldOf("uvlock", false).forGetter(Variant.SimpleModelState::uvLock) + ) + .apply(instance, Variant.SimpleModelState::new) + ); + public static final Variant.SimpleModelState DEFAULT = new Variant.SimpleModelState(Quadrant.R0, Quadrant.R0, false); - public Variant deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - JsonObject jsonObject = json.getAsJsonObject(); - ResourceLocation resourceLocation = this.getModel(jsonObject); - BlockModelRotation blockModelRotation = this.getBlockRotation(jsonObject); - boolean bl = this.getUvLock(jsonObject); - int i = this.getWeight(jsonObject); - return new Variant(resourceLocation, blockModelRotation.getRotation(), bl, i); + public ModelState asModelState() { + BlockModelRotation blockModelRotation = BlockModelRotation.by(this.x, this.y); + return (ModelState)(this.uvLock ? blockModelRotation.withUvLock() : blockModelRotation); } - private boolean getUvLock(JsonObject json) { - return GsonHelper.getAsBoolean(json, "uvlock", false); + public Variant.SimpleModelState withX(Quadrant xRot) { + return new Variant.SimpleModelState(xRot, this.y, this.uvLock); } - protected BlockModelRotation getBlockRotation(JsonObject json) { - int i = GsonHelper.getAsInt(json, "x", 0); - int j = GsonHelper.getAsInt(json, "y", 0); - BlockModelRotation blockModelRotation = BlockModelRotation.by(i, j); - if (blockModelRotation == null) { - throw new JsonParseException("Invalid BlockModelRotation x: " + i + ", y: " + j); - } else { - return blockModelRotation; - } + public Variant.SimpleModelState withY(Quadrant yRot) { + return new Variant.SimpleModelState(this.x, yRot, this.uvLock); } - protected ResourceLocation getModel(JsonObject json) { - return ResourceLocation.parse(GsonHelper.getAsString(json, "model")); - } - - protected int getWeight(JsonObject json) { - int i = GsonHelper.getAsInt(json, "weight", 1); - if (i < 1) { - throw new JsonParseException("Invalid weight " + i + " found, expected integer >= 1"); - } else { - return i; - } + public Variant.SimpleModelState withUvLock(boolean uvLock) { + return new Variant.SimpleModelState(this.x, this.y, uvLock); } } } diff --git a/net/minecraft/client/renderer/block/model/VariantMutator.java b/net/minecraft/client/renderer/block/model/VariantMutator.java new file mode 100644 index 00000000..21d998bb --- /dev/null +++ b/net/minecraft/client/renderer/block/model/VariantMutator.java @@ -0,0 +1,30 @@ +package net.minecraft.client.renderer.block.model; + +import com.mojang.math.Quadrant; +import java.util.function.UnaryOperator; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; + +@FunctionalInterface +@Environment(EnvType.CLIENT) +public interface VariantMutator extends UnaryOperator { + VariantMutator.VariantProperty X_ROT = Variant::withXRot; + VariantMutator.VariantProperty Y_ROT = Variant::withYRot; + VariantMutator.VariantProperty MODEL = Variant::withModel; + VariantMutator.VariantProperty UV_LOCK = Variant::withUvLock; + + default VariantMutator then(VariantMutator variantMutator) { + return variant -> (Variant)variantMutator.apply((Variant)this.apply(variant)); + } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface VariantProperty { + Variant apply(Variant variant, T object); + + default VariantMutator withValue(T object) { + return variant -> this.apply(variant, object); + } + } +} diff --git a/net/minecraft/client/renderer/block/model/VariantSelector.java b/net/minecraft/client/renderer/block/model/VariantSelector.java index 05cae2bb..2b7b2d03 100644 --- a/net/minecraft/client/renderer/block/model/VariantSelector.java +++ b/net/minecraft/client/renderer/block/model/VariantSelector.java @@ -19,24 +19,24 @@ public class VariantSelector { private static final Splitter COMMA_SPLITTER = Splitter.on(','); private static final Splitter EQUAL_SPLITTER = Splitter.on('=').limit(2); - public static > Predicate> predicate(StateDefinition stateDefinition, String string) { + public static > Predicate> predicate(StateDefinition stateDefinition, String value) { Map, Comparable> map = new HashMap(); - for (String string2 : COMMA_SPLITTER.split(string)) { - Iterator iterator = EQUAL_SPLITTER.split(string2).iterator(); + for (String string : COMMA_SPLITTER.split(value)) { + Iterator iterator = EQUAL_SPLITTER.split(string).iterator(); if (iterator.hasNext()) { - String string3 = (String)iterator.next(); - Property property = stateDefinition.getProperty(string3); + String string2 = (String)iterator.next(); + Property property = stateDefinition.getProperty(string2); if (property != null && iterator.hasNext()) { - String string4 = (String)iterator.next(); - Comparable comparable = getValueHelper((Property>)property, string4); + String string3 = (String)iterator.next(); + Comparable comparable = getValueHelper((Property>)property, string3); if (comparable == null) { - throw new RuntimeException("Unknown value: '" + string4 + "' for blockstate property: '" + string3 + "' " + property.getPossibleValues()); + throw new RuntimeException("Unknown value: '" + string3 + "' for blockstate property: '" + string2 + "' " + property.getPossibleValues()); } map.put(property, comparable); - } else if (!string3.isEmpty()) { - throw new RuntimeException("Unknown blockstate property: '" + string3 + "'"); + } else if (!string2.isEmpty()) { + throw new RuntimeException("Unknown blockstate property: '" + string2 + "'"); } } } @@ -53,7 +53,7 @@ public class VariantSelector { } @Nullable - private static > T getValueHelper(Property property, String string) { - return (T)property.getValue(string).orElse(null); + private static > T getValueHelper(Property property, String value) { + return (T)property.getValue(value).orElse(null); } } diff --git a/net/minecraft/client/renderer/block/model/multipart/AndCondition.java b/net/minecraft/client/renderer/block/model/multipart/AndCondition.java deleted file mode 100644 index ed7e2e84..00000000 --- a/net/minecraft/client/renderer/block/model/multipart/AndCondition.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.minecraft.client.renderer.block.model.multipart; - -import com.google.common.collect.Streams; -import java.util.function.Predicate; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.Util; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; - -@Environment(EnvType.CLIENT) -public class AndCondition implements Condition { - public static final String TOKEN = "AND"; - private final Iterable conditions; - - public AndCondition(Iterable conditions) { - this.conditions = conditions; - } - - @Override - public Predicate getPredicate(StateDefinition stateDefinition) { - return Util.allOf(Streams.stream(this.conditions).map(condition -> condition.getPredicate(stateDefinition)).toList()); - } -} diff --git a/net/minecraft/client/renderer/block/model/multipart/CombinedCondition.java b/net/minecraft/client/renderer/block/model/multipart/CombinedCondition.java new file mode 100644 index 00000000..0e236e32 --- /dev/null +++ b/net/minecraft/client/renderer/block/model/multipart/CombinedCondition.java @@ -0,0 +1,39 @@ +package net.minecraft.client.renderer.block.model.multipart; + +import com.google.common.collect.Lists; +import com.mojang.serialization.Codec; +import java.util.List; +import java.util.function.Predicate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.util.StringRepresentable; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateHolder; + +@Environment(EnvType.CLIENT) +public record CombinedCondition(CombinedCondition.Operation operation, List terms) implements Condition { + @Override + public > Predicate instantiate(StateDefinition stateDefinition) { + return this.operation.apply(Lists.transform(this.terms, condition -> condition.instantiate(stateDefinition))); + } + + @Environment(EnvType.CLIENT) + public static enum Operation implements StringRepresentable { + AND("AND", 0, "AND"), + OR("OR", 1, "OR"); + + public static final Codec CODEC = StringRepresentable.fromEnum(CombinedCondition.Operation::values); + private final String name; + + Operation(final String name) { + this.name = name; + } + + @Override + public String getSerializedName() { + return this.name; + } + + public abstract Predicate apply(List> conditions); + } +} diff --git a/net/minecraft/client/renderer/block/model/multipart/Condition.java b/net/minecraft/client/renderer/block/model/multipart/Condition.java index d6b6e312..89336c31 100644 --- a/net/minecraft/client/renderer/block/model/multipart/Condition.java +++ b/net/minecraft/client/renderer/block/model/multipart/Condition.java @@ -1,17 +1,46 @@ package net.minecraft.client.renderer.block.model.multipart; +import com.mojang.datafixers.util.Either; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.function.Predicate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.util.StringRepresentable; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateHolder; @FunctionalInterface @Environment(EnvType.CLIENT) public interface Condition { - Condition TRUE = stateDefinition -> blockState -> true; - Condition FALSE = stateDefinition -> blockState -> false; + Codec CODEC = Codec.recursive( + "condition", + codec -> { + Codec codec2 = Codec.simpleMap( + CombinedCondition.Operation.CODEC, codec.listOf(), StringRepresentable.keys(CombinedCondition.Operation.values()) + ) + .codec() + .comapFlatMap(map -> { + if (map.size() != 1) { + return DataResult.error(() -> "Invalid map size for combiner condition, expected exactly one element"); + } else { + Entry> entry = (Entry>)map.entrySet().iterator().next(); + return DataResult.success(new CombinedCondition((CombinedCondition.Operation)entry.getKey(), (List)entry.getValue())); + } + }, combinedCondition -> Map.of(combinedCondition.operation(), combinedCondition.terms())); + return Codec.either(codec2, KeyValueCondition.CODEC) + .flatComapMap(either -> either.map(combinedCondition -> combinedCondition, keyValueCondition -> keyValueCondition), condition -> { + return switch (condition) { + case CombinedCondition combinedCondition -> DataResult.success(Either.left(combinedCondition)); + case KeyValueCondition keyValueCondition -> DataResult.success(Either.right(keyValueCondition)); + default -> DataResult.error(() -> "Unrecognized condition"); + }; + }); + } + ); - Predicate getPredicate(StateDefinition stateDefinition); + > Predicate instantiate(StateDefinition stateDefinition); } diff --git a/net/minecraft/client/renderer/block/model/multipart/KeyValueCondition.java b/net/minecraft/client/renderer/block/model/multipart/KeyValueCondition.java index 27676bec..cbb1cce1 100644 --- a/net/minecraft/client/renderer/block/model/multipart/KeyValueCondition.java +++ b/net/minecraft/client/renderer/block/model/multipart/KeyValueCondition.java @@ -1,70 +1,162 @@ package net.minecraft.client.renderer.block.model.multipart; -import com.google.common.base.MoreObjects; +import com.google.common.base.Joiner; import com.google.common.base.Splitter; +import com.google.common.collect.Lists; +import com.mojang.logging.LogUtils; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import java.util.ArrayList; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Optional; import java.util.function.Predicate; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.util.ExtraCodecs; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateHolder; import net.minecraft.world.level.block.state.properties.Property; +import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class KeyValueCondition implements Condition { - private static final Splitter PIPE_SPLITTER = Splitter.on('|').omitEmptyStrings(); - private final String key; - private final String value; - - public KeyValueCondition(String key, String value) { - this.key = key; - this.value = value; - } +public record KeyValueCondition(Map tests) implements Condition { + static final Logger LOGGER = LogUtils.getLogger(); + public static final Codec CODEC = ExtraCodecs.nonEmptyMap(Codec.unboundedMap(Codec.STRING, KeyValueCondition.Terms.CODEC)) + .xmap(KeyValueCondition::new, KeyValueCondition::tests); @Override - public Predicate getPredicate(StateDefinition stateDefinition) { - Property property = stateDefinition.getProperty(this.key); - if (property == null) { - throw new RuntimeException(String.format(Locale.ROOT, "Unknown property '%s' on '%s'", this.key, stateDefinition.getOwner())); - } else { - String string = this.value; - boolean bl = !string.isEmpty() && string.charAt(0) == '!'; - if (bl) { - string = string.substring(1); - } + public > Predicate instantiate(StateDefinition stateDefinition) { + List> list = new ArrayList(this.tests.size()); + this.tests.forEach((string, terms) -> list.add(instantiate(stateDefinition, string, terms))); + return Util.allOf(list); + } - List list = PIPE_SPLITTER.splitToList(string); - if (list.isEmpty()) { - throw new RuntimeException(String.format(Locale.ROOT, "Empty value '%s' for property '%s' on '%s'", this.value, this.key, stateDefinition.getOwner())); + private static > Predicate instantiate(StateDefinition stateDefinition, String property, KeyValueCondition.Terms terms) { + Property property2 = stateDefinition.getProperty(property); + if (property2 == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Unknown property '%s' on '%s'", property, stateDefinition.getOwner())); + } else { + return terms.instantiate(stateDefinition.getOwner(), property2); + } + } + + @Environment(EnvType.CLIENT) + public record Term(String value, boolean negated) { + private static final String NEGATE = "!"; + + public Term(String value, boolean negated) { + if (value.isEmpty()) { + throw new IllegalArgumentException("Empty term"); } else { - Predicate predicate; - if (list.size() == 1) { - predicate = this.getBlockStatePredicate(stateDefinition, property, string); - } else { - predicate = Util.anyOf(list.stream().map(stringx -> this.getBlockStatePredicate(stateDefinition, property, stringx)).toList()); + this.value = value; + this.negated = negated; + } + } + + public static KeyValueCondition.Term parse(String text) { + return text.startsWith("!") ? new KeyValueCondition.Term(text.substring(1), true) : new KeyValueCondition.Term(text, false); + } + + public String toString() { + return this.negated ? "!" + this.value : this.value; + } + } + + @Environment(EnvType.CLIENT) + public record Terms(List entries) { + private static final char SEPARATOR = '|'; + private static final Joiner JOINER = Joiner.on('|'); + private static final Splitter SPLITTER = Splitter.on('|'); + private static final Codec LEGACY_REPRESENTATION_CODEC = Codec.either(Codec.INT, Codec.BOOL) + .flatComapMap(either -> either.map(String::valueOf, String::valueOf), string -> DataResult.error(() -> "This codec can't be used for encoding")); + public static final Codec CODEC = Codec.withAlternative(Codec.STRING, LEGACY_REPRESENTATION_CODEC) + .comapFlatMap(KeyValueCondition.Terms::parse, KeyValueCondition.Terms::toString); + + public Terms(List entries) { + if (entries.isEmpty()) { + throw new IllegalArgumentException("Empty value for property"); + } else { + this.entries = entries; + } + } + + public static DataResult parse(String text) { + List list = SPLITTER.splitToStream(text).map(KeyValueCondition.Term::parse).toList(); + if (list.isEmpty()) { + return DataResult.error(() -> "Empty value for property"); + } else { + for (KeyValueCondition.Term term : list) { + if (term.value.isEmpty()) { + return DataResult.error(() -> "Empty term in value '" + text + "'"); + } } - return bl ? predicate.negate() : predicate; + return DataResult.success(new KeyValueCondition.Terms(list)); } } - } - private Predicate getBlockStatePredicate(StateDefinition definition, Property property, String value) { - Optional optional = property.getValue(value); - if (optional.isEmpty()) { - throw new RuntimeException( - String.format(Locale.ROOT, "Unknown value '%s' for property '%s' on '%s' in '%s'", value, this.key, definition.getOwner(), this.value) - ); - } else { - return blockState -> blockState.getValue(property).equals(optional.get()); + public String toString() { + return JOINER.join(this.entries); + } + + public , T extends Comparable> Predicate instantiate(O owner, Property property) { + Predicate predicate = Util.anyOf(Lists.transform(this.entries, term -> this.instantiate(owner, property, term))); + List list = new ArrayList(property.getPossibleValues()); + int i = list.size(); + list.removeIf(predicate.negate()); + int j = list.size(); + if (j == 0) { + KeyValueCondition.LOGGER.warn("Condition {} for property {} on {} is always false", this, property.getName(), owner); + return stateHolder -> false; + } else { + int k = i - j; + if (k == 0) { + KeyValueCondition.LOGGER.warn("Condition {} for property {} on {} is always true", this, property.getName(), owner); + return stateHolder -> true; + } else { + boolean bl; + List list2; + if (j <= k) { + bl = false; + list2 = list; + } else { + bl = true; + List list3 = new ArrayList(property.getPossibleValues()); + list3.removeIf(predicate); + list2 = list3; + } + + if (list2.size() == 1) { + T comparable = (T)list2.getFirst(); + return stateHolder -> { + T comparable2 = stateHolder.getValue(property); + return comparable.equals(comparable2) ^ bl; + }; + } else { + return stateHolder -> { + T comparablex = stateHolder.getValue(property); + return list2.contains(comparablex) ^ bl; + }; + } + } + } + } + + private > T getValueOrThrow(Object owner, Property property, String value) { + Optional optional = property.getValue(value); + if (optional.isEmpty()) { + throw new RuntimeException(String.format(Locale.ROOT, "Unknown value '%s' for property '%s' on '%s' in '%s'", value, property, owner, this)); + } else { + return (T)optional.get(); + } + } + + private > Predicate instantiate(Object owner, Property property, KeyValueCondition.Term term) { + T comparable = this.getValueOrThrow(owner, property, term.value); + return term.negated ? comparable2 -> !comparable2.equals(comparable) : comparable2 -> comparable2.equals(comparable); } } - - public String toString() { - return MoreObjects.toStringHelper(this).add("key", this.key).add("value", this.value).toString(); - } } diff --git a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java b/net/minecraft/client/renderer/block/model/multipart/MultiPart.java deleted file mode 100644 index 65be9618..00000000 --- a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java +++ /dev/null @@ -1,113 +0,0 @@ -package net.minecraft.client.renderer.block.model.multipart; - -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import com.google.gson.JsonSyntaxException; -import it.unimi.dsi.fastutil.ints.IntArrayList; -import it.unimi.dsi.fastutil.ints.IntList; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.MultiVariant; -import net.minecraft.client.renderer.block.model.UnbakedBlockStateModel; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.client.resources.model.Material; -import net.minecraft.client.resources.model.ModelBaker; -import net.minecraft.client.resources.model.ModelState; -import net.minecraft.client.resources.model.MultiPartBakedModel; -import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; - -@Environment(EnvType.CLIENT) -public class MultiPart implements UnbakedBlockStateModel { - private final List selectors; - - MultiPart(List list) { - this.selectors = list; - } - - @Override - public Object visualEqualityGroup(BlockState blockState) { - IntList intList = new IntArrayList(); - - for (int i = 0; i < this.selectors.size(); i++) { - if (((MultiPart.InstantiatedSelector)this.selectors.get(i)).predicate.test(blockState)) { - intList.add(i); - } - } - - @Environment(EnvType.CLIENT) - record Key(MultiPart model, IntList selectors) { - } - - return new Key(this, intList); - } - - @Override - public void resolveDependencies(UnbakedModel.Resolver resolver) { - this.selectors.forEach(instantiatedSelector -> instantiatedSelector.variant.resolveDependencies(resolver)); - } - - @Override - public BakedModel bake(ModelBaker baker, Function spriteGetter, ModelState state) { - List list = new ArrayList(this.selectors.size()); - - for (MultiPart.InstantiatedSelector instantiatedSelector : this.selectors) { - BakedModel bakedModel = instantiatedSelector.variant.bake(baker, spriteGetter, state); - list.add(new MultiPartBakedModel.Selector(instantiatedSelector.predicate, bakedModel)); - } - - return new MultiPartBakedModel(list); - } - - @Environment(EnvType.CLIENT) - public record Definition(List selectors) { - public MultiPart instantiate(StateDefinition stateDefinition) { - List list = this.selectors - .stream() - .map(selector -> new MultiPart.InstantiatedSelector(selector.getPredicate(stateDefinition), selector.getVariant())) - .toList(); - return new MultiPart(list); - } - - public Set getMultiVariants() { - return (Set)this.selectors.stream().map(Selector::getVariant).collect(Collectors.toSet()); - } - } - - @Environment(EnvType.CLIENT) - public static class Deserializer implements JsonDeserializer { - public MultiPart.Definition deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { - return new MultiPart.Definition(this.getSelectors(jsonDeserializationContext, jsonElement.getAsJsonArray())); - } - - private List getSelectors(JsonDeserializationContext jsonContext, JsonArray elements) { - List list = new ArrayList(); - if (elements.isEmpty()) { - throw new JsonSyntaxException("Empty selector array"); - } else { - for (JsonElement jsonElement : elements) { - list.add((Selector)jsonContext.deserialize(jsonElement, Selector.class)); - } - - return list; - } - } - } - - @Environment(EnvType.CLIENT) - record InstantiatedSelector(Predicate predicate, MultiVariant variant) { - } -} diff --git a/net/minecraft/client/renderer/block/model/multipart/MultiPartModel.java b/net/minecraft/client/renderer/block/model/multipart/MultiPartModel.java new file mode 100644 index 00000000..d574ed14 --- /dev/null +++ b/net/minecraft/client/renderer/block/model/multipart/MultiPartModel.java @@ -0,0 +1,140 @@ +package net.minecraft.client.renderer.block.model.multipart; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableList.Builder; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import java.util.BitSet; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Predicate; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockModelPart; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.block.model.multipart.MultiPartModel.Unbaked.1; +import net.minecraft.client.renderer.block.model.multipart.MultiPartModel.Unbaked.1Key; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.state.BlockState; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class MultiPartModel implements BlockStateModel { + private final MultiPartModel.SharedBakedState shared; + private final BlockState blockState; + @Nullable + private List models; + + MultiPartModel(MultiPartModel.SharedBakedState shared, BlockState blockState) { + this.shared = shared; + this.blockState = blockState; + } + + @Override + public TextureAtlasSprite particleIcon() { + return this.shared.particleIcon; + } + + @Override + public void collectParts(RandomSource random, List output) { + if (this.models == null) { + this.models = this.shared.selectModels(this.blockState); + } + + long l = random.nextLong(); + + for (BlockStateModel blockStateModel : this.models) { + random.setSeed(l); + blockStateModel.collectParts(random, output); + } + } + + @Environment(EnvType.CLIENT) + public record Selector(Predicate condition, T model) { + + public MultiPartModel.Selector with(S model) { + return new MultiPartModel.Selector<>(this.condition, model); + } + } + + @Environment(EnvType.CLIENT) + static final class SharedBakedState { + private final List> selectors; + final TextureAtlasSprite particleIcon; + private final Map> subsets = new ConcurrentHashMap(); + + private static BlockStateModel getFirstModel(List> selectors) { + if (selectors.isEmpty()) { + throw new IllegalArgumentException("Model must have at least one selector"); + } else { + return (BlockStateModel)((MultiPartModel.Selector)selectors.getFirst()).model(); + } + } + + public SharedBakedState(List> selectors) { + this.selectors = selectors; + BlockStateModel blockStateModel = getFirstModel(selectors); + this.particleIcon = blockStateModel.particleIcon(); + } + + public List selectModels(BlockState state) { + BitSet bitSet = new BitSet(); + + for (int i = 0; i < this.selectors.size(); i++) { + if (((MultiPartModel.Selector)this.selectors.get(i)).condition.test(state)) { + bitSet.set(i); + } + } + + return (List)this.subsets.computeIfAbsent(bitSet, bitSetx -> { + Builder builder = ImmutableList.builder(); + + for (int ix = 0; ix < this.selectors.size(); ix++) { + if (bitSetx.get(ix)) { + builder.add((BlockStateModel)((MultiPartModel.Selector)this.selectors.get(ix)).model); + } + } + + return builder.build(); + }); + } + } + + @Environment(EnvType.CLIENT) + public static class Unbaked implements BlockStateModel.UnbakedRoot { + final List> selectors; + private final ModelBaker.SharedOperationKey sharedStateKey = new 1(this); + + public Unbaked(List> selectors) { + this.selectors = selectors; + } + + @Override + public Object visualEqualityGroup(BlockState state) { + IntList intList = new IntArrayList(); + + for (int i = 0; i < this.selectors.size(); i++) { + if (((MultiPartModel.Selector)this.selectors.get(i)).condition.test(state)) { + intList.add(i); + } + } + + return new 1Key(this, intList); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.selectors.forEach(selector -> ((BlockStateModel.Unbaked)selector.model).resolveDependencies(resolver)); + } + + @Override + public BlockStateModel bake(BlockState state, ModelBaker baker) { + MultiPartModel.SharedBakedState sharedBakedState = baker.compute(this.sharedStateKey); + return new MultiPartModel(sharedBakedState, state); + } + } +} diff --git a/net/minecraft/client/renderer/block/model/multipart/OrCondition.java b/net/minecraft/client/renderer/block/model/multipart/OrCondition.java deleted file mode 100644 index f05b38da..00000000 --- a/net/minecraft/client/renderer/block/model/multipart/OrCondition.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.minecraft.client.renderer.block.model.multipart; - -import com.google.common.collect.Streams; -import java.util.function.Predicate; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.Util; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; - -@Environment(EnvType.CLIENT) -public class OrCondition implements Condition { - public static final String TOKEN = "OR"; - private final Iterable conditions; - - public OrCondition(Iterable conditions) { - this.conditions = conditions; - } - - @Override - public Predicate getPredicate(StateDefinition stateDefinition) { - return Util.anyOf(Streams.stream(this.conditions).map(condition -> condition.getPredicate(stateDefinition)).toList()); - } -} diff --git a/net/minecraft/client/renderer/block/model/multipart/Selector.java b/net/minecraft/client/renderer/block/model/multipart/Selector.java index 69b1f628..82d9a4af 100644 --- a/net/minecraft/client/renderer/block/model/multipart/Selector.java +++ b/net/minecraft/client/renderer/block/model/multipart/Selector.java @@ -1,81 +1,25 @@ package net.minecraft.client.renderer.block.model.multipart; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.Streams; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import java.lang.reflect.Type; -import java.util.List; -import java.util.Set; -import java.util.Map.Entry; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Optional; import java.util.function.Predicate; -import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.MultiVariant; -import net.minecraft.util.GsonHelper; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateHolder; @Environment(EnvType.CLIENT) -public class Selector { - private final Condition condition; - private final MultiVariant variant; +public record Selector(Optional condition, BlockStateModel.Unbaked variant) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Condition.CODEC.optionalFieldOf("when").forGetter(Selector::condition), BlockStateModel.Unbaked.CODEC.fieldOf("apply").forGetter(Selector::variant) + ) + .apply(instance, Selector::new) + ); - public Selector(Condition condition, MultiVariant variant) { - this.condition = condition; - this.variant = variant; - } - - public MultiVariant getVariant() { - return this.variant; - } - - public Predicate getPredicate(StateDefinition definition) { - return this.condition.getPredicate(definition); - } - - @Environment(EnvType.CLIENT) - public static class Deserializer implements JsonDeserializer { - public Selector deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException { - JsonObject jsonObject = json.getAsJsonObject(); - return new Selector(this.getSelector(jsonObject), context.deserialize(jsonObject.get("apply"), MultiVariant.class)); - } - - private Condition getSelector(JsonObject json) { - return json.has("when") ? getCondition(GsonHelper.getAsJsonObject(json, "when")) : Condition.TRUE; - } - - @VisibleForTesting - static Condition getCondition(JsonObject json) { - Set> set = json.entrySet(); - if (set.isEmpty()) { - throw new JsonParseException("No elements found in selector"); - } else if (set.size() == 1) { - if (json.has("OR")) { - List list = (List)Streams.stream(GsonHelper.getAsJsonArray(json, "OR")) - .map(jsonElement -> getCondition(jsonElement.getAsJsonObject())) - .collect(Collectors.toList()); - return new OrCondition(list); - } else if (json.has("AND")) { - List list = (List)Streams.stream(GsonHelper.getAsJsonArray(json, "AND")) - .map(jsonElement -> getCondition(jsonElement.getAsJsonObject())) - .collect(Collectors.toList()); - return new AndCondition(list); - } else { - return getKeyValueCondition((Entry)set.iterator().next()); - } - } else { - return new AndCondition((Iterable)set.stream().map(Selector.Deserializer::getKeyValueCondition).collect(Collectors.toList())); - } - } - - private static Condition getKeyValueCondition(Entry entry) { - return new KeyValueCondition((String)entry.getKey(), ((JsonElement)entry.getValue()).getAsString()); - } + public > Predicate instantiate(StateDefinition stateDefinition) { + return (Predicate)this.condition.map(condition -> condition.instantiate(stateDefinition)).orElse((Predicate)stateHolder -> true); } } diff --git a/net/minecraft/client/renderer/blockentity/AbstractSignRenderer.java b/net/minecraft/client/renderer/blockentity/AbstractSignRenderer.java new file mode 100644 index 00000000..bceedcc6 --- /dev/null +++ b/net/minecraft/client/renderer/blockentity/AbstractSignRenderer.java @@ -0,0 +1,181 @@ +package net.minecraft.client.renderer.blockentity; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.Font.DisplayMode; +import net.minecraft.client.model.Model; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; +import net.minecraft.client.resources.model.Material; +import net.minecraft.core.BlockPos; +import net.minecraft.util.ARGB; +import net.minecraft.util.FormattedCharSequence; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.block.SignBlock; +import net.minecraft.world.level.block.entity.SignBlockEntity; +import net.minecraft.world.level.block.entity.SignText; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.WoodType; +import net.minecraft.world.phys.Vec3; + +@Environment(EnvType.CLIENT) +public abstract class AbstractSignRenderer implements BlockEntityRenderer { + private static final int BLACK_TEXT_OUTLINE_COLOR = -988212; + private static final int OUTLINE_RENDER_DISTANCE = Mth.square(16); + private final Font font; + + public AbstractSignRenderer(Context context) { + this.font = context.getFont(); + } + + protected abstract Model getSignModel(BlockState state, WoodType woodType); + + protected abstract Material getSignMaterial(WoodType woodType); + + protected abstract float getSignModelRenderScale(); + + protected abstract float getSignTextRenderScale(); + + protected abstract Vec3 getTextOffset(); + + protected abstract void translateSign(PoseStack poseStack, float yRot, BlockState state); + + public void render(SignBlockEntity signBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + BlockState blockState = signBlockEntity.getBlockState(); + SignBlock signBlock = (SignBlock)blockState.getBlock(); + Model model = this.getSignModel(blockState, signBlock.type()); + this.renderSignWithText(signBlockEntity, poseStack, multiBufferSource, i, j, blockState, signBlock, signBlock.type(), model); + } + + private void renderSignWithText( + SignBlockEntity blockEntity, + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + int packedOverlay, + BlockState state, + SignBlock sign, + WoodType woodType, + Model model + ) { + poseStack.pushPose(); + this.translateSign(poseStack, -sign.getYRotationDegrees(state), state); + this.renderSign(poseStack, bufferSource, packedLight, packedOverlay, woodType, model); + this.renderSignText( + blockEntity.getBlockPos(), + blockEntity.getFrontText(), + poseStack, + bufferSource, + packedLight, + blockEntity.getTextLineHeight(), + blockEntity.getMaxTextLineWidth(), + true + ); + this.renderSignText( + blockEntity.getBlockPos(), + blockEntity.getBackText(), + poseStack, + bufferSource, + packedLight, + blockEntity.getTextLineHeight(), + blockEntity.getMaxTextLineWidth(), + false + ); + poseStack.popPose(); + } + + protected void renderSign(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, WoodType woodType, Model model) { + poseStack.pushPose(); + float f = this.getSignModelRenderScale(); + poseStack.scale(f, -f, -f); + Material material = this.getSignMaterial(woodType); + VertexConsumer vertexConsumer = material.buffer(bufferSource, model::renderType); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + poseStack.popPose(); + } + + private void renderSignText( + BlockPos pos, SignText text, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int lineHeight, int maxLineWidth, boolean isFront + ) { + poseStack.pushPose(); + this.translateSignText(poseStack, isFront, this.getTextOffset()); + int i = getDarkColor(text); + int j = 4 * lineHeight / 2; + FormattedCharSequence[] formattedCharSequences = text.getRenderMessages(Minecraft.getInstance().isTextFilteringEnabled(), component -> { + List list = this.font.split(component, maxLineWidth); + return list.isEmpty() ? FormattedCharSequence.EMPTY : (FormattedCharSequence)list.get(0); + }); + int k; + boolean bl; + int l; + if (text.hasGlowingText()) { + k = text.getColor().getTextColor(); + bl = isOutlineVisible(pos, k); + l = 15728880; + } else { + k = i; + bl = false; + l = packedLight; + } + + for (int m = 0; m < 4; m++) { + FormattedCharSequence formattedCharSequence = formattedCharSequences[m]; + float f = -this.font.width(formattedCharSequence) / 2; + if (bl) { + this.font.drawInBatch8xOutline(formattedCharSequence, f, m * lineHeight - j, k, i, poseStack.last().pose(), bufferSource, l); + } else { + this.font + .drawInBatch(formattedCharSequence, f, (float)(m * lineHeight - j), k, false, poseStack.last().pose(), bufferSource, DisplayMode.POLYGON_OFFSET, 0, l); + } + } + + poseStack.popPose(); + } + + private void translateSignText(PoseStack poseStack, boolean isFront, Vec3 offset) { + if (!isFront) { + poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); + } + + float f = 0.015625F * this.getSignTextRenderScale(); + poseStack.translate(offset); + poseStack.scale(f, -f, f); + } + + private static boolean isOutlineVisible(BlockPos pos, int color) { + if (color == DyeColor.BLACK.getTextColor()) { + return true; + } else { + Minecraft minecraft = Minecraft.getInstance(); + LocalPlayer localPlayer = minecraft.player; + if (localPlayer != null && minecraft.options.getCameraType().isFirstPerson() && localPlayer.isScoping()) { + return true; + } else { + Entity entity = minecraft.getCameraEntity(); + return entity != null && entity.distanceToSqr(Vec3.atCenterOf(pos)) < OUTLINE_RENDER_DISTANCE; + } + } + } + + public static int getDarkColor(SignText text) { + int i = text.getColor().getTextColor(); + if (i == DyeColor.BLACK.getTextColor() && text.hasGlowingText()) { + return -988212; + } else { + double d = 0.4; + int j = (int)(ARGB.red(i) * 0.4); + int k = (int)(ARGB.green(i) * 0.4); + int l = (int)(ARGB.blue(i) * 0.4); + return ARGB.color(0, j, k, l); + } + } +} diff --git a/net/minecraft/client/renderer/blockentity/BannerRenderer.java b/net/minecraft/client/renderer/blockentity/BannerRenderer.java index c72a304d..a3cc5249 100644 --- a/net/minecraft/client/renderer/blockentity/BannerRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BannerRenderer.java @@ -1,17 +1,14 @@ package net.minecraft.client.renderer.blockentity; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.BannerFlagModel; +import net.minecraft.client.model.BannerModel; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.client.model.geom.PartPose; -import net.minecraft.client.model.geom.builders.CubeListBuilder; -import net.minecraft.client.model.geom.builders.LayerDefinition; -import net.minecraft.client.model.geom.builders.MeshDefinition; -import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.Sheets; @@ -20,84 +17,81 @@ import net.minecraft.client.resources.model.Material; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.util.Mth; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.BannerBlock; import net.minecraft.world.level.block.WallBannerBlock; import net.minecraft.world.level.block.entity.BannerBlockEntity; import net.minecraft.world.level.block.entity.BannerPatternLayers; -import net.minecraft.world.level.block.entity.BannerPatternLayers.Layer; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.RotationSegment; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class BannerRenderer implements BlockEntityRenderer { - private static final int BANNER_WIDTH = 20; - private static final int BANNER_HEIGHT = 40; private static final int MAX_PATTERNS = 16; - public static final String FLAG = "flag"; - private static final String POLE = "pole"; - private static final String BAR = "bar"; - private final ModelPart flag; - private final ModelPart pole; - private final ModelPart bar; + private static final float SIZE = 0.6666667F; + private final BannerModel standingModel; + private final BannerModel wallModel; + private final BannerFlagModel standingFlagModel; + private final BannerFlagModel wallFlagModel; public BannerRenderer(Context context) { - ModelPart modelPart = context.bakeLayer(ModelLayers.BANNER); - this.flag = modelPart.getChild("flag"); - this.pole = modelPart.getChild("pole"); - this.bar = modelPart.getChild("bar"); + this(context.getModelSet()); } - public static LayerDefinition createBodyLayer() { - MeshDefinition meshDefinition = new MeshDefinition(); - PartDefinition partDefinition = meshDefinition.getRoot(); - partDefinition.addOrReplaceChild( - "flag", CubeListBuilder.create().texOffs(0, 0).addBox(-10.0F, 0.0F, -2.0F, 20.0F, 40.0F, 1.0F), PartPose.offset(0.0F, -32.0F, 0.0F) - ); - partDefinition.addOrReplaceChild("pole", CubeListBuilder.create().texOffs(44, 0).addBox(-1.0F, -30.0F, -1.0F, 2.0F, 42.0F, 2.0F), PartPose.ZERO); - partDefinition.addOrReplaceChild("bar", CubeListBuilder.create().texOffs(0, 42).addBox(-10.0F, -32.0F, -1.0F, 20.0F, 2.0F, 2.0F), PartPose.ZERO); - return LayerDefinition.create(meshDefinition, 64, 64); + public BannerRenderer(EntityModelSet modelSet) { + this.standingModel = new BannerModel(modelSet.bakeLayer(ModelLayers.STANDING_BANNER)); + this.wallModel = new BannerModel(modelSet.bakeLayer(ModelLayers.WALL_BANNER)); + this.standingFlagModel = new BannerFlagModel(modelSet.bakeLayer(ModelLayers.STANDING_BANNER_FLAG)); + this.wallFlagModel = new BannerFlagModel(modelSet.bakeLayer(ModelLayers.WALL_BANNER_FLAG)); } - public void render(BannerBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - float f = 0.6666667F; - boolean bl = blockEntity.getLevel() == null; - poseStack.pushPose(); - long l; - if (bl) { - l = 0L; - poseStack.translate(0.5F, 0.5F, 0.5F); - this.pole.visible = true; + public void render(BannerBlockEntity bannerBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + BlockState blockState = bannerBlockEntity.getBlockState(); + BannerModel bannerModel; + BannerFlagModel bannerFlagModel; + float g; + if (blockState.getBlock() instanceof BannerBlock) { + g = -RotationSegment.convertToDegrees((Integer)blockState.getValue(BannerBlock.ROTATION)); + bannerModel = this.standingModel; + bannerFlagModel = this.standingFlagModel; } else { - l = blockEntity.getLevel().getGameTime(); - BlockState blockState = blockEntity.getBlockState(); - if (blockState.getBlock() instanceof BannerBlock) { - poseStack.translate(0.5F, 0.5F, 0.5F); - float g = -RotationSegment.convertToDegrees((Integer)blockState.getValue(BannerBlock.ROTATION)); - poseStack.mulPose(Axis.YP.rotationDegrees(g)); - this.pole.visible = true; - } else { - poseStack.translate(0.5F, -0.16666667F, 0.5F); - float g = -((Direction)blockState.getValue(WallBannerBlock.FACING)).toYRot(); - poseStack.mulPose(Axis.YP.rotationDegrees(g)); - poseStack.translate(0.0F, -0.3125F, -0.4375F); - this.pole.visible = false; - } + g = -((Direction)blockState.getValue(WallBannerBlock.FACING)).toYRot(); + bannerModel = this.wallModel; + bannerFlagModel = this.wallFlagModel; } + long l = bannerBlockEntity.getLevel().getGameTime(); + BlockPos blockPos = bannerBlockEntity.getBlockPos(); + float h = ((float)Math.floorMod(blockPos.getX() * 7 + blockPos.getY() * 9 + blockPos.getZ() * 13 + l, 100L) + f) / 100.0F; + renderBanner(poseStack, multiBufferSource, i, j, g, bannerModel, bannerFlagModel, h, bannerBlockEntity.getBaseColor(), bannerBlockEntity.getPatterns()); + } + + public void renderInHand( + PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, DyeColor baseColor, BannerPatternLayers patterns + ) { + renderBanner(poseStack, bufferSource, packedLight, packedOverlay, 0.0F, this.standingModel, this.standingFlagModel, 0.0F, baseColor, patterns); + } + + private static void renderBanner( + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + int packedOverlay, + float rotation, + BannerModel standingModel, + BannerFlagModel standingFlagModel, + float angle, + DyeColor baseColor, + BannerPatternLayers patterns + ) { poseStack.pushPose(); + poseStack.translate(0.5F, 0.0F, 0.5F); + poseStack.mulPose(Axis.YP.rotationDegrees(rotation)); poseStack.scale(0.6666667F, -0.6666667F, -0.6666667F); - VertexConsumer vertexConsumer = ModelBakery.BANNER_BASE.buffer(bufferSource, RenderType::entitySolid); - this.pole.render(poseStack, vertexConsumer, packedLight, packedOverlay); - this.bar.render(poseStack, vertexConsumer, packedLight, packedOverlay); - BlockPos blockPos = blockEntity.getBlockPos(); - float h = ((float)Math.floorMod(blockPos.getX() * 7 + blockPos.getY() * 9 + blockPos.getZ() * 13 + l, 100L) + partialTick) / 100.0F; - this.flag.xRot = (-0.0125F + 0.01F * Mth.cos((float) (Math.PI * 2) * h)) * (float) Math.PI; - renderPatterns( - poseStack, bufferSource, packedLight, packedOverlay, this.flag, ModelBakery.BANNER_BASE, true, blockEntity.getBaseColor(), blockEntity.getPatterns() - ); - poseStack.popPose(); + standingModel.renderToBuffer(poseStack, ModelBakery.BANNER_BASE.buffer(bufferSource, RenderType::entitySolid), packedLight, packedOverlay); + standingFlagModel.setupAnim(angle); + renderPatterns(poseStack, bufferSource, packedLight, packedOverlay, standingFlagModel.root(), ModelBakery.BANNER_BASE, true, baseColor, patterns); poseStack.popPose(); } @@ -106,7 +100,7 @@ public class BannerRenderer implements BlockEntityRenderer { */ public static void renderPatterns( PoseStack poseStack, - MultiBufferSource buffer, + MultiBufferSource bufferSource, int packedLight, int packedOverlay, ModelPart flagPart, @@ -115,29 +109,29 @@ public class BannerRenderer implements BlockEntityRenderer { DyeColor baseColor, BannerPatternLayers patterns ) { - renderPatterns(poseStack, buffer, packedLight, packedOverlay, flagPart, flagMaterial, banner, baseColor, patterns, false, true); + renderPatterns(poseStack, bufferSource, packedLight, packedOverlay, flagPart, flagMaterial, banner, baseColor, patterns, false, true); } public static void renderPatterns( PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - ModelPart modelPart, - Material material, - boolean bl, - DyeColor dyeColor, - BannerPatternLayers bannerPatternLayers, - boolean bl2, - boolean bl3 + MultiBufferSource bufferSource, + int packedLight, + int packedOverlay, + ModelPart flagPart, + Material flagMaterial, + boolean banner, + DyeColor baseColor, + BannerPatternLayers patterns, + boolean withGlint, + boolean noEntity ) { - modelPart.render(poseStack, material.buffer(multiBufferSource, RenderType::entitySolid, bl3, bl2), i, j); - renderPatternLayer(poseStack, multiBufferSource, i, j, modelPart, bl ? Sheets.BANNER_BASE : Sheets.SHIELD_BASE, dyeColor); + flagPart.render(poseStack, flagMaterial.buffer(bufferSource, RenderType::entitySolid, noEntity, withGlint), packedLight, packedOverlay); + renderPatternLayer(poseStack, bufferSource, packedLight, packedOverlay, flagPart, banner ? Sheets.BANNER_BASE : Sheets.SHIELD_BASE, baseColor); - for (int k = 0; k < 16 && k < bannerPatternLayers.layers().size(); k++) { - Layer layer = (Layer)bannerPatternLayers.layers().get(k); - Material material2 = bl ? Sheets.getBannerMaterial(layer.pattern()) : Sheets.getShieldMaterial(layer.pattern()); - renderPatternLayer(poseStack, multiBufferSource, i, j, modelPart, material2, layer.color()); + for (int i = 0; i < 16 && i < patterns.layers().size(); i++) { + BannerPatternLayers.Layer layer = (BannerPatternLayers.Layer)patterns.layers().get(i); + Material material = banner ? Sheets.getBannerMaterial(layer.pattern()) : Sheets.getShieldMaterial(layer.pattern()); + renderPatternLayer(poseStack, bufferSource, packedLight, packedOverlay, flagPart, material, layer.color()); } } diff --git a/net/minecraft/client/renderer/blockentity/BeaconRenderer.java b/net/minecraft/client/renderer/blockentity/BeaconRenderer.java index bd1c869e..b4254075 100644 --- a/net/minecraft/client/renderer/blockentity/BeaconRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BeaconRenderer.java @@ -6,6 +6,8 @@ import com.mojang.math.Axis; import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; @@ -13,31 +15,41 @@ import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; -import net.minecraft.world.level.block.entity.BeaconBlockEntity; +import net.minecraft.world.level.block.entity.BeaconBeamOwner; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) -public class BeaconRenderer implements BlockEntityRenderer { +public class BeaconRenderer implements BlockEntityRenderer { public static final ResourceLocation BEAM_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/beacon_beam.png"); - public static final int MAX_RENDER_Y = 1024; + public static final int MAX_RENDER_Y = 2048; + private static final float BEAM_SCALE_THRESHOLD = 96.0F; + public static final float SOLID_BEAM_RADIUS = 0.2F; + public static final float BEAM_GLOW_RADIUS = 0.25F; public BeaconRenderer(Context context) { } - public void render(BeaconBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + @Override + public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Vec3 cameraPos) { long l = blockEntity.getLevel().getGameTime(); - List list = blockEntity.getBeamSections(); + float f = (float)cameraPos.subtract(blockEntity.getBlockPos().getCenter()).horizontalDistance(); + LocalPlayer localPlayer = Minecraft.getInstance().player; + float g = localPlayer != null && localPlayer.isScoping() ? 1.0F : Math.max(1.0F, f / 96.0F); + List list = blockEntity.getBeamSections(); int i = 0; for (int j = 0; j < list.size(); j++) { - BeaconBlockEntity.BeaconBeamSection beaconBeamSection = (BeaconBlockEntity.BeaconBeamSection)list.get(j); - renderBeaconBeam(poseStack, bufferSource, partialTick, l, i, j == list.size() - 1 ? 1024 : beaconBeamSection.getHeight(), beaconBeamSection.getColor()); - i += beaconBeamSection.getHeight(); + BeaconBeamOwner.Section section = (BeaconBeamOwner.Section)list.get(j); + renderBeaconBeam(poseStack, bufferSource, partialTick, g, l, i, j == list.size() - 1 ? 2048 : section.getHeight(), section.getColor()); + i += section.getHeight(); } } - private static void renderBeaconBeam(PoseStack poseStack, MultiBufferSource bufferSource, float partialTick, long gameTime, int yOffset, int height, int color) { - renderBeaconBeam(poseStack, bufferSource, BEAM_LOCATION, partialTick, 1.0F, gameTime, yOffset, height, color, 0.2F, 0.25F); + private static void renderBeaconBeam( + PoseStack poseStack, MultiBufferSource bufferSource, float partialTick, float radius, long gameTime, int yOffset, int height, int color + ) { + renderBeaconBeam(poseStack, bufferSource, BEAM_LOCATION, partialTick, 1.0F, gameTime, yOffset, height, color, 0.2F * radius, 0.25F * radius); } public static void renderBeaconBeam( @@ -177,16 +189,18 @@ public class BeaconRenderer implements BlockEntityRenderer { .setNormal(pose, 0.0F, 1.0F, 0.0F); } - public boolean shouldRenderOffScreen(BeaconBlockEntity blockEntity) { + @Override + public boolean shouldRenderOffScreen(T blockEntity) { return true; } @Override public int getViewDistance() { - return 256; + return Minecraft.getInstance().options.getEffectiveRenderDistance() * 16; } - public boolean shouldRender(BeaconBlockEntity blockEntity, Vec3 cameraPos) { + @Override + public boolean shouldRender(T blockEntity, Vec3 cameraPos) { return Vec3.atCenterOf(blockEntity.getBlockPos()).multiply(1.0, 0.0, 1.0).closerThan(cameraPos.multiply(1.0, 0.0, 1.0), this.getViewDistance()); } } diff --git a/net/minecraft/client/renderer/blockentity/BedRenderer.java b/net/minecraft/client/renderer/blockentity/BedRenderer.java index 0772e916..ebd611c6 100644 --- a/net/minecraft/client/renderer/blockentity/BedRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BedRenderer.java @@ -6,6 +6,8 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.Model; +import net.minecraft.client.model.Model.Simple; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; @@ -22,10 +24,12 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BedBlock; import net.minecraft.world.level.block.ChestBlock; import net.minecraft.world.level.block.DoubleBlockCombiner; +import net.minecraft.world.level.block.DoubleBlockCombiner.NeighborCombineResult; import net.minecraft.world.level.block.entity.BedBlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BedPart; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class BedRenderer implements BlockEntityRenderer { @@ -33,8 +37,12 @@ public class BedRenderer implements BlockEntityRenderer { private final Model footModel; public BedRenderer(Context context) { - this.headModel = new Model.Simple(context.bakeLayer(ModelLayers.BED_HEAD), RenderType::entitySolid); - this.footModel = new Model.Simple(context.bakeLayer(ModelLayers.BED_FOOT), RenderType::entitySolid); + this(context.getModelSet()); + } + + public BedRenderer(EntityModelSet modelSet) { + this.headModel = new Simple(modelSet.bakeLayer(ModelLayers.BED_HEAD), RenderType::entitySolid); + this.footModel = new Simple(modelSet.bakeLayer(ModelLayers.BED_FOOT), RenderType::entitySolid); } public static LayerDefinition createHeadLayer() { @@ -69,49 +77,51 @@ public class BedRenderer implements BlockEntityRenderer { return LayerDefinition.create(meshDefinition, 64, 64); } - public void render(BedBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - Material material = Sheets.BED_TEXTURES[blockEntity.getColor().getId()]; - Level level = blockEntity.getLevel(); + public void render(BedBlockEntity bedBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + Level level = bedBlockEntity.getLevel(); if (level != null) { - BlockState blockState = blockEntity.getBlockState(); - DoubleBlockCombiner.NeighborCombineResult neighborCombineResult = DoubleBlockCombiner.combineWithNeigbour( + Material material = Sheets.getBedMaterial(bedBlockEntity.getColor()); + BlockState blockState = bedBlockEntity.getBlockState(); + NeighborCombineResult neighborCombineResult = DoubleBlockCombiner.combineWithNeigbour( BlockEntityType.BED, BedBlock::getBlockType, BedBlock::getConnectedDirection, ChestBlock.FACING, blockState, level, - blockEntity.getBlockPos(), + bedBlockEntity.getBlockPos(), (levelAccessor, blockPos) -> false ); - int i = neighborCombineResult.apply(new BrightnessCombiner<>()).get(packedLight); + int k = neighborCombineResult.apply(new BrightnessCombiner<>()).get(i); this.renderPiece( poseStack, - bufferSource, + multiBufferSource, blockState.getValue(BedBlock.PART) == BedPart.HEAD ? this.headModel : this.footModel, blockState.getValue(BedBlock.FACING), material, - i, - packedOverlay, + k, + j, false ); - } else { - this.renderPiece(poseStack, bufferSource, this.headModel, Direction.SOUTH, material, packedLight, packedOverlay, false); - this.renderPiece(poseStack, bufferSource, this.footModel, Direction.SOUTH, material, packedLight, packedOverlay, true); } } + public void renderInHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Material material) { + this.renderPiece(poseStack, bufferSource, this.headModel, Direction.SOUTH, material, packedLight, packedOverlay, false); + this.renderPiece(poseStack, bufferSource, this.footModel, Direction.SOUTH, material, packedLight, packedOverlay, true); + } + private void renderPiece( - PoseStack poseStack, MultiBufferSource multiBufferSource, Model model, Direction direction, Material material, int i, int j, boolean bl + PoseStack poseStack, MultiBufferSource bufferSource, Model model, Direction direction, Material material, int packedLight, int packedOverlay, boolean isFeet ) { poseStack.pushPose(); - poseStack.translate(0.0F, 0.5625F, bl ? -1.0F : 0.0F); + poseStack.translate(0.0F, 0.5625F, isFeet ? -1.0F : 0.0F); poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); poseStack.translate(0.5F, 0.5F, 0.5F); poseStack.mulPose(Axis.ZP.rotationDegrees(180.0F + direction.toYRot())); poseStack.translate(-0.5F, -0.5F, -0.5F); - VertexConsumer vertexConsumer = material.buffer(multiBufferSource, RenderType::entitySolid); - model.renderToBuffer(poseStack, vertexConsumer, i, j); + VertexConsumer vertexConsumer = material.buffer(bufferSource, RenderType::entitySolid); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/BellRenderer.java b/net/minecraft/client/renderer/blockentity/BellRenderer.java index 6bb35b18..f9f528f4 100644 --- a/net/minecraft/client/renderer/blockentity/BellRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BellRenderer.java @@ -13,6 +13,7 @@ import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.resources.model.Material; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BellBlockEntity; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class BellRenderer implements BlockEntityRenderer { @@ -25,9 +26,9 @@ public class BellRenderer implements BlockEntityRenderer { this.model = new BellModel(context.bakeLayer(ModelLayers.BELL)); } - public void render(BellBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - VertexConsumer vertexConsumer = BELL_RESOURCE_LOCATION.buffer(bufferSource, RenderType::entitySolid); - this.model.setupAnim(blockEntity, partialTick); - this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + public void render(BellBlockEntity bellBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + VertexConsumer vertexConsumer = BELL_RESOURCE_LOCATION.buffer(multiBufferSource, RenderType::entitySolid); + this.model.setupAnim(bellBlockEntity, f); + this.model.renderToBuffer(poseStack, vertexConsumer, i, j); } } diff --git a/net/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher.java b/net/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher.java index 5df35bd9..1b3ab6ec 100644 --- a/net/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher.java +++ b/net/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher.java @@ -18,6 +18,7 @@ import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.ResourceManagerReloadListener; @@ -25,28 +26,32 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class BlockEntityRenderDispatcher implements ResourceManagerReloadListener { private Map, BlockEntityRenderer> renderers = ImmutableMap.of(); private final Font font; - private final EntityModelSet entityModelSet; + private final Supplier entityModelSet; public Level level; public Camera camera; public HitResult cameraHitResult; - private final Supplier blockRenderDispatcher; - private final Supplier itemRenderer; - private final Supplier entityRenderer; + private final BlockRenderDispatcher blockRenderDispatcher; + private final ItemModelResolver itemModelResolver; + private final ItemRenderer itemRenderer; + private final EntityRenderDispatcher entityRenderer; public BlockEntityRenderDispatcher( Font font, - EntityModelSet entityModelSet, - Supplier blockRenderDispatcher, - Supplier itemRenderer, - Supplier entityRenderer + Supplier entityModelSet, + BlockRenderDispatcher blockRenderDispatcher, + ItemModelResolver itemModelResolver, + ItemRenderer itemRenderer, + EntityRenderDispatcher entityRenderer ) { this.itemRenderer = itemRenderer; + this.itemModelResolver = itemModelResolver; this.entityRenderer = entityRenderer; this.font = font; this.entityModelSet = entityModelSet; @@ -72,14 +77,21 @@ public class BlockEntityRenderDispatcher implements ResourceManagerReloadListene if (blockEntityRenderer != null) { if (blockEntity.hasLevel() && blockEntity.getType().isValid(blockEntity.getBlockState())) { if (blockEntityRenderer.shouldRender(blockEntity, this.camera.getPosition())) { - tryRender(blockEntity, () -> setupAndRender(blockEntityRenderer, blockEntity, partialTick, poseStack, bufferSource)); + try { + setupAndRender(blockEntityRenderer, blockEntity, partialTick, poseStack, bufferSource, this.camera.getPosition()); + } catch (Throwable var9) { + CrashReport crashReport = CrashReport.forThrowable(var9, "Rendering Block Entity"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Block Entity Details"); + blockEntity.fillCrashReportCategory(crashReportCategory); + throw new ReportedException(crashReport); + } } } } } private static void setupAndRender( - BlockEntityRenderer renderer, T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource + BlockEntityRenderer renderer, T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, Vec3 cameraPos ) { Level level = blockEntity.getLevel(); int i; @@ -89,31 +101,7 @@ public class BlockEntityRenderDispatcher implements ResourceManagerReloadListene i = 15728880; } - renderer.render(blockEntity, partialTick, poseStack, bufferSource, i, OverlayTexture.NO_OVERLAY); - } - - /** - * @return {@code true} if no renderer was found; otherwise {@code false} if render completed - */ - public boolean renderItem(E blockEntity, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - BlockEntityRenderer blockEntityRenderer = this.getRenderer(blockEntity); - if (blockEntityRenderer == null) { - return true; - } else { - tryRender(blockEntity, () -> blockEntityRenderer.render(blockEntity, 0.0F, poseStack, bufferSource, packedLight, packedOverlay)); - return false; - } - } - - private static void tryRender(BlockEntity blockEntity, Runnable renderer) { - try { - renderer.run(); - } catch (Throwable var5) { - CrashReport crashReport = CrashReport.forThrowable(var5, "Rendering Block Entity"); - CrashReportCategory crashReportCategory = crashReport.addCategory("Block Entity Details"); - blockEntity.fillCrashReportCategory(crashReportCategory); - throw new ReportedException(crashReport); - } + renderer.render(blockEntity, partialTick, poseStack, bufferSource, i, OverlayTexture.NO_OVERLAY, cameraPos); } public void setLevel(@Nullable Level level) { @@ -126,12 +114,7 @@ public class BlockEntityRenderDispatcher implements ResourceManagerReloadListene @Override public void onResourceManagerReload(ResourceManager resourceManager) { Context context = new Context( - this, - (BlockRenderDispatcher)this.blockRenderDispatcher.get(), - (ItemRenderer)this.itemRenderer.get(), - (EntityRenderDispatcher)this.entityRenderer.get(), - this.entityModelSet, - this.font + this, this.blockRenderDispatcher, this.itemModelResolver, this.itemRenderer, this.entityRenderer, (EntityModelSet)this.entityModelSet.get(), this.font ); this.renderers = BlockEntityRenderers.createEntityRenderers(context); } diff --git a/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java b/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java index 22cdac18..d4901d25 100644 --- a/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java @@ -9,7 +9,7 @@ import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public interface BlockEntityRenderer { - void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay); + void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Vec3 cameraPos); default boolean shouldRenderOffScreen(T blockEntity) { return false; diff --git a/net/minecraft/client/renderer/blockentity/BlockEntityRendererProvider.java b/net/minecraft/client/renderer/blockentity/BlockEntityRendererProvider.java index 578d3737..49ee168a 100644 --- a/net/minecraft/client/renderer/blockentity/BlockEntityRendererProvider.java +++ b/net/minecraft/client/renderer/blockentity/BlockEntityRendererProvider.java @@ -9,6 +9,7 @@ import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.world.level.block.entity.BlockEntity; @FunctionalInterface @@ -20,6 +21,7 @@ public interface BlockEntityRendererProvider { public static class Context { private final BlockEntityRenderDispatcher blockEntityRenderDispatcher; private final BlockRenderDispatcher blockRenderDispatcher; + private final ItemModelResolver itemModelResolver; private final ItemRenderer itemRenderer; private final EntityRenderDispatcher entityRenderer; private final EntityModelSet modelSet; @@ -28,6 +30,7 @@ public interface BlockEntityRendererProvider { public Context( BlockEntityRenderDispatcher blockEntityRenderDispatcher, BlockRenderDispatcher blockRenderDispatcher, + ItemModelResolver itemModelResolver, ItemRenderer itemRenderer, EntityRenderDispatcher entityRenderer, EntityModelSet modelSet, @@ -35,6 +38,7 @@ public interface BlockEntityRendererProvider { ) { this.blockEntityRenderDispatcher = blockEntityRenderDispatcher; this.blockRenderDispatcher = blockRenderDispatcher; + this.itemModelResolver = itemModelResolver; this.itemRenderer = itemRenderer; this.entityRenderer = entityRenderer; this.modelSet = modelSet; @@ -53,6 +57,10 @@ public interface BlockEntityRendererProvider { return this.entityRenderer; } + public ItemModelResolver getItemModelResolver() { + return this.itemModelResolver; + } + public ItemRenderer getItemRenderer() { return this.itemRenderer; } diff --git a/net/minecraft/client/renderer/blockentity/BlockEntityRenderers.java b/net/minecraft/client/renderer/blockentity/BlockEntityRenderers.java index de0a8076..f320e32d 100644 --- a/net/minecraft/client/renderer/blockentity/BlockEntityRenderers.java +++ b/net/minecraft/client/renderer/blockentity/BlockEntityRenderers.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableMap.Builder; import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -18,7 +19,7 @@ public class BlockEntityRenderers { PROVIDERS.put(type, renderProvider); } - public static Map, BlockEntityRenderer> createEntityRenderers(BlockEntityRendererProvider.Context context) { + public static Map, BlockEntityRenderer> createEntityRenderers(Context context) { Builder, BlockEntityRenderer> builder = ImmutableMap.builder(); PROVIDERS.forEach((blockEntityType, blockEntityRendererProvider) -> { try { @@ -45,7 +46,8 @@ public class BlockEntityRenderers { register(BlockEntityType.BEACON, BeaconRenderer::new); register(BlockEntityType.SKULL, SkullBlockRenderer::new); register(BlockEntityType.BANNER, BannerRenderer::new); - register(BlockEntityType.STRUCTURE_BLOCK, StructureBlockRenderer::new); + register(BlockEntityType.STRUCTURE_BLOCK, BlockEntityWithBoundingBoxRenderer::new); + register(BlockEntityType.TEST_INSTANCE_BLOCK, TestInstanceRenderer::new); register(BlockEntityType.SHULKER_BOX, ShulkerBoxRenderer::new); register(BlockEntityType.BED, BedRenderer::new); register(BlockEntityType.CONDUIT, ConduitRenderer::new); diff --git a/net/minecraft/client/renderer/blockentity/BlockEntityWithBoundingBoxRenderer.java b/net/minecraft/client/renderer/blockentity/BlockEntityWithBoundingBoxRenderer.java new file mode 100644 index 00000000..f3f12ffa --- /dev/null +++ b/net/minecraft/client/renderer/blockentity/BlockEntityWithBoundingBoxRenderer.java @@ -0,0 +1,134 @@ +package net.minecraft.client.renderer.blockentity; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.ShapeRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Vec3i; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BoundingBoxRenderable; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.BitSetDiscreteVoxelShape; +import net.minecraft.world.phys.shapes.DiscreteVoxelShape; + +@Environment(EnvType.CLIENT) +public class BlockEntityWithBoundingBoxRenderer implements BlockEntityRenderer { + public BlockEntityWithBoundingBoxRenderer(Context context) { + } + + @Override + public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Vec3 cameraPos) { + if (Minecraft.getInstance().player.canUseGameMasterBlocks() || Minecraft.getInstance().player.isSpectator()) { + BoundingBoxRenderable.Mode mode = blockEntity.renderMode(); + if (mode != BoundingBoxRenderable.Mode.NONE) { + BoundingBoxRenderable.RenderableBox renderableBox = blockEntity.getRenderableBox(); + BlockPos blockPos = renderableBox.localPos(); + Vec3i vec3i = renderableBox.size(); + if (vec3i.getX() >= 1 && vec3i.getY() >= 1 && vec3i.getZ() >= 1) { + float f = 1.0F; + float g = 0.9F; + float h = 0.5F; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); + BlockPos blockPos2 = blockPos.offset(vec3i); + ShapeRenderer.renderLineBox( + poseStack, + vertexConsumer, + blockPos.getX(), + blockPos.getY(), + blockPos.getZ(), + blockPos2.getX(), + blockPos2.getY(), + blockPos2.getZ(), + 0.9F, + 0.9F, + 0.9F, + 1.0F, + 0.5F, + 0.5F, + 0.5F + ); + if (mode == BoundingBoxRenderable.Mode.BOX_AND_INVISIBLE_BLOCKS && blockEntity.getLevel() != null) { + this.renderInvisibleBlocks(blockEntity, blockEntity.getLevel(), blockPos, vec3i, bufferSource, poseStack); + } + } + } + } + } + + private void renderInvisibleBlocks(T blockEntity, BlockGetter level, BlockPos pos, Vec3i boxSize, MultiBufferSource bufferSource, PoseStack poseStack) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); + BlockPos blockPos = blockEntity.getBlockPos(); + BlockPos blockPos2 = blockPos.offset(pos); + + for (BlockPos blockPos3 : BlockPos.betweenClosed(blockPos2, blockPos2.offset(boxSize).offset(-1, -1, -1))) { + BlockState blockState = level.getBlockState(blockPos3); + boolean bl = blockState.isAir(); + boolean bl2 = blockState.is(Blocks.STRUCTURE_VOID); + boolean bl3 = blockState.is(Blocks.BARRIER); + boolean bl4 = blockState.is(Blocks.LIGHT); + boolean bl5 = bl2 || bl3 || bl4; + if (bl || bl5) { + float f = bl ? 0.05F : 0.0F; + double d = blockPos3.getX() - blockPos.getX() + 0.45F - f; + double e = blockPos3.getY() - blockPos.getY() + 0.45F - f; + double g = blockPos3.getZ() - blockPos.getZ() + 0.45F - f; + double h = blockPos3.getX() - blockPos.getX() + 0.55F + f; + double i = blockPos3.getY() - blockPos.getY() + 0.55F + f; + double j = blockPos3.getZ() - blockPos.getZ() + 0.55F + f; + if (bl) { + ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 0.5F, 0.5F, 1.0F, 1.0F, 0.5F, 0.5F, 1.0F); + } else if (bl2) { + ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 0.75F, 0.75F, 1.0F, 1.0F, 0.75F, 0.75F); + } else if (bl3) { + ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F); + } else if (bl4) { + ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.0F); + } + } + } + } + + private void renderStructureVoids(T blockEntity, BlockPos pos, Vec3i boxSize, VertexConsumer consumer, PoseStack poseStack) { + BlockGetter blockGetter = blockEntity.getLevel(); + if (blockGetter != null) { + BlockPos blockPos = blockEntity.getBlockPos(); + DiscreteVoxelShape discreteVoxelShape = new BitSetDiscreteVoxelShape(boxSize.getX(), boxSize.getY(), boxSize.getZ()); + + for (BlockPos blockPos2 : BlockPos.betweenClosed(pos, pos.offset(boxSize).offset(-1, -1, -1))) { + if (blockGetter.getBlockState(blockPos2).is(Blocks.STRUCTURE_VOID)) { + discreteVoxelShape.fill(blockPos2.getX() - pos.getX(), blockPos2.getY() - pos.getY(), blockPos2.getZ() - pos.getZ()); + } + } + + discreteVoxelShape.forAllFaces((direction, i, j, k) -> { + float f = 0.48F; + float g = i + pos.getX() - blockPos.getX() + 0.5F - 0.48F; + float h = j + pos.getY() - blockPos.getY() + 0.5F - 0.48F; + float l = k + pos.getZ() - blockPos.getZ() + 0.5F - 0.48F; + float m = i + pos.getX() - blockPos.getX() + 0.5F + 0.48F; + float n = j + pos.getY() - blockPos.getY() + 0.5F + 0.48F; + float o = k + pos.getZ() - blockPos.getZ() + 0.5F + 0.48F; + ShapeRenderer.renderFace(poseStack, consumer, direction, g, h, l, m, n, o, 0.75F, 0.75F, 1.0F, 0.2F); + }); + } + } + + @Override + public boolean shouldRenderOffScreen(T blockEntity) { + return true; + } + + @Override + public int getViewDistance() { + return 96; + } +} diff --git a/net/minecraft/client/renderer/blockentity/BrightnessCombiner.java b/net/minecraft/client/renderer/blockentity/BrightnessCombiner.java index 6acad9ae..76f4a8d0 100644 --- a/net/minecraft/client/renderer/blockentity/BrightnessCombiner.java +++ b/net/minecraft/client/renderer/blockentity/BrightnessCombiner.java @@ -5,15 +5,15 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.LightTexture; -import net.minecraft.world.level.block.DoubleBlockCombiner; +import net.minecraft.world.level.block.DoubleBlockCombiner.Combiner; import net.minecraft.world.level.block.entity.BlockEntity; @Environment(EnvType.CLIENT) -public class BrightnessCombiner implements DoubleBlockCombiner.Combiner { - public Int2IntFunction acceptDouble(S first, S second) { +public class BrightnessCombiner implements Combiner { + public Int2IntFunction acceptDouble(S blockEntity, S blockEntity2) { return i -> { - int j = LevelRenderer.getLightColor(first.getLevel(), first.getBlockPos()); - int k = LevelRenderer.getLightColor(second.getLevel(), second.getBlockPos()); + int j = LevelRenderer.getLightColor(blockEntity.getLevel(), blockEntity.getBlockPos()); + int k = LevelRenderer.getLightColor(blockEntity2.getLevel(), blockEntity2.getBlockPos()); int l = LightTexture.block(j); int m = LightTexture.block(k); int n = LightTexture.sky(j); @@ -22,7 +22,7 @@ public class BrightnessCombiner implements DoubleBlockCom }; } - public Int2IntFunction acceptSingle(S single) { + public Int2IntFunction acceptSingle(S blockEntity) { return i -> i; } diff --git a/net/minecraft/client/renderer/blockentity/BrushableBlockRenderer.java b/net/minecraft/client/renderer/blockentity/BrushableBlockRenderer.java index 64bdeddd..31c2c963 100644 --- a/net/minecraft/client/renderer/blockentity/BrushableBlockRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BrushableBlockRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.Direction; @@ -13,35 +14,40 @@ import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BrushableBlockEntity; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class BrushableBlockRenderer implements BlockEntityRenderer { private final ItemRenderer itemRenderer; - public BrushableBlockRenderer(BlockEntityRendererProvider.Context context) { + public BrushableBlockRenderer(Context context) { this.itemRenderer = context.getItemRenderer(); } - public void render( - BrushableBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay - ) { - if (blockEntity.getLevel() != null) { - int i = (Integer)blockEntity.getBlockState().getValue(BlockStateProperties.DUSTED); - if (i > 0) { - Direction direction = blockEntity.getHitDirection(); + public void render(BrushableBlockEntity brushableBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + if (brushableBlockEntity.getLevel() != null) { + int k = (Integer)brushableBlockEntity.getBlockState().getValue(BlockStateProperties.DUSTED); + if (k > 0) { + Direction direction = brushableBlockEntity.getHitDirection(); if (direction != null) { - ItemStack itemStack = blockEntity.getItem(); + ItemStack itemStack = brushableBlockEntity.getItem(); if (!itemStack.isEmpty()) { poseStack.pushPose(); poseStack.translate(0.0F, 0.5F, 0.0F); - float[] fs = this.translations(direction, i); + float[] fs = this.translations(direction, k); poseStack.translate(fs[0], fs[1], fs[2]); poseStack.mulPose(Axis.YP.rotationDegrees(75.0F)); boolean bl = direction == Direction.EAST || direction == Direction.WEST; poseStack.mulPose(Axis.YP.rotationDegrees((bl ? 90 : 0) + 11)); poseStack.scale(0.5F, 0.5F, 0.5F); - int j = LevelRenderer.getLightColor(blockEntity.getLevel(), blockEntity.getBlockState(), blockEntity.getBlockPos().relative(direction)); - this.itemRenderer.renderStatic(itemStack, ItemDisplayContext.FIXED, j, OverlayTexture.NO_OVERLAY, poseStack, bufferSource, blockEntity.getLevel(), 0); + int l = LevelRenderer.getLightColor( + LevelRenderer.BrightnessGetter.DEFAULT, + brushableBlockEntity.getLevel(), + brushableBlockEntity.getBlockState(), + brushableBlockEntity.getBlockPos().relative(direction) + ); + this.itemRenderer + .renderStatic(itemStack, ItemDisplayContext.FIXED, l, OverlayTexture.NO_OVERLAY, poseStack, multiBufferSource, brushableBlockEntity.getLevel(), 0); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/CampfireRenderer.java b/net/minecraft/client/renderer/blockentity/CampfireRenderer.java index f2b9ff94..237c9517 100644 --- a/net/minecraft/client/renderer/blockentity/CampfireRenderer.java +++ b/net/minecraft/client/renderer/blockentity/CampfireRenderer.java @@ -13,6 +13,7 @@ import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.CampfireBlock; import net.minecraft.world.level.block.entity.CampfireBlockEntity; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class CampfireRenderer implements BlockEntityRenderer { @@ -23,23 +24,23 @@ public class CampfireRenderer implements BlockEntityRenderer nonNullList = blockEntity.getItems(); - int i = (int)blockEntity.getBlockPos().asLong(); + public void render(CampfireBlockEntity campfireBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + Direction direction = campfireBlockEntity.getBlockState().getValue(CampfireBlock.FACING); + NonNullList nonNullList = campfireBlockEntity.getItems(); + int k = (int)campfireBlockEntity.getBlockPos().asLong(); - for (int j = 0; j < nonNullList.size(); j++) { - ItemStack itemStack = nonNullList.get(j); + for (int l = 0; l < nonNullList.size(); l++) { + ItemStack itemStack = nonNullList.get(l); if (itemStack != ItemStack.EMPTY) { poseStack.pushPose(); poseStack.translate(0.5F, 0.44921875F, 0.5F); - Direction direction2 = Direction.from2DDataValue((j + direction.get2DDataValue()) % 4); - float f = -direction2.toYRot(); - poseStack.mulPose(Axis.YP.rotationDegrees(f)); + Direction direction2 = Direction.from2DDataValue((l + direction.get2DDataValue()) % 4); + float g = -direction2.toYRot(); + poseStack.mulPose(Axis.YP.rotationDegrees(g)); poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); poseStack.translate(-0.3125F, -0.3125F, 0.0F); poseStack.scale(0.375F, 0.375F, 0.375F); - this.itemRenderer.renderStatic(itemStack, ItemDisplayContext.FIXED, packedLight, packedOverlay, poseStack, bufferSource, blockEntity.getLevel(), i + j); + this.itemRenderer.renderStatic(itemStack, ItemDisplayContext.FIXED, i, j, poseStack, multiBufferSource, campfireBlockEntity.getLevel(), k + l); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/ChestRenderer.java b/net/minecraft/client/renderer/blockentity/ChestRenderer.java index 8f47d141..b09583e7 100644 --- a/net/minecraft/client/renderer/blockentity/ChestRenderer.java +++ b/net/minecraft/client/renderer/blockentity/ChestRenderer.java @@ -18,38 +18,40 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.AbstractChestBlock; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.ChestBlock; -import net.minecraft.world.level.block.DoubleBlockCombiner; +import net.minecraft.world.level.block.DoubleBlockCombiner.Combiner; +import net.minecraft.world.level.block.DoubleBlockCombiner.NeighborCombineResult; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.entity.LidBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.ChestType; import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class ChestRenderer implements BlockEntityRenderer { private final ChestModel singleModel; private final ChestModel doubleLeftModel; private final ChestModel doubleRightModel; - private boolean xmasTextures; + private final boolean xmasTextures = xmasTextures(); public ChestRenderer(Context context) { - Calendar calendar = Calendar.getInstance(); - if (calendar.get(2) + 1 == 12 && calendar.get(5) >= 24 && calendar.get(5) <= 26) { - this.xmasTextures = true; - } - this.singleModel = new ChestModel(context.bakeLayer(ModelLayers.CHEST)); this.doubleLeftModel = new ChestModel(context.bakeLayer(ModelLayers.DOUBLE_CHEST_LEFT)); this.doubleRightModel = new ChestModel(context.bakeLayer(ModelLayers.DOUBLE_CHEST_RIGHT)); } + public static boolean xmasTextures() { + Calendar calendar = Calendar.getInstance(); + return calendar.get(2) + 1 == 12 && calendar.get(5) >= 24 && calendar.get(5) <= 26; + } + @Override - public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Vec3 cameraPos) { Level level = blockEntity.getLevel(); boolean bl = level != null; BlockState blockState = bl ? blockEntity.getBlockState() : Blocks.CHEST.defaultBlockState().setValue((Property)ChestBlock.FACING, Direction.SOUTH); - ChestType chestType = blockState.hasProperty((Property)ChestBlock.TYPE) ? blockState.getValue(ChestBlock.TYPE) : ChestType.SINGLE; + ChestType chestType = blockState.hasProperty(ChestBlock.TYPE) ? blockState.getValue(ChestBlock.TYPE) : ChestType.SINGLE; if (blockState.getBlock() instanceof AbstractChestBlock abstractChestBlock) { boolean bl2 = chestType != ChestType.SINGLE; poseStack.pushPose(); @@ -57,11 +59,11 @@ public class ChestRenderer implements Bl poseStack.translate(0.5F, 0.5F, 0.5F); poseStack.mulPose(Axis.YP.rotationDegrees(-f)); poseStack.translate(-0.5F, -0.5F, -0.5F); - DoubleBlockCombiner.NeighborCombineResult neighborCombineResult; + NeighborCombineResult neighborCombineResult; if (bl) { neighborCombineResult = abstractChestBlock.combine(blockState, level, blockEntity.getBlockPos(), true); } else { - neighborCombineResult = DoubleBlockCombiner.Combiner::acceptNone; + neighborCombineResult = Combiner::acceptNone; } float g = neighborCombineResult.apply(ChestBlock.opennessCombiner(blockEntity)).get(partialTick); @@ -84,8 +86,8 @@ public class ChestRenderer implements Bl } } - private void render(PoseStack poseStack, VertexConsumer vertexConsumer, ChestModel chestModel, float f, int i, int j) { - chestModel.setupAnim(f); - chestModel.renderToBuffer(poseStack, vertexConsumer, i, j); + private void render(PoseStack poseStack, VertexConsumer buffer, ChestModel model, float openness, int packedLight, int packedOverlay) { + model.setupAnim(openness); + model.renderToBuffer(poseStack, buffer, packedLight, packedOverlay); } } diff --git a/net/minecraft/client/renderer/blockentity/ConduitRenderer.java b/net/minecraft/client/renderer/blockentity/ConduitRenderer.java index 115420d3..3f11a5dd 100644 --- a/net/minecraft/client/renderer/blockentity/ConduitRenderer.java +++ b/net/minecraft/client/renderer/blockentity/ConduitRenderer.java @@ -13,35 +13,34 @@ import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.MaterialMapper; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.resources.model.Material; -import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.level.block.entity.ConduitBlockEntity; +import net.minecraft.world.phys.Vec3; import org.joml.Quaternionf; import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class ConduitRenderer implements BlockEntityRenderer { - public static final Material SHELL_TEXTURE = new Material(TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/base")); - public static final Material ACTIVE_SHELL_TEXTURE = new Material(TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/cage")); - public static final Material WIND_TEXTURE = new Material(TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/wind")); - public static final Material VERTICAL_WIND_TEXTURE = new Material( - TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/wind_vertical") - ); - public static final Material OPEN_EYE_TEXTURE = new Material(TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/open_eye")); - public static final Material CLOSED_EYE_TEXTURE = new Material( - TextureAtlas.LOCATION_BLOCKS, ResourceLocation.withDefaultNamespace("entity/conduit/closed_eye") - ); + public static final MaterialMapper MAPPER = new MaterialMapper(TextureAtlas.LOCATION_BLOCKS, "entity/conduit"); + public static final Material SHELL_TEXTURE = MAPPER.defaultNamespaceApply("base"); + public static final Material ACTIVE_SHELL_TEXTURE = MAPPER.defaultNamespaceApply("cage"); + public static final Material WIND_TEXTURE = MAPPER.defaultNamespaceApply("wind"); + public static final Material VERTICAL_WIND_TEXTURE = MAPPER.defaultNamespaceApply("wind_vertical"); + public static final Material OPEN_EYE_TEXTURE = MAPPER.defaultNamespaceApply("open_eye"); + public static final Material CLOSED_EYE_TEXTURE = MAPPER.defaultNamespaceApply("closed_eye"); private final ModelPart eye; private final ModelPart wind; private final ModelPart shell; private final ModelPart cage; private final BlockEntityRenderDispatcher renderer; - public ConduitRenderer(BlockEntityRendererProvider.Context context) { + public ConduitRenderer(Context context) { this.renderer = context.getBlockEntityRenderDispatcher(); this.eye = context.bakeLayer(ModelLayers.CONDUIT_EYE); this.wind = context.bakeLayer(ModelLayers.CONDUIT_WIND); @@ -79,59 +78,54 @@ public class ConduitRenderer implements BlockEntityRenderer return LayerDefinition.create(meshDefinition, 32, 16); } - public void render(ConduitBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - float f = blockEntity.tickCount + partialTick; - if (!blockEntity.isActive()) { - float g = blockEntity.getActiveRotation(0.0F); - VertexConsumer vertexConsumer = SHELL_TEXTURE.buffer(bufferSource, RenderType::entitySolid); + public void render(ConduitBlockEntity conduitBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + float g = conduitBlockEntity.tickCount + f; + if (!conduitBlockEntity.isActive()) { + float h = conduitBlockEntity.getActiveRotation(0.0F); + VertexConsumer vertexConsumer = SHELL_TEXTURE.buffer(multiBufferSource, RenderType::entitySolid); poseStack.pushPose(); poseStack.translate(0.5F, 0.5F, 0.5F); - poseStack.mulPose(new Quaternionf().rotationY(g * (float) (Math.PI / 180.0))); - this.shell.render(poseStack, vertexConsumer, packedLight, packedOverlay); + poseStack.mulPose(new Quaternionf().rotationY(h * (float) (Math.PI / 180.0))); + this.shell.render(poseStack, vertexConsumer, i, j); poseStack.popPose(); } else { - float g = blockEntity.getActiveRotation(partialTick) * (180.0F / (float)Math.PI); - float h = Mth.sin(f * 0.1F) / 2.0F + 0.5F; - h = h * h + h; + float h = conduitBlockEntity.getActiveRotation(f) * (180.0F / (float)Math.PI); + float k = Mth.sin(g * 0.1F) / 2.0F + 0.5F; + k = k * k + k; poseStack.pushPose(); - poseStack.translate(0.5F, 0.3F + h * 0.2F, 0.5F); + poseStack.translate(0.5F, 0.3F + k * 0.2F, 0.5F); Vector3f vector3f = new Vector3f(0.5F, 1.0F, 0.5F).normalize(); - poseStack.mulPose(new Quaternionf().rotationAxis(g * (float) (Math.PI / 180.0), vector3f)); - this.cage.render(poseStack, ACTIVE_SHELL_TEXTURE.buffer(bufferSource, RenderType::entityCutoutNoCull), packedLight, packedOverlay); + poseStack.mulPose(new Quaternionf().rotationAxis(h * (float) (Math.PI / 180.0), vector3f)); + this.cage.render(poseStack, ACTIVE_SHELL_TEXTURE.buffer(multiBufferSource, RenderType::entityCutoutNoCull), i, j); poseStack.popPose(); - int i = blockEntity.tickCount / 66 % 3; + int l = conduitBlockEntity.tickCount / 66 % 3; poseStack.pushPose(); poseStack.translate(0.5F, 0.5F, 0.5F); - if (i == 1) { + if (l == 1) { poseStack.mulPose(new Quaternionf().rotationX((float) (Math.PI / 2))); - } else if (i == 2) { + } else if (l == 2) { poseStack.mulPose(new Quaternionf().rotationZ((float) (Math.PI / 2))); } - VertexConsumer vertexConsumer2 = (i == 1 ? VERTICAL_WIND_TEXTURE : WIND_TEXTURE).buffer(bufferSource, RenderType::entityCutoutNoCull); - this.wind.render(poseStack, vertexConsumer2, packedLight, packedOverlay); + VertexConsumer vertexConsumer2 = (l == 1 ? VERTICAL_WIND_TEXTURE : WIND_TEXTURE).buffer(multiBufferSource, RenderType::entityCutoutNoCull); + this.wind.render(poseStack, vertexConsumer2, i, j); poseStack.popPose(); poseStack.pushPose(); poseStack.translate(0.5F, 0.5F, 0.5F); poseStack.scale(0.875F, 0.875F, 0.875F); poseStack.mulPose(new Quaternionf().rotationXYZ((float) Math.PI, 0.0F, (float) Math.PI)); - this.wind.render(poseStack, vertexConsumer2, packedLight, packedOverlay); + this.wind.render(poseStack, vertexConsumer2, i, j); poseStack.popPose(); Camera camera = this.renderer.camera; poseStack.pushPose(); - poseStack.translate(0.5F, 0.3F + h * 0.2F, 0.5F); + poseStack.translate(0.5F, 0.3F + k * 0.2F, 0.5F); poseStack.scale(0.5F, 0.5F, 0.5F); - float j = -camera.getYRot(); - poseStack.mulPose(new Quaternionf().rotationYXZ(j * (float) (Math.PI / 180.0), camera.getXRot() * (float) (Math.PI / 180.0), (float) Math.PI)); - float k = 1.3333334F; + float m = -camera.getYRot(); + poseStack.mulPose(new Quaternionf().rotationYXZ(m * (float) (Math.PI / 180.0), camera.getXRot() * (float) (Math.PI / 180.0), (float) Math.PI)); + float n = 1.3333334F; poseStack.scale(1.3333334F, 1.3333334F, 1.3333334F); this.eye - .render( - poseStack, - (blockEntity.isHunting() ? OPEN_EYE_TEXTURE : CLOSED_EYE_TEXTURE).buffer(bufferSource, RenderType::entityCutoutNoCull), - packedLight, - packedOverlay - ); + .render(poseStack, (conduitBlockEntity.isHunting() ? OPEN_EYE_TEXTURE : CLOSED_EYE_TEXTURE).buffer(multiBufferSource, RenderType::entityCutoutNoCull), i, j); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/DecoratedPotRenderer.java b/net/minecraft/client/renderer/blockentity/DecoratedPotRenderer.java index 3b39adcf..66cfe3a3 100644 --- a/net/minecraft/client/renderer/blockentity/DecoratedPotRenderer.java +++ b/net/minecraft/client/renderer/blockentity/DecoratedPotRenderer.java @@ -7,6 +7,7 @@ import java.util.EnumSet; import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; @@ -18,6 +19,7 @@ import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.resources.model.Material; import net.minecraft.core.Direction; import net.minecraft.util.Mth; @@ -25,6 +27,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity; import net.minecraft.world.level.block.entity.DecoratedPotPatterns; import net.minecraft.world.level.block.entity.PotDecorations; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class DecoratedPotRenderer implements BlockEntityRenderer { @@ -44,12 +47,16 @@ public class DecoratedPotRenderer implements BlockEntityRenderer= 0.0F && f <= 1.0F) { + DecoratedPotBlockEntity.WobbleStyle wobbleStyle = decoratedPotBlockEntity.lastWobbleStyle; + if (wobbleStyle != null && decoratedPotBlockEntity.getLevel() != null) { + float g = ((float)(decoratedPotBlockEntity.getLevel().getGameTime() - decoratedPotBlockEntity.wobbleStartedAtTick) + f) / wobbleStyle.duration; + if (g >= 0.0F && g <= 1.0F) { if (wobbleStyle == DecoratedPotBlockEntity.WobbleStyle.POSITIVE) { - float g = 0.015625F; - float h = f * (float) (Math.PI * 2); - float i = -1.5F * (Mth.cos(h) + 0.5F) * Mth.sin(h / 2.0F); - poseStack.rotateAround(Axis.XP.rotation(i * 0.015625F), 0.5F, 0.0F, 0.5F); - float j = Mth.sin(h); - poseStack.rotateAround(Axis.ZP.rotation(j * 0.015625F), 0.5F, 0.0F, 0.5F); + float h = 0.015625F; + float k = g * (float) (Math.PI * 2); + float l = -1.5F * (Mth.cos(k) + 0.5F) * Mth.sin(k / 2.0F); + poseStack.rotateAround(Axis.XP.rotation(l * 0.015625F), 0.5F, 0.0F, 0.5F); + float m = Mth.sin(k); + poseStack.rotateAround(Axis.ZP.rotation(m * 0.015625F), 0.5F, 0.0F, 0.5F); } else { - float g = Mth.sin(-f * 3.0F * (float) Math.PI) * 0.125F; - float h = 1.0F - f; - poseStack.rotateAround(Axis.YP.rotation(g * h), 0.5F, 0.0F, 0.5F); + float h = Mth.sin(-g * 3.0F * (float) Math.PI) * 0.125F; + float k = 1.0F - g; + poseStack.rotateAround(Axis.YP.rotation(h * k), 0.5F, 0.0F, 0.5F); } } } + this.render(poseStack, multiBufferSource, i, j, decoratedPotBlockEntity.getDecorations()); + poseStack.popPose(); + } + + public void renderInHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, PotDecorations decorations) { + this.render(poseStack, bufferSource, packedLight, packedOverlay, decorations); + } + + private void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, PotDecorations decorations) { VertexConsumer vertexConsumer = Sheets.DECORATED_POT_BASE.buffer(bufferSource, RenderType::entitySolid); this.neck.render(poseStack, vertexConsumer, packedLight, packedOverlay); this.top.render(poseStack, vertexConsumer, packedLight, packedOverlay); this.bottom.render(poseStack, vertexConsumer, packedLight, packedOverlay); - PotDecorations potDecorations = blockEntity.getDecorations(); - this.renderSide(this.frontSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(potDecorations.front())); - this.renderSide(this.backSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(potDecorations.back())); - this.renderSide(this.leftSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(potDecorations.left())); - this.renderSide(this.rightSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(potDecorations.right())); - poseStack.popPose(); + this.renderSide(this.frontSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(decorations.front())); + this.renderSide(this.backSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(decorations.back())); + this.renderSide(this.leftSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(decorations.left())); + this.renderSide(this.rightSide, poseStack, bufferSource, packedLight, packedOverlay, getSideMaterial(decorations.right())); } private void renderSide(ModelPart modelPart, PoseStack poseStack, MultiBufferSource buffer, int packedLight, int packedOverlay, Material material) { diff --git a/net/minecraft/client/renderer/blockentity/EnchantTableRenderer.java b/net/minecraft/client/renderer/blockentity/EnchantTableRenderer.java index 8bd5521a..5f64f0a1 100644 --- a/net/minecraft/client/renderer/blockentity/EnchantTableRenderer.java +++ b/net/minecraft/client/renderer/blockentity/EnchantTableRenderer.java @@ -15,6 +15,7 @@ import net.minecraft.client.resources.model.Material; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.level.block.entity.EnchantingTableBlockEntity; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class EnchantTableRenderer implements BlockEntityRenderer { @@ -29,32 +30,32 @@ public class EnchantTableRenderer implements BlockEntityRenderer= (float) Math.PI) { - g -= (float) (Math.PI * 2); + while (h >= (float) Math.PI) { + h -= (float) (Math.PI * 2); } - while (g < (float) -Math.PI) { - g += (float) (Math.PI * 2); + while (h < (float) -Math.PI) { + h += (float) (Math.PI * 2); } - float h = blockEntity.oRot + g * partialTick; - poseStack.mulPose(Axis.YP.rotation(-h)); + float k = enchantingTableBlockEntity.oRot + h * f; + poseStack.mulPose(Axis.YP.rotation(-k)); poseStack.mulPose(Axis.ZP.rotationDegrees(80.0F)); - float i = Mth.lerp(partialTick, blockEntity.oFlip, blockEntity.flip); - float j = Mth.frac(i + 0.25F) * 1.6F - 0.3F; - float k = Mth.frac(i + 0.75F) * 1.6F - 0.3F; - float l = Mth.lerp(partialTick, blockEntity.oOpen, blockEntity.open); - this.bookModel.setupAnim(f, Mth.clamp(j, 0.0F, 1.0F), Mth.clamp(k, 0.0F, 1.0F), l); - VertexConsumer vertexConsumer = BOOK_LOCATION.buffer(bufferSource, RenderType::entitySolid); - this.bookModel.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + float l = Mth.lerp(f, enchantingTableBlockEntity.oFlip, enchantingTableBlockEntity.flip); + float m = Mth.frac(l + 0.25F) * 1.6F - 0.3F; + float n = Mth.frac(l + 0.75F) * 1.6F - 0.3F; + float o = Mth.lerp(f, enchantingTableBlockEntity.oOpen, enchantingTableBlockEntity.open); + this.bookModel.setupAnim(g, Mth.clamp(m, 0.0F, 1.0F), Mth.clamp(n, 0.0F, 1.0F), o); + VertexConsumer vertexConsumer = BOOK_LOCATION.buffer(multiBufferSource, RenderType::entitySolid); + this.bookModel.renderToBuffer(poseStack, vertexConsumer, i, j); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/HangingSignRenderer.java b/net/minecraft/client/renderer/blockentity/HangingSignRenderer.java index 762e747d..c9b829f1 100644 --- a/net/minecraft/client/renderer/blockentity/HangingSignRenderer.java +++ b/net/minecraft/client/renderer/blockentity/HangingSignRenderer.java @@ -2,13 +2,17 @@ package net.minecraft.client.renderer.blockentity; import com.google.common.collect.ImmutableMap; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; +import java.util.Arrays; import java.util.Map; +import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.Model; +import net.minecraft.client.model.Model.Simple; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; @@ -19,16 +23,15 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.resources.model.Material; +import net.minecraft.util.StringRepresentable; import net.minecraft.world.level.block.CeilingHangingSignBlock; -import net.minecraft.world.level.block.SignBlock; -import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) -public class HangingSignRenderer extends SignRenderer { +public class HangingSignRenderer extends AbstractSignRenderer { private static final String PLANK = "plank"; private static final String V_CHAINS = "vChains"; private static final String NORMAL_CHAINS = "normalChains"; @@ -40,108 +43,135 @@ public class HangingSignRenderer extends SignRenderer { private static final float MODEL_RENDER_SCALE = 1.0F; private static final float TEXT_RENDER_SCALE = 0.9F; private static final Vec3 TEXT_OFFSET = new Vec3(0.0, -0.32F, 0.073F); - private final Map hangingSignModels; + private final Map hangingSignModels; public HangingSignRenderer(Context context) { super(context); - this.hangingSignModels = (Map)WoodType.values() - .collect( - ImmutableMap.toImmutableMap( - woodType -> woodType, woodType -> new HangingSignRenderer.HangingSignModel(context.bakeLayer(ModelLayers.createHangingSignModelName(woodType))) - ) + Stream stream = WoodType.values() + .flatMap( + woodType -> Arrays.stream(HangingSignRenderer.AttachmentType.values()).map(attachmentType -> new HangingSignRenderer.ModelKey(woodType, attachmentType)) ); + this.hangingSignModels = (Map)stream.collect( + ImmutableMap.toImmutableMap(modelKey -> modelKey, modelKey -> createSignModel(context.getModelSet(), modelKey.woodType, modelKey.attachmentType)) + ); + } + + public static Model createSignModel(EntityModelSet modelSet, WoodType woodType, HangingSignRenderer.AttachmentType attachmentType) { + return new Simple(modelSet.bakeLayer(ModelLayers.createHangingSignModelName(woodType, attachmentType)), RenderType::entityCutoutNoCull); } @Override - public float getSignModelRenderScale() { + protected float getSignModelRenderScale() { return 1.0F; } @Override - public float getSignTextRenderScale() { + protected float getSignTextRenderScale() { return 0.9F; } - @Override - public void render(SignBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - BlockState blockState = blockEntity.getBlockState(); - SignBlock signBlock = (SignBlock)blockState.getBlock(); - WoodType woodType = SignBlock.getWoodType(signBlock); - HangingSignRenderer.HangingSignModel hangingSignModel = (HangingSignRenderer.HangingSignModel)this.hangingSignModels.get(woodType); - hangingSignModel.evaluateVisibleParts(blockState); - this.renderSignWithText(blockEntity, poseStack, bufferSource, packedLight, packedOverlay, blockState, signBlock, woodType, hangingSignModel); - } - - @Override - void translateSign(PoseStack poseStack, float yRot, BlockState state) { + private static void translateBase(PoseStack poseStack, float yRot) { poseStack.translate(0.5, 0.9375, 0.5); poseStack.mulPose(Axis.YP.rotationDegrees(yRot)); poseStack.translate(0.0F, -0.3125F, 0.0F); } @Override - Material getSignMaterial(WoodType woodType) { + protected void translateSign(PoseStack poseStack, float yRot, BlockState state) { + translateBase(poseStack, yRot); + } + + @Override + protected Model getSignModel(BlockState state, WoodType woodType) { + HangingSignRenderer.AttachmentType attachmentType = HangingSignRenderer.AttachmentType.byBlockState(state); + return (Model)this.hangingSignModels.get(new HangingSignRenderer.ModelKey(woodType, attachmentType)); + } + + @Override + protected Material getSignMaterial(WoodType woodType) { return Sheets.getHangingSignMaterial(woodType); } @Override - Vec3 getTextOffset() { + protected Vec3 getTextOffset() { return TEXT_OFFSET; } - public static LayerDefinition createHangingSignLayer() { + public static void renderInHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Model model, Material material) { + poseStack.pushPose(); + translateBase(poseStack, 0.0F); + poseStack.scale(1.0F, -1.0F, -1.0F); + VertexConsumer vertexConsumer = material.buffer(bufferSource, model::renderType); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + poseStack.popPose(); + } + + public static LayerDefinition createHangingSignLayer(HangingSignRenderer.AttachmentType attachmentType) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild("board", CubeListBuilder.create().texOffs(0, 12).addBox(-7.0F, 0.0F, -1.0F, 14.0F, 10.0F, 2.0F), PartPose.ZERO); - partDefinition.addOrReplaceChild("plank", CubeListBuilder.create().texOffs(0, 0).addBox(-8.0F, -6.0F, -2.0F, 16.0F, 2.0F, 4.0F), PartPose.ZERO); - PartDefinition partDefinition2 = partDefinition.addOrReplaceChild("normalChains", CubeListBuilder.create(), PartPose.ZERO); - partDefinition2.addOrReplaceChild( - "chainL1", - CubeListBuilder.create().texOffs(0, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), - PartPose.offsetAndRotation(-5.0F, -6.0F, 0.0F, 0.0F, (float) (-Math.PI / 4), 0.0F) - ); - partDefinition2.addOrReplaceChild( - "chainL2", - CubeListBuilder.create().texOffs(6, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), - PartPose.offsetAndRotation(-5.0F, -6.0F, 0.0F, 0.0F, (float) (Math.PI / 4), 0.0F) - ); - partDefinition2.addOrReplaceChild( - "chainR1", - CubeListBuilder.create().texOffs(0, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), - PartPose.offsetAndRotation(5.0F, -6.0F, 0.0F, 0.0F, (float) (-Math.PI / 4), 0.0F) - ); - partDefinition2.addOrReplaceChild( - "chainR2", - CubeListBuilder.create().texOffs(6, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), - PartPose.offsetAndRotation(5.0F, -6.0F, 0.0F, 0.0F, (float) (Math.PI / 4), 0.0F) - ); - partDefinition.addOrReplaceChild("vChains", CubeListBuilder.create().texOffs(14, 6).addBox(-6.0F, -6.0F, 0.0F, 12.0F, 6.0F, 0.0F), PartPose.ZERO); + if (attachmentType == HangingSignRenderer.AttachmentType.WALL) { + partDefinition.addOrReplaceChild("plank", CubeListBuilder.create().texOffs(0, 0).addBox(-8.0F, -6.0F, -2.0F, 16.0F, 2.0F, 4.0F), PartPose.ZERO); + } + + if (attachmentType == HangingSignRenderer.AttachmentType.WALL || attachmentType == HangingSignRenderer.AttachmentType.CEILING) { + PartDefinition partDefinition2 = partDefinition.addOrReplaceChild("normalChains", CubeListBuilder.create(), PartPose.ZERO); + partDefinition2.addOrReplaceChild( + "chainL1", + CubeListBuilder.create().texOffs(0, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), + PartPose.offsetAndRotation(-5.0F, -6.0F, 0.0F, 0.0F, (float) (-Math.PI / 4), 0.0F) + ); + partDefinition2.addOrReplaceChild( + "chainL2", + CubeListBuilder.create().texOffs(6, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), + PartPose.offsetAndRotation(-5.0F, -6.0F, 0.0F, 0.0F, (float) (Math.PI / 4), 0.0F) + ); + partDefinition2.addOrReplaceChild( + "chainR1", + CubeListBuilder.create().texOffs(0, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), + PartPose.offsetAndRotation(5.0F, -6.0F, 0.0F, 0.0F, (float) (-Math.PI / 4), 0.0F) + ); + partDefinition2.addOrReplaceChild( + "chainR2", + CubeListBuilder.create().texOffs(6, 6).addBox(-1.5F, 0.0F, 0.0F, 3.0F, 6.0F, 0.0F), + PartPose.offsetAndRotation(5.0F, -6.0F, 0.0F, 0.0F, (float) (Math.PI / 4), 0.0F) + ); + } + + if (attachmentType == HangingSignRenderer.AttachmentType.CEILING_MIDDLE) { + partDefinition.addOrReplaceChild("vChains", CubeListBuilder.create().texOffs(14, 6).addBox(-6.0F, -6.0F, 0.0F, 12.0F, 6.0F, 0.0F), PartPose.ZERO); + } + return LayerDefinition.create(meshDefinition, 64, 32); } @Environment(EnvType.CLIENT) - public static final class HangingSignModel extends Model { - public final ModelPart plank; - public final ModelPart vChains; - public final ModelPart normalChains; + public static enum AttachmentType implements StringRepresentable { + WALL("wall"), + CEILING("ceiling"), + CEILING_MIDDLE("ceiling_middle"); - public HangingSignModel(ModelPart root) { - super(root, RenderType::entityCutoutNoCull); - this.plank = root.getChild("plank"); - this.normalChains = root.getChild("normalChains"); - this.vChains = root.getChild("vChains"); + private final String name; + + private AttachmentType(final String name) { + this.name = name; } - public void evaluateVisibleParts(BlockState state) { - boolean bl = !(state.getBlock() instanceof CeilingHangingSignBlock); - this.plank.visible = bl; - this.vChains.visible = false; - this.normalChains.visible = true; - if (!bl) { - boolean bl2 = (Boolean)state.getValue(BlockStateProperties.ATTACHED); - this.normalChains.visible = !bl2; - this.vChains.visible = bl2; + public static HangingSignRenderer.AttachmentType byBlockState(BlockState blockState) { + if (blockState.getBlock() instanceof CeilingHangingSignBlock) { + return blockState.getValue(BlockStateProperties.ATTACHED) ? CEILING_MIDDLE : CEILING; + } else { + return WALL; } } + + @Override + public String getSerializedName() { + return this.name; + } + } + + @Environment(EnvType.CLIENT) + public record ModelKey(WoodType woodType, HangingSignRenderer.AttachmentType attachmentType) { } } diff --git a/net/minecraft/client/renderer/blockentity/LecternRenderer.java b/net/minecraft/client/renderer/blockentity/LecternRenderer.java index 337e27ab..e4de40c0 100644 --- a/net/minecraft/client/renderer/blockentity/LecternRenderer.java +++ b/net/minecraft/client/renderer/blockentity/LecternRenderer.java @@ -14,6 +14,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.block.LecternBlock; import net.minecraft.world.level.block.entity.LecternBlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class LecternRenderer implements BlockEntityRenderer { @@ -23,18 +24,18 @@ public class LecternRenderer implements BlockEntityRenderer this.bookModel = new BookModel(context.bakeLayer(ModelLayers.BOOK)); } - public void render(LecternBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - BlockState blockState = blockEntity.getBlockState(); + public void render(LecternBlockEntity lecternBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + BlockState blockState = lecternBlockEntity.getBlockState(); if ((Boolean)blockState.getValue(LecternBlock.HAS_BOOK)) { poseStack.pushPose(); poseStack.translate(0.5F, 1.0625F, 0.5F); - float f = ((Direction)blockState.getValue(LecternBlock.FACING)).getClockWise().toYRot(); - poseStack.mulPose(Axis.YP.rotationDegrees(-f)); + float g = ((Direction)blockState.getValue(LecternBlock.FACING)).getClockWise().toYRot(); + poseStack.mulPose(Axis.YP.rotationDegrees(-g)); poseStack.mulPose(Axis.ZP.rotationDegrees(67.5F)); poseStack.translate(0.0F, -0.125F, 0.0F); this.bookModel.setupAnim(0.0F, 0.1F, 0.9F, 1.2F); - VertexConsumer vertexConsumer = EnchantTableRenderer.BOOK_LOCATION.buffer(bufferSource, RenderType::entitySolid); - this.bookModel.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + VertexConsumer vertexConsumer = EnchantTableRenderer.BOOK_LOCATION.buffer(multiBufferSource, RenderType::entitySolid); + this.bookModel.renderToBuffer(poseStack, vertexConsumer, i, j); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/PistonHeadRenderer.java b/net/minecraft/client/renderer/blockentity/PistonHeadRenderer.java index acb2cd52..2849232f 100644 --- a/net/minecraft/client/renderer/blockentity/PistonHeadRenderer.java +++ b/net/minecraft/client/renderer/blockentity/PistonHeadRenderer.java @@ -2,6 +2,7 @@ package net.minecraft.client.renderer.blockentity; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; +import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.ItemBlockRenderTypes; @@ -9,6 +10,7 @@ import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.renderer.block.model.BlockModelPart; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -20,6 +22,7 @@ import net.minecraft.world.level.block.piston.PistonHeadBlock; import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.PistonType; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class PistonHeadRenderer implements BlockEntityRenderer { @@ -29,35 +32,33 @@ public class PistonHeadRenderer implements BlockEntityRenderer= 0.5F); - this.renderBlock(blockPos, blockState2, poseStack, bufferSource, level, false, packedOverlay); - BlockPos blockPos2 = blockPos.relative(blockEntity.getMovementDirection()); + blockState2 = blockState2.setValue(PistonHeadBlock.SHORT, pistonMovingBlockEntity.getProgress(f) >= 0.5F); + this.renderBlock(blockPos, blockState2, poseStack, multiBufferSource, level, false, j); + BlockPos blockPos2 = blockPos.relative(pistonMovingBlockEntity.getMovementDirection()); poseStack.popPose(); poseStack.pushPose(); blockState = blockState.setValue(PistonBaseBlock.EXTENDED, true); - this.renderBlock(blockPos2, blockState, poseStack, bufferSource, level, true, packedOverlay); + this.renderBlock(blockPos2, blockState, poseStack, multiBufferSource, level, true, j); } else { - this.renderBlock(blockPos, blockState, poseStack, bufferSource, level, false, packedOverlay); + this.renderBlock(blockPos, blockState, poseStack, multiBufferSource, level, false, j); } poseStack.popPose(); @@ -72,11 +73,8 @@ public class PistonHeadRenderer implements BlockEntityRenderer list = this.blockRenderer.getBlockModel(state).collectParts(RandomSource.create(state.getSeed(pos))); + this.blockRenderer.getModelRenderer().tesselateBlock(level, list, state, pos, poseStack, vertexConsumer, extended, packedOverlay); } @Override diff --git a/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java b/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java index 84385a61..e00f0acd 100644 --- a/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java +++ b/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java @@ -5,6 +5,7 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.Model; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.renderer.MultiBufferSource; @@ -16,43 +17,45 @@ import net.minecraft.core.Direction; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.ShulkerBoxBlock; import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity; -import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class ShulkerBoxRenderer implements BlockEntityRenderer { private final ShulkerBoxRenderer.ShulkerBoxModel model; public ShulkerBoxRenderer(Context context) { - this.model = new ShulkerBoxRenderer.ShulkerBoxModel(context.bakeLayer(ModelLayers.SHULKER_BOX)); + this(context.getModelSet()); } - public void render( - ShulkerBoxBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay - ) { - Direction direction = Direction.UP; - if (blockEntity.hasLevel()) { - BlockState blockState = blockEntity.getLevel().getBlockState(blockEntity.getBlockPos()); - if (blockState.getBlock() instanceof ShulkerBoxBlock) { - direction = blockState.getValue(ShulkerBoxBlock.FACING); - } - } + public ShulkerBoxRenderer(EntityModelSet modelSet) { + this.model = new ShulkerBoxRenderer.ShulkerBoxModel(modelSet.bakeLayer(ModelLayers.SHULKER_BOX)); + } - DyeColor dyeColor = blockEntity.getColor(); + public void render(ShulkerBoxBlockEntity shulkerBoxBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + Direction direction = shulkerBoxBlockEntity.getBlockState().getValueOrElse(ShulkerBoxBlock.FACING, Direction.UP); + DyeColor dyeColor = shulkerBoxBlockEntity.getColor(); Material material; if (dyeColor == null) { material = Sheets.DEFAULT_SHULKER_TEXTURE_LOCATION; } else { - material = (Material)Sheets.SHULKER_TEXTURE_LOCATION.get(dyeColor.getId()); + material = Sheets.getShulkerBoxMaterial(dyeColor); } + float g = shulkerBoxBlockEntity.getProgress(f); + this.render(poseStack, multiBufferSource, i, j, direction, g, material); + } + + public void render( + PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Direction facing, float progress, Material material + ) { poseStack.pushPose(); poseStack.translate(0.5F, 0.5F, 0.5F); float f = 0.9995F; poseStack.scale(0.9995F, 0.9995F, 0.9995F); - poseStack.mulPose(direction.getRotation()); + poseStack.mulPose(facing.getRotation()); poseStack.scale(1.0F, -1.0F, -1.0F); poseStack.translate(0.0F, -1.0F, 0.0F); - this.model.animate(blockEntity, partialTick); + this.model.animate(progress); VertexConsumer vertexConsumer = material.buffer(bufferSource, this.model::renderType); this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); poseStack.popPose(); @@ -62,14 +65,14 @@ public class ShulkerBoxRenderer implements BlockEntityRenderer { - private static final int BLACK_TEXT_OUTLINE_COLOR = -988212; - private static final int OUTLINE_RENDER_DISTANCE = Mth.square(16); +public class SignRenderer extends AbstractSignRenderer { private static final float RENDER_SCALE = 0.6666667F; private static final Vec3 TEXT_OFFSET = new Vec3(0.0, 0.33333334F, 0.046666667F); private final Map signModels; - private final Font font; public SignRenderer(Context context) { + super(context); this.signModels = (Map)WoodType.values() .collect( ImmutableMap.toImmutableMap( @@ -56,161 +42,66 @@ public class SignRenderer implements BlockEntityRenderer { woodType -> new SignRenderer.Models(createSignModel(context.getModelSet(), woodType, true), createSignModel(context.getModelSet(), woodType, false)) ) ); - this.font = context.getFont(); } - public void render(SignBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - BlockState blockState = blockEntity.getBlockState(); - SignBlock signBlock = (SignBlock)blockState.getBlock(); - WoodType woodType = SignBlock.getWoodType(signBlock); + @Override + protected Model getSignModel(BlockState state, WoodType woodType) { SignRenderer.Models models = (SignRenderer.Models)this.signModels.get(woodType); - Model model = blockState.getBlock() instanceof StandingSignBlock ? models.standing() : models.wall(); - this.renderSignWithText(blockEntity, poseStack, bufferSource, packedLight, packedOverlay, blockState, signBlock, woodType, model); + return state.getBlock() instanceof StandingSignBlock ? models.standing() : models.wall(); } - public float getSignModelRenderScale() { + @Override + protected Material getSignMaterial(WoodType woodType) { + return Sheets.getSignMaterial(woodType); + } + + @Override + protected float getSignModelRenderScale() { return 0.6666667F; } - public float getSignTextRenderScale() { + @Override + protected float getSignTextRenderScale() { return 0.6666667F; } - void renderSignWithText( - SignBlockEntity signEntity, - PoseStack poseStack, - MultiBufferSource buffer, - int packedLight, - int packedOverlay, - BlockState state, - SignBlock signBlock, - WoodType woodType, - Model model - ) { - poseStack.pushPose(); - this.translateSign(poseStack, -signBlock.getYRotationDegrees(state), state); - this.renderSign(poseStack, buffer, packedLight, packedOverlay, woodType, model); - this.renderSignText( - signEntity.getBlockPos(), signEntity.getFrontText(), poseStack, buffer, packedLight, signEntity.getTextLineHeight(), signEntity.getMaxTextLineWidth(), true - ); - this.renderSignText( - signEntity.getBlockPos(), signEntity.getBackText(), poseStack, buffer, packedLight, signEntity.getTextLineHeight(), signEntity.getMaxTextLineWidth(), false - ); - poseStack.popPose(); - } - - void translateSign(PoseStack poseStack, float yRot, BlockState state) { - poseStack.translate(0.5F, 0.75F * this.getSignModelRenderScale(), 0.5F); + private static void translateBase(PoseStack poseStack, float yRot) { + poseStack.translate(0.5F, 0.5F, 0.5F); poseStack.mulPose(Axis.YP.rotationDegrees(yRot)); + } + + @Override + protected void translateSign(PoseStack poseStack, float yRot, BlockState state) { + translateBase(poseStack, yRot); if (!(state.getBlock() instanceof StandingSignBlock)) { poseStack.translate(0.0F, -0.3125F, -0.4375F); } } - void renderSign(PoseStack poseStack, MultiBufferSource buffer, int packedLight, int packedOverlay, WoodType woodType, Model model) { + @Override + protected Vec3 getTextOffset() { + return TEXT_OFFSET; + } + + public static void renderInHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, Model model, Material material) { poseStack.pushPose(); - float f = this.getSignModelRenderScale(); - poseStack.scale(f, -f, -f); - Material material = this.getSignMaterial(woodType); - VertexConsumer vertexConsumer = material.buffer(buffer, model::renderType); + translateBase(poseStack, 0.0F); + poseStack.scale(0.6666667F, -0.6666667F, -0.6666667F); + VertexConsumer vertexConsumer = material.buffer(bufferSource, model::renderType); model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); poseStack.popPose(); } - Material getSignMaterial(WoodType woodType) { - return Sheets.getSignMaterial(woodType); + public static Model createSignModel(EntityModelSet modelSet, WoodType woodType, boolean standingSign) { + ModelLayerLocation modelLayerLocation = standingSign ? ModelLayers.createStandingSignModelName(woodType) : ModelLayers.createWallSignModelName(woodType); + return new Simple(modelSet.bakeLayer(modelLayerLocation), RenderType::entityCutoutNoCull); } - void renderSignText( - BlockPos pos, SignText text, PoseStack poseStack, MultiBufferSource buffer, int packedLight, int lineHeight, int maxWidth, boolean isFrontText - ) { - poseStack.pushPose(); - this.translateSignText(poseStack, isFrontText, this.getTextOffset()); - int i = getDarkColor(text); - int j = 4 * lineHeight / 2; - FormattedCharSequence[] formattedCharSequences = text.getRenderMessages(Minecraft.getInstance().isTextFilteringEnabled(), component -> { - List list = this.font.split(component, maxWidth); - return list.isEmpty() ? FormattedCharSequence.EMPTY : (FormattedCharSequence)list.get(0); - }); - int k; - boolean bl; - int l; - if (text.hasGlowingText()) { - k = text.getColor().getTextColor(); - bl = isOutlineVisible(pos, k); - l = 15728880; - } else { - k = i; - bl = false; - l = packedLight; - } - - for (int m = 0; m < 4; m++) { - FormattedCharSequence formattedCharSequence = formattedCharSequences[m]; - float f = -this.font.width(formattedCharSequence) / 2; - if (bl) { - this.font.drawInBatch8xOutline(formattedCharSequence, f, m * lineHeight - j, k, i, poseStack.last().pose(), buffer, l); - } else { - this.font - .drawInBatch(formattedCharSequence, f, (float)(m * lineHeight - j), k, false, poseStack.last().pose(), buffer, Font.DisplayMode.POLYGON_OFFSET, 0, l); - } - } - - poseStack.popPose(); - } - - private void translateSignText(PoseStack poseStack, boolean isFrontText, Vec3 offset) { - if (!isFrontText) { - poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); - } - - float f = 0.015625F * this.getSignTextRenderScale(); - poseStack.translate(offset); - poseStack.scale(f, -f, f); - } - - Vec3 getTextOffset() { - return TEXT_OFFSET; - } - - static boolean isOutlineVisible(BlockPos pos, int textColor) { - if (textColor == DyeColor.BLACK.getTextColor()) { - return true; - } else { - Minecraft minecraft = Minecraft.getInstance(); - LocalPlayer localPlayer = minecraft.player; - if (localPlayer != null && minecraft.options.getCameraType().isFirstPerson() && localPlayer.isScoping()) { - return true; - } else { - Entity entity = minecraft.getCameraEntity(); - return entity != null && entity.distanceToSqr(Vec3.atCenterOf(pos)) < OUTLINE_RENDER_DISTANCE; - } - } - } - - public static int getDarkColor(SignText signText) { - int i = signText.getColor().getTextColor(); - if (i == DyeColor.BLACK.getTextColor() && signText.hasGlowingText()) { - return -988212; - } else { - double d = 0.4; - int j = (int)(ARGB.red(i) * 0.4); - int k = (int)(ARGB.green(i) * 0.4); - int l = (int)(ARGB.blue(i) * 0.4); - return ARGB.color(0, j, k, l); - } - } - - public static Model createSignModel(EntityModelSet entityModelSet, WoodType woodType, boolean bl) { - ModelLayerLocation modelLayerLocation = bl ? ModelLayers.createStandingSignModelName(woodType) : ModelLayers.createWallSignModelName(woodType); - return new Model.Simple(entityModelSet.bakeLayer(modelLayerLocation), RenderType::entityCutoutNoCull); - } - - public static LayerDefinition createSignLayer(boolean bl) { + public static LayerDefinition createSignLayer(boolean standingSign) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild("sign", CubeListBuilder.create().texOffs(0, 0).addBox(-12.0F, -14.0F, -1.0F, 24.0F, 12.0F, 2.0F), PartPose.ZERO); - if (bl) { + if (standingSign) { partDefinition.addOrReplaceChild("stick", CubeListBuilder.create().texOffs(0, 14).addBox(-1.0F, -2.0F, -1.0F, 2.0F, 14.0F, 2.0F), PartPose.ZERO); } diff --git a/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java b/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java index 5810e70d..dd66f35f 100644 --- a/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java +++ b/net/minecraft/client/renderer/blockentity/SkullBlockRenderer.java @@ -1,11 +1,10 @@ package net.minecraft.client.renderer.blockentity; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; -import com.google.common.collect.ImmutableMap.Builder; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.Map; +import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; @@ -21,7 +20,6 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.DefaultPlayerSkin; -import net.minecraft.client.resources.SkinManager; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.component.ResolvableProfile; @@ -31,11 +29,12 @@ import net.minecraft.world.level.block.WallSkullBlock; import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.RotationSegment; +import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class SkullBlockRenderer implements BlockEntityRenderer { - private final Map modelByType; + private final Function modelByType; private static final Map SKIN_BY_TYPE = Util.make(Maps.newHashMap(), hashMap -> { hashMap.put(SkullBlock.Types.SKELETON, ResourceLocation.withDefaultNamespace("textures/entity/skeleton/skeleton.png")); hashMap.put(SkullBlock.Types.WITHER_SKELETON, ResourceLocation.withDefaultNamespace("textures/entity/skeleton/wither_skeleton.png")); @@ -46,33 +45,39 @@ public class SkullBlockRenderer implements BlockEntityRenderer hashMap.put(SkullBlock.Types.PLAYER, DefaultPlayerSkin.getDefaultTexture()); }); - public static Map createSkullRenderers(EntityModelSet entityModelSet) { - Builder builder = ImmutableMap.builder(); - builder.put(SkullBlock.Types.SKELETON, new SkullModel(entityModelSet.bakeLayer(ModelLayers.SKELETON_SKULL))); - builder.put(SkullBlock.Types.WITHER_SKELETON, new SkullModel(entityModelSet.bakeLayer(ModelLayers.WITHER_SKELETON_SKULL))); - builder.put(SkullBlock.Types.PLAYER, new SkullModel(entityModelSet.bakeLayer(ModelLayers.PLAYER_HEAD))); - builder.put(SkullBlock.Types.ZOMBIE, new SkullModel(entityModelSet.bakeLayer(ModelLayers.ZOMBIE_HEAD))); - builder.put(SkullBlock.Types.CREEPER, new SkullModel(entityModelSet.bakeLayer(ModelLayers.CREEPER_HEAD))); - builder.put(SkullBlock.Types.DRAGON, new DragonHeadModel(entityModelSet.bakeLayer(ModelLayers.DRAGON_SKULL))); - builder.put(SkullBlock.Types.PIGLIN, new PiglinHeadModel(entityModelSet.bakeLayer(ModelLayers.PIGLIN_HEAD))); - return builder.build(); + @Nullable + public static SkullModelBase createModel(EntityModelSet modelSet, SkullBlock.Type type) { + if (type instanceof SkullBlock.Types types) { + return (SkullModelBase)(switch (types) { + case SKELETON -> new SkullModel(modelSet.bakeLayer(ModelLayers.SKELETON_SKULL)); + case WITHER_SKELETON -> new SkullModel(modelSet.bakeLayer(ModelLayers.WITHER_SKELETON_SKULL)); + case PLAYER -> new SkullModel(modelSet.bakeLayer(ModelLayers.PLAYER_HEAD)); + case ZOMBIE -> new SkullModel(modelSet.bakeLayer(ModelLayers.ZOMBIE_HEAD)); + case CREEPER -> new SkullModel(modelSet.bakeLayer(ModelLayers.CREEPER_HEAD)); + case DRAGON -> new DragonHeadModel(modelSet.bakeLayer(ModelLayers.DRAGON_SKULL)); + case PIGLIN -> new PiglinHeadModel(modelSet.bakeLayer(ModelLayers.PIGLIN_HEAD)); + }); + } else { + return null; + } } public SkullBlockRenderer(Context context) { - this.modelByType = createSkullRenderers(context.getModelSet()); + EntityModelSet entityModelSet = context.getModelSet(); + this.modelByType = Util.memoize((Function)(type -> createModel(entityModelSet, type))); } - public void render(SkullBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - float f = blockEntity.getAnimation(partialTick); - BlockState blockState = blockEntity.getBlockState(); + public void render(SkullBlockEntity skullBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + float g = skullBlockEntity.getAnimation(f); + BlockState blockState = skullBlockEntity.getBlockState(); boolean bl = blockState.getBlock() instanceof WallSkullBlock; Direction direction = bl ? blockState.getValue(WallSkullBlock.FACING) : null; - int i = bl ? RotationSegment.convertToSegment(direction.getOpposite()) : (Integer)blockState.getValue(SkullBlock.ROTATION); - float g = RotationSegment.convertToDegrees(i); + int k = bl ? RotationSegment.convertToSegment(direction.getOpposite()) : (Integer)blockState.getValue(SkullBlock.ROTATION); + float h = RotationSegment.convertToDegrees(k); SkullBlock.Type type = ((AbstractSkullBlock)blockState.getBlock()).getType(); - SkullModelBase skullModelBase = (SkullModelBase)this.modelByType.get(type); - RenderType renderType = getRenderType(type, blockEntity.getOwnerProfile()); - renderSkull(direction, g, f, poseStack, bufferSource, packedLight, skullModelBase, renderType); + SkullModelBase skullModelBase = (SkullModelBase)this.modelByType.apply(type); + RenderType renderType = getRenderType(type, skullBlockEntity.getOwnerProfile()); + renderSkull(direction, h, g, poseStack, multiBufferSource, i, skullModelBase, renderType); } public static void renderSkull( @@ -101,12 +106,14 @@ public class SkullBlockRenderer implements BlockEntityRenderer } public static RenderType getRenderType(SkullBlock.Type type, @Nullable ResolvableProfile profile) { - ResourceLocation resourceLocation = (ResourceLocation)SKIN_BY_TYPE.get(type); - if (type == SkullBlock.Types.PLAYER && profile != null) { - SkinManager skinManager = Minecraft.getInstance().getSkinManager(); - return RenderType.entityTranslucent(skinManager.getInsecureSkin(profile.gameProfile()).texture()); - } else { - return RenderType.entityCutoutNoCullZOffset(resourceLocation); - } + return getRenderType(type, profile, null); + } + + public static RenderType getRenderType(SkullBlock.Type type, @Nullable ResolvableProfile profile, @Nullable ResourceLocation textureOverride) { + return type == SkullBlock.Types.PLAYER && profile != null + ? RenderType.entityTranslucent( + textureOverride != null ? textureOverride : Minecraft.getInstance().getSkinManager().getInsecureSkin(profile.gameProfile()).texture() + ) + : RenderType.entityCutoutNoCullZOffset(textureOverride != null ? textureOverride : (ResourceLocation)SKIN_BY_TYPE.get(type)); } } diff --git a/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java b/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java index 7aa9ddad..006099ac 100644 --- a/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java +++ b/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.level.BaseSpawner; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.SpawnerBlockEntity; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class SpawnerRenderer implements BlockEntityRenderer { @@ -21,13 +22,13 @@ public class SpawnerRenderer implements BlockEntityRenderer this.entityRenderer = context.getEntityRenderer(); } - public void render(SpawnerBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - Level level = blockEntity.getLevel(); + public void render(SpawnerBlockEntity spawnerBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + Level level = spawnerBlockEntity.getLevel(); if (level != null) { - BaseSpawner baseSpawner = blockEntity.getSpawner(); - Entity entity = baseSpawner.getOrCreateDisplayEntity(level, blockEntity.getBlockPos()); + BaseSpawner baseSpawner = spawnerBlockEntity.getSpawner(); + Entity entity = baseSpawner.getOrCreateDisplayEntity(level, spawnerBlockEntity.getBlockPos()); if (entity != null) { - renderEntityInSpawner(partialTick, poseStack, bufferSource, packedLight, entity, this.entityRenderer, baseSpawner.getoSpin(), baseSpawner.getSpin()); + renderEntityInSpawner(f, poseStack, multiBufferSource, i, entity, this.entityRenderer, baseSpawner.getoSpin(), baseSpawner.getSpin()); } } } diff --git a/net/minecraft/client/renderer/blockentity/StructureBlockRenderer.java b/net/minecraft/client/renderer/blockentity/StructureBlockRenderer.java deleted file mode 100644 index fc44e62d..00000000 --- a/net/minecraft/client/renderer/blockentity/StructureBlockRenderer.java +++ /dev/null @@ -1,171 +0,0 @@ -package net.minecraft.client.renderer.blockentity; - -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.ShapeRenderer; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Vec3i; -import net.minecraft.gametest.framework.StructureUtils; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.entity.StructureBlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.StructureMode; -import net.minecraft.world.phys.shapes.BitSetDiscreteVoxelShape; -import net.minecraft.world.phys.shapes.DiscreteVoxelShape; - -@Environment(EnvType.CLIENT) -public class StructureBlockRenderer implements BlockEntityRenderer { - public StructureBlockRenderer(Context context) { - } - - public void render( - StructureBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay - ) { - if (Minecraft.getInstance().player.canUseGameMasterBlocks() || Minecraft.getInstance().player.isSpectator()) { - BlockPos blockPos = blockEntity.getStructurePos(); - Vec3i vec3i = blockEntity.getStructureSize(); - if (vec3i.getX() >= 1 && vec3i.getY() >= 1 && vec3i.getZ() >= 1) { - if (blockEntity.getMode() == StructureMode.SAVE || blockEntity.getMode() == StructureMode.LOAD) { - double d = blockPos.getX(); - double e = blockPos.getZ(); - double f = blockPos.getY(); - double g = f + vec3i.getY(); - double h; - double i; - switch (blockEntity.getMirror()) { - case LEFT_RIGHT: - h = vec3i.getX(); - i = -vec3i.getZ(); - break; - case FRONT_BACK: - h = -vec3i.getX(); - i = vec3i.getZ(); - break; - default: - h = vec3i.getX(); - i = vec3i.getZ(); - } - - double j; - double k; - double l; - double m; - switch (blockEntity.getRotation()) { - case CLOCKWISE_90: - j = i < 0.0 ? d : d + 1.0; - k = h < 0.0 ? e + 1.0 : e; - l = j - i; - m = k + h; - break; - case CLOCKWISE_180: - j = h < 0.0 ? d : d + 1.0; - k = i < 0.0 ? e : e + 1.0; - l = j - h; - m = k - i; - break; - case COUNTERCLOCKWISE_90: - j = i < 0.0 ? d + 1.0 : d; - k = h < 0.0 ? e : e + 1.0; - l = j + i; - m = k - h; - break; - default: - j = h < 0.0 ? d + 1.0 : d; - k = i < 0.0 ? e + 1.0 : e; - l = j + h; - m = k + i; - } - - float n = 1.0F; - float o = 0.9F; - float p = 0.5F; - if (blockEntity.getMode() == StructureMode.SAVE || blockEntity.getShowBoundingBox()) { - VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); - ShapeRenderer.renderLineBox(poseStack, vertexConsumer, j, f, k, l, g, m, 0.9F, 0.9F, 0.9F, 1.0F, 0.5F, 0.5F, 0.5F); - } - - if (blockEntity.getMode() == StructureMode.SAVE && blockEntity.getShowAir()) { - this.renderInvisibleBlocks(blockEntity, bufferSource, poseStack); - } - } - } - } - } - - private void renderInvisibleBlocks(StructureBlockEntity blockEntity, MultiBufferSource bufferSource, PoseStack poseStack) { - BlockGetter blockGetter = blockEntity.getLevel(); - VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); - BlockPos blockPos = blockEntity.getBlockPos(); - BlockPos blockPos2 = StructureUtils.getStructureOrigin(blockEntity); - - for (BlockPos blockPos3 : BlockPos.betweenClosed(blockPos2, blockPos2.offset(blockEntity.getStructureSize()).offset(-1, -1, -1))) { - BlockState blockState = blockGetter.getBlockState(blockPos3); - boolean bl = blockState.isAir(); - boolean bl2 = blockState.is(Blocks.STRUCTURE_VOID); - boolean bl3 = blockState.is(Blocks.BARRIER); - boolean bl4 = blockState.is(Blocks.LIGHT); - boolean bl5 = bl2 || bl3 || bl4; - if (bl || bl5) { - float f = bl ? 0.05F : 0.0F; - double d = blockPos3.getX() - blockPos.getX() + 0.45F - f; - double e = blockPos3.getY() - blockPos.getY() + 0.45F - f; - double g = blockPos3.getZ() - blockPos.getZ() + 0.45F - f; - double h = blockPos3.getX() - blockPos.getX() + 0.55F + f; - double i = blockPos3.getY() - blockPos.getY() + 0.55F + f; - double j = blockPos3.getZ() - blockPos.getZ() + 0.55F + f; - if (bl) { - ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 0.5F, 0.5F, 1.0F, 1.0F, 0.5F, 0.5F, 1.0F); - } else if (bl2) { - ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 0.75F, 0.75F, 1.0F, 1.0F, 0.75F, 0.75F); - } else if (bl3) { - ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F); - } else if (bl4) { - ShapeRenderer.renderLineBox(poseStack, vertexConsumer, d, e, g, h, i, j, 1.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.0F); - } - } - } - } - - private void renderStructureVoids(StructureBlockEntity blockEntity, VertexConsumer buffer, PoseStack poseStack) { - BlockGetter blockGetter = blockEntity.getLevel(); - if (blockGetter != null) { - BlockPos blockPos = blockEntity.getBlockPos(); - BlockPos blockPos2 = StructureUtils.getStructureOrigin(blockEntity); - Vec3i vec3i = blockEntity.getStructureSize(); - DiscreteVoxelShape discreteVoxelShape = new BitSetDiscreteVoxelShape(vec3i.getX(), vec3i.getY(), vec3i.getZ()); - - for (BlockPos blockPos3 : BlockPos.betweenClosed(blockPos2, blockPos2.offset(vec3i).offset(-1, -1, -1))) { - if (blockGetter.getBlockState(blockPos3).is(Blocks.STRUCTURE_VOID)) { - discreteVoxelShape.fill(blockPos3.getX() - blockPos2.getX(), blockPos3.getY() - blockPos2.getY(), blockPos3.getZ() - blockPos2.getZ()); - } - } - - discreteVoxelShape.forAllFaces((direction, i, j, k) -> { - float f = 0.48F; - float g = i + blockPos2.getX() - blockPos.getX() + 0.5F - 0.48F; - float h = j + blockPos2.getY() - blockPos.getY() + 0.5F - 0.48F; - float l = k + blockPos2.getZ() - blockPos.getZ() + 0.5F - 0.48F; - float m = i + blockPos2.getX() - blockPos.getX() + 0.5F + 0.48F; - float n = j + blockPos2.getY() - blockPos.getY() + 0.5F + 0.48F; - float o = k + blockPos2.getZ() - blockPos.getZ() + 0.5F + 0.48F; - ShapeRenderer.renderFace(poseStack, buffer, direction, g, h, l, m, n, o, 0.75F, 0.75F, 1.0F, 0.2F); - }); - } - } - - public boolean shouldRenderOffScreen(StructureBlockEntity blockEntity) { - return true; - } - - @Override - public int getViewDistance() { - return 96; - } -} diff --git a/net/minecraft/client/renderer/blockentity/TestInstanceRenderer.java b/net/minecraft/client/renderer/blockentity/TestInstanceRenderer.java new file mode 100644 index 00000000..1c7d3c75 --- /dev/null +++ b/net/minecraft/client/renderer/blockentity/TestInstanceRenderer.java @@ -0,0 +1,38 @@ +package net.minecraft.client.renderer.blockentity; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; +import net.minecraft.world.level.block.entity.TestInstanceBlockEntity; +import net.minecraft.world.phys.Vec3; + +@Environment(EnvType.CLIENT) +public class TestInstanceRenderer implements BlockEntityRenderer { + private final BeaconRenderer beacon; + private final BlockEntityWithBoundingBoxRenderer box; + + public TestInstanceRenderer(Context context) { + this.beacon = new BeaconRenderer<>(context); + this.box = new BlockEntityWithBoundingBoxRenderer<>(context); + } + + public void render(TestInstanceBlockEntity testInstanceBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + this.beacon.render(testInstanceBlockEntity, f, poseStack, multiBufferSource, i, j, vec3); + this.box.render(testInstanceBlockEntity, f, poseStack, multiBufferSource, i, j, vec3); + } + + public boolean shouldRenderOffScreen(TestInstanceBlockEntity testInstanceBlockEntity) { + return this.beacon.shouldRenderOffScreen(testInstanceBlockEntity) || this.box.shouldRenderOffScreen(testInstanceBlockEntity); + } + + @Override + public int getViewDistance() { + return Math.max(this.beacon.getViewDistance(), this.box.getViewDistance()); + } + + public boolean shouldRender(TestInstanceBlockEntity testInstanceBlockEntity, Vec3 vec3) { + return this.beacon.shouldRender(testInstanceBlockEntity, vec3) || this.box.shouldRender(testInstanceBlockEntity, vec3); + } +} diff --git a/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java b/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java index 5360a169..30fd116c 100644 --- a/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java +++ b/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java @@ -10,6 +10,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class TheEndGatewayRenderer extends TheEndPortalRenderer { @@ -19,7 +20,9 @@ public class TheEndGatewayRenderer extends TheEndPortalRenderer implements public static final ResourceLocation END_SKY_LOCATION = ResourceLocation.withDefaultNamespace("textures/environment/end_sky.png"); public static final ResourceLocation END_PORTAL_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/end_portal.png"); - public TheEndPortalRenderer(BlockEntityRendererProvider.Context context) { + public TheEndPortalRenderer(Context context) { } - public void render(T blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + public void render(T theEndPortalBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { Matrix4f matrix4f = poseStack.last().pose(); - this.renderCube(blockEntity, matrix4f, bufferSource.getBuffer(this.renderType())); + this.renderCube(theEndPortalBlockEntity, matrix4f, multiBufferSource.getBuffer(this.renderType())); } private void renderCube(T blockEntity, Matrix4f pose, VertexConsumer consumer) { diff --git a/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java b/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java index f2f78304..88df0d69 100644 --- a/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java +++ b/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java @@ -4,32 +4,32 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity; import net.minecraft.world.level.block.entity.trialspawner.TrialSpawner; import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class TrialSpawnerRenderer implements BlockEntityRenderer { private final EntityRenderDispatcher entityRenderer; - public TrialSpawnerRenderer(BlockEntityRendererProvider.Context context) { + public TrialSpawnerRenderer(Context context) { this.entityRenderer = context.getEntityRenderer(); } - public void render( - TrialSpawnerBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay - ) { - Level level = blockEntity.getLevel(); + public void render(TrialSpawnerBlockEntity trialSpawnerBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + Level level = trialSpawnerBlockEntity.getLevel(); if (level != null) { - TrialSpawner trialSpawner = blockEntity.getTrialSpawner(); + TrialSpawner trialSpawner = trialSpawnerBlockEntity.getTrialSpawner(); TrialSpawnerData trialSpawnerData = trialSpawner.getData(); Entity entity = trialSpawnerData.getOrCreateDisplayEntity(trialSpawner, level, trialSpawner.getState()); if (entity != null) { SpawnerRenderer.renderEntityInSpawner( - partialTick, poseStack, bufferSource, packedLight, entity, this.entityRenderer, trialSpawnerData.getOSpin(), trialSpawnerData.getSpin() + f, poseStack, multiBufferSource, i, entity, this.entityRenderer, trialSpawnerData.getOSpin(), trialSpawnerData.getSpin() ); } } diff --git a/net/minecraft/client/renderer/blockentity/VaultRenderer.java b/net/minecraft/client/renderer/blockentity/VaultRenderer.java index 36909492..d044b32e 100644 --- a/net/minecraft/client/renderer/blockentity/VaultRenderer.java +++ b/net/minecraft/client/renderer/blockentity/VaultRenderer.java @@ -5,65 +5,46 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; import net.minecraft.client.renderer.entity.ItemEntityRenderer; -import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.entity.state.ItemClusterRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.vault.VaultBlockEntity; import net.minecraft.world.level.block.entity.vault.VaultClientData; +import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public class VaultRenderer implements BlockEntityRenderer { - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; private final RandomSource random = RandomSource.create(); + private final ItemClusterRenderState renderState = new ItemClusterRenderState(); - public VaultRenderer(BlockEntityRendererProvider.Context context) { - this.itemRenderer = context.getItemRenderer(); + public VaultRenderer(Context context) { + this.itemModelResolver = context.getItemModelResolver(); } - public void render(VaultBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { - if (VaultBlockEntity.Client.shouldDisplayActiveEffects(blockEntity.getSharedData())) { - Level level = blockEntity.getLevel(); + public void render(VaultBlockEntity vaultBlockEntity, float f, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, Vec3 vec3) { + if (VaultBlockEntity.Client.shouldDisplayActiveEffects(vaultBlockEntity.getSharedData())) { + Level level = vaultBlockEntity.getLevel(); if (level != null) { - ItemStack itemStack = blockEntity.getSharedData().getDisplayItem(); + ItemStack itemStack = vaultBlockEntity.getSharedData().getDisplayItem(); if (!itemStack.isEmpty()) { - this.random.setSeed(ItemEntityRenderer.getSeedForItemStack(itemStack)); - VaultClientData vaultClientData = blockEntity.getClientData(); - renderItemInside( - partialTick, - level, - poseStack, - bufferSource, - packedLight, - itemStack, - this.itemRenderer, - vaultClientData.previousSpin(), - vaultClientData.currentSpin(), - this.random - ); + this.itemModelResolver.updateForTopItem(this.renderState.item, itemStack, ItemDisplayContext.GROUND, level, null, 0); + this.renderState.count = ItemClusterRenderState.getRenderedAmount(itemStack.getCount()); + this.renderState.seed = ItemClusterRenderState.getSeedForItemStack(itemStack); + VaultClientData vaultClientData = vaultBlockEntity.getClientData(); + poseStack.pushPose(); + poseStack.translate(0.5F, 0.4F, 0.5F); + poseStack.mulPose(Axis.YP.rotationDegrees(Mth.rotLerp(f, vaultClientData.previousSpin(), vaultClientData.currentSpin()))); + ItemEntityRenderer.renderMultipleFromCount(poseStack, multiBufferSource, i, this.renderState, this.random); + poseStack.popPose(); } } } } - - public static void renderItemInside( - float partialTick, - Level level, - PoseStack poseStack, - MultiBufferSource buffer, - int packedLight, - ItemStack item, - ItemRenderer itemRenderer, - float previousSpin, - float currentSpin, - RandomSource random - ) { - poseStack.pushPose(); - poseStack.translate(0.5F, 0.4F, 0.5F); - poseStack.mulPose(Axis.YP.rotationDegrees(Mth.rotLerp(partialTick, previousSpin, currentSpin))); - ItemEntityRenderer.renderMultipleFromCount(itemRenderer, poseStack, buffer, packedLight, item, random, level); - poseStack.popPose(); - } } diff --git a/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java b/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java index 4e87dd70..848ed50c 100644 --- a/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java +++ b/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java @@ -15,12 +15,12 @@ public class CompileTaskDynamicQueue { private int recompileQuota = 2; private final List tasks = new ObjectArrayList<>(); - public synchronized void add(CompileTask compileTask) { - this.tasks.add(compileTask); + public synchronized void add(CompileTask task) { + this.tasks.add(task); } @Nullable - public synchronized CompileTask poll(Vec3 vec3) { + public synchronized CompileTask poll(Vec3 cameraPosition) { int i = -1; int j = -1; double d = Double.MAX_VALUE; @@ -33,7 +33,7 @@ public class CompileTaskDynamicQueue { if (compileTask.isCancelled.get()) { listIterator.remove(); } else { - double f = compileTask.getOrigin().distToCenterSqr(vec3); + double f = compileTask.getRenderOrigin().distToCenterSqr(cameraPosition); if (!compileTask.isRecompile() && f < d) { d = f; i = k; @@ -62,8 +62,8 @@ public class CompileTaskDynamicQueue { } @Nullable - private CompileTask removeTaskByIndex(int i) { - return i >= 0 ? (CompileTask)this.tasks.remove(i) : null; + private CompileTask removeTaskByIndex(int index) { + return index >= 0 ? (CompileTask)this.tasks.remove(index) : null; } public synchronized void clear() { diff --git a/net/minecraft/client/renderer/chunk/SectionCompiler.java b/net/minecraft/client/renderer/chunk/SectionCompiler.java index ba13a7b0..e69bc9a4 100644 --- a/net/minecraft/client/renderer/chunk/SectionCompiler.java +++ b/net/minecraft/client/renderer/chunk/SectionCompiler.java @@ -8,6 +8,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.blaze3d.vertex.VertexSorting; import com.mojang.blaze3d.vertex.MeshData.SortState; +import it.unimi.dsi.fastutil.objects.ObjectArrayList; import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap; import java.util.ArrayList; import java.util.List; @@ -20,6 +21,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.SectionBufferBuilderPack; import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.renderer.block.model.BlockModelPart; import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.core.BlockPos; @@ -52,6 +54,7 @@ public class SectionCompiler { ModelBlockRenderer.enableCaching(); Map map = new Reference2ObjectArrayMap<>(RenderType.chunkBufferLayers().size()); RandomSource randomSource = RandomSource.create(); + List list = new ObjectArrayList<>(); for (BlockPos blockPos3 : BlockPos.betweenClosed(blockPos, blockPos2)) { BlockState blockState = region.getBlockState(blockPos3); @@ -76,14 +79,17 @@ public class SectionCompiler { if (blockState.getRenderShape() == RenderShape.MODEL) { RenderType renderType = ItemBlockRenderTypes.getChunkRenderType(blockState); BufferBuilder bufferBuilder = this.getOrBeginLayer(map, sectionBufferBuilderPack, renderType); + randomSource.setSeed(blockState.getSeed(blockPos3)); + this.blockRenderer.getBlockModel(blockState).collectParts(randomSource, list); poseStack.pushPose(); poseStack.translate( (float)SectionPos.sectionRelative(blockPos3.getX()), (float)SectionPos.sectionRelative(blockPos3.getY()), (float)SectionPos.sectionRelative(blockPos3.getZ()) ); - this.blockRenderer.renderBatched(blockState, blockPos3, region, poseStack, bufferBuilder, true, randomSource); + this.blockRenderer.renderBatched(blockState, blockPos3, region, poseStack, bufferBuilder, true, list); poseStack.popPose(); + list.clear(); } } diff --git a/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java b/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java index 9f8dc070..b5c2064a 100644 --- a/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java +++ b/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java @@ -3,14 +3,19 @@ package net.minecraft.client.renderer.chunk; import com.google.common.collect.Lists; import com.google.common.collect.Queues; import com.google.common.collect.Sets; +import com.mojang.blaze3d.buffers.BufferType; import com.mojang.blaze3d.buffers.BufferUsage; -import com.mojang.blaze3d.vertex.ByteBufferBuilder; +import com.mojang.blaze3d.buffers.GpuBuffer; +import com.mojang.blaze3d.systems.CommandEncoder; +import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.MeshData; -import com.mojang.blaze3d.vertex.VertexBuffer; +import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.blaze3d.vertex.VertexSorting; +import com.mojang.blaze3d.vertex.ByteBufferBuilder.Result; import com.mojang.blaze3d.vertex.MeshData.SortState; import it.unimi.dsi.fastutil.objects.ObjectArraySet; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -19,7 +24,6 @@ import java.util.Queue; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.CrashReport; @@ -47,6 +51,7 @@ import net.minecraft.util.profiling.Profiler; import net.minecraft.util.profiling.Zone; import net.minecraft.util.thread.ConsecutiveExecutor; import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.status.ChunkStatus; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -55,11 +60,11 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class SectionRenderDispatcher { private final CompileTaskDynamicQueue compileQueue = new CompileTaskDynamicQueue(); - private final Queue toUpload = Queues.newConcurrentLinkedQueue(); + final Queue toUpload = Queues.newConcurrentLinkedQueue(); final SectionBufferBuilderPack fixedBuffers; private final SectionBufferBuilderPool bufferPool; private volatile int toBatchCount; - private volatile boolean closed; + volatile boolean closed; private final ConsecutiveExecutor consecutiveExecutor; private final TracingExecutor executor; ClientLevel level; @@ -68,21 +73,21 @@ public class SectionRenderDispatcher { final SectionCompiler sectionCompiler; public SectionRenderDispatcher( - ClientLevel clientLevel, - LevelRenderer levelRenderer, - TracingExecutor tracingExecutor, - RenderBuffers renderBuffers, - BlockRenderDispatcher blockRenderDispatcher, - BlockEntityRenderDispatcher blockEntityRenderDispatcher + ClientLevel level, + LevelRenderer renderer, + TracingExecutor executor, + RenderBuffers buffer, + BlockRenderDispatcher blockRenderer, + BlockEntityRenderDispatcher blockEntityRenderer ) { - this.level = clientLevel; - this.renderer = levelRenderer; - this.fixedBuffers = renderBuffers.fixedBufferPack(); - this.bufferPool = renderBuffers.sectionBufferPool(); - this.executor = tracingExecutor; - this.consecutiveExecutor = new ConsecutiveExecutor(tracingExecutor, "Section Renderer"); + this.level = level; + this.renderer = renderer; + this.fixedBuffers = buffer.fixedBufferPack(); + this.bufferPool = buffer.sectionBufferPool(); + this.executor = executor; + this.consecutiveExecutor = new ConsecutiveExecutor(executor, "Section Renderer"); this.consecutiveExecutor.schedule(this::runTask); - this.sectionCompiler = new SectionCompiler(blockRenderDispatcher, blockEntityRenderDispatcher); + this.sectionCompiler = new SectionCompiler(blockRenderer, blockEntityRenderer); } public void setLevel(ClientLevel level) { @@ -169,34 +174,6 @@ public class SectionRenderDispatcher { } } - public CompletableFuture uploadSectionLayer(MeshData meshData, VertexBuffer vertexBuffer) { - return this.closed ? CompletableFuture.completedFuture(null) : CompletableFuture.runAsync(() -> { - if (vertexBuffer.isInvalid()) { - meshData.close(); - } else { - try (Zone zone = Profiler.get().zone("Upload Section Layer")) { - vertexBuffer.bind(); - vertexBuffer.upload(meshData); - VertexBuffer.unbind(); - } - } - }, this.toUpload::add); - } - - public CompletableFuture uploadSectionIndexBuffer(ByteBufferBuilder.Result result, VertexBuffer vertexBuffer) { - return this.closed ? CompletableFuture.completedFuture(null) : CompletableFuture.runAsync(() -> { - if (vertexBuffer.isInvalid()) { - result.close(); - } else { - try (Zone zone = Profiler.get().zone("Upload Section Indices")) { - vertexBuffer.bind(); - vertexBuffer.uploadIndexBuffer(result); - VertexBuffer.unbind(); - } - } - }, this.toUpload::add); - } - private void clearBatchQueue() { this.compileQueue.clear(); this.toBatchCount = 0; @@ -250,22 +227,21 @@ public class SectionRenderDispatcher { @Nullable private ResortTransparencyTask lastResortTransparencyTask; private final Set globalBlockEntities = Sets.newHashSet(); - private final Map buffers = (Map)RenderType.chunkBufferLayers() - .stream() - .collect(Collectors.toMap(renderType -> renderType, renderType -> new VertexBuffer(BufferUsage.STATIC_WRITE))); + private final Map buffers = new HashMap(); private AABB bb; private boolean dirty = true; - long sectionNode = SectionPos.asLong(-1, -1, -1); - final BlockPos.MutableBlockPos origin = new BlockPos.MutableBlockPos(-1, -1, -1); + volatile long sectionNode = SectionPos.asLong(-1, -1, -1); + final BlockPos.MutableBlockPos renderOrigin = new BlockPos.MutableBlockPos(-1, -1, -1); private boolean playerChanged; - public RenderSection(final int i, final long l) { - this.index = i; - this.setSectionNode(l); + public RenderSection(final int index, final long sectionNode) { + this.index = index; + this.setSectionNode(sectionNode); } - private boolean doesChunkExistAt(long l) { - return SectionRenderDispatcher.this.level.getChunk(SectionPos.x(l), SectionPos.z(l), ChunkStatus.FULL, false) != null; + private boolean doesChunkExistAt(long pos) { + ChunkAccess chunkAccess = SectionRenderDispatcher.this.level.getChunk(SectionPos.x(pos), SectionPos.z(pos), ChunkStatus.FULL, false); + return chunkAccess != null && SectionRenderDispatcher.this.level.getLightEngine().lightOnInColumn(SectionPos.getZeroNode(pos)); } public boolean hasAllNeighbors() { @@ -275,24 +251,187 @@ public class SectionRenderDispatcher { : this.doesChunkExistAt(SectionPos.offset(this.sectionNode, Direction.WEST)) && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, Direction.NORTH)) && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, Direction.EAST)) - && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, Direction.SOUTH)); + && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, Direction.SOUTH)) + && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, -1, 0, -1)) + && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, -1, 0, 1)) + && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, 1, 0, -1)) + && this.doesChunkExistAt(SectionPos.offset(this.sectionNode, 1, 0, 1)); } public AABB getBoundingBox() { return this.bb; } - public VertexBuffer getBuffer(RenderType renderType) { - return (VertexBuffer)this.buffers.get(renderType); + @Nullable + public SectionRenderDispatcher.SectionBuffers getBuffers(RenderType renderType) { + return (SectionRenderDispatcher.SectionBuffers)this.buffers.get(renderType); } - public void setSectionNode(long l) { + public CompletableFuture uploadSectionLayer(RenderType renderType, MeshData meshData) { + if (SectionRenderDispatcher.this.closed) { + meshData.close(); + return CompletableFuture.completedFuture(null); + } else { + return CompletableFuture.runAsync( + () -> { + try (Zone zone = Profiler.get().zone("Upload Section Layer")) { + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + if (this.buffers.containsKey(renderType)) { + SectionRenderDispatcher.SectionBuffers sectionBuffers = (SectionRenderDispatcher.SectionBuffers)this.buffers.get(renderType); + if (sectionBuffers.vertexBuffer.size() < meshData.vertexBuffer().remaining()) { + sectionBuffers.vertexBuffer.close(); + sectionBuffers.setVertexBuffer( + RenderSystem.getDevice() + .createBuffer( + () -> "Section vertex buffer - layer: " + + renderType.getName() + + "; cords: " + + SectionPos.x(this.sectionNode) + + ", " + + SectionPos.y(this.sectionNode) + + ", " + + SectionPos.z(this.sectionNode), + BufferType.VERTICES, + BufferUsage.STATIC_WRITE, + meshData.vertexBuffer() + ) + ); + } else if (!sectionBuffers.vertexBuffer.isClosed()) { + commandEncoder.writeToBuffer(sectionBuffers.vertexBuffer, meshData.vertexBuffer(), 0); + } + + if (meshData.indexBuffer() != null) { + if (sectionBuffers.indexBuffer != null && sectionBuffers.indexBuffer.size() >= meshData.indexBuffer().remaining()) { + if (!sectionBuffers.indexBuffer.isClosed()) { + commandEncoder.writeToBuffer(sectionBuffers.indexBuffer, meshData.indexBuffer(), 0); + } + } else { + if (sectionBuffers.indexBuffer != null) { + sectionBuffers.indexBuffer.close(); + } + + sectionBuffers.setIndexBuffer( + RenderSystem.getDevice() + .createBuffer( + () -> "Section index buffer - layer: " + + renderType.getName() + + "; cords: " + + SectionPos.x(this.sectionNode) + + ", " + + SectionPos.y(this.sectionNode) + + ", " + + SectionPos.z(this.sectionNode), + BufferType.INDICES, + BufferUsage.STATIC_WRITE, + meshData.indexBuffer() + ) + ); + } + } else if (sectionBuffers.indexBuffer != null) { + sectionBuffers.indexBuffer.close(); + sectionBuffers.setIndexBuffer(null); + } + + sectionBuffers.setIndexCount(meshData.drawState().indexCount()); + sectionBuffers.setIndexType(meshData.drawState().indexType()); + } else { + GpuBuffer gpuBuffer = RenderSystem.getDevice() + .createBuffer( + () -> "Section vertex buffer - layer: " + + renderType.getName() + + "; cords: " + + SectionPos.x(this.sectionNode) + + ", " + + SectionPos.y(this.sectionNode) + + ", " + + SectionPos.z(this.sectionNode), + BufferType.VERTICES, + BufferUsage.STATIC_WRITE, + meshData.vertexBuffer() + ); + GpuBuffer gpuBuffer2 = meshData.indexBuffer() != null + ? RenderSystem.getDevice() + .createBuffer( + () -> "Section index buffer - layer: " + + renderType.getName() + + "; cords: " + + SectionPos.x(this.sectionNode) + + ", " + + SectionPos.y(this.sectionNode) + + ", " + + SectionPos.z(this.sectionNode), + BufferType.INDICES, + BufferUsage.STATIC_WRITE, + meshData.indexBuffer() + ) + : null; + SectionRenderDispatcher.SectionBuffers sectionBuffers2 = new SectionRenderDispatcher.SectionBuffers( + gpuBuffer, gpuBuffer2, meshData.drawState().indexCount(), meshData.drawState().indexType() + ); + this.buffers.put(renderType, sectionBuffers2); + } + + meshData.close(); + } + }, + SectionRenderDispatcher.this.toUpload::add + ); + } + } + + public CompletableFuture uploadSectionIndexBuffer(Result result, RenderType renderType) { + if (SectionRenderDispatcher.this.closed) { + result.close(); + return CompletableFuture.completedFuture(null); + } else { + return CompletableFuture.runAsync( + () -> { + try (Zone zone = Profiler.get().zone("Upload Section Indices")) { + SectionRenderDispatcher.SectionBuffers sectionBuffers = this.getBuffers(renderType); + if (sectionBuffers != null && !SectionRenderDispatcher.this.closed) { + if (sectionBuffers.indexBuffer == null) { + sectionBuffers.setIndexBuffer( + RenderSystem.getDevice() + .createBuffer( + () -> "Section index buffer - layer: " + + renderType.getName() + + "; cords: " + + SectionPos.x(this.sectionNode) + + ", " + + SectionPos.y(this.sectionNode) + + ", " + + SectionPos.z(this.sectionNode), + BufferType.INDICES, + BufferUsage.STATIC_WRITE, + result.byteBuffer() + ) + ); + } else { + CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder(); + if (!sectionBuffers.indexBuffer.isClosed()) { + commandEncoder.writeToBuffer(sectionBuffers.indexBuffer, result.byteBuffer(), 0); + } + } + + result.close(); + return; + } + + result.close(); + } + }, + SectionRenderDispatcher.this.toUpload::add + ); + } + } + + public void setSectionNode(long sectionNode) { this.reset(); - this.sectionNode = l; - int i = SectionPos.sectionToBlockCoord(SectionPos.x(l)); - int j = SectionPos.sectionToBlockCoord(SectionPos.y(l)); - int k = SectionPos.sectionToBlockCoord(SectionPos.z(l)); - this.origin.set(i, j, k); + this.sectionNode = sectionNode; + int i = SectionPos.sectionToBlockCoord(SectionPos.x(sectionNode)); + int j = SectionPos.sectionToBlockCoord(SectionPos.y(sectionNode)); + int k = SectionPos.sectionToBlockCoord(SectionPos.z(sectionNode)); + this.renderOrigin.set(i, j, k); this.bb = new AABB(i, j, k, i + 16, j + 16, k + 16); } @@ -308,20 +447,17 @@ public class SectionRenderDispatcher { return (SectionRenderDispatcher.CompiledSection)this.compiled.get(); } - private void reset() { + public void reset() { this.cancelTasks(); this.compiled.set(SectionRenderDispatcher.CompiledSection.UNCOMPILED); this.pointOfView.set(null); this.dirty = true; + this.buffers.values().forEach(SectionRenderDispatcher.SectionBuffers::close); + this.buffers.clear(); } - public void releaseBuffers() { - this.reset(); - this.buffers.values().forEach(VertexBuffer::close); - } - - public BlockPos getOrigin() { - return this.origin; + public BlockPos getRenderOrigin() { + return this.renderOrigin; } public long getSectionNode() { @@ -351,9 +487,9 @@ public class SectionRenderDispatcher { return SectionPos.offset(this.sectionNode, direction); } - public void resortTransparency(SectionRenderDispatcher sectionRenderDispatcher) { + public void resortTransparency(SectionRenderDispatcher dispatcher) { this.lastResortTransparencyTask = new ResortTransparencyTask(this, this.getCompiled()); - sectionRenderDispatcher.schedule(this.lastResortTransparencyTask); + dispatcher.schedule(this.lastResortTransparencyTask); } public boolean hasTranslucentGeometry() { @@ -413,9 +549,65 @@ public class SectionRenderDispatcher { SectionRenderDispatcher.this.renderer.addRecentlyCompiledSection(this); } - VertexSorting createVertexSorting() { + VertexSorting createVertexSorting(SectionPos sectionPos) { Vec3 vec3 = SectionRenderDispatcher.this.getCameraPosition(); - return VertexSorting.byDistance((float)(vec3.x - this.origin.getX()), (float)(vec3.y - this.origin.getY()), (float)(vec3.z - this.origin.getZ())); + return VertexSorting.byDistance((float)(vec3.x - sectionPos.minBlockX()), (float)(vec3.y - sectionPos.minBlockY()), (float)(vec3.z - sectionPos.minBlockZ())); + } + } + + @Environment(EnvType.CLIENT) + public static final class SectionBuffers implements AutoCloseable { + GpuBuffer vertexBuffer; + @Nullable + GpuBuffer indexBuffer; + private int indexCount; + private VertexFormat.IndexType indexType; + + public SectionBuffers(GpuBuffer vertexBuffer, @Nullable GpuBuffer indexBuffer, int indexCount, VertexFormat.IndexType indexType) { + this.vertexBuffer = vertexBuffer; + this.indexBuffer = indexBuffer; + this.indexCount = indexCount; + this.indexType = indexType; + } + + public GpuBuffer getVertexBuffer() { + return this.vertexBuffer; + } + + @Nullable + public GpuBuffer getIndexBuffer() { + return this.indexBuffer; + } + + public void setIndexBuffer(@Nullable GpuBuffer indexBuffer) { + this.indexBuffer = indexBuffer; + } + + public int getIndexCount() { + return this.indexCount; + } + + public VertexFormat.IndexType getIndexType() { + return this.indexType; + } + + public void setIndexType(VertexFormat.IndexType indexType) { + this.indexType = indexType; + } + + public void setIndexCount(int indexCount) { + this.indexCount = indexCount; + } + + public void setVertexBuffer(GpuBuffer vertexBuffer) { + this.vertexBuffer = vertexBuffer; + } + + public void close() { + this.vertexBuffer.close(); + if (this.indexBuffer != null) { + this.indexBuffer.close(); + } } } @@ -431,20 +623,20 @@ public class SectionRenderDispatcher { private int y; private int z; - public static SectionRenderDispatcher.TranslucencyPointOfView of(Vec3 vec3, long l) { - return new SectionRenderDispatcher.TranslucencyPointOfView().set(vec3, l); + public static SectionRenderDispatcher.TranslucencyPointOfView of(Vec3 cameraPosition, long sectionNode) { + return new SectionRenderDispatcher.TranslucencyPointOfView().set(cameraPosition, sectionNode); } - public SectionRenderDispatcher.TranslucencyPointOfView set(Vec3 vec3, long l) { - this.x = getCoordinate(vec3.x(), SectionPos.x(l)); - this.y = getCoordinate(vec3.y(), SectionPos.y(l)); - this.z = getCoordinate(vec3.z(), SectionPos.z(l)); + public SectionRenderDispatcher.TranslucencyPointOfView set(Vec3 cameraPosition, long sectionNode) { + this.x = getCoordinate(cameraPosition.x(), SectionPos.x(sectionNode)); + this.y = getCoordinate(cameraPosition.y(), SectionPos.y(sectionNode)); + this.z = getCoordinate(cameraPosition.z(), SectionPos.z(sectionNode)); return this; } - private static int getCoordinate(double d, int i) { - int j = SectionPos.blockToSectionCoord(d) - i; - return Mth.clamp(j, -1, 1); + private static int getCoordinate(double cameraCoord, int sectionCoord) { + int i = SectionPos.blockToSectionCoord(cameraCoord) - sectionCoord; + return Mth.clamp(i, -1, 1); } public boolean isAxisAligned() { diff --git a/net/minecraft/client/renderer/culling/Frustum.java b/net/minecraft/client/renderer/culling/Frustum.java index b0ebfebd..a6c470a6 100644 --- a/net/minecraft/client/renderer/culling/Frustum.java +++ b/net/minecraft/client/renderer/culling/Frustum.java @@ -74,14 +74,14 @@ public class Frustum { return this.cubeInFrustum(boundingBox.minX(), boundingBox.minY(), boundingBox.minZ(), boundingBox.maxX() + 1, boundingBox.maxY() + 1, boundingBox.maxZ() + 1); } - private int cubeInFrustum(double d, double e, double f, double g, double h, double i) { - float j = (float)(d - this.camX); - float k = (float)(e - this.camY); - float l = (float)(f - this.camZ); - float m = (float)(g - this.camX); - float n = (float)(h - this.camY); - float o = (float)(i - this.camZ); - return this.intersection.intersectAab(j, k, l, m, n, o); + private int cubeInFrustum(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { + float f = (float)(minX - this.camX); + float g = (float)(minY - this.camY); + float h = (float)(minZ - this.camZ); + float i = (float)(maxX - this.camX); + float j = (float)(maxY - this.camY); + float k = (float)(maxZ - this.camZ); + return this.intersection.intersectAab(f, g, h, i, j, k); } public Vector4f[] getFrustumPoints() { diff --git a/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java b/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java index 27c71e1c..e3d1d4fe 100644 --- a/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java +++ b/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java @@ -35,7 +35,7 @@ public class ChunkCullingDebugRenderer implements DebugRenderer.SimpleDebugRende for (SectionRenderDispatcher.RenderSection renderSection : levelRenderer.getVisibleSections()) { SectionOcclusionGraph.Node node = sectionOcclusionGraph.getNode(renderSection); if (node != null) { - BlockPos blockPos = renderSection.getOrigin(); + BlockPos blockPos = renderSection.getRenderOrigin(); poseStack.pushPose(); poseStack.translate(blockPos.getX() - camX, blockPos.getY() - camY, blockPos.getZ() - camZ); Matrix4f matrix4f = poseStack.last().pose(); @@ -160,15 +160,21 @@ public class ChunkCullingDebugRenderer implements DebugRenderer.SimpleDebugRende } } - private void addFrustumVertex(VertexConsumer vertexConsumer, Matrix4f matrix4f, Vector4f vector4f) { - vertexConsumer.addVertex(matrix4f, vector4f.x(), vector4f.y(), vector4f.z()).setColor(-16777216).setNormal(0.0F, 0.0F, -1.0F); + private void addFrustumVertex(VertexConsumer buffer, Matrix4f pose, Vector4f position) { + buffer.addVertex(pose, position.x(), position.y(), position.z()).setColor(-16777216).setNormal(0.0F, 0.0F, -1.0F); } - private void addFrustumQuad(VertexConsumer vertexConsumer, Matrix4f matrix4f, Vector4f[] vector4fs, int i, int j, int k, int l, int m, int n, int o) { + private void addFrustumQuad( + VertexConsumer buffer, Matrix4f pose, Vector4f[] frustumPoints, int point1, int point2, int point3, int point4, int red, int green, int blue + ) { float f = 0.25F; - vertexConsumer.addVertex(matrix4f, vector4fs[i].x(), vector4fs[i].y(), vector4fs[i].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[j].x(), vector4fs[j].y(), vector4fs[j].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[k].x(), vector4fs[k].y(), vector4fs[k].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[l].x(), vector4fs[l].y(), vector4fs[l].z()).setColor((float)m, (float)n, (float)o, 0.25F); + buffer.addVertex(pose, frustumPoints[point1].x(), frustumPoints[point1].y(), frustumPoints[point1].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point2].x(), frustumPoints[point2].y(), frustumPoints[point2].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point3].x(), frustumPoints[point3].y(), frustumPoints[point3].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point4].x(), frustumPoints[point4].y(), frustumPoints[point4].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); } } diff --git a/net/minecraft/client/renderer/debug/DebugRenderer.java b/net/minecraft/client/renderer/debug/DebugRenderer.java index 3c0809bf..48fa5b88 100644 --- a/net/minecraft/client/renderer/debug/DebugRenderer.java +++ b/net/minecraft/client/renderer/debug/DebugRenderer.java @@ -9,9 +9,11 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.Font.DisplayMode; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ShapeRenderer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.culling.Frustum; import net.minecraft.core.BlockPos; import net.minecraft.util.ARGB; @@ -121,20 +123,20 @@ public class DebugRenderer { return this.renderOctree = !this.renderOctree; } - public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource.BufferSource bufferSource, double d, double e, double f) { + public void render(PoseStack poseStack, Frustum frustum, BufferSource bufferSource, double camX, double camY, double camZ) { if (this.renderChunkborder && !Minecraft.getInstance().showOnlyReducedInfo()) { - this.chunkBorderRenderer.render(poseStack, bufferSource, d, e, f); + this.chunkBorderRenderer.render(poseStack, bufferSource, camX, camY, camZ); } if (this.renderOctree) { - this.octreeDebugRenderer.render(poseStack, frustum, bufferSource, d, e, f); + this.octreeDebugRenderer.render(poseStack, frustum, bufferSource, camX, camY, camZ); } - this.gameTestDebugRenderer.render(poseStack, bufferSource, d, e, f); + this.gameTestDebugRenderer.render(poseStack, bufferSource, camX, camY, camZ); } - public void renderAfterTranslucents(PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, double d, double e, double f) { - this.chunkCullingDebugRenderer.render(poseStack, bufferSource, d, e, f); + public void renderAfterTranslucents(PoseStack poseStack, BufferSource bufferSource, double camX, double camY, double camZ) { + this.chunkCullingDebugRenderer.render(poseStack, bufferSource, camX, camY, camZ); } public static Optional getTargetedEntity(@Nullable Entity entity, int distance) { @@ -226,8 +228,8 @@ public class DebugRenderer { double z, int color, float scale, - boolean bl, - float f, + boolean center, + float xOffset, boolean transparent ) { Minecraft minecraft = Minecraft.getInstance(); @@ -236,58 +238,66 @@ public class DebugRenderer { Font font = minecraft.font; double d = camera.getPosition().x; double e = camera.getPosition().y; - double g = camera.getPosition().z; + double f = camera.getPosition().z; poseStack.pushPose(); - poseStack.translate((float)(x - d), (float)(y - e) + 0.07F, (float)(z - g)); + poseStack.translate((float)(x - d), (float)(y - e) + 0.07F, (float)(z - f)); poseStack.mulPose(camera.rotation()); poseStack.scale(scale, -scale, scale); - float h = bl ? -font.width(text) / 2.0F : 0.0F; - h -= f / scale; - font.drawInBatch( - text, h, 0.0F, color, false, poseStack.last().pose(), bufferSource, transparent ? Font.DisplayMode.SEE_THROUGH : Font.DisplayMode.NORMAL, 0, 15728880 - ); + float g = center ? -font.width(text) / 2.0F : 0.0F; + g -= xOffset / scale; + font.drawInBatch(text, g, 0.0F, color, false, poseStack.last().pose(), bufferSource, transparent ? DisplayMode.SEE_THROUGH : DisplayMode.NORMAL, 0, 15728880); poseStack.popPose(); } } - private static Vec3 mixColor(float f) { - float g = 5.99999F; - int i = (int)(Mth.clamp(f, 0.0F, 1.0F) * 5.99999F); - float h = f * 5.99999F - i; + private static Vec3 mixColor(float shift) { + float f = 5.99999F; + int i = (int)(Mth.clamp(shift, 0.0F, 1.0F) * 5.99999F); + float g = shift * 5.99999F - i; return switch (i) { - case 0 -> new Vec3(1.0, h, 0.0); - case 1 -> new Vec3(1.0F - h, 1.0, 0.0); - case 2 -> new Vec3(0.0, 1.0, h); - case 3 -> new Vec3(0.0, 1.0 - h, 1.0); - case 4 -> new Vec3(h, 0.0, 1.0); - case 5 -> new Vec3(1.0, 0.0, 1.0 - h); + case 0 -> new Vec3(1.0, g, 0.0); + case 1 -> new Vec3(1.0F - g, 1.0, 0.0); + case 2 -> new Vec3(0.0, 1.0, g); + case 3 -> new Vec3(0.0, 1.0 - g, 1.0); + case 4 -> new Vec3(g, 0.0, 1.0); + case 5 -> new Vec3(1.0, 0.0, 1.0 - g); default -> throw new IllegalStateException("Unexpected value: " + i); }; } - private static Vec3 shiftHue(float f, float g, float h, float i) { - Vec3 vec3 = mixColor(i).scale(f); - Vec3 vec32 = mixColor((i + 0.33333334F) % 1.0F).scale(g); - Vec3 vec33 = mixColor((i + 0.6666667F) % 1.0F).scale(h); + private static Vec3 shiftHue(float red, float green, float blue, float shift) { + Vec3 vec3 = mixColor(shift).scale(red); + Vec3 vec32 = mixColor((shift + 0.33333334F) % 1.0F).scale(green); + Vec3 vec33 = mixColor((shift + 0.6666667F) % 1.0F).scale(blue); Vec3 vec34 = vec3.add(vec32).add(vec33); double d = Math.max(Math.max(1.0, vec34.x), Math.max(vec34.y, vec34.z)); return new Vec3(vec34.x / d, vec34.y / d, vec34.z / d); } public static void renderVoxelShape( - PoseStack poseStack, VertexConsumer vertexConsumer, VoxelShape voxelShape, double d, double e, double f, float g, float h, float i, float j, boolean bl + PoseStack poseStack, + VertexConsumer buffer, + VoxelShape shape, + double x, + double y, + double z, + float red, + float green, + float blue, + float alpha, + boolean lowerColorVariance ) { - List list = voxelShape.toAabbs(); + List list = shape.toAabbs(); if (!list.isEmpty()) { - int k = bl ? list.size() : list.size() * 8; - ShapeRenderer.renderShape(poseStack, vertexConsumer, Shapes.create((AABB)list.get(0)), d, e, f, ARGB.colorFromFloat(j, g, h, i)); + int i = lowerColorVariance ? list.size() : list.size() * 8; + ShapeRenderer.renderShape(poseStack, buffer, Shapes.create((AABB)list.get(0)), x, y, z, ARGB.colorFromFloat(alpha, red, green, blue)); - for (int l = 1; l < list.size(); l++) { - AABB aABB = (AABB)list.get(l); - float m = (float)l / k; - Vec3 vec3 = shiftHue(g, h, i, m); - ShapeRenderer.renderShape(poseStack, vertexConsumer, Shapes.create(aABB), d, e, f, ARGB.colorFromFloat(j, (float)vec3.x, (float)vec3.y, (float)vec3.z)); + for (int j = 1; j < list.size(); j++) { + AABB aABB = (AABB)list.get(j); + float f = (float)j / i; + Vec3 vec3 = shiftHue(red, green, blue, f); + ShapeRenderer.renderShape(poseStack, buffer, Shapes.create(aABB), x, y, z, ARGB.colorFromFloat(alpha, (float)vec3.x, (float)vec3.y, (float)vec3.z)); } } } diff --git a/net/minecraft/client/renderer/debug/LightSectionDebugRenderer.java b/net/minecraft/client/renderer/debug/LightSectionDebugRenderer.java index 51782cc9..997ee45b 100644 --- a/net/minecraft/client/renderer/debug/LightSectionDebugRenderer.java +++ b/net/minecraft/client/renderer/debug/LightSectionDebugRenderer.java @@ -13,8 +13,8 @@ import net.minecraft.client.renderer.ShapeRenderer; import net.minecraft.core.Direction; import net.minecraft.core.SectionPos; import net.minecraft.world.level.LightLayer; -import net.minecraft.world.level.lighting.LayerLightSectionStorage; import net.minecraft.world.level.lighting.LevelLightEngine; +import net.minecraft.world.level.lighting.LayerLightSectionStorage.SectionType; import net.minecraft.world.phys.shapes.BitSetDiscreteVoxelShape; import net.minecraft.world.phys.shapes.DiscreteVoxelShape; import org.jetbrains.annotations.Nullable; @@ -119,11 +119,11 @@ public class LightSectionDebugRenderer implements DebugRenderer.SimpleDebugRende for (int k = 0; k < i; k++) { for (int l = 0; l < i; l++) { SectionPos sectionPos = SectionPos.of(pos.x() + l - radius, pos.y() + k - radius, pos.z() + j - radius); - LayerLightSectionStorage.SectionType sectionType = levelLightEngine.getDebugSectionType(lightLayer, sectionPos); - if (sectionType == LayerLightSectionStorage.SectionType.LIGHT_AND_DATA) { + SectionType sectionType = levelLightEngine.getDebugSectionType(lightLayer, sectionPos); + if (sectionType == SectionType.LIGHT_AND_DATA) { this.lightAndBlocksShape.fill(l, k, j); this.lightShape.fill(l, k, j); - } else if (sectionType == LayerLightSectionStorage.SectionType.LIGHT_ONLY) { + } else if (sectionType == SectionType.LIGHT_ONLY) { this.lightShape.fill(l, k, j); } } diff --git a/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java b/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java index b4bf58dc..8670e987 100644 --- a/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java +++ b/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java @@ -22,51 +22,51 @@ public class OctreeDebugRenderer { this.minecraft = minecraft; } - public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource multiBufferSource, double d, double e, double f) { + public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource bufferSource, double camX, double camY, double camZ) { Octree octree = this.minecraft.levelRenderer.getSectionOcclusionGraph().getOctree(); MutableInt mutableInt = new MutableInt(0); - octree.visitNodes((node, bl, i, bl2) -> this.renderNode(node, poseStack, multiBufferSource, d, e, f, i, bl, mutableInt, bl2), frustum, 32); + octree.visitNodes((node, bl, i, bl2) -> this.renderNode(node, poseStack, bufferSource, camX, camY, camZ, i, bl, mutableInt, bl2), frustum, 32); } private void renderNode( Octree.Node node, PoseStack poseStack, - MultiBufferSource multiBufferSource, - double d, - double e, - double f, - int i, - boolean bl, - MutableInt mutableInt, - boolean bl2 + MultiBufferSource bufferSource, + double camX, + double camY, + double camZ, + int recursionDepth, + boolean isLeafNode, + MutableInt nodesRendered, + boolean isNearby ) { AABB aABB = node.getAABB(); - double g = aABB.getXsize(); - long l = Math.round(g / 16.0); + double d = aABB.getXsize(); + long l = Math.round(d / 16.0); if (l == 1L) { - mutableInt.add(1); - double h = aABB.getCenter().x; - double j = aABB.getCenter().y; - double k = aABB.getCenter().z; - int m = bl2 ? -16711936 : -1; - DebugRenderer.renderFloatingText(poseStack, multiBufferSource, String.valueOf(mutableInt.getValue()), h, j, k, m, 0.3F); + nodesRendered.add(1); + double e = aABB.getCenter().x; + double f = aABB.getCenter().y; + double g = aABB.getCenter().z; + int i = isNearby ? -16711936 : -1; + DebugRenderer.renderFloatingText(poseStack, bufferSource, String.valueOf(nodesRendered.getValue()), e, f, g, i, 0.3F); } - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.lines()); - long n = l + 5L; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); + long m = l + 5L; ShapeRenderer.renderLineBox( poseStack, vertexConsumer, - aABB.deflate(0.1 * i).move(-d, -e, -f), - getColorComponent(n, 0.3F), - getColorComponent(n, 0.8F), - getColorComponent(n, 0.5F), - bl ? 0.4F : 1.0F + aABB.deflate(0.1 * recursionDepth).move(-camX, -camY, -camZ), + getColorComponent(m, 0.3F), + getColorComponent(m, 0.8F), + getColorComponent(m, 0.5F), + isLeafNode ? 0.4F : 1.0F ); } - private static float getColorComponent(long l, float f) { - float g = 0.1F; - return Mth.frac(f * (float)l) * 0.9F + 0.1F; + private static float getColorComponent(long value, float multiplier) { + float f = 0.1F; + return Mth.frac(multiplier * (float)value) * 0.9F + 0.1F; } } diff --git a/net/minecraft/client/renderer/debug/PathfindingRenderer.java b/net/minecraft/client/renderer/debug/PathfindingRenderer.java index 15b325c5..776046df 100644 --- a/net/minecraft/client/renderer/debug/PathfindingRenderer.java +++ b/net/minecraft/client/renderer/debug/PathfindingRenderer.java @@ -57,13 +57,23 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } } - public static void renderPath(PoseStack poseStack, MultiBufferSource buffer, Path path, float f, boolean bl, boolean bl2, double x, double y, double z) { - renderPathLine(poseStack, buffer.getBuffer(RenderType.debugLineStrip(6.0)), path, x, y, z); + public static void renderPath( + PoseStack poseStack, + MultiBufferSource bufferSource, + Path path, + float nodeSize, + boolean renderDebugNodes, + boolean renderDebugInfo, + double x, + double y, + double z + ) { + renderPathLine(poseStack, bufferSource.getBuffer(RenderType.debugLineStrip(6.0)), path, x, y, z); BlockPos blockPos = path.getTarget(); if (distanceToCamera(blockPos, x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, + bufferSource, new AABB( blockPos.getX() + 0.25F, blockPos.getY() + 0.25F, blockPos.getZ() + 0.25, blockPos.getX() + 0.75F, blockPos.getY() + 0.75F, blockPos.getZ() + 0.75F ) @@ -77,15 +87,18 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { for (int i = 0; i < path.getNodeCount(); i++) { Node node = path.getNode(i); if (distanceToCamera(node.asBlockPos(), x, y, z) <= 80.0F) { - float g = i == path.getNextNodeIndex() ? 1.0F : 0.0F; - float h = i == path.getNextNodeIndex() ? 0.0F : 1.0F; + float f = i == path.getNextNodeIndex() ? 1.0F : 0.0F; + float g = i == path.getNextNodeIndex() ? 0.0F : 1.0F; DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node.x + 0.5F - f, node.y + 0.01F * i, node.z + 0.5F - f, node.x + 0.5F + f, node.y + 0.25F + 0.01F * i, node.z + 0.5F + f).move(-x, -y, -z), - g, + bufferSource, + new AABB( + node.x + 0.5F - nodeSize, node.y + 0.01F * i, node.z + 0.5F - nodeSize, node.x + 0.5F + nodeSize, node.y + 0.25F + 0.01F * i, node.z + 0.5F + nodeSize + ) + .move(-x, -y, -z), + f, 0.0F, - h, + g, 0.5F ); } @@ -93,13 +106,20 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } DebugData debugData = path.debugData(); - if (bl && debugData != null) { + if (renderDebugNodes && debugData != null) { for (Node node2 : debugData.closedSet()) { if (distanceToCamera(node2.asBlockPos(), x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node2.x + 0.5F - f / 2.0F, node2.y + 0.01F, node2.z + 0.5F - f / 2.0F, node2.x + 0.5F + f / 2.0F, node2.y + 0.1, node2.z + 0.5F + f / 2.0F) + bufferSource, + new AABB( + node2.x + 0.5F - nodeSize / 2.0F, + node2.y + 0.01F, + node2.z + 0.5F - nodeSize / 2.0F, + node2.x + 0.5F + nodeSize / 2.0F, + node2.y + 0.1, + node2.z + 0.5F + nodeSize / 2.0F + ) .move(-x, -y, -z), 1.0F, 0.8F, @@ -113,8 +133,15 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { if (distanceToCamera(node2x.asBlockPos(), x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node2x.x + 0.5F - f / 2.0F, node2x.y + 0.01F, node2x.z + 0.5F - f / 2.0F, node2x.x + 0.5F + f / 2.0F, node2x.y + 0.1, node2x.z + 0.5F + f / 2.0F) + bufferSource, + new AABB( + node2x.x + 0.5F - nodeSize / 2.0F, + node2x.y + 0.01F, + node2x.z + 0.5F - nodeSize / 2.0F, + node2x.x + 0.5F + nodeSize / 2.0F, + node2x.y + 0.1, + node2x.z + 0.5F + nodeSize / 2.0F + ) .move(-x, -y, -z), 0.8F, 1.0F, @@ -125,13 +152,15 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } } - if (bl2) { + if (renderDebugInfo) { for (int j = 0; j < path.getNodeCount(); j++) { Node node3 = path.getNode(j); if (distanceToCamera(node3.asBlockPos(), x, y, z) <= 80.0F) { - DebugRenderer.renderFloatingText(poseStack, buffer, String.valueOf(node3.type), node3.x + 0.5, node3.y + 0.75, node3.z + 0.5, -1, 0.02F, true, 0.0F, true); DebugRenderer.renderFloatingText( - poseStack, buffer, String.format(Locale.ROOT, "%.2f", node3.costMalus), node3.x + 0.5, node3.y + 0.25, node3.z + 0.5, -1, 0.02F, true, 0.0F, true + poseStack, bufferSource, String.valueOf(node3.type), node3.x + 0.5, node3.y + 0.75, node3.z + 0.5, -1, 0.02F, true, 0.0F, true + ); + DebugRenderer.renderFloatingText( + poseStack, bufferSource, String.format(Locale.ROOT, "%.2f", node3.costMalus), node3.x + 0.5, node3.y + 0.25, node3.z + 0.5, -1, 0.02F, true, 0.0F, true ); } } diff --git a/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java b/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java index 0b5ad1a0..9cdf9868 100644 --- a/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java +++ b/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ShapeRenderer; import net.minecraft.network.protocol.common.custom.RedstoneWireOrientationsDebugPayload; +import net.minecraft.network.protocol.common.custom.RedstoneWireOrientationsDebugPayload.Wire; import net.minecraft.world.level.redstone.Orientation; import org.joml.Vector3f; @@ -25,8 +26,8 @@ public class RedstoneWireOrientationsRenderer implements DebugRenderer.SimpleDeb this.minecraft = minecraft; } - public void addWireOrientations(RedstoneWireOrientationsDebugPayload redstoneWireOrientationsDebugPayload) { - this.updatedWires.add(redstoneWireOrientationsDebugPayload); + public void addWireOrientations(RedstoneWireOrientationsDebugPayload payload) { + this.updatedWires.add(payload); } @Override @@ -41,7 +42,7 @@ public class RedstoneWireOrientationsRenderer implements DebugRenderer.SimpleDeb if (m > 200L) { iterator.remove(); } else { - for (RedstoneWireOrientationsDebugPayload.Wire wire : redstoneWireOrientationsDebugPayload.wires()) { + for (Wire wire : redstoneWireOrientationsDebugPayload.wires()) { Vector3f vector3f = wire.pos().getBottomCenter().subtract(camX, camY - 0.1, camZ).toVector3f(); Orientation orientation = wire.orientation(); ShapeRenderer.renderVector(poseStack, vertexConsumer, vector3f, orientation.getFront().getUnitVec3().scale(0.5), -16776961); diff --git a/net/minecraft/client/renderer/debug/SupportBlockRenderer.java b/net/minecraft/client/renderer/debug/SupportBlockRenderer.java index d6b53d68..6925a9d2 100644 --- a/net/minecraft/client/renderer/debug/SupportBlockRenderer.java +++ b/net/minecraft/client/renderer/debug/SupportBlockRenderer.java @@ -88,7 +88,7 @@ public class SupportBlockRenderer implements DebugRenderer.SimpleDebugRenderer { DebugRenderer.renderVoxelShape( poseStack, buffer.getBuffer(RenderType.lines()), - this.minecraft.level.getBlockState(pos).getCollisionShape(this.minecraft.level, pos, CollisionContext.empty()).move(pos.getX(), pos.getY(), pos.getZ()), + this.minecraft.level.getBlockState(pos).getCollisionShape(this.minecraft.level, pos, CollisionContext.empty()).move(pos), -camX, -camY, -camZ, diff --git a/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java b/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java index c90186a2..e9736bb6 100644 --- a/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java @@ -8,6 +8,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.BoatRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.util.Mth; @@ -16,7 +17,7 @@ import org.joml.Quaternionf; @Environment(EnvType.CLIENT) public abstract class AbstractBoatRenderer extends EntityRenderer { - public AbstractBoatRenderer(EntityRendererProvider.Context context) { + public AbstractBoatRenderer(Context context) { super(context); this.shadowRadius = 0.8F; } @@ -30,7 +31,7 @@ public abstract class AbstractBoatRenderer extends EntityRenderer model(); diff --git a/net/minecraft/client/renderer/entity/AbstractHoglinRenderer.java b/net/minecraft/client/renderer/entity/AbstractHoglinRenderer.java index e3f39bb8..8acbd6e0 100644 --- a/net/minecraft/client/renderer/entity/AbstractHoglinRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractHoglinRenderer.java @@ -10,8 +10,8 @@ import net.minecraft.world.entity.monster.hoglin.HoglinBase; @Environment(EnvType.CLIENT) public abstract class AbstractHoglinRenderer extends AgeableMobRenderer { - public AbstractHoglinRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, float f) { - super(context, new HoglinModel(context.bakeLayer(modelLayerLocation)), new HoglinModel(context.bakeLayer(modelLayerLocation2)), f); + public AbstractHoglinRenderer(EntityRendererProvider.Context context, ModelLayerLocation adultModel, ModelLayerLocation babyModel, float shadowRadius) { + super(context, new HoglinModel(context.bakeLayer(adultModel)), new HoglinModel(context.bakeLayer(babyModel)), shadowRadius); } public HoglinRenderState createRenderState() { diff --git a/net/minecraft/client/renderer/entity/AbstractHorseRenderer.java b/net/minecraft/client/renderer/entity/AbstractHorseRenderer.java index 84485420..d889f23d 100644 --- a/net/minecraft/client/renderer/entity/AbstractHorseRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractHorseRenderer.java @@ -1,30 +1,23 @@ package net.minecraft.client.renderer.entity; -import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.EntityModel; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EquineRenderState; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.animal.horse.AbstractHorse; @Environment(EnvType.CLIENT) public abstract class AbstractHorseRenderer> extends AgeableMobRenderer { - private final float scale; - - public AbstractHorseRenderer(EntityRendererProvider.Context context, M entityModel, M entityModel2, float f) { - super(context, entityModel, entityModel2, 0.75F); - this.scale = f; - } - - protected void scale(S equineRenderState, PoseStack poseStack) { - poseStack.scale(this.scale, this.scale, this.scale); - super.scale(equineRenderState, poseStack); + public AbstractHorseRenderer(Context context, M adultModel, M babyModel) { + super(context, adultModel, babyModel, 0.75F); } public void extractRenderState(T abstractHorse, S equineRenderState, float f) { super.extractRenderState(abstractHorse, equineRenderState, f); - equineRenderState.isSaddled = abstractHorse.isSaddled(); + equineRenderState.saddle = abstractHorse.getItemBySlot(EquipmentSlot.SADDLE).copy(); equineRenderState.isRidden = abstractHorse.isVehicle(); equineRenderState.eatAnimation = abstractHorse.getEatAnim(f); equineRenderState.standAnimation = abstractHorse.getStandAnim(f); diff --git a/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java b/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java index 4eb9e161..7ac1aa5e 100644 --- a/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java @@ -10,6 +10,7 @@ import net.minecraft.client.model.MinecartModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.block.BlockRenderDispatcher; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.MinecartRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -25,13 +26,14 @@ import net.minecraft.world.phys.Vec3; @Environment(EnvType.CLIENT) public abstract class AbstractMinecartRenderer extends EntityRenderer { private static final ResourceLocation MINECART_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/minecart.png"); + private static final float DISPLAY_BLOCK_SCALE = 0.75F; protected final MinecartModel model; private final BlockRenderDispatcher blockRenderer; - public AbstractMinecartRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation) { + public AbstractMinecartRenderer(Context context, ModelLayerLocation modelLayer) { super(context); this.shadowRadius = 0.7F; - this.model = new MinecartModel(context.bakeLayer(modelLayerLocation)); + this.model = new MinecartModel(context.bakeLayer(modelLayer)); this.blockRenderer = context.getBlockRenderDispatcher(); } @@ -57,7 +59,6 @@ public abstract class AbstractMinecartRenderer void newRender(S minecartRenderState, PoseStack poseStack) { - poseStack.mulPose(Axis.YP.rotationDegrees(minecartRenderState.yRot)); - poseStack.mulPose(Axis.ZP.rotationDegrees(-minecartRenderState.xRot)); + private static void newRender(S renderState, PoseStack poseStack) { + poseStack.mulPose(Axis.YP.rotationDegrees(renderState.yRot)); + poseStack.mulPose(Axis.ZP.rotationDegrees(-renderState.xRot)); poseStack.translate(0.0F, 0.375F, 0.0F); } - private static void oldRender(S minecartRenderState, PoseStack poseStack) { - double d = minecartRenderState.x; - double e = minecartRenderState.y; - double f = minecartRenderState.z; - float g = minecartRenderState.xRot; - float h = minecartRenderState.yRot; - if (minecartRenderState.posOnRail != null && minecartRenderState.frontPos != null && minecartRenderState.backPos != null) { - Vec3 vec3 = minecartRenderState.frontPos; - Vec3 vec32 = minecartRenderState.backPos; - poseStack.translate(minecartRenderState.posOnRail.x - d, (vec3.y + vec32.y) / 2.0 - e, minecartRenderState.posOnRail.z - f); + private static void oldRender(S renderState, PoseStack poseStack) { + double d = renderState.x; + double e = renderState.y; + double f = renderState.z; + float g = renderState.xRot; + float h = renderState.yRot; + if (renderState.posOnRail != null && renderState.frontPos != null && renderState.backPos != null) { + Vec3 vec3 = renderState.frontPos; + Vec3 vec32 = renderState.backPos; + poseStack.translate(renderState.posOnRail.x - d, (vec3.y + vec32.y) / 2.0 - e, renderState.posOnRail.z - f); Vec3 vec33 = vec32.add(-vec3.x, -vec3.y, -vec3.z); if (vec33.length() != 0.0) { vec33 = vec33.normalize(); @@ -121,49 +122,49 @@ public abstract class AbstractMinecartRenderer void newExtractState( - T abstractMinecart, NewMinecartBehavior newMinecartBehavior, S minecartRenderState, float f + T minecart, NewMinecartBehavior behavior, S renderState, float partialTick ) { - if (newMinecartBehavior.cartHasPosRotLerp()) { - minecartRenderState.renderPos = newMinecartBehavior.getCartLerpPosition(f); - minecartRenderState.xRot = newMinecartBehavior.getCartLerpXRot(f); - minecartRenderState.yRot = newMinecartBehavior.getCartLerpYRot(f); + if (behavior.cartHasPosRotLerp()) { + renderState.renderPos = behavior.getCartLerpPosition(partialTick); + renderState.xRot = behavior.getCartLerpXRot(partialTick); + renderState.yRot = behavior.getCartLerpYRot(partialTick); } else { - minecartRenderState.renderPos = null; - minecartRenderState.xRot = abstractMinecart.getXRot(); - minecartRenderState.yRot = abstractMinecart.getYRot(); + renderState.renderPos = null; + renderState.xRot = minecart.getXRot(); + renderState.yRot = minecart.getYRot(); } } private static void oldExtractState( - T abstractMinecart, OldMinecartBehavior oldMinecartBehavior, S minecartRenderState, float f + T minecart, OldMinecartBehavior behavior, S renderState, float partialTick ) { - float g = 0.3F; - minecartRenderState.xRot = abstractMinecart.getXRot(f); - minecartRenderState.yRot = abstractMinecart.getYRot(f); - double d = minecartRenderState.x; - double e = minecartRenderState.y; - double h = minecartRenderState.z; - Vec3 vec3 = oldMinecartBehavior.getPos(d, e, h); + float f = 0.3F; + renderState.xRot = minecart.getXRot(partialTick); + renderState.yRot = minecart.getYRot(partialTick); + double d = renderState.x; + double e = renderState.y; + double g = renderState.z; + Vec3 vec3 = behavior.getPos(d, e, g); if (vec3 != null) { - minecartRenderState.posOnRail = vec3; - Vec3 vec32 = oldMinecartBehavior.getPosOffs(d, e, h, 0.3F); - Vec3 vec33 = oldMinecartBehavior.getPosOffs(d, e, h, -0.3F); - minecartRenderState.frontPos = (Vec3)Objects.requireNonNullElse(vec32, vec3); - minecartRenderState.backPos = (Vec3)Objects.requireNonNullElse(vec33, vec3); + renderState.posOnRail = vec3; + Vec3 vec32 = behavior.getPosOffs(d, e, g, 0.3F); + Vec3 vec33 = behavior.getPosOffs(d, e, g, -0.3F); + renderState.frontPos = (Vec3)Objects.requireNonNullElse(vec32, vec3); + renderState.backPos = (Vec3)Objects.requireNonNullElse(vec33, vec3); } else { - minecartRenderState.posOnRail = null; - minecartRenderState.frontPos = null; - minecartRenderState.backPos = null; + renderState.posOnRail = null; + renderState.frontPos = null; + renderState.backPos = null; } } - protected void renderMinecartContents(S minecartRenderState, BlockState blockState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { - this.blockRenderer.renderSingleBlock(blockState, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); + protected void renderMinecartContents(S renderState, BlockState state, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { + this.blockRenderer.renderSingleBlock(state, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); } protected AABB getBoundingBoxForCulling(T abstractMinecart) { AABB aABB = super.getBoundingBoxForCulling(abstractMinecart); - return abstractMinecart.hasCustomDisplay() ? aABB.inflate(Math.abs(abstractMinecart.getDisplayOffset()) / 16.0) : aABB; + return !abstractMinecart.getDisplayBlockState().isAir() ? aABB.expandTowards(0.0, abstractMinecart.getDisplayOffset() * 0.75F / 16.0F, 0.0) : aABB; } public Vec3 getRenderOffset(S minecartRenderState) { diff --git a/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java b/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java index b0300c1e..c20d4181 100644 --- a/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java @@ -2,27 +2,30 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.model.SkeletonModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.client.renderer.entity.state.SkeletonRenderState; +import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.monster.AbstractSkeleton; +import net.minecraft.world.item.Items; @Environment(EnvType.CLIENT) public abstract class AbstractSkeletonRenderer extends HumanoidMobRenderer> { public AbstractSkeletonRenderer( - EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, ModelLayerLocation modelLayerLocation3 + EntityRendererProvider.Context context, ModelLayerLocation modelLayer, ModelLayerLocation skeletonLayer, ModelLayerLocation innerModelLayer ) { - this(context, modelLayerLocation2, modelLayerLocation3, new SkeletonModel<>(context.bakeLayer(modelLayerLocation))); + this(context, skeletonLayer, innerModelLayer, new SkeletonModel<>(context.bakeLayer(modelLayer))); } public AbstractSkeletonRenderer( - EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, SkeletonModel skeletonModel + EntityRendererProvider.Context context, ModelLayerLocation skeletonLayer, ModelLayerLocation innerModelLayer, SkeletonModel model ) { - super(context, skeletonModel, 0.5F); + super(context, model, 0.5F); this.addLayer( new HumanoidArmorLayer<>( - this, new SkeletonModel(context.bakeLayer(modelLayerLocation)), new SkeletonModel(context.bakeLayer(modelLayerLocation2)), context.getEquipmentRenderer() + this, new SkeletonModel(context.bakeLayer(skeletonLayer)), new SkeletonModel(context.bakeLayer(innerModelLayer)), context.getEquipmentRenderer() ) ); } @@ -31,9 +34,16 @@ public abstract class AbstractSkeletonRenderer(this, zombieModel3, zombieModel4, zombieModel5, zombieModel6, context.getEquipmentRenderer())); + super(context, adultModel, babyModel, 0.5F); + this.addLayer(new HumanoidArmorLayer<>(this, innerModel, outerModel, innerModelBaby, outerModelBaby, context.getEquipmentRenderer())); } public ResourceLocation getTextureLocation(S zombieRenderState) { diff --git a/net/minecraft/client/renderer/entity/AgeableMobRenderer.java b/net/minecraft/client/renderer/entity/AgeableMobRenderer.java index a348612a..743262af 100644 --- a/net/minecraft/client/renderer/entity/AgeableMobRenderer.java +++ b/net/minecraft/client/renderer/entity/AgeableMobRenderer.java @@ -14,10 +14,10 @@ public abstract class AgeableMobRenderer(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); } public ResourceLocation getTextureLocation(AllayRenderState allayRenderState) { @@ -29,6 +30,7 @@ public class AllayRenderer extends MobRenderer(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); this.addLayer(new WingsLayer<>(this, context.getModelSet(), context.getEquipmentRenderer())); - this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), context.getItemRenderer())); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet())); } public ResourceLocation getTextureLocation(ArmorStandRenderState armorStandRenderState) { @@ -56,7 +57,7 @@ public class ArmorStandRenderer extends LivingEntityRenderer extends EntityRenderer { private final ArrowModel model; - public ArrowRenderer(EntityRendererProvider.Context context) { + public ArrowRenderer(Context context) { super(context); this.model = new ArrowModel(context.bakeLayer(ModelLayers.ARROW)); } @@ -34,7 +35,7 @@ public abstract class ArrowRenderer { - private static final Map TEXTURE_BY_TYPE = Util.make(Maps.newHashMap(), hashMap -> { - for (Axolotl.Variant variant : Axolotl.Variant.values()) { + private static final Map TEXTURE_BY_TYPE = Util.make(Maps.newHashMap(), hashMap -> { + for (Variant variant : Variant.values()) { hashMap.put(variant, ResourceLocation.withDefaultNamespace(String.format(Locale.ROOT, "textures/entity/axolotl/axolotl_%s.png", variant.getName()))); } }); diff --git a/net/minecraft/client/renderer/entity/BlazeRenderer.java b/net/minecraft/client/renderer/entity/BlazeRenderer.java index 0c007317..456dcb2b 100644 --- a/net/minecraft/client/renderer/entity/BlazeRenderer.java +++ b/net/minecraft/client/renderer/entity/BlazeRenderer.java @@ -22,7 +22,7 @@ public class BlazeRenderer extends MobRenderer model; - public BoatRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation) { + public BoatRenderer(Context context, ModelLayerLocation modelLayer) { super(context); - this.texture = modelLayerLocation.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); - this.waterPatchModel = new Model.Simple(context.bakeLayer(ModelLayers.BOAT_WATER_PATCH), resourceLocation -> RenderType.waterMask()); - this.model = new BoatModel(context.bakeLayer(modelLayerLocation)); + this.texture = modelLayer.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); + this.waterPatchModel = new Simple(context.bakeLayer(ModelLayers.BOAT_WATER_PATCH), resourceLocation -> RenderType.waterMask()); + this.model = new BoatModel(context.bakeLayer(modelLayer)); } @Override @@ -39,9 +41,10 @@ public class BoatRenderer extends AbstractBoatRenderer { } @Override - protected void renderTypeAdditions(BoatRenderState boatRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { - if (!boatRenderState.isUnderWater) { - this.waterPatchModel.renderToBuffer(poseStack, multiBufferSource.getBuffer(this.waterPatchModel.renderType(this.texture)), i, OverlayTexture.NO_OVERLAY); + protected void renderTypeAdditions(BoatRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { + if (!renderState.isUnderWater) { + this.waterPatchModel + .renderToBuffer(poseStack, bufferSource.getBuffer(this.waterPatchModel.renderType(this.texture)), packedLight, OverlayTexture.NO_OVERLAY); } } } diff --git a/net/minecraft/client/renderer/entity/CamelRenderer.java b/net/minecraft/client/renderer/entity/CamelRenderer.java index feeb7138..5539cefe 100644 --- a/net/minecraft/client/renderer/entity/CamelRenderer.java +++ b/net/minecraft/client/renderer/entity/CamelRenderer.java @@ -3,17 +3,32 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.CamelModel; +import net.minecraft.client.model.CamelSaddleModel; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.layers.SimpleEquipmentLayer; import net.minecraft.client.renderer.entity.state.CamelRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.animal.camel.Camel; @Environment(EnvType.CLIENT) public class CamelRenderer extends AgeableMobRenderer { private static final ResourceLocation CAMEL_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/camel/camel.png"); - public CamelRenderer(EntityRendererProvider.Context context) { + public CamelRenderer(Context context) { super(context, new CamelModel(context.bakeLayer(ModelLayers.CAMEL)), new CamelModel(context.bakeLayer(ModelLayers.CAMEL_BABY)), 0.7F); + this.addLayer( + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + EquipmentClientInfo.LayerType.CAMEL_SADDLE, + camelRenderState -> camelRenderState.saddle, + new CamelSaddleModel(context.bakeLayer(ModelLayers.CAMEL_SADDLE)), + new CamelSaddleModel(context.bakeLayer(ModelLayers.CAMEL_BABY_SADDLE)) + ) + ); } public ResourceLocation getTextureLocation(CamelRenderState camelRenderState) { @@ -26,7 +41,7 @@ public class CamelRenderer extends AgeableMobRenderer { - public CatRenderer(EntityRendererProvider.Context context) { + public CatRenderer(Context context) { super(context, new CatModel(context.bakeLayer(ModelLayers.CAT)), new CatModel(context.bakeLayer(ModelLayers.CAT_BABY)), 0.4F); this.addLayer(new CatCollarLayer(this, context.getModelSet())); } @@ -29,7 +30,7 @@ public class CatRenderer extends AgeableMobRenderer { } @Override - public ResourceLocation getTextureLocation(LivingEntityRenderState livingEntityRenderState) { + public ResourceLocation getTextureLocation(LivingEntityRenderState renderState) { return CAVE_SPIDER_LOCATION; } } diff --git a/net/minecraft/client/renderer/entity/ChickenRenderer.java b/net/minecraft/client/renderer/entity/ChickenRenderer.java index 506795d3..cc21fe91 100644 --- a/net/minecraft/client/renderer/entity/ChickenRenderer.java +++ b/net/minecraft/client/renderer/entity/ChickenRenderer.java @@ -1,24 +1,55 @@ package net.minecraft.client.renderer.entity; +import com.google.common.collect.Maps; +import com.mojang.blaze3d.vertex.PoseStack; +import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.AdultAndBabyModelPair; import net.minecraft.client.model.ChickenModel; +import net.minecraft.client.model.ColdChickenModel; +import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ChickenRenderState; +import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.entity.animal.Chicken; +import net.minecraft.world.entity.animal.ChickenVariant; @Environment(EnvType.CLIENT) -public class ChickenRenderer extends AgeableMobRenderer { - private static final ResourceLocation CHICKEN_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/chicken.png"); +public class ChickenRenderer extends MobRenderer { + private final Map> models; - public ChickenRenderer(EntityRendererProvider.Context context) { - super(context, new ChickenModel(context.bakeLayer(ModelLayers.CHICKEN)), new ChickenModel(context.bakeLayer(ModelLayers.CHICKEN_BABY)), 0.3F); + public ChickenRenderer(Context context) { + super(context, new ChickenModel(context.bakeLayer(ModelLayers.CHICKEN)), 0.3F); + this.models = bakeModels(context); + } + + private static Map> bakeModels(Context context) { + return Maps.newEnumMap( + Map.of( + ChickenVariant.ModelType.NORMAL, + new AdultAndBabyModelPair<>(new ChickenModel(context.bakeLayer(ModelLayers.CHICKEN)), new ChickenModel(context.bakeLayer(ModelLayers.CHICKEN_BABY))), + ChickenVariant.ModelType.COLD, + new AdultAndBabyModelPair<>( + new ColdChickenModel(context.bakeLayer(ModelLayers.COLD_CHICKEN)), new ColdChickenModel(context.bakeLayer(ModelLayers.COLD_CHICKEN_BABY)) + ) + ) + ); + } + + public void render(ChickenRenderState chickenRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + if (chickenRenderState.variant != null) { + this.model = (EntityModel)((AdultAndBabyModelPair)this.models.get(chickenRenderState.variant.modelAndTexture().model())).getModel(chickenRenderState.isBaby); + super.render(chickenRenderState, poseStack, multiBufferSource, i); + } } public ResourceLocation getTextureLocation(ChickenRenderState chickenRenderState) { - return CHICKEN_LOCATION; + return chickenRenderState.variant == null ? MissingTextureAtlasSprite.getLocation() : chickenRenderState.variant.modelAndTexture().asset().texturePath(); } public ChickenRenderState createRenderState() { @@ -29,5 +60,6 @@ public class ChickenRenderer extends AgeableMobRenderer { private static final ResourceLocation COD_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/fish/cod.png"); - public CodRenderer(EntityRendererProvider.Context context) { + public CodRenderer(Context context) { super(context, new CodModel(context.bakeLayer(ModelLayers.COD)), 0.3F); } @Override - public ResourceLocation getTextureLocation(LivingEntityRenderState livingEntityRenderState) { + public ResourceLocation getTextureLocation(LivingEntityRenderState renderState) { return COD_LOCATION; } @@ -29,11 +30,11 @@ public class CodRenderer extends MobRenderer { - private static final ResourceLocation COW_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/cow/cow.png"); +public class CowRenderer extends MobRenderer { + private final Map> models; - public CowRenderer(EntityRendererProvider.Context context) { - super(context, new CowModel(context.bakeLayer(ModelLayers.COW)), new CowModel(context.bakeLayer(ModelLayers.COW_BABY)), 0.7F); + public CowRenderer(Context context) { + super(context, new CowModel(context.bakeLayer(ModelLayers.COW)), 0.7F); + this.models = bakeModels(context); } - @Override - public ResourceLocation getTextureLocation(LivingEntityRenderState livingEntityRenderState) { - return COW_LOCATION; + private static Map> bakeModels(Context context) { + return Maps.newEnumMap( + Map.of( + CowVariant.ModelType.NORMAL, + new AdultAndBabyModelPair<>(new CowModel(context.bakeLayer(ModelLayers.COW)), new CowModel(context.bakeLayer(ModelLayers.COW_BABY))), + CowVariant.ModelType.WARM, + new AdultAndBabyModelPair<>(new CowModel(context.bakeLayer(ModelLayers.WARM_COW)), new CowModel(context.bakeLayer(ModelLayers.WARM_COW_BABY))), + CowVariant.ModelType.COLD, + new AdultAndBabyModelPair<>(new CowModel(context.bakeLayer(ModelLayers.COLD_COW)), new CowModel(context.bakeLayer(ModelLayers.COLD_COW_BABY))) + ) + ); } - public LivingEntityRenderState createRenderState() { - return new LivingEntityRenderState(); + public ResourceLocation getTextureLocation(CowRenderState cowRenderState) { + return cowRenderState.variant == null ? MissingTextureAtlasSprite.getLocation() : cowRenderState.variant.modelAndTexture().asset().texturePath(); } - public void extractRenderState(Cow cow, LivingEntityRenderState livingEntityRenderState, float f) { - super.extractRenderState(cow, livingEntityRenderState, f); + public CowRenderState createRenderState() { + return new CowRenderState(); + } + + public void extractRenderState(Cow cow, CowRenderState cowRenderState, float f) { + super.extractRenderState(cow, cowRenderState, f); + cowRenderState.variant = cow.getVariant().value(); + } + + public void render(CowRenderState cowRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + if (cowRenderState.variant != null) { + this.model = (EntityModel)((AdultAndBabyModelPair)this.models.get(cowRenderState.variant.modelAndTexture().model())).getModel(cowRenderState.isBaby); + super.render(cowRenderState, poseStack, multiBufferSource, i); + } } } diff --git a/net/minecraft/client/renderer/entity/CreakingRenderer.java b/net/minecraft/client/renderer/entity/CreakingRenderer.java index 71bacc78..229f365f 100644 --- a/net/minecraft/client/renderer/entity/CreakingRenderer.java +++ b/net/minecraft/client/renderer/entity/CreakingRenderer.java @@ -16,9 +16,9 @@ public class CreakingRenderer extends MobRenderer(this, EYES_TEXTURE_LOCATION, (creakingRenderState, f) -> 1.0F, CreakingModel::getHeadModelParts, RenderType::eyes) + new LivingEntityEmissiveLayer<>(this, EYES_TEXTURE_LOCATION, (creakingRenderState, f) -> 1.0F, CreakingModel::getHeadModelParts, RenderType::eyes, true) ); } @@ -34,7 +34,15 @@ public class CreakingRenderer extends MobRenderer extends EntityRenderer { private final EntityRenderDispatcher entityRenderDispatcher; - protected DisplayRenderer(EntityRendererProvider.Context context) { + protected DisplayRenderer(Context context) { super(context); this.entityRenderDispatcher = context.getEntityRenderDispatcher(); } @@ -67,38 +69,40 @@ public abstract class DisplayRenderer quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * displayEntityRenderState.entityYRot, (float) (Math.PI / 180.0) * displayEntityRenderState.entityXRot, 0.0F + case FIXED -> quaternion.rotationYXZ( + (float) (-Math.PI / 180.0) * entityRenderState.entityYRot, (float) (Math.PI / 180.0) * entityRenderState.entityXRot, 0.0F ); - case HORIZONTAL -> quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * displayEntityRenderState.entityYRot, (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F - ); - case VERTICAL -> quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * displayEntityRenderState.entityXRot, 0.0F - ); - case CENTER -> quaternionf.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); + case HORIZONTAL -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * entityRenderState.entityYRot, (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); + case VERTICAL -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * entityRenderState.entityXRot, 0.0F); + case CENTER -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); }; } @@ -118,7 +122,7 @@ public abstract class DisplayRenderer { private final BlockRenderDispatcher blockRenderer; - protected BlockDisplayRenderer(EntityRendererProvider.Context context) { + protected BlockDisplayRenderer(Context context) { super(context); this.blockRenderer = context.getBlockRenderDispatcher(); } @@ -154,11 +158,11 @@ public abstract class DisplayRenderer { - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; - protected ItemDisplayRenderer(EntityRendererProvider.Context context) { + protected ItemDisplayRenderer(Context context) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); } public ItemDisplayEntityRenderState createRenderState() { @@ -169,22 +173,16 @@ public abstract class DisplayRenderer { private final Font font; - protected TextDisplayRenderer(EntityRendererProvider.Context context) { + protected TextDisplayRenderer(Context context) { super(context); this.font = context.getFont(); } @@ -265,16 +263,7 @@ public abstract class DisplayRenderer 1.0E-7; } } diff --git a/net/minecraft/client/renderer/entity/DonkeyRenderer.java b/net/minecraft/client/renderer/entity/DonkeyRenderer.java index 12b5dbca..b9e0d626 100644 --- a/net/minecraft/client/renderer/entity/DonkeyRenderer.java +++ b/net/minecraft/client/renderer/entity/DonkeyRenderer.java @@ -3,22 +3,33 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.DonkeyModel; +import net.minecraft.client.model.EquineSaddleModel; import net.minecraft.client.model.geom.ModelLayerLocation; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.layers.SimpleEquipmentLayer; import net.minecraft.client.renderer.entity.state.DonkeyRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.animal.horse.AbstractChestedHorse; @Environment(EnvType.CLIENT) public class DonkeyRenderer extends AbstractHorseRenderer { - public static final ResourceLocation DONKEY_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/horse/donkey.png"); - public static final ResourceLocation MULE_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/horse/mule.png"); private final ResourceLocation texture; - public DonkeyRenderer( - EntityRendererProvider.Context context, float f, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, boolean bl - ) { - super(context, new DonkeyModel(context.bakeLayer(modelLayerLocation)), new DonkeyModel(context.bakeLayer(modelLayerLocation2)), f); - this.texture = bl ? MULE_TEXTURE : DONKEY_TEXTURE; + public DonkeyRenderer(Context context, DonkeyRenderer.Type type) { + super(context, new DonkeyModel(context.bakeLayer(type.model)), new DonkeyModel(context.bakeLayer(type.babyModel))); + this.texture = type.texture; + this.addLayer( + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + type.saddleLayer, + donkeyRenderState -> donkeyRenderState.saddle, + new EquineSaddleModel(context.bakeLayer(type.saddleModel)), + new EquineSaddleModel(context.bakeLayer(type.babySaddleModel)) + ) + ); } public ResourceLocation getTextureLocation(DonkeyRenderState donkeyRenderState) { @@ -33,4 +44,47 @@ public class DonkeyRenderer extends AbstractHors super.extractRenderState(abstractChestedHorse, donkeyRenderState, f); donkeyRenderState.hasChest = abstractChestedHorse.hasChest(); } + + @Environment(EnvType.CLIENT) + public static enum Type { + DONKEY( + ResourceLocation.withDefaultNamespace("textures/entity/horse/donkey.png"), + ModelLayers.DONKEY, + ModelLayers.DONKEY_BABY, + EquipmentClientInfo.LayerType.DONKEY_SADDLE, + ModelLayers.DONKEY_SADDLE, + ModelLayers.DONKEY_BABY_SADDLE + ), + MULE( + ResourceLocation.withDefaultNamespace("textures/entity/horse/mule.png"), + ModelLayers.MULE, + ModelLayers.MULE_BABY, + EquipmentClientInfo.LayerType.MULE_SADDLE, + ModelLayers.MULE_SADDLE, + ModelLayers.MULE_BABY_SADDLE + ); + + final ResourceLocation texture; + final ModelLayerLocation model; + final ModelLayerLocation babyModel; + final EquipmentClientInfo.LayerType saddleLayer; + final ModelLayerLocation saddleModel; + final ModelLayerLocation babySaddleModel; + + private Type( + final ResourceLocation texture, + final ModelLayerLocation model, + final ModelLayerLocation babyModel, + final EquipmentClientInfo.LayerType saddleLayer, + final ModelLayerLocation saddleModel, + final ModelLayerLocation babySaddleModel + ) { + this.texture = texture; + this.model = model; + this.babyModel = babyModel; + this.saddleLayer = saddleLayer; + this.saddleModel = saddleModel; + this.babySaddleModel = babySaddleModel; + } + } } diff --git a/net/minecraft/client/renderer/entity/DragonFireballRenderer.java b/net/minecraft/client/renderer/entity/DragonFireballRenderer.java index a4dae302..bdfa8466 100644 --- a/net/minecraft/client/renderer/entity/DragonFireballRenderer.java +++ b/net/minecraft/client/renderer/entity/DragonFireballRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EntityRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.BlockPos; @@ -17,7 +18,7 @@ public class DragonFireballRenderer extends EntityRenderer { private static final ResourceLocation DROWNED_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/zombie/drowned.png"); - public DrownedRenderer(EntityRendererProvider.Context context) { + public DrownedRenderer(Context context) { super( context, new DrownedModel(context.bakeLayer(ModelLayers.DROWNED)), @@ -47,4 +52,9 @@ public class DrownedRenderer extends AbstractZombieRenderer builder, float f) { + super.extractAdditionalHitboxes(enderDragon, builder, f); + double d = -Mth.lerp((double)f, enderDragon.xOld, enderDragon.getX()); + double e = -Mth.lerp((double)f, enderDragon.yOld, enderDragon.getY()); + double g = -Mth.lerp((double)f, enderDragon.zOld, enderDragon.getZ()); + + for (EnderDragonPart enderDragonPart : enderDragon.getSubEntities()) { + AABB aABB = enderDragonPart.getBoundingBox(); + HitboxRenderState hitboxRenderState = new HitboxRenderState( + aABB.minX - enderDragonPart.getX(), + aABB.minY - enderDragonPart.getY(), + aABB.minZ - enderDragonPart.getZ(), + aABB.maxX - enderDragonPart.getX(), + aABB.maxY - enderDragonPart.getY(), + aABB.maxZ - enderDragonPart.getZ(), + (float)(d + Mth.lerp((double)f, enderDragonPart.xOld, enderDragonPart.getX())), + (float)(e + Mth.lerp((double)f, enderDragonPart.yOld, enderDragonPart.getY())), + (float)(g + Mth.lerp((double)f, enderDragonPart.zOld, enderDragonPart.getZ())), + 0.25F, + 1.0F, + 0.0F + ); + builder.add(hitboxRenderState); + } + } + protected boolean affectedByCulling(EnderDragon enderDragon) { return false; } diff --git a/net/minecraft/client/renderer/entity/EndermanRenderer.java b/net/minecraft/client/renderer/entity/EndermanRenderer.java index b59a8dfd..aaab5c20 100644 --- a/net/minecraft/client/renderer/entity/EndermanRenderer.java +++ b/net/minecraft/client/renderer/entity/EndermanRenderer.java @@ -43,7 +43,7 @@ public class EndermanRenderer extends MobRenderer entityModels; + private final EquipmentAssetManager equipmentAssets; private boolean shouldRenderShadow = true; private boolean renderHitBoxes; @@ -91,23 +93,24 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { public EntityRenderDispatcher( Minecraft minecraft, TextureManager textureManager, + ItemModelResolver itemModelResolver, ItemRenderer itemRenderer, MapRenderer mapRenderer, BlockRenderDispatcher blockRenderDispatcher, Font font, Options options, - EntityModelSet entityModelSet, - EquipmentModelSet equipmentModelSet + Supplier entityModels, + EquipmentAssetManager equipmentModels ) { this.textureManager = textureManager; - this.itemRenderer = itemRenderer; + this.itemModelResolver = itemModelResolver; this.mapRenderer = mapRenderer; - this.itemInHandRenderer = new ItemInHandRenderer(minecraft, this, itemRenderer); + this.itemInHandRenderer = new ItemInHandRenderer(minecraft, this, itemRenderer, itemModelResolver); this.blockRenderDispatcher = blockRenderDispatcher; this.font = font; this.options = options; - this.entityModels = entityModelSet; - this.equipmentModels = equipmentModelSet; + this.entityModels = entityModels; + this.equipmentAssets = equipmentModels; } public EntityRenderer getRenderer(T entity) { @@ -120,6 +123,16 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { } } + public EntityRenderer getRenderer(S renderState) { + if (renderState instanceof PlayerRenderState playerRenderState) { + Model model = playerRenderState.skin.model(); + EntityRenderer entityRenderer = (EntityRenderer)this.playerRenderers.get(model); + return (EntityRenderer)(entityRenderer != null ? entityRenderer : (EntityRenderer)this.playerRenderers.get(Model.WIDE)); + } else { + return (EntityRenderer)this.renderers.get(renderState.entityType); + } + } + public void prepare(Level level, Camera activeRenderInfo, Entity entity) { this.level = level; this.camera = activeRenderInfo; @@ -148,149 +161,173 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { return entityRenderer.shouldRender(entity, frustum, camX, camY, camZ); } - public void render(E entity, double d, double e, double f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + public void render( + E entity, double xOffset, double yOffset, double zOffset, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight + ) { EntityRenderer entityRenderer = this.getRenderer(entity); - this.render(entity, d, e, f, g, poseStack, multiBufferSource, i, entityRenderer); + this.render(entity, xOffset, yOffset, zOffset, partialTick, poseStack, bufferSource, packedLight, entityRenderer); } private void render( - E entity, double d, double e, double f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, EntityRenderer entityRenderer + E entity, + double xOffset, + double yOffset, + double zOffset, + float partialTick, + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + EntityRenderer renderer ) { + S entityRenderState; try { - S entityRenderState = entityRenderer.createRenderState(entity, g); - Vec3 vec3 = entityRenderer.getRenderOffset(entityRenderState); - double h = d + vec3.x(); - double j = e + vec3.y(); - double k = f + vec3.z(); - poseStack.pushPose(); - poseStack.translate(h, j, k); - entityRenderer.render(entityRenderState, poseStack, multiBufferSource, i); - if (entityRenderState.displayFireAnimation) { - this.renderFlame(poseStack, multiBufferSource, entityRenderState, Mth.rotationAroundAxis(Mth.Y_AXIS, this.cameraOrientation, new Quaternionf())); - } + entityRenderState = renderer.createRenderState(entity, partialTick); + } catch (Throwable var19) { + CrashReport crashReport = CrashReport.forThrowable(var19, "Extracting render state for an entity in world"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being extracted"); + entity.fillCrashReportCategory(crashReportCategory); + CrashReportCategory crashReportCategory2 = this.fillRendererDetails(xOffset, yOffset, zOffset, renderer, crashReport); + crashReportCategory2.setDetail("Delta", partialTick); + throw new ReportedException(crashReport); + } - if (entity instanceof Player) { - poseStack.translate(-vec3.x(), -vec3.y(), -vec3.z()); - } - - if (this.options.entityShadows().get() && this.shouldRenderShadow && !entityRenderState.isInvisible) { - float l = entityRenderer.getShadowRadius(entityRenderState); - if (l > 0.0F) { - double m = entityRenderState.distanceToCameraSq; - float n = (float)((1.0 - m / 256.0) * entityRenderer.shadowStrength); - if (n > 0.0F) { - renderShadow(poseStack, multiBufferSource, entityRenderState, n, g, this.level, Math.min(l, 32.0F)); - } - } - } - - if (!(entity instanceof Player)) { - poseStack.translate(-vec3.x(), -vec3.y(), -vec3.z()); - } - - if (this.renderHitBoxes && !entityRenderState.isInvisible && !Minecraft.getInstance().showOnlyReducedInfo()) { - renderHitbox(poseStack, multiBufferSource.getBuffer(RenderType.lines()), entity, g, 1.0F, 1.0F, 1.0F); - } - - poseStack.popPose(); - } catch (Throwable var25) { - CrashReport crashReport = CrashReport.forThrowable(var25, "Rendering entity in world"); + try { + this.render(entityRenderState, xOffset, yOffset, zOffset, poseStack, bufferSource, packedLight, renderer); + } catch (Throwable var18) { + CrashReport crashReport = CrashReport.forThrowable(var18, "Rendering entity in world"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being rendered"); entity.fillCrashReportCategory(crashReportCategory); - CrashReportCategory crashReportCategory2 = crashReport.addCategory("Renderer details"); - crashReportCategory2.setDetail("Assigned renderer", entityRenderer); - crashReportCategory2.setDetail("Location", CrashReportCategory.formatLocation(this.level, d, e, f)); - crashReportCategory2.setDetail("Delta", g); throw new ReportedException(crashReport); } } - private static void renderServerSideHitbox(PoseStack poseStack, Entity entity, MultiBufferSource bufferSource) { - Entity entity2 = getServerSideEntity(entity); - if (entity2 == null) { - DebugRenderer.renderFloatingText(poseStack, bufferSource, "Missing", entity.getX(), entity.getBoundingBox().maxY + 1.5, entity.getZ(), -65536); - } else { + public void render( + S renderState, double xOffset, double yOffset, double zOffset, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight + ) { + EntityRenderer entityRenderer = this.getRenderer(renderState); + this.render(renderState, xOffset, yOffset, zOffset, poseStack, bufferSource, packedLight, entityRenderer); + } + + private void render( + S renderState, + double xOffset, + double yOffset, + double zOffset, + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + EntityRenderer renderer + ) { + try { + Vec3 vec3 = renderer.getRenderOffset(renderState); + double d = xOffset + vec3.x(); + double e = yOffset + vec3.y(); + double f = zOffset + vec3.z(); poseStack.pushPose(); - poseStack.translate(entity2.getX() - entity.getX(), entity2.getY() - entity.getY(), entity2.getZ() - entity.getZ()); - renderHitbox(poseStack, bufferSource.getBuffer(RenderType.lines()), entity2, 1.0F, 0.0F, 1.0F, 0.0F); - ShapeRenderer.renderVector(poseStack, bufferSource.getBuffer(RenderType.lines()), new Vector3f(), entity2.getDeltaMovement(), -256); - poseStack.popPose(); - } - } - - @Nullable - private static Entity getServerSideEntity(Entity entity) { - IntegratedServer integratedServer = Minecraft.getInstance().getSingleplayerServer(); - if (integratedServer != null) { - ServerLevel serverLevel = integratedServer.getLevel(entity.level().dimension()); - if (serverLevel != null) { - return serverLevel.getEntity(entity.getId()); + poseStack.translate(d, e, f); + renderer.render(renderState, poseStack, bufferSource, packedLight); + if (renderState.displayFireAnimation) { + this.renderFlame(poseStack, bufferSource, renderState, Mth.rotationAroundAxis(Mth.Y_AXIS, this.cameraOrientation, new Quaternionf())); } - } - return null; + if (renderState instanceof PlayerRenderState) { + poseStack.translate(-vec3.x(), -vec3.y(), -vec3.z()); + } + + if (this.options.entityShadows().get() && this.shouldRenderShadow && !renderState.isInvisible) { + float g = renderer.getShadowRadius(renderState); + if (g > 0.0F) { + double h = renderState.distanceToCameraSq; + float i = (float)((1.0 - h / 256.0) * renderer.getShadowStrength(renderState)); + if (i > 0.0F) { + renderShadow(poseStack, bufferSource, renderState, i, this.level, Math.min(g, 32.0F)); + } + } + } + + if (!(renderState instanceof PlayerRenderState)) { + poseStack.translate(-vec3.x(), -vec3.y(), -vec3.z()); + } + + if (renderState.hitboxesRenderState != null) { + this.renderHitboxes(poseStack, renderState, renderState.hitboxesRenderState, bufferSource); + } + + poseStack.popPose(); + } catch (Throwable var23) { + CrashReport crashReport = CrashReport.forThrowable(var23, "Rendering entity in world"); + CrashReportCategory crashReportCategory = crashReport.addCategory("EntityRenderState being rendered"); + renderState.fillCrashReportCategory(crashReportCategory); + this.fillRendererDetails(xOffset, yOffset, zOffset, renderer, crashReport); + throw new ReportedException(crashReport); + } } - private static void renderHitbox(PoseStack poseStack, VertexConsumer buffer, Entity entity, float red, float green, float blue, float alpha) { - AABB aABB = entity.getBoundingBox().move(-entity.getX(), -entity.getY(), -entity.getZ()); - ShapeRenderer.renderLineBox(poseStack, buffer, aABB, green, blue, alpha, 1.0F); - if (entity instanceof EnderDragon) { - double d = -Mth.lerp((double)red, entity.xOld, entity.getX()); - double e = -Mth.lerp((double)red, entity.yOld, entity.getY()); - double f = -Mth.lerp((double)red, entity.zOld, entity.getZ()); + private CrashReportCategory fillRendererDetails( + double xOffset, double yOffset, double zOffset, EntityRenderer renderer, CrashReport crashReport + ) { + CrashReportCategory crashReportCategory = crashReport.addCategory("Renderer details"); + crashReportCategory.setDetail("Assigned renderer", renderer); + crashReportCategory.setDetail("Location", CrashReportCategory.formatLocation(this.level, xOffset, yOffset, zOffset)); + return crashReportCategory; + } - for (EnderDragonPart enderDragonPart : ((EnderDragon)entity).getSubEntities()) { + private void renderHitboxes(PoseStack poseStack, EntityRenderState renderState, HitboxesRenderState hitboxesRenderState, MultiBufferSource bufferSource) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); + renderHitboxesAndViewVector(poseStack, hitboxesRenderState, vertexConsumer, renderState.eyeHeight); + ServerHitboxesRenderState serverHitboxesRenderState = renderState.serverHitboxesRenderState; + if (serverHitboxesRenderState != null) { + if (serverHitboxesRenderState.missing()) { + HitboxRenderState hitboxRenderState = (HitboxRenderState)hitboxesRenderState.hitboxes().getFirst(); + DebugRenderer.renderFloatingText(poseStack, bufferSource, "Missing", renderState.x, hitboxRenderState.y1() + 1.5, renderState.z, -65536); + } else if (serverHitboxesRenderState.hitboxes() != null) { poseStack.pushPose(); - double g = d + Mth.lerp((double)red, enderDragonPart.xOld, enderDragonPart.getX()); - double h = e + Mth.lerp((double)red, enderDragonPart.yOld, enderDragonPart.getY()); - double i = f + Mth.lerp((double)red, enderDragonPart.zOld, enderDragonPart.getZ()); - poseStack.translate(g, h, i); - ShapeRenderer.renderLineBox( - poseStack, - buffer, - enderDragonPart.getBoundingBox().move(-enderDragonPart.getX(), -enderDragonPart.getY(), -enderDragonPart.getZ()), - 0.25F, - 1.0F, - 0.0F, - 1.0F + poseStack.translate( + serverHitboxesRenderState.serverEntityX() - renderState.x, + serverHitboxesRenderState.serverEntityY() - renderState.y, + serverHitboxesRenderState.serverEntityZ() - renderState.z ); + renderHitboxesAndViewVector(poseStack, serverHitboxesRenderState.hitboxes(), vertexConsumer, serverHitboxesRenderState.eyeHeight()); + Vec3 vec3 = new Vec3(serverHitboxesRenderState.deltaMovementX(), serverHitboxesRenderState.deltaMovementY(), serverHitboxesRenderState.deltaMovementZ()); + ShapeRenderer.renderVector(poseStack, vertexConsumer, new Vector3f(), vec3, -256); poseStack.popPose(); } } - - if (entity instanceof LivingEntity) { - float j = 0.01F; - ShapeRenderer.renderLineBox( - poseStack, buffer, aABB.minX, entity.getEyeHeight() - 0.01F, aABB.minZ, aABB.maxX, entity.getEyeHeight() + 0.01F, aABB.maxZ, 1.0F, 0.0F, 0.0F, 1.0F - ); - } - - Entity entity2 = entity.getVehicle(); - if (entity2 != null) { - float k = Math.min(entity2.getBbWidth(), entity.getBbWidth()) / 2.0F; - float l = 0.0625F; - Vec3 vec3 = entity2.getPassengerRidingPosition(entity).subtract(entity.position()); - ShapeRenderer.renderLineBox(poseStack, buffer, vec3.x - k, vec3.y, vec3.z - k, vec3.x + k, vec3.y + 0.0625, vec3.z + k, 1.0F, 1.0F, 0.0F, 1.0F); - } - - ShapeRenderer.renderVector(poseStack, buffer, new Vector3f(0.0F, entity.getEyeHeight(), 0.0F), entity.getViewVector(red).scale(2.0), -16776961); } - private void renderFlame(PoseStack poseStack, MultiBufferSource multiBufferSource, EntityRenderState entityRenderState, Quaternionf quaternionf) { + private static void renderHitboxesAndViewVector(PoseStack poseStack, HitboxesRenderState hitboxesRenderState, VertexConsumer consumer, float eyeHeight) { + for (HitboxRenderState hitboxRenderState : hitboxesRenderState.hitboxes()) { + renderHitbox(poseStack, consumer, hitboxRenderState); + } + + Vec3 vec3 = new Vec3(hitboxesRenderState.viewX(), hitboxesRenderState.viewY(), hitboxesRenderState.viewZ()); + ShapeRenderer.renderVector(poseStack, consumer, new Vector3f(0.0F, eyeHeight, 0.0F), vec3.scale(2.0), -16776961); + } + + private static void renderHitbox(PoseStack posStack, VertexConsumer consumer, HitboxRenderState hitbox) { + posStack.pushPose(); + posStack.translate(hitbox.offsetX(), hitbox.offsetY(), hitbox.offsetZ()); + ShapeRenderer.renderLineBox( + posStack, consumer, hitbox.x0(), hitbox.y0(), hitbox.z0(), hitbox.x1(), hitbox.y1(), hitbox.z1(), hitbox.red(), hitbox.green(), hitbox.blue(), 1.0F + ); + posStack.popPose(); + } + + private void renderFlame(PoseStack poseStack, MultiBufferSource bufferSource, EntityRenderState renderState, Quaternionf quaternion) { TextureAtlasSprite textureAtlasSprite = ModelBakery.FIRE_0.sprite(); TextureAtlasSprite textureAtlasSprite2 = ModelBakery.FIRE_1.sprite(); poseStack.pushPose(); - float f = entityRenderState.boundingBoxWidth * 1.4F; + float f = renderState.boundingBoxWidth * 1.4F; poseStack.scale(f, f, f); float g = 0.5F; float h = 0.0F; - float i = entityRenderState.boundingBoxHeight / f; + float i = renderState.boundingBoxHeight / f; float j = 0.0F; - poseStack.mulPose(quaternionf); + poseStack.mulPose(quaternion); poseStack.translate(0.0F, 0.0F, 0.3F - (int)i * 0.02F); float k = 0.0F; int l = 0; - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(Sheets.cutoutBlockSheet()); + VertexConsumer vertexConsumer = bufferSource.getBuffer(Sheets.cutoutBlockSheet()); for (PoseStack.Pose pose = poseStack.last(); i > 0.0F; l++) { TextureAtlasSprite textureAtlasSprite3 = l % 2 == 0 ? textureAtlasSprite : textureAtlasSprite2; @@ -322,44 +359,35 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { } private static void renderShadow( - PoseStack poseStack, MultiBufferSource multiBufferSource, EntityRenderState entityRenderState, float f, float g, LevelReader levelReader, float h + PoseStack poseStack, MultiBufferSource bufferSource, EntityRenderState renderState, float strength, LevelReader level, float size ) { - float i = Math.min(f / 0.5F, h); - int j = Mth.floor(entityRenderState.x - h); - int k = Mth.floor(entityRenderState.x + h); - int l = Mth.floor(entityRenderState.y - i); - int m = Mth.floor(entityRenderState.y); - int n = Mth.floor(entityRenderState.z - h); - int o = Mth.floor(entityRenderState.z + h); + float f = Math.min(strength / 0.5F, size); + int i = Mth.floor(renderState.x - size); + int j = Mth.floor(renderState.x + size); + int k = Mth.floor(renderState.y - f); + int l = Mth.floor(renderState.y); + int m = Mth.floor(renderState.z - size); + int n = Mth.floor(renderState.z + size); PoseStack.Pose pose = poseStack.last(); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(SHADOW_RENDER_TYPE); + VertexConsumer vertexConsumer = bufferSource.getBuffer(SHADOW_RENDER_TYPE); BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); - for (int p = n; p <= o; p++) { - for (int q = j; q <= k; q++) { - mutableBlockPos.set(q, 0, p); - ChunkAccess chunkAccess = levelReader.getChunk(mutableBlockPos); + for (int o = m; o <= n; o++) { + for (int p = i; p <= j; p++) { + mutableBlockPos.set(p, 0, o); + ChunkAccess chunkAccess = level.getChunk(mutableBlockPos); - for (int r = l; r <= m; r++) { - mutableBlockPos.setY(r); - float s = f - (float)(entityRenderState.y - mutableBlockPos.getY()) * 0.5F; - renderBlockShadow(pose, vertexConsumer, chunkAccess, levelReader, mutableBlockPos, entityRenderState.x, entityRenderState.y, entityRenderState.z, h, s); + for (int q = k; q <= l; q++) { + mutableBlockPos.setY(q); + float g = strength - (float)(renderState.y - mutableBlockPos.getY()) * 0.5F; + renderBlockShadow(pose, vertexConsumer, chunkAccess, level, mutableBlockPos, renderState.x, renderState.y, renderState.z, size, g); } } } } private static void renderBlockShadow( - PoseStack.Pose pose, - VertexConsumer vertexConsumer, - ChunkAccess chunk, - LevelReader level, - BlockPos pos, - double x, - double y, - double z, - float size, - float weight + PoseStack.Pose pose, VertexConsumer consumer, ChunkAccess chunk, LevelReader level, BlockPos pos, double x, double y, double z, float size, float weight ) { BlockPos blockPos = pos.below(); BlockState blockState = chunk.getBlockState(blockPos); @@ -390,10 +418,10 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { float r = -m / 2.0F / size + 0.5F; float s = -o / 2.0F / size + 0.5F; float t = -p / 2.0F / size + 0.5F; - shadowVertex(pose, vertexConsumer, i, l, n, o, q, s); - shadowVertex(pose, vertexConsumer, i, l, n, p, q, t); - shadowVertex(pose, vertexConsumer, i, m, n, p, r, t); - shadowVertex(pose, vertexConsumer, i, m, n, o, r, s); + shadowVertex(pose, consumer, i, l, n, o, q, s); + shadowVertex(pose, consumer, i, l, n, p, q, t); + shadowVertex(pose, consumer, i, m, n, p, r, t); + shadowVertex(pose, consumer, i, m, n, o, r, s); } } } @@ -433,8 +461,15 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { @Override public void onResourceManagerReload(ResourceManager resourceManager) { - EntityRendererProvider.Context context = new EntityRendererProvider.Context( - this, this.itemRenderer, this.mapRenderer, this.blockRenderDispatcher, resourceManager, this.entityModels, this.equipmentModels, this.font + Context context = new Context( + this, + this.itemModelResolver, + this.mapRenderer, + this.blockRenderDispatcher, + resourceManager, + (EntityModelSet)this.entityModels.get(), + this.equipmentAssets, + this.font ); this.renderers = EntityRenderers.createEntityRenderers(context); this.playerRenderers = EntityRenderers.createPlayerRenderers(context); diff --git a/net/minecraft/client/renderer/entity/EntityRenderer.java b/net/minecraft/client/renderer/entity/EntityRenderer.java index ad5fd913..b41b242a 100644 --- a/net/minecraft/client/renderer/entity/EntityRenderer.java +++ b/net/minecraft/client/renderer/entity/EntityRenderer.java @@ -1,18 +1,25 @@ package net.minecraft.client.renderer.entity; +import com.google.common.collect.ImmutableList.Builder; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.Font.DisplayMode; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.culling.Frustum; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EntityRenderState; +import net.minecraft.client.renderer.entity.state.HitboxRenderState; +import net.minecraft.client.renderer.entity.state.HitboxesRenderState; +import net.minecraft.client.server.IntegratedServer; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityAttachment; @@ -35,7 +42,7 @@ public abstract class EntityRenderer builder = new Builder<>(); + AABB aABB = entity.getBoundingBox(); + HitboxRenderState hitboxRenderState; + if (green) { + hitboxRenderState = new HitboxRenderState( + aABB.minX - entity.getX(), + aABB.minY - entity.getY(), + aABB.minZ - entity.getZ(), + aABB.maxX - entity.getX(), + aABB.maxY - entity.getY(), + aABB.maxZ - entity.getZ(), + 0.0F, + 1.0F, + 0.0F + ); + } else { + hitboxRenderState = new HitboxRenderState( + aABB.minX - entity.getX(), + aABB.minY - entity.getY(), + aABB.minZ - entity.getZ(), + aABB.maxX - entity.getX(), + aABB.maxY - entity.getY(), + aABB.maxZ - entity.getZ(), + 1.0F, + 1.0F, + 1.0F + ); + } + + builder.add(hitboxRenderState); + Entity entity2 = entity.getVehicle(); + if (entity2 != null) { + float f = Math.min(entity2.getBbWidth(), entity.getBbWidth()) / 2.0F; + float g = 0.0625F; + Vec3 vec3 = entity2.getPassengerRidingPosition(entity).subtract(entity.position()); + HitboxRenderState hitboxRenderState2 = new HitboxRenderState(vec3.x - f, vec3.y, vec3.z - f, vec3.x + f, vec3.y + 0.0625, vec3.z + f, 1.0F, 1.0F, 0.0F); + builder.add(hitboxRenderState2); + } + + this.extractAdditionalHitboxes(entity, builder, partialTick); + Vec3 vec32 = entity.getViewVector(partialTick); + return new HitboxesRenderState(vec32.x, vec32.y, vec32.z, builder.build()); + } + + protected void extractAdditionalHitboxes(T entity, Builder hitboxes, float partialTick) { + } + + @Nullable + private static Entity getServerSideEntity(Entity entity) { + IntegratedServer integratedServer = Minecraft.getInstance().getSingleplayerServer(); + if (integratedServer != null) { + ServerLevel serverLevel = integratedServer.getLevel(entity.level().dimension()); + if (serverLevel != null) { + return serverLevel.getEntity(entity.getId()); + } + } + + return null; } } diff --git a/net/minecraft/client/renderer/entity/EntityRendererProvider.java b/net/minecraft/client/renderer/entity/EntityRendererProvider.java index 22c01ebc..4779be51 100644 --- a/net/minecraft/client/renderer/entity/EntityRendererProvider.java +++ b/net/minecraft/client/renderer/entity/EntityRendererProvider.java @@ -10,7 +10,8 @@ import net.minecraft.client.renderer.MapRenderer; import net.minecraft.client.renderer.Sheets; import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.entity.layers.EquipmentLayerRenderer; -import net.minecraft.client.resources.model.EquipmentModelSet; +import net.minecraft.client.renderer.item.ItemModelResolver; +import net.minecraft.client.resources.model.EquipmentAssetManager; import net.minecraft.client.resources.model.ModelManager; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.world.entity.Entity; @@ -23,42 +24,42 @@ public interface EntityRendererProvider { @Environment(EnvType.CLIENT) public static class Context { private final EntityRenderDispatcher entityRenderDispatcher; - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; private final MapRenderer mapRenderer; private final BlockRenderDispatcher blockRenderDispatcher; private final ResourceManager resourceManager; private final EntityModelSet modelSet; - private final EquipmentModelSet equipmentModels; + private final EquipmentAssetManager equipmentAssets; private final Font font; private final EquipmentLayerRenderer equipmentRenderer; public Context( EntityRenderDispatcher entityRenderDispatcher, - ItemRenderer itemRenderer, + ItemModelResolver itemModelResolver, MapRenderer mapRenderer, BlockRenderDispatcher blockRenderDispatcher, ResourceManager resourceManager, - EntityModelSet entityModelSet, - EquipmentModelSet equipmentModelSet, + EntityModelSet modelSet, + EquipmentAssetManager equipmentAssets, Font font ) { this.entityRenderDispatcher = entityRenderDispatcher; - this.itemRenderer = itemRenderer; + this.itemModelResolver = itemModelResolver; this.mapRenderer = mapRenderer; this.blockRenderDispatcher = blockRenderDispatcher; this.resourceManager = resourceManager; - this.modelSet = entityModelSet; - this.equipmentModels = equipmentModelSet; + this.modelSet = modelSet; + this.equipmentAssets = equipmentAssets; this.font = font; - this.equipmentRenderer = new EquipmentLayerRenderer(equipmentModelSet, this.getModelManager().getAtlas(Sheets.ARMOR_TRIMS_SHEET)); + this.equipmentRenderer = new EquipmentLayerRenderer(equipmentAssets, this.getModelManager().getAtlas(Sheets.ARMOR_TRIMS_SHEET)); } public EntityRenderDispatcher getEntityRenderDispatcher() { return this.entityRenderDispatcher; } - public ItemRenderer getItemRenderer() { - return this.itemRenderer; + public ItemModelResolver getItemModelResolver() { + return this.itemModelResolver; } public MapRenderer getMapRenderer() { @@ -77,8 +78,8 @@ public interface EntityRendererProvider { return this.modelSet; } - public EquipmentModelSet getEquipmentModels() { - return this.equipmentModels; + public EquipmentAssetManager getEquipmentAssets() { + return this.equipmentAssets; } public EquipmentLayerRenderer getEquipmentRenderer() { diff --git a/net/minecraft/client/renderer/entity/EntityRenderers.java b/net/minecraft/client/renderer/entity/EntityRenderers.java index cc87bd42..198b333e 100644 --- a/net/minecraft/client/renderer/entity/EntityRenderers.java +++ b/net/minecraft/client/renderer/entity/EntityRenderers.java @@ -10,6 +10,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.SquidModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.player.AbstractClientPlayer; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.player.PlayerRenderer; import net.minecraft.client.resources.PlayerSkin.Model; import net.minecraft.core.registries.BuiltInRegistries; @@ -33,7 +34,7 @@ public class EntityRenderers { PROVIDERS.put(entityType, provider); } - public static Map, EntityRenderer> createEntityRenderers(EntityRendererProvider.Context context) { + public static Map, EntityRenderer> createEntityRenderers(Context context) { Builder, EntityRenderer> builder = ImmutableMap.builder(); PROVIDERS.forEach((entityType, entityRendererProvider) -> { try { @@ -45,7 +46,7 @@ public class EntityRenderers { return builder.build(); } - public static Map> createPlayerRenderers(EntityRendererProvider.Context context) { + public static Map> createPlayerRenderers(Context context) { Builder> builder = ImmutableMap.builder(); PLAYER_PROVIDERS.forEach((model, entityRendererProvider) -> { try { @@ -71,52 +72,41 @@ public class EntityRenderers { } static { + register(EntityType.ACACIA_BOAT, context -> new BoatRenderer(context, ModelLayers.ACACIA_BOAT)); + register(EntityType.ACACIA_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.ACACIA_CHEST_BOAT)); register(EntityType.ALLAY, AllayRenderer::new); register(EntityType.AREA_EFFECT_CLOUD, NoopRenderer::new); register(EntityType.ARMADILLO, ArmadilloRenderer::new); register(EntityType.ARMOR_STAND, ArmorStandRenderer::new); register(EntityType.ARROW, TippableArrowRenderer::new); register(EntityType.AXOLOTL, AxolotlRenderer::new); + register(EntityType.BAMBOO_CHEST_RAFT, context -> new RaftRenderer(context, ModelLayers.BAMBOO_CHEST_RAFT)); + register(EntityType.BAMBOO_RAFT, context -> new RaftRenderer(context, ModelLayers.BAMBOO_RAFT)); register(EntityType.BAT, BatRenderer::new); register(EntityType.BEE, BeeRenderer::new); + register(EntityType.BIRCH_BOAT, context -> new BoatRenderer(context, ModelLayers.BIRCH_BOAT)); + register(EntityType.BIRCH_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.BIRCH_CHEST_BOAT)); register(EntityType.BLAZE, BlazeRenderer::new); register(EntityType.BLOCK_DISPLAY, DisplayRenderer.BlockDisplayRenderer::new); - register(EntityType.OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.OAK_BOAT)); - register(EntityType.SPRUCE_BOAT, context -> new BoatRenderer(context, ModelLayers.SPRUCE_BOAT)); - register(EntityType.BIRCH_BOAT, context -> new BoatRenderer(context, ModelLayers.BIRCH_BOAT)); - register(EntityType.JUNGLE_BOAT, context -> new BoatRenderer(context, ModelLayers.JUNGLE_BOAT)); - register(EntityType.ACACIA_BOAT, context -> new BoatRenderer(context, ModelLayers.ACACIA_BOAT)); - register(EntityType.CHERRY_BOAT, context -> new BoatRenderer(context, ModelLayers.CHERRY_BOAT)); - register(EntityType.DARK_OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.DARK_OAK_BOAT)); - register(EntityType.PALE_OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.PALE_OAK_BOAT)); - register(EntityType.MANGROVE_BOAT, context -> new BoatRenderer(context, ModelLayers.MANGROVE_BOAT)); - register(EntityType.BAMBOO_RAFT, context -> new RaftRenderer(context, ModelLayers.BAMBOO_RAFT)); register(EntityType.BOGGED, BoggedRenderer::new); register(EntityType.BREEZE, BreezeRenderer::new); register(EntityType.BREEZE_WIND_CHARGE, WindChargeRenderer::new); - register(EntityType.CAT, CatRenderer::new); register(EntityType.CAMEL, CamelRenderer::new); + register(EntityType.CAT, CatRenderer::new); register(EntityType.CAVE_SPIDER, CaveSpiderRenderer::new); - register(EntityType.OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.OAK_CHEST_BOAT)); - register(EntityType.SPRUCE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.SPRUCE_CHEST_BOAT)); - register(EntityType.BIRCH_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.BIRCH_CHEST_BOAT)); - register(EntityType.JUNGLE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.JUNGLE_CHEST_BOAT)); - register(EntityType.ACACIA_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.ACACIA_CHEST_BOAT)); + register(EntityType.CHERRY_BOAT, context -> new BoatRenderer(context, ModelLayers.CHERRY_BOAT)); register(EntityType.CHERRY_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.CHERRY_CHEST_BOAT)); - register(EntityType.DARK_OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.DARK_OAK_CHEST_BOAT)); - register(EntityType.PALE_OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.PALE_OAK_CHEST_BOAT)); - register(EntityType.MANGROVE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.MANGROVE_CHEST_BOAT)); - register(EntityType.BAMBOO_CHEST_RAFT, context -> new RaftRenderer(context, ModelLayers.BAMBOO_CHEST_RAFT)); register(EntityType.CHEST_MINECART, context -> new MinecartRenderer(context, ModelLayers.CHEST_MINECART)); register(EntityType.CHICKEN, ChickenRenderer::new); register(EntityType.COD, CodRenderer::new); register(EntityType.COMMAND_BLOCK_MINECART, context -> new MinecartRenderer(context, ModelLayers.COMMAND_BLOCK_MINECART)); register(EntityType.COW, CowRenderer::new); register(EntityType.CREAKING, CreakingRenderer::new); - register(EntityType.CREAKING_TRANSIENT, CreakingRenderer::new); register(EntityType.CREEPER, CreeperRenderer::new); + register(EntityType.DARK_OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.DARK_OAK_BOAT)); + register(EntityType.DARK_OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.DARK_OAK_CHEST_BOAT)); register(EntityType.DOLPHIN, DolphinRenderer::new); - register(EntityType.DONKEY, context -> new DonkeyRenderer<>(context, 0.87F, ModelLayers.DONKEY, ModelLayers.DONKEY_BABY, false)); + register(EntityType.DONKEY, context -> new DonkeyRenderer<>(context, DonkeyRenderer.Type.DONKEY)); register(EntityType.DRAGON_FIREBALL, DragonFireballRenderer::new); register(EntityType.DROWNED, DrownedRenderer::new); register(EntityType.EGG, ThrownItemRenderer::new); @@ -159,18 +149,27 @@ public class EntityRenderers { register(EntityType.ITEM, ItemEntityRenderer::new); register(EntityType.ITEM_DISPLAY, DisplayRenderer.ItemDisplayRenderer::new); register(EntityType.ITEM_FRAME, ItemFrameRenderer::new); - register(EntityType.OMINOUS_ITEM_SPAWNER, OminousItemSpawnerRenderer::new); + register(EntityType.JUNGLE_BOAT, context -> new BoatRenderer(context, ModelLayers.JUNGLE_BOAT)); + register(EntityType.JUNGLE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.JUNGLE_CHEST_BOAT)); register(EntityType.LEASH_KNOT, LeashKnotRenderer::new); register(EntityType.LIGHTNING_BOLT, LightningBoltRenderer::new); + register(EntityType.LINGERING_POTION, ThrownItemRenderer::new); register(EntityType.LLAMA, context -> new LlamaRenderer(context, ModelLayers.LLAMA, ModelLayers.LLAMA_BABY)); register(EntityType.LLAMA_SPIT, LlamaSpitRenderer::new); register(EntityType.MAGMA_CUBE, MagmaCubeRenderer::new); + register(EntityType.MANGROVE_BOAT, context -> new BoatRenderer(context, ModelLayers.MANGROVE_BOAT)); + register(EntityType.MANGROVE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.MANGROVE_CHEST_BOAT)); register(EntityType.MARKER, NoopRenderer::new); register(EntityType.MINECART, context -> new MinecartRenderer(context, ModelLayers.MINECART)); register(EntityType.MOOSHROOM, MushroomCowRenderer::new); - register(EntityType.MULE, context -> new DonkeyRenderer<>(context, 0.92F, ModelLayers.MULE, ModelLayers.MULE_BABY, true)); + register(EntityType.MULE, context -> new DonkeyRenderer<>(context, DonkeyRenderer.Type.MULE)); + register(EntityType.OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.OAK_BOAT)); + register(EntityType.OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.OAK_CHEST_BOAT)); register(EntityType.OCELOT, OcelotRenderer::new); + register(EntityType.OMINOUS_ITEM_SPAWNER, OminousItemSpawnerRenderer::new); register(EntityType.PAINTING, PaintingRenderer::new); + register(EntityType.PALE_OAK_BOAT, context -> new BoatRenderer(context, ModelLayers.PALE_OAK_BOAT)); + register(EntityType.PALE_OAK_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.PALE_OAK_CHEST_BOAT)); register(EntityType.PANDA, PandaRenderer::new); register(EntityType.PARROT, ParrotRenderer::new); register(EntityType.PHANTOM, PhantomRenderer::new); @@ -201,7 +200,6 @@ public class EntityRenderers { ); register(EntityType.PILLAGER, PillagerRenderer::new); register(EntityType.POLAR_BEAR, PolarBearRenderer::new); - register(EntityType.POTION, ThrownItemRenderer::new); register(EntityType.PUFFERFISH, PufferfishRenderer::new); register(EntityType.RABBIT, RabbitRenderer::new); register(EntityType.RAVAGER, RavagerRenderer::new); @@ -211,7 +209,7 @@ public class EntityRenderers { register(EntityType.SHULKER_BULLET, ShulkerBulletRenderer::new); register(EntityType.SILVERFISH, SilverfishRenderer::new); register(EntityType.SKELETON, SkeletonRenderer::new); - register(EntityType.SKELETON_HORSE, context -> new UndeadHorseRenderer(context, ModelLayers.SKELETON_HORSE, ModelLayers.SKELETON_HORSE_BABY, true)); + register(EntityType.SKELETON_HORSE, context -> new UndeadHorseRenderer(context, UndeadHorseRenderer.Type.SKELETON)); register(EntityType.SLIME, SlimeRenderer::new); register(EntityType.SMALL_FIREBALL, context -> new ThrownItemRenderer<>(context, 0.75F, true)); register(EntityType.SNIFFER, SnifferRenderer::new); @@ -220,6 +218,9 @@ public class EntityRenderers { register(EntityType.SPAWNER_MINECART, context -> new MinecartRenderer(context, ModelLayers.SPAWNER_MINECART)); register(EntityType.SPECTRAL_ARROW, SpectralArrowRenderer::new); register(EntityType.SPIDER, SpiderRenderer::new); + register(EntityType.SPLASH_POTION, ThrownItemRenderer::new); + register(EntityType.SPRUCE_BOAT, context -> new BoatRenderer(context, ModelLayers.SPRUCE_BOAT)); + register(EntityType.SPRUCE_CHEST_BOAT, context -> new BoatRenderer(context, ModelLayers.SPRUCE_CHEST_BOAT)); register( EntityType.SQUID, context -> new SquidRenderer<>(context, new SquidModel(context.bakeLayer(ModelLayers.SQUID)), new SquidModel(context.bakeLayer(ModelLayers.SQUID_BABY))) @@ -237,8 +238,8 @@ public class EntityRenderers { register(EntityType.VEX, VexRenderer::new); register(EntityType.VILLAGER, VillagerRenderer::new); register(EntityType.VINDICATOR, VindicatorRenderer::new); - register(EntityType.WARDEN, WardenRenderer::new); register(EntityType.WANDERING_TRADER, WanderingTraderRenderer::new); + register(EntityType.WARDEN, WardenRenderer::new); register(EntityType.WIND_CHARGE, WindChargeRenderer::new); register(EntityType.WITCH, WitchRenderer::new); register(EntityType.WITHER, WitherBossRenderer::new); @@ -247,7 +248,7 @@ public class EntityRenderers { register(EntityType.WOLF, WolfRenderer::new); register(EntityType.ZOGLIN, ZoglinRenderer::new); register(EntityType.ZOMBIE, ZombieRenderer::new); - register(EntityType.ZOMBIE_HORSE, context -> new UndeadHorseRenderer(context, ModelLayers.ZOMBIE_HORSE, ModelLayers.ZOMBIE_HORSE_BABY, false)); + register(EntityType.ZOMBIE_HORSE, context -> new UndeadHorseRenderer(context, UndeadHorseRenderer.Type.ZOMBIE)); register(EntityType.ZOMBIE_VILLAGER, ZombieVillagerRenderer::new); register( EntityType.ZOMBIFIED_PIGLIN, diff --git a/net/minecraft/client/renderer/entity/EvokerFangsRenderer.java b/net/minecraft/client/renderer/entity/EvokerFangsRenderer.java index 334b68a9..60042219 100644 --- a/net/minecraft/client/renderer/entity/EvokerFangsRenderer.java +++ b/net/minecraft/client/renderer/entity/EvokerFangsRenderer.java @@ -8,6 +8,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.EvokerFangsModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EvokerFangsRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -18,7 +19,7 @@ public class EvokerFangsRenderer extends EntityRenderer extends IllagerRenderer { private static final ResourceLocation EVOKER_ILLAGER = ResourceLocation.withDefaultNamespace("textures/entity/illager/evoker.png"); - public EvokerRenderer(EntityRendererProvider.Context context) { + public EvokerRenderer(Context context) { super(context, new IllagerModel<>(context.bakeLayer(ModelLayers.EVOKER)), 0.5F); - this.addLayer(new ItemInHandLayer>(this, context.getItemRenderer()) { + this.addLayer(new ItemInHandLayer>(this) { public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, EvokerRenderState evokerRenderState, float f, float g) { if (evokerRenderState.isCastingSpell) { super.render(poseStack, multiBufferSource, i, evokerRenderState, f, g); diff --git a/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java b/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java index 888d0086..21b2f879 100644 --- a/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java +++ b/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ExperienceOrbRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.BlockPos; @@ -18,7 +19,7 @@ public class ExperienceOrbRenderer extends EntityRenderer { private final BlockRenderDispatcher dispatcher; - public FallingBlockRenderer(EntityRendererProvider.Context context) { + public FallingBlockRenderer(Context context) { super(context); this.shadowRadius = 0.5F; this.dispatcher = context.getBlockRenderDispatcher(); @@ -36,18 +39,19 @@ public class FallingBlockRenderer extends EntityRenderer list = this.dispatcher + .getBlockModel(blockState) + .collectParts(RandomSource.create(blockState.getSeed(fallingBlockRenderState.startBlockPos))); this.dispatcher .getModelRenderer() .tesselateBlock( fallingBlockRenderState, - this.dispatcher.getBlockModel(blockState), + list, blockState, fallingBlockRenderState.blockPos, poseStack, multiBufferSource.getBuffer(ItemBlockRenderTypes.getMovingBlockRenderType(blockState)), false, - RandomSource.create(), - blockState.getSeed(fallingBlockRenderState.startBlockPos), OverlayTexture.NO_OVERLAY ); poseStack.popPose(); diff --git a/net/minecraft/client/renderer/entity/FireworkEntityRenderer.java b/net/minecraft/client/renderer/entity/FireworkEntityRenderer.java index 724a5015..38dd8b6e 100644 --- a/net/minecraft/client/renderer/entity/FireworkEntityRenderer.java +++ b/net/minecraft/client/renderer/entity/FireworkEntityRenderer.java @@ -5,19 +5,20 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.FireworkRocketRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class FireworkEntityRenderer extends EntityRenderer { - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; - public FireworkEntityRenderer(EntityRendererProvider.Context context) { + public FireworkEntityRenderer(Context context) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); } public void render(FireworkRocketRenderState fireworkRocketRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { @@ -29,17 +30,7 @@ public class FireworkEntityRenderer extends EntityRenderer { - public FrogRenderer(EntityRendererProvider.Context context) { + public FrogRenderer(Context context) { super(context, new FrogModel(context.bakeLayer(ModelLayers.FROG)), 0.3F); } @@ -24,11 +25,11 @@ public class FrogRenderer extends MobRenderer public void extractRenderState(Frog frog, FrogRenderState frogRenderState, float f) { super.extractRenderState(frog, frogRenderState, f); - frogRenderState.isSwimming = frog.isInWaterOrBubble(); + frogRenderState.isSwimming = frog.isInWater(); frogRenderState.jumpAnimationState.copyFrom(frog.jumpAnimationState); frogRenderState.croakAnimationState.copyFrom(frog.croakAnimationState); frogRenderState.tongueAnimationState.copyFrom(frog.tongueAnimationState); frogRenderState.swimIdleAnimationState.copyFrom(frog.swimIdleAnimationState); - frogRenderState.texture = frog.getVariant().value().texture(); + frogRenderState.texture = frog.getVariant().value().assetInfo().texturePath(); } } diff --git a/net/minecraft/client/renderer/entity/GiantMobRenderer.java b/net/minecraft/client/renderer/entity/GiantMobRenderer.java index e80e9cc6..193b6321 100644 --- a/net/minecraft/client/renderer/entity/GiantMobRenderer.java +++ b/net/minecraft/client/renderer/entity/GiantMobRenderer.java @@ -17,7 +17,7 @@ public class GiantMobRenderer extends MobRenderer(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); this.addLayer( new HumanoidArmorLayer<>( this, @@ -38,6 +38,6 @@ public class GiantMobRenderer extends MobRenderer { private static final ResourceLocation GLOW_SQUID_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/squid/glow_squid.png"); - public GlowSquidRenderer(EntityRendererProvider.Context context, SquidModel squidModel, SquidModel squidModel2) { + public GlowSquidRenderer(Context context, SquidModel squidModel, SquidModel squidModel2) { super(context, squidModel, squidModel2); } diff --git a/net/minecraft/client/renderer/entity/GuardianRenderer.java b/net/minecraft/client/renderer/entity/GuardianRenderer.java index 5a138cf1..2a3c67ed 100644 --- a/net/minecraft/client/renderer/entity/GuardianRenderer.java +++ b/net/minecraft/client/renderer/entity/GuardianRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.culling.Frustum; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.GuardianRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -29,11 +30,11 @@ public class GuardianRenderer extends MobRenderer { - private static final Map LOCATION_BY_VARIANT = Util.make(Maps.newEnumMap(Variant.class), enumMap -> { - enumMap.put(Variant.WHITE, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_white.png")); - enumMap.put(Variant.CREAMY, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_creamy.png")); - enumMap.put(Variant.CHESTNUT, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_chestnut.png")); - enumMap.put(Variant.BROWN, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_brown.png")); - enumMap.put(Variant.BLACK, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_black.png")); - enumMap.put(Variant.GRAY, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_gray.png")); - enumMap.put(Variant.DARK_BROWN, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_darkbrown.png")); - }); + private static final Map LOCATION_BY_VARIANT = Maps.newEnumMap( + Map.of( + Variant.WHITE, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_white.png"), + Variant.CREAMY, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_creamy.png"), + Variant.CHESTNUT, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_chestnut.png"), + Variant.BROWN, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_brown.png"), + Variant.BLACK, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_black.png"), + Variant.GRAY, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_gray.png"), + Variant.DARK_BROWN, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_darkbrown.png") + ) + ); - public HorseRenderer(EntityRendererProvider.Context context) { - super(context, new HorseModel(context.bakeLayer(ModelLayers.HORSE)), new HorseModel(context.bakeLayer(ModelLayers.HORSE_BABY)), 1.1F); + public HorseRenderer(Context context) { + super(context, new HorseModel(context.bakeLayer(ModelLayers.HORSE)), new HorseModel(context.bakeLayer(ModelLayers.HORSE_BABY))); this.addLayer(new HorseMarkingLayer(this)); - this.addLayer(new HorseArmorLayer(this, context.getModelSet(), context.getEquipmentRenderer())); + this.addLayer( + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + EquipmentClientInfo.LayerType.HORSE_BODY, + horseRenderState -> horseRenderState.bodyArmorItem, + new HorseModel(context.bakeLayer(ModelLayers.HORSE_ARMOR)), + new HorseModel(context.bakeLayer(ModelLayers.HORSE_BABY_ARMOR)) + ) + ); + this.addLayer( + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + EquipmentClientInfo.LayerType.HORSE_SADDLE, + horseRenderState -> horseRenderState.saddle, + new EquineSaddleModel(context.bakeLayer(ModelLayers.HORSE_SADDLE)), + new EquineSaddleModel(context.bakeLayer(ModelLayers.HORSE_BABY_SADDLE)) + ) + ); } public ResourceLocation getTextureLocation(HorseRenderState horseRenderState) { diff --git a/net/minecraft/client/renderer/entity/HumanoidMobRenderer.java b/net/minecraft/client/renderer/entity/HumanoidMobRenderer.java index 3e9b049f..42bd4baa 100644 --- a/net/minecraft/client/renderer/entity/HumanoidMobRenderer.java +++ b/net/minecraft/client/renderer/entity/HumanoidMobRenderer.java @@ -4,15 +4,19 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.renderer.entity.layers.CustomHeadLayer; +import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.client.renderer.entity.layers.ItemInHandLayer; import net.minecraft.client.renderer.entity.layers.WingsLayer; +import net.minecraft.client.renderer.entity.state.ArmedEntityRenderState; import net.minecraft.client.renderer.entity.state.HumanoidRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Mob; import net.minecraft.world.item.CrossbowItem; +import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public abstract class HumanoidMobRenderer> extends AgeableMobRenderer { @@ -20,55 +24,68 @@ public abstract class HumanoidMobRenderer(this, context.getModelSet(), transforms, context.getItemRenderer())); + public HumanoidMobRenderer(EntityRendererProvider.Context context, M adultModel, M babyModel, float shadowRadius, CustomHeadLayer.Transforms transforms) { + super(context, adultModel, babyModel, shadowRadius); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), transforms)); this.addLayer(new WingsLayer<>(this, context.getModelSet(), context.getEquipmentRenderer())); - this.addLayer(new ItemInHandLayer<>(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); + } + + protected HumanoidModel.ArmPose getArmPose(T mob, HumanoidArm arm) { + return HumanoidModel.ArmPose.EMPTY; } public void extractRenderState(T mob, S humanoidRenderState, float f) { super.extractRenderState(mob, humanoidRenderState, f); - extractHumanoidRenderState(mob, humanoidRenderState, f); + extractHumanoidRenderState(mob, humanoidRenderState, f, this.itemModelResolver); + humanoidRenderState.leftArmPose = this.getArmPose(mob, HumanoidArm.LEFT); + humanoidRenderState.rightArmPose = this.getArmPose(mob, HumanoidArm.RIGHT); } - public static void extractHumanoidRenderState(LivingEntity livingEntity, HumanoidRenderState humanoidRenderState, float f) { - humanoidRenderState.isCrouching = livingEntity.isCrouching(); - humanoidRenderState.isFallFlying = livingEntity.isFallFlying(); - humanoidRenderState.isVisuallySwimming = livingEntity.isVisuallySwimming(); - humanoidRenderState.isPassenger = livingEntity.isPassenger(); - humanoidRenderState.speedValue = 1.0F; - if (humanoidRenderState.isFallFlying) { - humanoidRenderState.speedValue = (float)livingEntity.getDeltaMovement().lengthSqr(); - humanoidRenderState.speedValue /= 0.2F; - humanoidRenderState.speedValue = humanoidRenderState.speedValue * (humanoidRenderState.speedValue * humanoidRenderState.speedValue); + public static void extractHumanoidRenderState(LivingEntity entity, HumanoidRenderState reusedState, float partialTick, ItemModelResolver itemModelResolver) { + ArmedEntityRenderState.extractArmedEntityRenderState(entity, reusedState, itemModelResolver); + reusedState.isCrouching = entity.isCrouching(); + reusedState.isFallFlying = entity.isFallFlying(); + reusedState.isVisuallySwimming = entity.isVisuallySwimming(); + reusedState.isPassenger = entity.isPassenger(); + reusedState.speedValue = 1.0F; + if (reusedState.isFallFlying) { + reusedState.speedValue = (float)entity.getDeltaMovement().lengthSqr(); + reusedState.speedValue /= 0.2F; + reusedState.speedValue = reusedState.speedValue * (reusedState.speedValue * reusedState.speedValue); } - if (humanoidRenderState.speedValue < 1.0F) { - humanoidRenderState.speedValue = 1.0F; + if (reusedState.speedValue < 1.0F) { + reusedState.speedValue = 1.0F; } - humanoidRenderState.attackTime = livingEntity.getAttackAnim(f); - humanoidRenderState.swimAmount = livingEntity.getSwimAmount(f); - humanoidRenderState.attackArm = getAttackArm(livingEntity); - humanoidRenderState.useItemHand = livingEntity.getUsedItemHand(); - humanoidRenderState.maxCrossbowChargeDuration = CrossbowItem.getChargeDuration(livingEntity.getUseItem(), livingEntity); - humanoidRenderState.ticksUsingItem = livingEntity.getTicksUsingItem(); - humanoidRenderState.isUsingItem = livingEntity.isUsingItem(); - humanoidRenderState.elytraRotX = livingEntity.elytraAnimationState.getRotX(f); - humanoidRenderState.elytraRotY = livingEntity.elytraAnimationState.getRotY(f); - humanoidRenderState.elytraRotZ = livingEntity.elytraAnimationState.getRotZ(f); - humanoidRenderState.chestItem = livingEntity.getItemBySlot(EquipmentSlot.CHEST).copy(); - humanoidRenderState.legsItem = livingEntity.getItemBySlot(EquipmentSlot.LEGS).copy(); - humanoidRenderState.feetItem = livingEntity.getItemBySlot(EquipmentSlot.FEET).copy(); + reusedState.attackTime = entity.getAttackAnim(partialTick); + reusedState.swimAmount = entity.getSwimAmount(partialTick); + reusedState.attackArm = getAttackArm(entity); + reusedState.useItemHand = entity.getUsedItemHand(); + reusedState.maxCrossbowChargeDuration = CrossbowItem.getChargeDuration(entity.getUseItem(), entity); + reusedState.ticksUsingItem = entity.getTicksUsingItem(); + reusedState.isUsingItem = entity.isUsingItem(); + reusedState.elytraRotX = entity.elytraAnimationState.getRotX(partialTick); + reusedState.elytraRotY = entity.elytraAnimationState.getRotY(partialTick); + reusedState.elytraRotZ = entity.elytraAnimationState.getRotZ(partialTick); + reusedState.headEquipment = getEquipmentIfRenderable(entity, EquipmentSlot.HEAD); + reusedState.chestEquipment = getEquipmentIfRenderable(entity, EquipmentSlot.CHEST); + reusedState.legsEquipment = getEquipmentIfRenderable(entity, EquipmentSlot.LEGS); + reusedState.feetEquipment = getEquipmentIfRenderable(entity, EquipmentSlot.FEET); } - private static HumanoidArm getAttackArm(LivingEntity livingEntity) { - HumanoidArm humanoidArm = livingEntity.getMainArm(); - return livingEntity.swingingArm == InteractionHand.MAIN_HAND ? humanoidArm : humanoidArm.getOpposite(); + private static ItemStack getEquipmentIfRenderable(LivingEntity entity, EquipmentSlot slot) { + ItemStack itemStack = entity.getItemBySlot(slot); + return HumanoidArmorLayer.shouldRender(itemStack, slot) ? itemStack.copy() : ItemStack.EMPTY; + } + + private static HumanoidArm getAttackArm(LivingEntity entity) { + HumanoidArm humanoidArm = entity.getMainArm(); + return entity.swingingArm == InteractionHand.MAIN_HAND ? humanoidArm : humanoidArm.getOpposite(); } } diff --git a/net/minecraft/client/renderer/entity/IllagerRenderer.java b/net/minecraft/client/renderer/entity/IllagerRenderer.java index f1e156c4..d8a69988 100644 --- a/net/minecraft/client/renderer/entity/IllagerRenderer.java +++ b/net/minecraft/client/renderer/entity/IllagerRenderer.java @@ -4,6 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.IllagerModel; import net.minecraft.client.renderer.entity.layers.CustomHeadLayer; +import net.minecraft.client.renderer.entity.state.ArmedEntityRenderState; import net.minecraft.client.renderer.entity.state.IllagerRenderState; import net.minecraft.world.entity.monster.AbstractIllager; import net.minecraft.world.item.CrossbowItem; @@ -12,11 +13,12 @@ import net.minecraft.world.item.CrossbowItem; public abstract class IllagerRenderer extends MobRenderer> { protected IllagerRenderer(EntityRendererProvider.Context context, IllagerModel model, float shadowRadius) { super(context, model, shadowRadius); - this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), context.getItemRenderer())); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet())); } public void extractRenderState(T abstractIllager, S illagerRenderState, float f) { super.extractRenderState(abstractIllager, illagerRenderState, f); + ArmedEntityRenderState.extractArmedEntityRenderState(abstractIllager, illagerRenderState, this.itemModelResolver); illagerRenderState.isRiding = abstractIllager.isPassenger(); illagerRenderState.mainArm = abstractIllager.getMainArm(); illagerRenderState.armPose = abstractIllager.getArmPose(); diff --git a/net/minecraft/client/renderer/entity/IllusionerRenderer.java b/net/minecraft/client/renderer/entity/IllusionerRenderer.java index 7010c73a..0ac92206 100644 --- a/net/minecraft/client/renderer/entity/IllusionerRenderer.java +++ b/net/minecraft/client/renderer/entity/IllusionerRenderer.java @@ -7,6 +7,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.IllagerModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.ItemInHandLayer; import net.minecraft.client.renderer.entity.state.IllusionerRenderState; import net.minecraft.resources.ResourceLocation; @@ -19,9 +20,9 @@ import net.minecraft.world.phys.Vec3; public class IllusionerRenderer extends IllagerRenderer { private static final ResourceLocation ILLUSIONER = ResourceLocation.withDefaultNamespace("textures/entity/illager/illusioner.png"); - public IllusionerRenderer(EntityRendererProvider.Context context) { + public IllusionerRenderer(Context context) { super(context, new IllagerModel<>(context.bakeLayer(ModelLayers.ILLUSIONER)), 0.5F); - this.addLayer(new ItemInHandLayer>(this, context.getItemRenderer()) { + this.addLayer(new ItemInHandLayer>(this) { public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, IllusionerRenderState illusionerRenderState, float f, float g) { if (illusionerRenderState.isCastingSpell || illusionerRenderState.isAggressive) { super.render(poseStack, multiBufferSource, i, illusionerRenderState, f, g); diff --git a/net/minecraft/client/renderer/entity/IronGolemRenderer.java b/net/minecraft/client/renderer/entity/IronGolemRenderer.java index e2fc381c..d195e453 100644 --- a/net/minecraft/client/renderer/entity/IronGolemRenderer.java +++ b/net/minecraft/client/renderer/entity/IronGolemRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.IronGolemModel; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.IronGolemCrackinessLayer; import net.minecraft.client.renderer.entity.layers.IronGolemFlowerLayer; import net.minecraft.client.renderer.entity.state.IronGolemRenderState; @@ -16,7 +17,7 @@ import net.minecraft.world.entity.animal.IronGolem; public class IronGolemRenderer extends MobRenderer { private static final ResourceLocation GOLEM_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/iron_golem/iron_golem.png"); - public IronGolemRenderer(EntityRendererProvider.Context context) { + public IronGolemRenderer(Context context) { super(context, new IronGolemModel(context.bakeLayer(ModelLayers.IRON_GOLEM)), 0.7F); this.addLayer(new IronGolemCrackinessLayer(this)); this.addLayer(new IronGolemFlowerLayer(this, context.getBlockRenderDispatcher())); diff --git a/net/minecraft/client/renderer/entity/ItemEntityRenderer.java b/net/minecraft/client/renderer/entity/ItemEntityRenderer.java index 516efbe2..7e625bc2 100644 --- a/net/minecraft/client/renderer/entity/ItemEntityRenderer.java +++ b/net/minecraft/client/renderer/entity/ItemEntityRenderer.java @@ -1,34 +1,32 @@ package net.minecraft.client.renderer.entity; -import com.google.common.annotations.VisibleForTesting; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.state.ItemClusterRenderState; import net.minecraft.client.renderer.entity.state.ItemEntityRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.item.ItemEntity; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; +import net.minecraft.world.phys.AABB; @Environment(EnvType.CLIENT) public class ItemEntityRenderer extends EntityRenderer { + private static final float ITEM_MIN_HOVER_HEIGHT = 0.0625F; private static final float ITEM_BUNDLE_OFFSET_SCALE = 0.15F; - private static final float FLAT_ITEM_BUNDLE_OFFSET_X = 0.0F; - private static final float FLAT_ITEM_BUNDLE_OFFSET_Y = 0.0F; - private static final float FLAT_ITEM_BUNDLE_OFFSET_Z = 0.09375F; - private final ItemRenderer itemRenderer; + private static final float FLAT_ITEM_DEPTH_THRESHOLD = 0.0625F; + private final ItemModelResolver itemModelResolver; private final RandomSource random = RandomSource.create(); - public ItemEntityRenderer(EntityRendererProvider.Context context) { + public ItemEntityRenderer(Context context) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); this.shadowRadius = 0.15F; this.shadowStrength = 0.75F; } @@ -41,94 +39,71 @@ public class ItemEntityRenderer extends EntityRenderer 0.0625F) { + itemStackRenderState.render(poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); - public static void renderMultipleFromCount( - ItemRenderer itemRenderer, - PoseStack poseStack, - MultiBufferSource buffer, - int packedLight, - ItemStack item, - BakedModel model, - boolean isGui3d, - RandomSource random - ) { - int i = getRenderedAmount(item.getCount()); - float f = model.getTransforms().ground.scale.x(); - float g = model.getTransforms().ground.scale.y(); - float h = model.getTransforms().ground.scale.z(); - if (!isGui3d) { - float j = -0.0F * (i - 1) * 0.5F * f; - float k = -0.0F * (i - 1) * 0.5F * g; - float l = -0.09375F * (i - 1) * 0.5F * h; - poseStack.translate(j, k, l); - } - - for (int m = 0; m < i; m++) { - poseStack.pushPose(); - if (m > 0) { - if (isGui3d) { + for (int j = 1; j < i; j++) { + poseStack.pushPose(); + float g = (random.nextFloat() * 2.0F - 1.0F) * 0.15F; + float h = (random.nextFloat() * 2.0F - 1.0F) * 0.15F; float k = (random.nextFloat() * 2.0F - 1.0F) * 0.15F; - float l = (random.nextFloat() * 2.0F - 1.0F) * 0.15F; - float n = (random.nextFloat() * 2.0F - 1.0F) * 0.15F; - poseStack.translate(k, l, n); - } else { - float k = (random.nextFloat() * 2.0F - 1.0F) * 0.15F * 0.5F; - float l = (random.nextFloat() * 2.0F - 1.0F) * 0.15F * 0.5F; - poseStack.translate(k, l, 0.0F); + poseStack.translate(g, h, k); + itemStackRenderState.render(poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); + poseStack.popPose(); } - } + } else { + float l = f * 1.5F; + poseStack.translate(0.0F, 0.0F, -(l * (i - 1) / 2.0F)); + itemStackRenderState.render(poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); + poseStack.translate(0.0F, 0.0F, l); - itemRenderer.render(item, ItemDisplayContext.GROUND, false, poseStack, buffer, packedLight, OverlayTexture.NO_OVERLAY, model); - poseStack.popPose(); - if (!isGui3d) { - poseStack.translate(0.0F * f, 0.0F * g, 0.09375F * h); + for (int m = 1; m < i; m++) { + poseStack.pushPose(); + float h = (random.nextFloat() * 2.0F - 1.0F) * 0.15F * 0.5F; + float k = (random.nextFloat() * 2.0F - 1.0F) * 0.15F * 0.5F; + poseStack.translate(h, k, 0.0F); + itemStackRenderState.render(poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); + poseStack.popPose(); + poseStack.translate(0.0F, 0.0F, l); + } } } } diff --git a/net/minecraft/client/renderer/entity/ItemFrameRenderer.java b/net/minecraft/client/renderer/entity/ItemFrameRenderer.java index 903e193a..2a60e65d 100644 --- a/net/minecraft/client/renderer/entity/ItemFrameRenderer.java +++ b/net/minecraft/client/renderer/entity/ItemFrameRenderer.java @@ -9,20 +9,22 @@ import net.minecraft.client.renderer.MapRenderer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockRenderDispatcher; +import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ItemFrameRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.resources.model.BlockStateModelLoader; -import net.minecraft.client.resources.model.ModelManager; -import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.client.resources.model.BlockStateDefinitions; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.component.DataComponents; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.saveddata.maps.MapId; import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import net.minecraft.world.phys.Vec3; @@ -31,19 +33,21 @@ import net.minecraft.world.phys.Vec3; public class ItemFrameRenderer extends EntityRenderer { public static final int GLOW_FRAME_BRIGHTNESS = 5; public static final int BRIGHT_MAP_LIGHT_ADJUSTMENT = 30; - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; private final MapRenderer mapRenderer; private final BlockRenderDispatcher blockRenderer; - public ItemFrameRenderer(EntityRendererProvider.Context context) { + public ItemFrameRenderer(Context context) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); this.mapRenderer = context.getMapRenderer(); this.blockRenderer = context.getBlockRenderDispatcher(); } - protected int getBlockLightLevel(T entity, BlockPos pos) { - return entity.getType() == EntityType.GLOW_ITEM_FRAME ? Math.max(5, super.getBlockLightLevel(entity, pos)) : super.getBlockLightLevel(entity, pos); + protected int getBlockLightLevel(T itemFrame, BlockPos blockPos) { + return itemFrame.getType() == EntityType.GLOW_ITEM_FRAME + ? Math.max(5, super.getBlockLightLevel(itemFrame, blockPos)) + : super.getBlockLightLevel(itemFrame, blockPos); } public void render(ItemFrameRenderState itemFrameRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { @@ -66,67 +70,52 @@ public class ItemFrameRenderer extends EntityRenderer extends EntityRenderer extends EntityRenderer extends EntityRenderer quads, + RenderType renderType, + ItemStackRenderState.FoilType foilType ) { - if (!itemStack.isEmpty()) { - this.renderSimpleItemModel( - itemStack, displayContext, leftHand, poseStack, bufferSource, combinedLight, combinedOverlay, model, shouldRenderItemFlat(displayContext) - ); - } - } - - public void renderBundleItem( - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - boolean bl, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - BakedModel bakedModel, - @Nullable Level level, - @Nullable LivingEntity livingEntity, - int k - ) { - if (itemStack.getItem() instanceof BundleItem bundleItem) { - if (BundleItem.hasSelectedItem(itemStack)) { - boolean bl2 = shouldRenderItemFlat(itemDisplayContext); - BakedModel bakedModel2 = this.resolveModelOverride(this.itemModelShaper.getItemModel(bundleItem.openBackModel()), itemStack, level, livingEntity, k); - this.renderItemModelRaw(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, j, bakedModel2, bl2, -1.5F); - ItemStack itemStack2 = BundleItem.getSelectedItemStack(itemStack); - BakedModel bakedModel3 = this.getModel(itemStack2, level, livingEntity, k); - this.renderSimpleItemModel(itemStack2, itemDisplayContext, bl, poseStack, multiBufferSource, i, j, bakedModel3, bl2); - BakedModel bakedModel4 = this.resolveModelOverride(this.itemModelShaper.getItemModel(bundleItem.openFrontModel()), itemStack, level, livingEntity, k); - this.renderItemModelRaw(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, j, bakedModel4, bl2, 0.5F); - } else { - this.render(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, j, bakedModel); - } - } - } - - private void renderSimpleItemModel( - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - boolean bl, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - BakedModel bakedModel, - boolean bl2 - ) { - if (bl2) { - if (itemStack.is(Items.TRIDENT)) { - bakedModel = this.modelManager.getModel(TRIDENT_MODEL); - } else if (itemStack.is(Items.SPYGLASS)) { - bakedModel = this.modelManager.getModel(SPYGLASS_MODEL); - } - } - - this.renderItemModelRaw(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, j, bakedModel, bl2, -0.5F); - } - - private void renderItemModelRaw( - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - boolean bl, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - BakedModel bakedModel, - boolean bl2, - float f - ) { - poseStack.pushPose(); - bakedModel.getTransforms().getTransform(itemDisplayContext).apply(bl, poseStack); - poseStack.translate(-0.5F, -0.5F, f); - this.renderItem(itemStack, itemDisplayContext, poseStack, multiBufferSource, i, j, bakedModel, bl2); - poseStack.popPose(); - } - - private void renderItem( - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - BakedModel bakedModel, - boolean bl - ) { - if (!bakedModel.isCustomRenderer() && (!itemStack.is(Items.TRIDENT) || bl)) { - RenderType renderType = ItemBlockRenderTypes.getRenderType(itemStack); - VertexConsumer vertexConsumer; - if (hasAnimatedTexture(itemStack) && itemStack.hasFoil()) { - PoseStack.Pose pose = poseStack.last().copy(); - if (itemDisplayContext == ItemDisplayContext.GUI) { - MatrixUtil.mulComponentWise(pose.pose(), 0.5F); - } else if (itemDisplayContext.firstPerson()) { - MatrixUtil.mulComponentWise(pose.pose(), 0.75F); - } - - vertexConsumer = getCompassFoilBuffer(multiBufferSource, renderType, pose); - } else { - vertexConsumer = getFoilBuffer(multiBufferSource, renderType, true, itemStack.hasFoil()); + VertexConsumer vertexConsumer; + if (foilType == ItemStackRenderState.FoilType.SPECIAL) { + PoseStack.Pose pose = poseStack.last().copy(); + if (displayContext == ItemDisplayContext.GUI) { + MatrixUtil.mulComponentWise(pose.pose(), 0.5F); + } else if (displayContext.firstPerson()) { + MatrixUtil.mulComponentWise(pose.pose(), 0.75F); } - this.renderModelLists(bakedModel, itemStack, i, j, poseStack, vertexConsumer); + vertexConsumer = getCompassFoilBuffer(bufferSource, renderType, pose); } else { - this.blockEntityRenderer.renderByItem(itemStack, itemDisplayContext, poseStack, multiBufferSource, i, j); + vertexConsumer = getFoilBuffer(bufferSource, renderType, true, foilType != ItemStackRenderState.FoilType.NONE); } - } - private static boolean shouldRenderItemFlat(ItemDisplayContext itemDisplayContext) { - return itemDisplayContext == ItemDisplayContext.GUI || itemDisplayContext == ItemDisplayContext.GROUND || itemDisplayContext == ItemDisplayContext.FIXED; - } - - private static boolean hasAnimatedTexture(ItemStack stack) { - return stack.is(ItemTags.COMPASSES) || stack.is(Items.CLOCK); + renderQuadList(poseStack, vertexConsumer, quads, tintLayers, packedLight, packedOverlay); } public static VertexConsumer getArmorFoilBuffer(MultiBufferSource bufferSource, RenderType renderType, boolean hasFoil) { @@ -206,7 +75,7 @@ public class ItemRenderer implements ResourceManagerReloadListener { : bufferSource.getBuffer(renderType); } - public static VertexConsumer getCompassFoilBuffer(MultiBufferSource bufferSource, RenderType renderType, PoseStack.Pose pose) { + private static VertexConsumer getCompassFoilBuffer(MultiBufferSource bufferSource, RenderType renderType, PoseStack.Pose pose) { return VertexMultiConsumer.create( new SheetedDecalTextureGenerator(bufferSource.getBuffer(RenderType.glint()), pose, 0.0078125F), bufferSource.getBuffer(renderType) ); @@ -222,73 +91,60 @@ public class ItemRenderer implements ResourceManagerReloadListener { } } - private void renderQuadList(PoseStack poseStack, VertexConsumer buffer, List quads, ItemStack itemStack, int combinedLight, int combinedOverlay) { - boolean bl = !itemStack.isEmpty(); + private static int getLayerColorSafe(int[] tintLayers, int index) { + return index >= 0 && index < tintLayers.length ? tintLayers[index] : -1; + } + + private static void renderQuadList(PoseStack poseStack, VertexConsumer buffer, List quads, int[] tintLayers, int packedLight, int packedOverlay) { PoseStack.Pose pose = poseStack.last(); for (BakedQuad bakedQuad : quads) { - int i = -1; - if (bl && bakedQuad.isTinted()) { - i = this.itemColors.getColor(itemStack, bakedQuad.getTintIndex()); + float f; + float g; + float h; + float j; + if (bakedQuad.isTinted()) { + int i = getLayerColorSafe(tintLayers, bakedQuad.tintIndex()); + f = ARGB.alpha(i) / 255.0F; + g = ARGB.red(i) / 255.0F; + h = ARGB.green(i) / 255.0F; + j = ARGB.blue(i) / 255.0F; + } else { + f = 1.0F; + g = 1.0F; + h = 1.0F; + j = 1.0F; } - float f = ARGB.alpha(i) / 255.0F; - float g = ARGB.red(i) / 255.0F; - float h = ARGB.green(i) / 255.0F; - float j = ARGB.blue(i) / 255.0F; - buffer.putBulkData(pose, bakedQuad, g, h, j, f, combinedLight, combinedOverlay); + buffer.putBulkData(pose, bakedQuad, g, h, j, f, packedLight, packedOverlay); } } - public BakedModel getModel(ItemStack stack, @Nullable Level level, @Nullable LivingEntity entity, int seed) { - BakedModel bakedModel = this.itemModelShaper.getItemModel(stack); - return this.resolveModelOverride(bakedModel, stack, level, entity, seed); - } - public void renderStatic( ItemStack stack, ItemDisplayContext displayContext, - int combinedLight, - int combinedOverlay, + int packedLight, + int packedOverlay, PoseStack poseStack, MultiBufferSource bufferSource, @Nullable Level level, int seed ) { - this.renderStatic(null, stack, displayContext, false, poseStack, bufferSource, level, combinedLight, combinedOverlay, seed); + this.renderStatic(null, stack, displayContext, poseStack, bufferSource, level, packedLight, packedOverlay, seed); } public void renderStatic( @Nullable LivingEntity entity, - ItemStack itemStack, - ItemDisplayContext diplayContext, - boolean leftHand, + ItemStack stack, + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, @Nullable Level level, - int combinedLight, - int combinedOverlay, + int packedLight, + int packedOverlay, int seed ) { - if (!itemStack.isEmpty()) { - BakedModel bakedModel = this.getModel(itemStack, level, entity, seed); - this.render(itemStack, diplayContext, leftHand, poseStack, bufferSource, combinedLight, combinedOverlay, bakedModel); - } - } - - @Override - public void onResourceManagerReload(ResourceManager resourceManager) { - this.itemModelShaper.invalidateCache(); - } - - @Nullable - public BakedModel resolveItemModel(ItemStack itemStack, LivingEntity livingEntity, ItemDisplayContext itemDisplayContext) { - return itemStack.isEmpty() ? null : this.getModel(itemStack, livingEntity.level(), livingEntity, livingEntity.getId() + itemDisplayContext.ordinal()); - } - - private BakedModel resolveModelOverride(BakedModel bakedModel, ItemStack itemStack, @Nullable Level level, @Nullable LivingEntity livingEntity, int i) { - ClientLevel clientLevel = level instanceof ClientLevel ? (ClientLevel)level : null; - BakedModel bakedModel2 = bakedModel.overrides().findOverride(itemStack, clientLevel, livingEntity, i); - return bakedModel2 == null ? bakedModel : bakedModel2; + this.resolver.updateForTopItem(this.scratchItemStackRenderState, stack, displayContext, level, entity, seed); + this.scratchItemStackRenderState.render(poseStack, bufferSource, packedLight, packedOverlay); } } diff --git a/net/minecraft/client/renderer/entity/LeashKnotRenderer.java b/net/minecraft/client/renderer/entity/LeashKnotRenderer.java index 0649adb9..02bbc940 100644 --- a/net/minecraft/client/renderer/entity/LeashKnotRenderer.java +++ b/net/minecraft/client/renderer/entity/LeashKnotRenderer.java @@ -7,6 +7,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.LeashKnotModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EntityRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -17,20 +18,20 @@ public class LeashKnotRenderer extends EntityRenderer { - public LightningBoltRenderer(EntityRendererProvider.Context context) { + public LightningBoltRenderer(Context context) { super(context); } @@ -86,27 +87,51 @@ public class LightningBoltRenderer extends EntityRenderer { private static final float EYE_BED_OFFSET = 0.1F; protected M model; - protected final ItemRenderer itemRenderer; + protected final ItemModelResolver itemModelResolver; protected final List> layers = Lists.>newArrayList(); - public LivingEntityRenderer(EntityRendererProvider.Context context, M model, float shadowRadius) { + public LivingEntityRenderer(Context context, M model, float shadowRadius) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); this.model = model; this.shadowRadius = shadowRadius; } @@ -107,34 +113,34 @@ public abstract class LivingEntityRenderer 0.0F) { - float h = (livingEntityRenderState.deathTime - 1.0F) / 20.0F * 1.6F; - h = Mth.sqrt(h); - if (h > 1.0F) { - h = 1.0F; + if (renderState.deathTime > 0.0F) { + float f = (renderState.deathTime - 1.0F) / 20.0F * 1.6F; + f = Mth.sqrt(f); + if (f > 1.0F) { + f = 1.0F; } - poseStack.mulPose(Axis.ZP.rotationDegrees(h * this.getFlipDegrees())); - } else if (livingEntityRenderState.isAutoSpinAttack) { - poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F - livingEntityRenderState.xRot)); - poseStack.mulPose(Axis.YP.rotationDegrees(livingEntityRenderState.ageInTicks * -75.0F)); - } else if (livingEntityRenderState.hasPose(Pose.SLEEPING)) { - Direction direction = livingEntityRenderState.bedOrientation; - float i = direction != null ? sleepDirectionToRotation(direction) : f; - poseStack.mulPose(Axis.YP.rotationDegrees(i)); + poseStack.mulPose(Axis.ZP.rotationDegrees(f * this.getFlipDegrees())); + } else if (renderState.isAutoSpinAttack) { + poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F - renderState.xRot)); + poseStack.mulPose(Axis.YP.rotationDegrees(renderState.ageInTicks * -75.0F)); + } else if (renderState.hasPose(Pose.SLEEPING)) { + Direction direction = renderState.bedOrientation; + float g = direction != null ? sleepDirectionToRotation(direction) : bodyRot; + poseStack.mulPose(Axis.YP.rotationDegrees(g)); poseStack.mulPose(Axis.ZP.rotationDegrees(this.getFlipDegrees())); poseStack.mulPose(Axis.YP.rotationDegrees(270.0F)); - } else if (livingEntityRenderState.isUpsideDown) { - poseStack.translate(0.0F, (livingEntityRenderState.boundingBoxHeight + 0.1F) / g, 0.0F); + } else if (renderState.isUpsideDown) { + poseStack.translate(0.0F, (renderState.boundingBoxHeight + 0.1F) / scale, 0.0F); poseStack.mulPose(Axis.ZP.rotationDegrees(180.0F)); } } @@ -192,11 +198,11 @@ public abstract class LivingEntityRenderer 0 || livingEntity.deathTime > 0; ItemStack itemStack = livingEntity.getItemBySlot(EquipmentSlot.HEAD); - livingEntityRenderState.headItem = itemStack.copy(); - livingEntityRenderState.headItemModel = this.itemRenderer.resolveItemModel(itemStack, livingEntity, ItemDisplayContext.HEAD); - livingEntityRenderState.mainArm = livingEntity.getMainArm(); - ItemStack itemStack2 = livingEntity.getItemHeldByArm(HumanoidArm.RIGHT); - ItemStack itemStack3 = livingEntity.getItemHeldByArm(HumanoidArm.LEFT); - livingEntityRenderState.rightHandItem = itemStack2.copy(); - livingEntityRenderState.leftHandItem = itemStack3.copy(); - livingEntityRenderState.rightHandItemModel = this.itemRenderer.resolveItemModel(itemStack2, livingEntity, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND); - livingEntityRenderState.leftHandItemModel = this.itemRenderer.resolveItemModel(itemStack3, livingEntity, ItemDisplayContext.THIRD_PERSON_LEFT_HAND); + if (itemStack.getItem() instanceof BlockItem blockItem && blockItem.getBlock() instanceof AbstractSkullBlock abstractSkullBlock) { + livingEntityRenderState.wornHeadType = abstractSkullBlock.getType(); + livingEntityRenderState.wornHeadProfile = itemStack.get(DataComponents.PROFILE); + livingEntityRenderState.headItem.clear(); + } else { + livingEntityRenderState.wornHeadType = null; + livingEntityRenderState.wornHeadProfile = null; + if (!HumanoidArmorLayer.shouldRender(itemStack, EquipmentSlot.HEAD)) { + this.itemModelResolver.updateForLiving(livingEntityRenderState.headItem, itemStack, ItemDisplayContext.HEAD, livingEntity); + } else { + livingEntityRenderState.headItem.clear(); + } + } + livingEntityRenderState.deathTime = livingEntity.deathTime > 0 ? livingEntity.deathTime + f : 0.0F; Minecraft minecraft = Minecraft.getInstance(); livingEntityRenderState.isInvisibleToPlayer = livingEntityRenderState.isInvisible && livingEntity.isInvisibleTo(minecraft.player); livingEntityRenderState.appearsGlowing = minecraft.shouldEntityAppearGlowing(livingEntity); } - private static float solveBodyRot(LivingEntity livingEntity, float f, float g) { - if (livingEntity.getVehicle() instanceof LivingEntity livingEntity2) { - float h = Mth.rotLerp(g, livingEntity2.yBodyRotO, livingEntity2.yBodyRot); - float i = 85.0F; - float j = Mth.clamp(Mth.wrapDegrees(f - h), -85.0F, 85.0F); - h = f - j; - if (Math.abs(j) > 50.0F) { - h += j * 0.2F; + protected void extractAdditionalHitboxes(T livingEntity, Builder builder, float f) { + AABB aABB = livingEntity.getBoundingBox(); + float g = 0.01F; + HitboxRenderState hitboxRenderState = new HitboxRenderState( + aABB.minX - livingEntity.getX(), + livingEntity.getEyeHeight() - 0.01F, + aABB.minZ - livingEntity.getZ(), + aABB.maxX - livingEntity.getX(), + livingEntity.getEyeHeight() + 0.01F, + aABB.maxZ - livingEntity.getZ(), + 1.0F, + 0.0F, + 0.0F + ); + builder.add(hitboxRenderState); + } + + private static float solveBodyRot(LivingEntity entity, float yHeadRot, float partialTick) { + if (entity.getVehicle() instanceof LivingEntity livingEntity) { + float f = Mth.rotLerp(partialTick, livingEntity.yBodyRotO, livingEntity.yBodyRot); + float g = 85.0F; + float h = Mth.clamp(Mth.wrapDegrees(yHeadRot - f), -85.0F, 85.0F); + f = yHeadRot - h; + if (Math.abs(h) > 50.0F) { + f += h * 0.2F; } - return h; + return f; } else { - return Mth.rotLerp(g, livingEntity.yBodyRotO, livingEntity.yBodyRot); + return Mth.rotLerp(partialTick, entity.yBodyRotO, entity.yBodyRot); } } } diff --git a/net/minecraft/client/renderer/entity/LlamaRenderer.java b/net/minecraft/client/renderer/entity/LlamaRenderer.java index 362099fd..cab1031b 100644 --- a/net/minecraft/client/renderer/entity/LlamaRenderer.java +++ b/net/minecraft/client/renderer/entity/LlamaRenderer.java @@ -16,8 +16,8 @@ public class LlamaRenderer extends AgeableMobRenderer { - public MinecartRenderer(EntityRendererProvider.Context context, ModelLayerLocation layer) { + public MinecartRenderer(Context context, ModelLayerLocation layer) { super(context, layer); } diff --git a/net/minecraft/client/renderer/entity/MobRenderer.java b/net/minecraft/client/renderer/entity/MobRenderer.java index bd89ee9a..412d361c 100644 --- a/net/minecraft/client/renderer/entity/MobRenderer.java +++ b/net/minecraft/client/renderer/entity/MobRenderer.java @@ -3,13 +3,14 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.EntityModel; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; import net.minecraft.world.entity.Mob; @Environment(EnvType.CLIENT) public abstract class MobRenderer> extends LivingEntityRenderer { - public MobRenderer(EntityRendererProvider.Context context, M model, float shadowRadius) { - super(context, model, shadowRadius); + public MobRenderer(Context context, M entityModel, float f) { + super(context, entityModel, f); } protected boolean shouldShowName(T mob, double d) { diff --git a/net/minecraft/client/renderer/entity/NoopRenderer.java b/net/minecraft/client/renderer/entity/NoopRenderer.java index 17411f55..0a2dae46 100644 --- a/net/minecraft/client/renderer/entity/NoopRenderer.java +++ b/net/minecraft/client/renderer/entity/NoopRenderer.java @@ -2,12 +2,13 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EntityRenderState; import net.minecraft.world.entity.Entity; @Environment(EnvType.CLIENT) public class NoopRenderer extends EntityRenderer { - public NoopRenderer(EntityRendererProvider.Context context) { + public NoopRenderer(Context context) { super(context); } diff --git a/net/minecraft/client/renderer/entity/OminousItemSpawnerRenderer.java b/net/minecraft/client/renderer/entity/OminousItemSpawnerRenderer.java index 13828bb9..ba4e15f0 100644 --- a/net/minecraft/client/renderer/entity/OminousItemSpawnerRenderer.java +++ b/net/minecraft/client/renderer/entity/OminousItemSpawnerRenderer.java @@ -5,49 +5,47 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.state.OminousItemSpawnerRenderState; -import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.state.ItemClusterRenderState; +import net.minecraft.client.renderer.item.ItemModelResolver; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.OminousItemSpawner; import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) -public class OminousItemSpawnerRenderer extends EntityRenderer { +public class OminousItemSpawnerRenderer extends EntityRenderer { private static final float ROTATION_SPEED = 40.0F; private static final int TICKS_SCALING = 50; - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; + private final RandomSource random = RandomSource.create(); - protected OminousItemSpawnerRenderer(EntityRendererProvider.Context context) { + protected OminousItemSpawnerRenderer(Context context) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); } - public OminousItemSpawnerRenderState createRenderState() { - return new OminousItemSpawnerRenderState(); + public ItemClusterRenderState createRenderState() { + return new ItemClusterRenderState(); } - public void extractRenderState(OminousItemSpawner ominousItemSpawner, OminousItemSpawnerRenderState ominousItemSpawnerRenderState, float f) { - super.extractRenderState(ominousItemSpawner, ominousItemSpawnerRenderState, f); + public void extractRenderState(OminousItemSpawner ominousItemSpawner, ItemClusterRenderState itemClusterRenderState, float f) { + super.extractRenderState(ominousItemSpawner, itemClusterRenderState, f); ItemStack itemStack = ominousItemSpawner.getItem(); - ominousItemSpawnerRenderState.item = itemStack.copy(); - ominousItemSpawnerRenderState.itemModel = !itemStack.isEmpty() ? this.itemRenderer.getModel(itemStack, ominousItemSpawner.level(), null, 0) : null; + itemClusterRenderState.extractItemGroupRenderState(ominousItemSpawner, itemStack, this.itemModelResolver); } - public void render(OminousItemSpawnerRenderState ominousItemSpawnerRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { - BakedModel bakedModel = ominousItemSpawnerRenderState.itemModel; - if (bakedModel != null) { + public void render(ItemClusterRenderState itemClusterRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + if (!itemClusterRenderState.item.isEmpty()) { poseStack.pushPose(); - if (ominousItemSpawnerRenderState.ageInTicks <= 50.0F) { - float f = Math.min(ominousItemSpawnerRenderState.ageInTicks, 50.0F) / 50.0F; + if (itemClusterRenderState.ageInTicks <= 50.0F) { + float f = Math.min(itemClusterRenderState.ageInTicks, 50.0F) / 50.0F; poseStack.scale(f, f, f); } - float f = Mth.wrapDegrees(ominousItemSpawnerRenderState.ageInTicks * 40.0F); + float f = Mth.wrapDegrees(itemClusterRenderState.ageInTicks * 40.0F); poseStack.mulPose(Axis.YP.rotationDegrees(f)); - ItemEntityRenderer.renderMultipleFromCount( - this.itemRenderer, poseStack, multiBufferSource, 15728880, ominousItemSpawnerRenderState.item, bakedModel, bakedModel.isGui3d(), RandomSource.create() - ); + ItemEntityRenderer.renderMultipleFromCount(poseStack, multiBufferSource, 15728880, itemClusterRenderState, this.random); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/PaintingRenderer.java b/net/minecraft/client/renderer/entity/PaintingRenderer.java index 86c06491..82558564 100644 --- a/net/minecraft/client/renderer/entity/PaintingRenderer.java +++ b/net/minecraft/client/renderer/entity/PaintingRenderer.java @@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.PaintingRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -22,7 +23,7 @@ import net.minecraft.world.level.Level; @Environment(EnvType.CLIENT) public class PaintingRenderer extends EntityRenderer { - public PaintingRenderer(EntityRendererProvider.Context context) { + public PaintingRenderer(Context context) { super(context); } @@ -95,62 +96,62 @@ public class PaintingRenderer extends EntityRenderer { - private static final Map TEXTURES = Util.make(Maps.newEnumMap(Panda.Gene.class), enumMap -> { - enumMap.put(Panda.Gene.NORMAL, ResourceLocation.withDefaultNamespace("textures/entity/panda/panda.png")); - enumMap.put(Panda.Gene.LAZY, ResourceLocation.withDefaultNamespace("textures/entity/panda/lazy_panda.png")); - enumMap.put(Panda.Gene.WORRIED, ResourceLocation.withDefaultNamespace("textures/entity/panda/worried_panda.png")); - enumMap.put(Panda.Gene.PLAYFUL, ResourceLocation.withDefaultNamespace("textures/entity/panda/playful_panda.png")); - enumMap.put(Panda.Gene.BROWN, ResourceLocation.withDefaultNamespace("textures/entity/panda/brown_panda.png")); - enumMap.put(Panda.Gene.WEAK, ResourceLocation.withDefaultNamespace("textures/entity/panda/weak_panda.png")); - enumMap.put(Panda.Gene.AGGRESSIVE, ResourceLocation.withDefaultNamespace("textures/entity/panda/aggressive_panda.png")); - }); + private static final Map TEXTURES = Maps.newEnumMap( + Map.of( + Panda.Gene.NORMAL, + ResourceLocation.withDefaultNamespace("textures/entity/panda/panda.png"), + Panda.Gene.LAZY, + ResourceLocation.withDefaultNamespace("textures/entity/panda/lazy_panda.png"), + Panda.Gene.WORRIED, + ResourceLocation.withDefaultNamespace("textures/entity/panda/worried_panda.png"), + Panda.Gene.PLAYFUL, + ResourceLocation.withDefaultNamespace("textures/entity/panda/playful_panda.png"), + Panda.Gene.BROWN, + ResourceLocation.withDefaultNamespace("textures/entity/panda/brown_panda.png"), + Panda.Gene.WEAK, + ResourceLocation.withDefaultNamespace("textures/entity/panda/weak_panda.png"), + Panda.Gene.AGGRESSIVE, + ResourceLocation.withDefaultNamespace("textures/entity/panda/aggressive_panda.png") + ) + ); - public PandaRenderer(EntityRendererProvider.Context context) { + public PandaRenderer(Context context) { super(context, new PandaModel(context.bakeLayer(ModelLayers.PANDA)), new PandaModel(context.bakeLayer(ModelLayers.PANDA_BABY)), 0.9F); - this.addLayer(new PandaHoldsItemLayer(this, context.getItemRenderer())); + this.addLayer(new PandaHoldsItemLayer(this)); } public ResourceLocation getTextureLocation(PandaRenderState pandaRenderState) { @@ -42,6 +52,7 @@ public class PandaRenderer extends AgeableMobRenderer 0; pandaRenderState.isSneezing = panda.isSneezing(); diff --git a/net/minecraft/client/renderer/entity/PhantomRenderer.java b/net/minecraft/client/renderer/entity/PhantomRenderer.java index 5cd973ac..e16103ed 100644 --- a/net/minecraft/client/renderer/entity/PhantomRenderer.java +++ b/net/minecraft/client/renderer/entity/PhantomRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.PhantomModel; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.PhantomEyesLayer; import net.minecraft.client.renderer.entity.state.PhantomRenderState; import net.minecraft.resources.ResourceLocation; @@ -15,7 +16,7 @@ import net.minecraft.world.entity.monster.Phantom; public class PhantomRenderer extends MobRenderer { private static final ResourceLocation PHANTOM_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/phantom.png"); - public PhantomRenderer(EntityRendererProvider.Context context) { + public PhantomRenderer(Context context) { super(context, new PhantomModel(context.bakeLayer(ModelLayers.PHANTOM)), 0.75F); this.addLayer(new PhantomEyesLayer(this)); } diff --git a/net/minecraft/client/renderer/entity/PigRenderer.java b/net/minecraft/client/renderer/entity/PigRenderer.java index 3ece7af2..f6550b2a 100644 --- a/net/minecraft/client/renderer/entity/PigRenderer.java +++ b/net/minecraft/client/renderer/entity/PigRenderer.java @@ -1,32 +1,65 @@ package net.minecraft.client.renderer.entity; +import com.google.common.collect.Maps; +import com.mojang.blaze3d.vertex.PoseStack; +import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.AdultAndBabyModelPair; +import net.minecraft.client.model.ColdPigModel; +import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.PigModel; import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.entity.layers.SaddleLayer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.layers.SimpleEquipmentLayer; import net.minecraft.client.renderer.entity.state.PigRenderState; +import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.animal.Pig; +import net.minecraft.world.entity.animal.PigVariant; @Environment(EnvType.CLIENT) -public class PigRenderer extends AgeableMobRenderer { - private static final ResourceLocation PIG_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/pig/pig.png"); +public class PigRenderer extends MobRenderer { + private final Map> models; - public PigRenderer(EntityRendererProvider.Context context) { - super(context, new PigModel(context.bakeLayer(ModelLayers.PIG)), new PigModel(context.bakeLayer(ModelLayers.PIG_BABY)), 0.7F); + public PigRenderer(Context context) { + super(context, new PigModel(context.bakeLayer(ModelLayers.PIG)), 0.7F); + this.models = bakeModels(context); this.addLayer( - new SaddleLayer<>( + new SimpleEquipmentLayer<>( this, + context.getEquipmentRenderer(), + EquipmentClientInfo.LayerType.PIG_SADDLE, + pigRenderState -> pigRenderState.saddle, new PigModel(context.bakeLayer(ModelLayers.PIG_SADDLE)), - new PigModel(context.bakeLayer(ModelLayers.PIG_BABY_SADDLE)), - ResourceLocation.withDefaultNamespace("textures/entity/pig/pig_saddle.png") + new PigModel(context.bakeLayer(ModelLayers.PIG_BABY_SADDLE)) ) ); } + private static Map> bakeModels(Context context) { + return Maps.newEnumMap( + Map.of( + PigVariant.ModelType.NORMAL, + new AdultAndBabyModelPair<>(new PigModel(context.bakeLayer(ModelLayers.PIG)), new PigModel(context.bakeLayer(ModelLayers.PIG_BABY))), + PigVariant.ModelType.COLD, + new AdultAndBabyModelPair<>(new ColdPigModel(context.bakeLayer(ModelLayers.COLD_PIG)), new ColdPigModel(context.bakeLayer(ModelLayers.COLD_PIG_BABY))) + ) + ); + } + + public void render(PigRenderState pigRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + if (pigRenderState.variant != null) { + this.model = (EntityModel)((AdultAndBabyModelPair)this.models.get(pigRenderState.variant.modelAndTexture().model())).getModel(pigRenderState.isBaby); + super.render(pigRenderState, poseStack, multiBufferSource, i); + } + } + public ResourceLocation getTextureLocation(PigRenderState pigRenderState) { - return PIG_LOCATION; + return pigRenderState.variant == null ? MissingTextureAtlasSprite.getLocation() : pigRenderState.variant.modelAndTexture().asset().texturePath(); } public PigRenderState createRenderState() { @@ -35,6 +68,7 @@ public class PigRenderer extends AgeableMobRenderer( this, - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation3)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation4)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation6)), + new HumanoidArmorModel(context.bakeLayer(innerModel)), + new HumanoidArmorModel(context.bakeLayer(outerModel)), + new HumanoidArmorModel(context.bakeLayer(innerModelBaby)), + new HumanoidArmorModel(context.bakeLayer(outerModelBaby)), context.getEquipmentRenderer() ) ); diff --git a/net/minecraft/client/renderer/entity/PillagerRenderer.java b/net/minecraft/client/renderer/entity/PillagerRenderer.java index 74764edd..a22abdf5 100644 --- a/net/minecraft/client/renderer/entity/PillagerRenderer.java +++ b/net/minecraft/client/renderer/entity/PillagerRenderer.java @@ -15,7 +15,7 @@ public class PillagerRenderer extends IllagerRenderer(context.bakeLayer(ModelLayers.PILLAGER)), 0.5F); - this.addLayer(new ItemInHandLayer<>(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); } public ResourceLocation getTextureLocation(IllagerRenderState illagerRenderState) { diff --git a/net/minecraft/client/renderer/entity/PufferfishRenderer.java b/net/minecraft/client/renderer/entity/PufferfishRenderer.java index 4a8dc70e..0b9f056a 100644 --- a/net/minecraft/client/renderer/entity/PufferfishRenderer.java +++ b/net/minecraft/client/renderer/entity/PufferfishRenderer.java @@ -36,13 +36,16 @@ public class PufferfishRenderer extends MobRenderer this.small; case 1 -> this.mid; default -> this.big; }; - this.shadowRadius = 0.1F + 0.1F * pufferfishRenderState.puffState; super.render(pufferfishRenderState, poseStack, multiBufferSource, i); } diff --git a/net/minecraft/client/renderer/entity/RaftRenderer.java b/net/minecraft/client/renderer/entity/RaftRenderer.java index 512bba5b..282ca837 100644 --- a/net/minecraft/client/renderer/entity/RaftRenderer.java +++ b/net/minecraft/client/renderer/entity/RaftRenderer.java @@ -7,6 +7,7 @@ import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.RaftModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.BoatRenderState; import net.minecraft.resources.ResourceLocation; @@ -15,10 +16,10 @@ public class RaftRenderer extends AbstractBoatRenderer { private final EntityModel model; private final ResourceLocation texture; - public RaftRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation) { + public RaftRenderer(Context context, ModelLayerLocation modelLayer) { super(context); - this.texture = modelLayerLocation.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); - this.model = new RaftModel(context.bakeLayer(modelLayerLocation)); + this.texture = modelLayer.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); + this.model = new RaftModel(context.bakeLayer(modelLayer)); } @Override diff --git a/net/minecraft/client/renderer/entity/SalmonRenderer.java b/net/minecraft/client/renderer/entity/SalmonRenderer.java index c3be7d29..9095e344 100644 --- a/net/minecraft/client/renderer/entity/SalmonRenderer.java +++ b/net/minecraft/client/renderer/entity/SalmonRenderer.java @@ -7,6 +7,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.SalmonModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.SalmonRenderState; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; @@ -19,7 +20,7 @@ public class SalmonRenderer extends MobRenderer { private static final ResourceLocation SHEEP_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/sheep/sheep.png"); - public SheepRenderer(EntityRendererProvider.Context context) { + public SheepRenderer(Context context) { super(context, new SheepModel(context.bakeLayer(ModelLayers.SHEEP)), new SheepModel(context.bakeLayer(ModelLayers.SHEEP_BABY)), 0.7F); + this.addLayer(new SheepWoolUndercoatLayer(this, context.getModelSet())); this.addLayer(new SheepWoolLayer(this, context.getModelSet())); } diff --git a/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java b/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java index 5a3ca11d..305a0e19 100644 --- a/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java +++ b/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java @@ -9,6 +9,7 @@ import net.minecraft.client.model.ShulkerBulletModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ShulkerBulletRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.BlockPos; @@ -22,7 +23,7 @@ public class ShulkerBulletRenderer extends EntityRenderer material.texture().withPath((UnaryOperator)(string -> "textures/" + string + ".png"))) .toArray(ResourceLocation[]::new); - public ShulkerRenderer(EntityRendererProvider.Context context) { + public ShulkerRenderer(Context context) { super(context, new ShulkerModel(context.bakeLayer(ModelLayers.SHULKER)), 0.0F); } diff --git a/net/minecraft/client/renderer/entity/SilverfishRenderer.java b/net/minecraft/client/renderer/entity/SilverfishRenderer.java index e3363a74..5c565a45 100644 --- a/net/minecraft/client/renderer/entity/SilverfishRenderer.java +++ b/net/minecraft/client/renderer/entity/SilverfishRenderer.java @@ -22,7 +22,7 @@ public class SilverfishRenderer extends MobRenderer { +public class SnowGolemRenderer extends MobRenderer { private static final ResourceLocation SNOW_GOLEM_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/snow_golem.png"); public SnowGolemRenderer(EntityRendererProvider.Context context) { super(context, new SnowGolemModel(context.bakeLayer(ModelLayers.SNOW_GOLEM)), 0.5F); - this.addLayer(new SnowGolemHeadLayer(this, context.getBlockRenderDispatcher(), context.getItemRenderer())); + this.addLayer(new SnowGolemHeadLayer(this, context.getBlockRenderDispatcher())); } - @Override - public ResourceLocation getTextureLocation(LivingEntityRenderState livingEntityRenderState) { + public ResourceLocation getTextureLocation(SnowGolemRenderState snowGolemRenderState) { return SNOW_GOLEM_LOCATION; } - public LivingEntityRenderState createRenderState() { - return new LivingEntityRenderState(); + public SnowGolemRenderState createRenderState() { + return new SnowGolemRenderState(); } - public void extractRenderState(SnowGolem snowGolem, LivingEntityRenderState livingEntityRenderState, float f) { - super.extractRenderState(snowGolem, livingEntityRenderState, f); - livingEntityRenderState.headItem = snowGolem.hasPumpkin() ? new ItemStack(Items.CARVED_PUMPKIN) : ItemStack.EMPTY; - livingEntityRenderState.headItemModel = this.itemRenderer.resolveItemModel(livingEntityRenderState.headItem, snowGolem, ItemDisplayContext.HEAD); + public void extractRenderState(SnowGolem snowGolem, SnowGolemRenderState snowGolemRenderState, float f) { + super.extractRenderState(snowGolem, snowGolemRenderState, f); + snowGolemRenderState.hasPumpkin = snowGolem.hasPumpkin(); } } diff --git a/net/minecraft/client/renderer/entity/SpectralArrowRenderer.java b/net/minecraft/client/renderer/entity/SpectralArrowRenderer.java index 241e47e5..27a13d54 100644 --- a/net/minecraft/client/renderer/entity/SpectralArrowRenderer.java +++ b/net/minecraft/client/renderer/entity/SpectralArrowRenderer.java @@ -2,6 +2,7 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ArrowRenderState; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.projectile.SpectralArrow; @@ -10,12 +11,12 @@ import net.minecraft.world.entity.projectile.SpectralArrow; public class SpectralArrowRenderer extends ArrowRenderer { public static final ResourceLocation SPECTRAL_ARROW_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/projectiles/spectral_arrow.png"); - public SpectralArrowRenderer(EntityRendererProvider.Context context) { + public SpectralArrowRenderer(Context context) { super(context); } @Override - protected ResourceLocation getTextureLocation(ArrowRenderState arrowRenderState) { + protected ResourceLocation getTextureLocation(ArrowRenderState renderState) { return SPECTRAL_ARROW_LOCATION; } diff --git a/net/minecraft/client/renderer/entity/SpiderRenderer.java b/net/minecraft/client/renderer/entity/SpiderRenderer.java index 8c7e8022..71f9c8d5 100644 --- a/net/minecraft/client/renderer/entity/SpiderRenderer.java +++ b/net/minecraft/client/renderer/entity/SpiderRenderer.java @@ -29,7 +29,7 @@ public class SpiderRenderer extends MobRenderer extends AgeableMobRenderer { private static final ResourceLocation SQUID_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/squid/squid.png"); - public SquidRenderer(EntityRendererProvider.Context context, SquidModel squidModel, SquidModel squidModel2) { - super(context, squidModel, squidModel2, 0.7F); + public SquidRenderer(Context context, SquidModel adultModel, SquidModel babyModel) { + super(context, adultModel, babyModel, 0.7F); } public ResourceLocation getTextureLocation(SquidRenderState squidRenderState) { diff --git a/net/minecraft/client/renderer/entity/StriderRenderer.java b/net/minecraft/client/renderer/entity/StriderRenderer.java index b2b9196d..624b3504 100644 --- a/net/minecraft/client/renderer/entity/StriderRenderer.java +++ b/net/minecraft/client/renderer/entity/StriderRenderer.java @@ -1,26 +1,33 @@ package net.minecraft.client.renderer.entity; -import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.StriderModel; import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.entity.layers.SaddleLayer; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.layers.SimpleEquipmentLayer; import net.minecraft.client.renderer.entity.state.StriderRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.monster.Strider; @Environment(EnvType.CLIENT) -public class StriderRenderer extends MobRenderer { +public class StriderRenderer extends AgeableMobRenderer { private static final ResourceLocation STRIDER_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/strider/strider.png"); private static final ResourceLocation COLD_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/strider/strider_cold.png"); private static final float SHADOW_RADIUS = 0.5F; - public StriderRenderer(EntityRendererProvider.Context context) { - super(context, new StriderModel(context.bakeLayer(ModelLayers.STRIDER)), 0.5F); + public StriderRenderer(Context context) { + super(context, new StriderModel(context.bakeLayer(ModelLayers.STRIDER)), new StriderModel(context.bakeLayer(ModelLayers.STRIDER_BABY)), 0.5F); this.addLayer( - new SaddleLayer<>( - this, new StriderModel(context.bakeLayer(ModelLayers.STRIDER_SADDLE)), ResourceLocation.withDefaultNamespace("textures/entity/strider/strider_saddle.png") + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + EquipmentClientInfo.LayerType.STRIDER_SADDLE, + striderRenderState -> striderRenderState.saddle, + new StriderModel(context.bakeLayer(ModelLayers.STRIDER_SADDLE)), + new StriderModel(context.bakeLayer(ModelLayers.STRIDER_BABY_SADDLE)) ) ); } @@ -40,16 +47,11 @@ public class StriderRenderer extends MobRenderer extends EntityRenderer { - private final ItemRenderer itemRenderer; + private final ItemModelResolver itemModelResolver; private final float scale; private final boolean fullBright; - public ThrownItemRenderer(EntityRendererProvider.Context context, float scale, boolean fullBright) { + public ThrownItemRenderer(Context context, float scale, boolean fullBright) { super(context); - this.itemRenderer = context.getItemRenderer(); + this.itemModelResolver = context.getItemModelResolver(); this.scale = scale; this.fullBright = fullBright; } - public ThrownItemRenderer(EntityRendererProvider.Context context) { + public ThrownItemRenderer(Context context) { this(context, 1.0F, false); } @@ -38,13 +39,7 @@ public class ThrownItemRenderer extends EntityR poseStack.pushPose(); poseStack.scale(this.scale, this.scale, this.scale); poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation()); - if (thrownItemRenderState.itemModel != null) { - this.itemRenderer - .render( - thrownItemRenderState.item, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, thrownItemRenderState.itemModel - ); - } - + thrownItemRenderState.item.render(poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); poseStack.popPose(); super.render(thrownItemRenderState, poseStack, multiBufferSource, i); } @@ -55,8 +50,6 @@ public class ThrownItemRenderer extends EntityR public void extractRenderState(T entity, ThrownItemRenderState thrownItemRenderState, float f) { super.extractRenderState(entity, thrownItemRenderState, f); - ItemStack itemStack = entity.getItem(); - thrownItemRenderState.itemModel = !itemStack.isEmpty() ? this.itemRenderer.getModel(itemStack, entity.level(), null, entity.getId()) : null; - thrownItemRenderState.item = itemStack.copy(); + this.itemModelResolver.updateForNonLiving(thrownItemRenderState.item, entity.getItem(), ItemDisplayContext.GROUND, entity); } } diff --git a/net/minecraft/client/renderer/entity/ThrownTridentRenderer.java b/net/minecraft/client/renderer/entity/ThrownTridentRenderer.java index 9c2d37ae..1bddca12 100644 --- a/net/minecraft/client/renderer/entity/ThrownTridentRenderer.java +++ b/net/minecraft/client/renderer/entity/ThrownTridentRenderer.java @@ -8,6 +8,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.TridentModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.ThrownTridentRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -18,7 +19,7 @@ public class ThrownTridentRenderer extends EntityRenderer { private final BlockRenderDispatcher blockRenderer; - public TntMinecartRenderer(EntityRendererProvider.Context context) { + public TntMinecartRenderer(Context context) { super(context, ModelLayers.TNT_MINECART); this.blockRenderer = context.getBlockRenderDispatcher(); } diff --git a/net/minecraft/client/renderer/entity/TntRenderer.java b/net/minecraft/client/renderer/entity/TntRenderer.java index 0c866884..3d3a349b 100644 --- a/net/minecraft/client/renderer/entity/TntRenderer.java +++ b/net/minecraft/client/renderer/entity/TntRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.block.BlockRenderDispatcher; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.TntRenderState; import net.minecraft.util.Mth; import net.minecraft.world.entity.item.PrimedTnt; @@ -14,7 +15,7 @@ import net.minecraft.world.entity.item.PrimedTnt; public class TntRenderer extends EntityRenderer { private final BlockRenderDispatcher blockRenderer; - public TntRenderer(EntityRendererProvider.Context context) { + public TntRenderer(Context context) { super(context); this.shadowRadius = 0.5F; this.blockRenderer = context.getBlockRenderDispatcher(); diff --git a/net/minecraft/client/renderer/entity/TropicalFishRenderer.java b/net/minecraft/client/renderer/entity/TropicalFishRenderer.java index 22484a84..1bc8b413 100644 --- a/net/minecraft/client/renderer/entity/TropicalFishRenderer.java +++ b/net/minecraft/client/renderer/entity/TropicalFishRenderer.java @@ -9,6 +9,7 @@ import net.minecraft.client.model.TropicalFishModelA; import net.minecraft.client.model.TropicalFishModelB; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.TropicalFishPatternLayer; import net.minecraft.client.renderer.entity.state.TropicalFishRenderState; import net.minecraft.resources.ResourceLocation; @@ -17,19 +18,25 @@ import net.minecraft.world.entity.animal.TropicalFish; @Environment(EnvType.CLIENT) public class TropicalFishRenderer extends MobRenderer> { + /** + * Breaking recompile intentionally since modelA/B incorrectly mapped. + */ private final EntityModel modelA = this.getModel(); + /** + * Breaking recompile intentionally since modelA/B incorrectly mapped. + */ private final EntityModel modelB; private static final ResourceLocation MODEL_A_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/fish/tropical_a.png"); private static final ResourceLocation MODEL_B_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/fish/tropical_b.png"); - public TropicalFishRenderer(EntityRendererProvider.Context context) { + public TropicalFishRenderer(Context context) { super(context, new TropicalFishModelA(context.bakeLayer(ModelLayers.TROPICAL_FISH_SMALL)), 0.15F); this.modelB = new TropicalFishModelB(context.bakeLayer(ModelLayers.TROPICAL_FISH_LARGE)); this.addLayer(new TropicalFishPatternLayer(this, context.getModelSet())); } public ResourceLocation getTextureLocation(TropicalFishRenderState tropicalFishRenderState) { - return switch (tropicalFishRenderState.variant.base()) { + return switch (tropicalFishRenderState.pattern.base()) { case SMALL -> MODEL_A_TEXTURE; case LARGE -> MODEL_B_TEXTURE; }; @@ -41,13 +48,13 @@ public class TropicalFishRenderer extends MobRenderer this.modelA; case LARGE -> this.modelB; }; diff --git a/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java b/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java index 6cb5dbc2..0e6cf506 100644 --- a/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java +++ b/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java @@ -3,21 +3,34 @@ package net.minecraft.client.renderer.entity; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.AbstractEquineModel; +import net.minecraft.client.model.EquineSaddleModel; import net.minecraft.client.model.HorseModel; import net.minecraft.client.model.geom.ModelLayerLocation; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.client.renderer.entity.layers.SimpleEquipmentLayer; import net.minecraft.client.renderer.entity.state.EquineRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.animal.horse.AbstractHorse; @Environment(EnvType.CLIENT) public class UndeadHorseRenderer extends AbstractHorseRenderer> { - private static final ResourceLocation ZOMBIE_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_zombie.png"); - private static final ResourceLocation SKELETON_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_skeleton.png"); private final ResourceLocation texture; - public UndeadHorseRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, boolean bl) { - super(context, new HorseModel(context.bakeLayer(modelLayerLocation)), new HorseModel(context.bakeLayer(modelLayerLocation2)), 1.0F); - this.texture = bl ? SKELETON_TEXTURE : ZOMBIE_TEXTURE; + public UndeadHorseRenderer(Context context, UndeadHorseRenderer.Type type) { + super(context, new HorseModel(context.bakeLayer(type.model)), new HorseModel(context.bakeLayer(type.babyModel))); + this.texture = type.texture; + this.addLayer( + new SimpleEquipmentLayer<>( + this, + context.getEquipmentRenderer(), + type.saddleLayer, + equineRenderState -> equineRenderState.saddle, + new EquineSaddleModel(context.bakeLayer(type.saddleModel)), + new EquineSaddleModel(context.bakeLayer(type.babySaddleModel)) + ) + ); } public ResourceLocation getTextureLocation(EquineRenderState equineRenderState) { @@ -27,4 +40,47 @@ public class UndeadHorseRenderer extends AbstractHorseRenderer { public VexRenderer(EntityRendererProvider.Context context) { super(context, new VexModel(context.bakeLayer(ModelLayers.VEX)), 0.3F); - this.addLayer(new ItemInHandLayer<>(this, context.getItemRenderer())); + this.addLayer(new ItemInHandLayer<>(this)); } protected int getBlockLightLevel(Vex entity, BlockPos pos) { @@ -34,6 +35,7 @@ public class VexRenderer extends MobRenderer { public void extractRenderState(Vex vex, VexRenderState vexRenderState, float f) { super.extractRenderState(vex, vexRenderState, f); + ArmedEntityRenderState.extractArmedEntityRenderState(vex, vexRenderState, this.itemModelResolver); vexRenderState.isCharging = vex.isCharging(); } } diff --git a/net/minecraft/client/renderer/entity/VillagerRenderer.java b/net/minecraft/client/renderer/entity/VillagerRenderer.java index 3e67cc0b..cb101605 100644 --- a/net/minecraft/client/renderer/entity/VillagerRenderer.java +++ b/net/minecraft/client/renderer/entity/VillagerRenderer.java @@ -1,6 +1,5 @@ package net.minecraft.client.renderer.entity; -import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.VillagerModel; @@ -8,26 +7,21 @@ import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.entity.layers.CrossedArmsItemLayer; import net.minecraft.client.renderer.entity.layers.CustomHeadLayer; import net.minecraft.client.renderer.entity.layers.VillagerProfessionLayer; +import net.minecraft.client.renderer.entity.state.HoldingEntityRenderState; import net.minecraft.client.renderer.entity.state.VillagerRenderState; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.npc.Villager; @Environment(EnvType.CLIENT) -public class VillagerRenderer extends MobRenderer { +public class VillagerRenderer extends AgeableMobRenderer { private static final ResourceLocation VILLAGER_BASE_SKIN = ResourceLocation.withDefaultNamespace("textures/entity/villager/villager.png"); public static final CustomHeadLayer.Transforms CUSTOM_HEAD_TRANSFORMS = new CustomHeadLayer.Transforms(-0.1171875F, -0.07421875F, 1.0F); public VillagerRenderer(EntityRendererProvider.Context context) { - super(context, new VillagerModel(context.bakeLayer(ModelLayers.VILLAGER)), 0.5F); - this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), CUSTOM_HEAD_TRANSFORMS, context.getItemRenderer())); + super(context, new VillagerModel(context.bakeLayer(ModelLayers.VILLAGER)), new VillagerModel(context.bakeLayer(ModelLayers.VILLAGER_BABY)), 0.5F); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), CUSTOM_HEAD_TRANSFORMS)); this.addLayer(new VillagerProfessionLayer<>(this, context.getResourceManager(), "villager")); - this.addLayer(new CrossedArmsItemLayer<>(this, context.getItemRenderer())); - } - - protected void scale(VillagerRenderState villagerRenderState, PoseStack poseStack) { - super.scale(villagerRenderState, poseStack); - float f = villagerRenderState.ageScale; - poseStack.scale(f, f, f); + this.addLayer(new CrossedArmsItemLayer<>(this)); } public ResourceLocation getTextureLocation(VillagerRenderState villagerRenderState) { @@ -45,6 +39,7 @@ public class VillagerRenderer extends MobRenderer 0; villagerRenderState.villagerData = villager.getVillagerData(); } diff --git a/net/minecraft/client/renderer/entity/VindicatorRenderer.java b/net/minecraft/client/renderer/entity/VindicatorRenderer.java index 9d390f64..8e81e864 100644 --- a/net/minecraft/client/renderer/entity/VindicatorRenderer.java +++ b/net/minecraft/client/renderer/entity/VindicatorRenderer.java @@ -6,6 +6,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.IllagerModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.ItemInHandLayer; import net.minecraft.client.renderer.entity.state.IllagerRenderState; import net.minecraft.resources.ResourceLocation; @@ -15,9 +16,9 @@ import net.minecraft.world.entity.monster.Vindicator; public class VindicatorRenderer extends IllagerRenderer { private static final ResourceLocation VINDICATOR = ResourceLocation.withDefaultNamespace("textures/entity/illager/vindicator.png"); - public VindicatorRenderer(EntityRendererProvider.Context context) { + public VindicatorRenderer(Context context) { super(context, new IllagerModel<>(context.bakeLayer(ModelLayers.VINDICATOR)), 0.5F); - this.addLayer(new ItemInHandLayer>(this, context.getItemRenderer()) { + this.addLayer(new ItemInHandLayer>(this) { public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, IllagerRenderState illagerRenderState, float f, float g) { if (illagerRenderState.isAggressive) { super.render(poseStack, multiBufferSource, i, illagerRenderState, f, g); diff --git a/net/minecraft/client/renderer/entity/WanderingTraderRenderer.java b/net/minecraft/client/renderer/entity/WanderingTraderRenderer.java index 38798a20..3b28fe0a 100644 --- a/net/minecraft/client/renderer/entity/WanderingTraderRenderer.java +++ b/net/minecraft/client/renderer/entity/WanderingTraderRenderer.java @@ -6,6 +6,7 @@ import net.minecraft.client.model.VillagerModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.entity.layers.CrossedArmsItemLayer; import net.minecraft.client.renderer.entity.layers.CustomHeadLayer; +import net.minecraft.client.renderer.entity.state.HoldingEntityRenderState; import net.minecraft.client.renderer.entity.state.VillagerRenderState; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.npc.WanderingTrader; @@ -16,8 +17,8 @@ public class WanderingTraderRenderer extends MobRenderer(this, context.getModelSet(), context.getItemRenderer())); - this.addLayer(new CrossedArmsItemLayer<>(this, context.getItemRenderer())); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet())); + this.addLayer(new CrossedArmsItemLayer<>(this)); } public ResourceLocation getTextureLocation(VillagerRenderState villagerRenderState) { @@ -30,6 +31,7 @@ public class WanderingTraderRenderer extends MobRenderer 0; } } diff --git a/net/minecraft/client/renderer/entity/WardenRenderer.java b/net/minecraft/client/renderer/entity/WardenRenderer.java index 5f6917c0..af6ff2af 100644 --- a/net/minecraft/client/renderer/entity/WardenRenderer.java +++ b/net/minecraft/client/renderer/entity/WardenRenderer.java @@ -25,7 +25,12 @@ public class WardenRenderer extends MobRenderer( - this, BIOLUMINESCENT_LAYER_TEXTURE, (wardenRenderState, f) -> 1.0F, WardenModel::getBioluminescentLayerModelParts, RenderType::entityTranslucentEmissive + this, + BIOLUMINESCENT_LAYER_TEXTURE, + (wardenRenderState, f) -> 1.0F, + WardenModel::getBioluminescentLayerModelParts, + RenderType::entityTranslucentEmissive, + false ) ); this.addLayer( @@ -34,7 +39,8 @@ public class WardenRenderer extends MobRenderer Math.max(0.0F, Mth.cos(f * 0.045F) * 0.25F), WardenModel::getPulsatingSpotsLayerModelParts, - RenderType::entityTranslucentEmissive + RenderType::entityTranslucentEmissive, + false ) ); this.addLayer( @@ -43,12 +49,18 @@ public class WardenRenderer extends MobRenderer Math.max(0.0F, Mth.cos(f * 0.045F + (float) Math.PI) * 0.25F), WardenModel::getPulsatingSpotsLayerModelParts, - RenderType::entityTranslucentEmissive + RenderType::entityTranslucentEmissive, + false ) ); this.addLayer( new LivingEntityEmissiveLayer<>( - this, TEXTURE, (wardenRenderState, f) -> wardenRenderState.tendrilAnimation, WardenModel::getTendrilsLayerModelParts, RenderType::entityTranslucentEmissive + this, + TEXTURE, + (wardenRenderState, f) -> wardenRenderState.tendrilAnimation, + WardenModel::getTendrilsLayerModelParts, + RenderType::entityTranslucentEmissive, + false ) ); this.addLayer( @@ -57,7 +69,8 @@ public class WardenRenderer extends MobRenderer wardenRenderState.heartAnimation, WardenModel::getHeartLayerModelParts, - RenderType::entityTranslucentEmissive + RenderType::entityTranslucentEmissive, + false ) ); } diff --git a/net/minecraft/client/renderer/entity/WindChargeRenderer.java b/net/minecraft/client/renderer/entity/WindChargeRenderer.java index 63d4fcd9..f0f7e10f 100644 --- a/net/minecraft/client/renderer/entity/WindChargeRenderer.java +++ b/net/minecraft/client/renderer/entity/WindChargeRenderer.java @@ -8,6 +8,7 @@ import net.minecraft.client.model.WindChargeModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.EntityRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; @@ -18,17 +19,17 @@ public class WindChargeRenderer extends EntityRenderer { @@ -15,7 +18,7 @@ public class WitchRenderer extends MobRenderer { - public WolfRenderer(EntityRendererProvider.Context context) { + public WolfRenderer(Context context) { super(context, new WolfModel(context.bakeLayer(ModelLayers.WOLF)), new WolfModel(context.bakeLayer(ModelLayers.WOLF_BABY)), 0.5F); this.addLayer(new WolfArmorLayer(this, context.getModelSet(), context.getEquipmentRenderer())); this.addLayer(new WolfCollarLayer(this)); diff --git a/net/minecraft/client/renderer/entity/ZombieRenderer.java b/net/minecraft/client/renderer/entity/ZombieRenderer.java index 3aab56c8..1bc73720 100644 --- a/net/minecraft/client/renderer/entity/ZombieRenderer.java +++ b/net/minecraft/client/renderer/entity/ZombieRenderer.java @@ -28,21 +28,21 @@ public class ZombieRenderer extends AbstractZombieRenderer(context.bakeLayer(modelLayerLocation)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation2)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation3)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation4)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation5)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation6)) + new ZombieModel<>(context.bakeLayer(adultModel)), + new ZombieModel<>(context.bakeLayer(babyModel)), + new ZombieModel<>(context.bakeLayer(innerModel)), + new ZombieModel<>(context.bakeLayer(outerModel)), + new ZombieModel<>(context.bakeLayer(innerModelBaby)), + new ZombieModel<>(context.bakeLayer(outerModelBaby)) ); } } diff --git a/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java b/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java index e887e9f0..50a9d057 100644 --- a/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java +++ b/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java @@ -5,6 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.HumanoidArmorModel; import net.minecraft.client.model.ZombifiedPiglinModel; import net.minecraft.client.model.geom.ModelLayerLocation; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.client.renderer.entity.state.ZombifiedPiglinRenderState; import net.minecraft.resources.ResourceLocation; @@ -15,28 +16,28 @@ public class ZombifiedPiglinRenderer extends HumanoidMobRenderer( this, - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation3)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation4)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), + new HumanoidArmorModel(context.bakeLayer(innerArmorLayer)), + new HumanoidArmorModel(context.bakeLayer(outerArmorLayer)), + new HumanoidArmorModel(context.bakeLayer(innerArmorBaby)), + new HumanoidArmorModel(context.bakeLayer(outerArmorBaby)), context.getEquipmentRenderer() ) ); diff --git a/net/minecraft/client/renderer/entity/layers/ArrowLayer.java b/net/minecraft/client/renderer/entity/layers/ArrowLayer.java index 2ac69101..1cba2f36 100644 --- a/net/minecraft/client/renderer/entity/layers/ArrowLayer.java +++ b/net/minecraft/client/renderer/entity/layers/ArrowLayer.java @@ -5,24 +5,19 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.ArrowModel; import net.minecraft.client.model.PlayerModel; import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.TippableArrowRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.PlayerRenderState; @Environment(EnvType.CLIENT) public class ArrowLayer extends StuckInBodyLayer { - public ArrowLayer(LivingEntityRenderer livingEntityRenderer, EntityRendererProvider.Context context) { - super( - livingEntityRenderer, - new ArrowModel(context.bakeLayer(ModelLayers.ARROW)), - TippableArrowRenderer.NORMAL_ARROW_LOCATION, - StuckInBodyLayer.PlacementStyle.IN_CUBE - ); + public ArrowLayer(LivingEntityRenderer renderer, Context context) { + super(renderer, new ArrowModel(context.bakeLayer(ModelLayers.ARROW)), TippableArrowRenderer.NORMAL_ARROW_LOCATION, StuckInBodyLayer.PlacementStyle.IN_CUBE); } @Override - protected int numStuck(PlayerRenderState playerRenderState) { - return playerRenderState.arrowCount; + protected int numStuck(PlayerRenderState renderState) { + return renderState.arrowCount; } } diff --git a/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java b/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java index 05ce3252..b356c840 100644 --- a/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java +++ b/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java @@ -5,8 +5,8 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.BeeStingerModel; import net.minecraft.client.model.PlayerModel; import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.LivingEntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.state.PlayerRenderState; import net.minecraft.resources.ResourceLocation; @@ -14,12 +14,12 @@ import net.minecraft.resources.ResourceLocation; public class BeeStingerLayer extends StuckInBodyLayer { private static final ResourceLocation BEE_STINGER_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/bee/bee_stinger.png"); - public BeeStingerLayer(LivingEntityRenderer livingEntityRenderer, EntityRendererProvider.Context context) { - super(livingEntityRenderer, new BeeStingerModel(context.bakeLayer(ModelLayers.BEE_STINGER)), BEE_STINGER_LOCATION, StuckInBodyLayer.PlacementStyle.ON_SURFACE); + public BeeStingerLayer(LivingEntityRenderer renderer, Context context) { + super(renderer, new BeeStingerModel(context.bakeLayer(ModelLayers.BEE_STINGER)), BEE_STINGER_LOCATION, StuckInBodyLayer.PlacementStyle.ON_SURFACE); } @Override - protected int numStuck(PlayerRenderState playerRenderState) { - return playerRenderState.stingerCount; + protected int numStuck(PlayerRenderState renderState) { + return renderState.stingerCount; } } diff --git a/net/minecraft/client/renderer/entity/layers/CapeLayer.java b/net/minecraft/client/renderer/entity/layers/CapeLayer.java index 77f9576e..2616f563 100644 --- a/net/minecraft/client/renderer/entity/layers/CapeLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CapeLayer.java @@ -15,29 +15,30 @@ import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.PlayerRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.PlayerSkin; -import net.minecraft.client.resources.model.EquipmentModelSet; +import net.minecraft.client.resources.model.EquipmentAssetManager; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.core.component.DataComponents; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.EquipmentModel; +import net.minecraft.world.item.equipment.EquipmentAsset; import net.minecraft.world.item.equipment.Equippable; @Environment(EnvType.CLIENT) public class CapeLayer extends RenderLayer { private final HumanoidModel model; - private final EquipmentModelSet equipmentModels; + private final EquipmentAssetManager equipmentAssets; - public CapeLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentModelSet equipmentModelSet) { - super(renderLayerParent); - this.model = new PlayerCapeModel<>(entityModelSet.bakeLayer(ModelLayers.PLAYER_CAPE)); - this.equipmentModels = equipmentModelSet; + public CapeLayer(RenderLayerParent renderer, EntityModelSet modelSet, EquipmentAssetManager equipmentAssets) { + super(renderer); + this.model = new PlayerCapeModel<>(modelSet.bakeLayer(ModelLayers.PLAYER_CAPE)); + this.equipmentAssets = equipmentAssets; } - private boolean hasLayer(ItemStack itemStack, EquipmentModel.LayerType layerType) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && !equippable.model().isEmpty()) { - EquipmentModel equipmentModel = this.equipmentModels.get((ResourceLocation)equippable.model().get()); - return !equipmentModel.getLayers(layerType).isEmpty(); + private boolean hasLayer(ItemStack stack, EquipmentClientInfo.LayerType layer) { + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); + if (equippable != null && !equippable.assetId().isEmpty()) { + EquipmentClientInfo equipmentClientInfo = this.equipmentAssets.get((ResourceKey)equippable.assetId().get()); + return !equipmentClientInfo.getLayers(layer).isEmpty(); } else { return false; } @@ -47,9 +48,9 @@ public class CapeLayer extends RenderLayer { if (!playerRenderState.isInvisible && playerRenderState.showCape) { PlayerSkin playerSkin = playerRenderState.skin; if (playerSkin.capeTexture() != null) { - if (!this.hasLayer(playerRenderState.chestItem, EquipmentModel.LayerType.WINGS)) { + if (!this.hasLayer(playerRenderState.chestEquipment, EquipmentClientInfo.LayerType.WINGS)) { poseStack.pushPose(); - if (this.hasLayer(playerRenderState.chestItem, EquipmentModel.LayerType.HUMANOID)) { + if (this.hasLayer(playerRenderState.chestEquipment, EquipmentClientInfo.LayerType.HUMANOID)) { poseStack.translate(0.0F, -0.053125F, 0.06875F); } diff --git a/net/minecraft/client/renderer/entity/layers/CrossedArmsItemLayer.java b/net/minecraft/client/renderer/entity/layers/CrossedArmsItemLayer.java index c7e9fe9d..0f1c7510 100644 --- a/net/minecraft/client/renderer/entity/layers/CrossedArmsItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CrossedArmsItemLayer.java @@ -5,33 +5,34 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.EntityModel; +import net.minecraft.client.model.VillagerLikeModel; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; -import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; +import net.minecraft.client.renderer.entity.state.HoldingEntityRenderState; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) -public class CrossedArmsItemLayer> extends RenderLayer { - private final ItemRenderer itemRenderer; - - public CrossedArmsItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { +public class CrossedArmsItemLayer & VillagerLikeModel> extends RenderLayer { + public CrossedArmsItemLayer(RenderLayerParent renderLayerParent) { super(renderLayerParent); - this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - BakedModel bakedModel = livingEntityRenderState.getMainHandItemModel(); - if (bakedModel != null) { + public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S holdingEntityRenderState, float f, float g) { + ItemStackRenderState itemStackRenderState = holdingEntityRenderState.heldItem; + if (!itemStackRenderState.isEmpty()) { poseStack.pushPose(); - poseStack.translate(0.0F, 0.4F, -0.4F); - poseStack.mulPose(Axis.XP.rotationDegrees(180.0F)); - ItemStack itemStack = livingEntityRenderState.getMainHandItem(); - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + this.applyTranslation(holdingEntityRenderState, poseStack); + itemStackRenderState.render(poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); poseStack.popPose(); } } + + protected void applyTranslation(S renderState, PoseStack poseStack) { + this.getParentModel().translateToArms(poseStack); + poseStack.mulPose(Axis.XP.rotation(0.75F)); + poseStack.scale(1.07F, 1.07F, 1.07F); + poseStack.translate(0.0F, 0.13F, -0.34F); + poseStack.mulPose(Axis.XP.rotation((float) Math.PI)); + } } diff --git a/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java b/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java index 8270f777..219ca90d 100644 --- a/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java @@ -2,9 +2,10 @@ package net.minecraft.client.renderer.entity.layers; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Axis; -import java.util.Map; +import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.Util; import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.HeadedModel; import net.minecraft.client.model.SkullModelBase; @@ -12,19 +13,9 @@ import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.SkullBlockRenderer; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.core.component.DataComponents; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.ResolvableProfile; -import net.minecraft.world.level.block.AbstractSkullBlock; import net.minecraft.world.level.block.SkullBlock; @Environment(EnvType.CLIENT) @@ -32,44 +23,36 @@ public class CustomHeadLayer skullModels; - private final ItemRenderer itemRenderer; + private final Function skullModels; - public CustomHeadLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, ItemRenderer itemRenderer) { - this(renderLayerParent, entityModelSet, CustomHeadLayer.Transforms.DEFAULT, itemRenderer); + public CustomHeadLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + this(renderer, modelSet, CustomHeadLayer.Transforms.DEFAULT); } - public CustomHeadLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, CustomHeadLayer.Transforms transforms, ItemRenderer itemRenderer - ) { - super(renderLayerParent); + public CustomHeadLayer(RenderLayerParent renderer, EntityModelSet modelSet, CustomHeadLayer.Transforms transforms) { + super(renderer); this.transforms = transforms; - this.skullModels = SkullBlockRenderer.createSkullRenderers(entityModelSet); - this.itemRenderer = itemRenderer; + this.skullModels = Util.memoize((Function)(type -> SkullBlockRenderer.createModel(modelSet, type))); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - ItemStack itemStack = livingEntityRenderState.headItem; - BakedModel bakedModel = livingEntityRenderState.headItemModel; - if (!itemStack.isEmpty() && bakedModel != null) { - Item item = itemStack.getItem(); + if (!livingEntityRenderState.headItem.isEmpty() || livingEntityRenderState.wornHeadType != null) { poseStack.pushPose(); poseStack.scale(this.transforms.horizontalScale(), 1.0F, this.transforms.horizontalScale()); M entityModel = this.getParentModel(); entityModel.root().translateAndRotate(poseStack); entityModel.getHead().translateAndRotate(poseStack); - if (item instanceof BlockItem blockItem && blockItem.getBlock() instanceof AbstractSkullBlock abstractSkullBlock) { + if (livingEntityRenderState.wornHeadType != null) { poseStack.translate(0.0F, this.transforms.skullYOffset(), 0.0F); poseStack.scale(1.1875F, -1.1875F, -1.1875F); - ResolvableProfile resolvableProfile = itemStack.get(DataComponents.PROFILE); poseStack.translate(-0.5, 0.0, -0.5); - SkullBlock.Type type = abstractSkullBlock.getType(); - SkullModelBase skullModelBase = (SkullModelBase)this.skullModels.get(type); - RenderType renderType = SkullBlockRenderer.getRenderType(type, resolvableProfile); + SkullBlock.Type type = livingEntityRenderState.wornHeadType; + SkullModelBase skullModelBase = (SkullModelBase)this.skullModels.apply(type); + RenderType renderType = SkullBlockRenderer.getRenderType(type, livingEntityRenderState.wornHeadProfile); SkullBlockRenderer.renderSkull(null, 180.0F, livingEntityRenderState.wornHeadAnimationPos, poseStack, multiBufferSource, i, skullModelBase, renderType); - } else if (!HumanoidArmorLayer.shouldRender(itemStack, EquipmentSlot.HEAD)) { + } else { translateToHead(poseStack, this.transforms); - this.itemRenderer.render(itemStack, ItemDisplayContext.HEAD, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + livingEntityRenderState.headItem.render(poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); } poseStack.popPose(); diff --git a/net/minecraft/client/renderer/entity/layers/Deadmau5EarsLayer.java b/net/minecraft/client/renderer/entity/layers/Deadmau5EarsLayer.java index c24c5816..33bb0c29 100644 --- a/net/minecraft/client/renderer/entity/layers/Deadmau5EarsLayer.java +++ b/net/minecraft/client/renderer/entity/layers/Deadmau5EarsLayer.java @@ -19,9 +19,9 @@ import net.minecraft.client.renderer.entity.state.PlayerRenderState; public class Deadmau5EarsLayer extends RenderLayer { private final HumanoidModel model; - public Deadmau5EarsLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet) { - super(renderLayerParent); - this.model = new PlayerEarsModel(entityModelSet.bakeLayer(ModelLayers.PLAYER_EARS)); + public Deadmau5EarsLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + super(renderer); + this.model = new PlayerEarsModel(modelSet.bakeLayer(ModelLayers.PLAYER_EARS)); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PlayerRenderState playerRenderState, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java b/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java index 4404ec77..20d3f664 100644 --- a/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java @@ -5,28 +5,21 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.DolphinModel; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.DolphinRenderState; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.util.Mth; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class DolphinCarryingItemLayer extends RenderLayer { - private final ItemRenderer itemRenderer; - - public DolphinCarryingItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { + public DolphinCarryingItemLayer(RenderLayerParent renderLayerParent) { super(renderLayerParent); - this.itemRenderer = itemRenderer; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, DolphinRenderState dolphinRenderState, float f, float g) { - ItemStack itemStack = dolphinRenderState.getMainHandItem(); - BakedModel bakedModel = dolphinRenderState.getMainHandItemModel(); - if (bakedModel != null) { + ItemStackRenderState itemStackRenderState = dolphinRenderState.heldItem; + if (!itemStackRenderState.isEmpty()) { poseStack.pushPose(); float h = 1.0F; float j = -1.0F; @@ -37,7 +30,7 @@ public class DolphinCarryingItemLayer extends RenderLayer> extends RenderLayer { - public EnergySwirlLayer(RenderLayerParent renderer) { - super(renderer); + public EnergySwirlLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } @Override - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S entityRenderState, float f, float g) { - if (this.isPowered(entityRenderState)) { - float h = entityRenderState.ageInTicks; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + if (this.isPowered(renderState)) { + float f = renderState.ageInTicks; M entityModel = this.model(); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.energySwirl(this.getTextureLocation(), this.xOffset(h) % 1.0F, h * 0.01F % 1.0F)); - entityModel.setupAnim(entityRenderState); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY, -8355712); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.energySwirl(this.getTextureLocation(), this.xOffset(f) % 1.0F, f * 0.01F % 1.0F)); + entityModel.setupAnim(renderState); + entityModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, -8355712); } } - protected abstract boolean isPowered(S entityRenderState); + protected abstract boolean isPowered(S renderState); protected abstract float xOffset(float tickCount); diff --git a/net/minecraft/client/renderer/entity/layers/EquipmentLayerRenderer.java b/net/minecraft/client/renderer/entity/layers/EquipmentLayerRenderer.java index c7559650..11dc71bd 100644 --- a/net/minecraft/client/renderer/entity/layers/EquipmentLayerRenderer.java +++ b/net/minecraft/client/renderer/entity/layers/EquipmentLayerRenderer.java @@ -16,99 +16,102 @@ import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.resources.model.EquipmentModelSet; +import net.minecraft.client.resources.model.EquipmentAssetManager; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.ItemTags; import net.minecraft.util.ARGB; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.component.DyedItemColor; -import net.minecraft.world.item.equipment.EquipmentModel; +import net.minecraft.world.item.equipment.EquipmentAsset; import net.minecraft.world.item.equipment.trim.ArmorTrim; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class EquipmentLayerRenderer { private static final int NO_LAYER_COLOR = 0; - private final EquipmentModelSet equipmentModels; + private final EquipmentAssetManager equipmentAssets; private final Function layerTextureLookup; private final Function trimSpriteLookup; - public EquipmentLayerRenderer(EquipmentModelSet equipmentModelSet, TextureAtlas textureAtlas) { - this.equipmentModels = equipmentModelSet; + public EquipmentLayerRenderer(EquipmentAssetManager equipmentAssets, TextureAtlas atlas) { + this.equipmentAssets = equipmentAssets; this.layerTextureLookup = Util.memoize( (Function)(layerTextureKey -> layerTextureKey.layer.getTextureLocation(layerTextureKey.layerType)) ); - this.trimSpriteLookup = Util.memoize((Function)(trimSpriteKey -> { - ResourceLocation resourceLocation = trimSpriteKey.trim.getTexture(trimSpriteKey.layerType, trimSpriteKey.equipmentModelId); - return textureAtlas.getSprite(resourceLocation); - })); + this.trimSpriteLookup = Util.memoize( + (Function)(trimSpriteKey -> atlas.getSprite(trimSpriteKey.spriteId())) + ); } public void renderLayers( - EquipmentModel.LayerType layerType, - ResourceLocation resourceLocation, - Model model, - ItemStack itemStack, + EquipmentClientInfo.LayerType layerType, + ResourceKey equipmentAsset, + Model armorModel, + ItemStack item, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + MultiBufferSource bufferSource, + int packedLight ) { - this.renderLayers(layerType, resourceLocation, model, itemStack, poseStack, multiBufferSource, i, null); + this.renderLayers(layerType, equipmentAsset, armorModel, item, poseStack, bufferSource, packedLight, null); } public void renderLayers( - EquipmentModel.LayerType layerType, - ResourceLocation resourceLocation, - Model model, - ItemStack itemStack, + EquipmentClientInfo.LayerType layerType, + ResourceKey equipmentAsset, + Model armorModel, + ItemStack item, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - @Nullable ResourceLocation resourceLocation2 + MultiBufferSource bufferSource, + int packedLight, + @Nullable ResourceLocation playerTexture ) { - List list = this.equipmentModels.get(resourceLocation).getLayers(layerType); + List list = this.equipmentAssets.get(equipmentAsset).getLayers(layerType); if (!list.isEmpty()) { - int j = itemStack.is(ItemTags.DYEABLE) ? DyedItemColor.getOrDefault(itemStack, 0) : 0; - boolean bl = itemStack.hasFoil(); + int i = DyedItemColor.getOrDefault(item, 0); + boolean bl = item.hasFoil(); - for (EquipmentModel.Layer layer : list) { - int k = getColorForLayer(layer, j); - if (k != 0) { - ResourceLocation resourceLocation3 = layer.usePlayerTexture() && resourceLocation2 != null - ? resourceLocation2 + for (EquipmentClientInfo.Layer layer : list) { + int j = getColorForLayer(layer, i); + if (j != 0) { + ResourceLocation resourceLocation = layer.usePlayerTexture() && playerTexture != null + ? playerTexture : (ResourceLocation)this.layerTextureLookup.apply(new EquipmentLayerRenderer.LayerTextureKey(layerType, layer)); - VertexConsumer vertexConsumer = ItemRenderer.getArmorFoilBuffer(multiBufferSource, RenderType.armorCutoutNoCull(resourceLocation3), bl); - model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY, k); + VertexConsumer vertexConsumer = ItemRenderer.getArmorFoilBuffer(bufferSource, RenderType.armorCutoutNoCull(resourceLocation), bl); + armorModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, j); bl = false; } } - ArmorTrim armorTrim = itemStack.get(DataComponents.TRIM); + ArmorTrim armorTrim = item.get(DataComponents.TRIM); if (armorTrim != null) { TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)this.trimSpriteLookup - .apply(new EquipmentLayerRenderer.TrimSpriteKey(armorTrim, layerType, resourceLocation)); - VertexConsumer vertexConsumer2 = textureAtlasSprite.wrap(multiBufferSource.getBuffer(Sheets.armorTrimsSheet(armorTrim.pattern().value().decal()))); - model.renderToBuffer(poseStack, vertexConsumer2, i, OverlayTexture.NO_OVERLAY); + .apply(new EquipmentLayerRenderer.TrimSpriteKey(armorTrim, layerType, equipmentAsset)); + VertexConsumer vertexConsumer2 = textureAtlasSprite.wrap(bufferSource.getBuffer(Sheets.armorTrimsSheet(armorTrim.pattern().value().decal()))); + armorModel.renderToBuffer(poseStack, vertexConsumer2, packedLight, OverlayTexture.NO_OVERLAY); } } } - private static int getColorForLayer(EquipmentModel.Layer layer, int i) { - Optional optional = layer.dyeable(); + private static int getColorForLayer(EquipmentClientInfo.Layer layer, int color) { + Optional optional = layer.dyeable(); if (optional.isPresent()) { - int j = (Integer)((EquipmentModel.Dyeable)optional.get()).colorWhenUndyed().map(ARGB::opaque).orElse(0); - return i != 0 ? i : j; + int i = (Integer)((EquipmentClientInfo.Dyeable)optional.get()).colorWhenUndyed().map(ARGB::opaque).orElse(0); + return color != 0 ? color : i; } else { return -1; } } @Environment(EnvType.CLIENT) - record LayerTextureKey(EquipmentModel.LayerType layerType, EquipmentModel.Layer layer) { + record LayerTextureKey(EquipmentClientInfo.LayerType layerType, EquipmentClientInfo.Layer layer) { } @Environment(EnvType.CLIENT) - record TrimSpriteKey(ArmorTrim trim, EquipmentModel.LayerType layerType, ResourceLocation equipmentModelId) { + record TrimSpriteKey(ArmorTrim trim, EquipmentClientInfo.LayerType layerType, ResourceKey equipmentAssetId) { + public ResourceLocation spriteId() { + return this.trim.layerAssetId(this.layerType.trimAssetPrefix(), this.equipmentAssetId); + } } } diff --git a/net/minecraft/client/renderer/entity/layers/EyesLayer.java b/net/minecraft/client/renderer/entity/layers/EyesLayer.java index ed21707a..697aa248 100644 --- a/net/minecraft/client/renderer/entity/layers/EyesLayer.java +++ b/net/minecraft/client/renderer/entity/layers/EyesLayer.java @@ -13,14 +13,14 @@ import net.minecraft.client.renderer.texture.OverlayTexture; @Environment(EnvType.CLIENT) public abstract class EyesLayer> extends RenderLayer { - public EyesLayer(RenderLayerParent renderer) { - super(renderer); + public EyesLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } @Override - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S entityRenderState, float f, float g) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(this.renderType()); - this.getParentModel().renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(this.renderType()); + this.getParentModel().renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } public abstract RenderType renderType(); diff --git a/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java b/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java index 2da88d5b..6685ecbe 100644 --- a/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java @@ -6,27 +6,20 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.FoxModel; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.FoxRenderState; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class FoxHeldItemLayer extends RenderLayer { - private final ItemRenderer itemRenderer; - - public FoxHeldItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { + public FoxHeldItemLayer(RenderLayerParent renderLayerParent) { super(renderLayerParent); - this.itemRenderer = itemRenderer; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, FoxRenderState foxRenderState, float f, float g) { - BakedModel bakedModel = foxRenderState.getMainHandItemModel(); - ItemStack itemStack = foxRenderState.getMainHandItem(); - if (bakedModel != null && !itemStack.isEmpty()) { + ItemStackRenderState itemStackRenderState = foxRenderState.heldItem; + if (!itemStackRenderState.isEmpty()) { boolean bl = foxRenderState.isSleeping; boolean bl2 = foxRenderState.isBaby; poseStack.pushPose(); @@ -56,7 +49,7 @@ public class FoxHeldItemLayer extends RenderLayer { poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); } - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + itemStackRenderState.render(poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java b/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java deleted file mode 100644 index 42412743..00000000 --- a/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.minecraft.client.renderer.entity.layers; - -import com.mojang.blaze3d.vertex.PoseStack; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.model.HorseModel; -import net.minecraft.client.model.geom.EntityModelSet; -import net.minecraft.client.model.geom.ModelLayers; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.RenderLayerParent; -import net.minecraft.client.renderer.entity.state.HorseRenderState; -import net.minecraft.core.component.DataComponents; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.EquipmentModel; -import net.minecraft.world.item.equipment.Equippable; - -@Environment(EnvType.CLIENT) -public class HorseArmorLayer extends RenderLayer { - private final HorseModel adultModel; - private final HorseModel babyModel; - private final EquipmentLayerRenderer equipmentRenderer; - - public HorseArmorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.equipmentRenderer = equipmentLayerRenderer; - this.adultModel = new HorseModel(entityModelSet.bakeLayer(ModelLayers.HORSE_ARMOR)); - this.babyModel = new HorseModel(entityModelSet.bakeLayer(ModelLayers.HORSE_BABY_ARMOR)); - } - - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, HorseRenderState horseRenderState, float f, float g) { - ItemStack itemStack = horseRenderState.bodyArmorItem; - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && !equippable.model().isEmpty()) { - HorseModel horseModel = horseRenderState.isBaby ? this.babyModel : this.adultModel; - ResourceLocation resourceLocation = (ResourceLocation)equippable.model().get(); - horseModel.setupAnim(horseRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.HORSE_BODY, resourceLocation, horseModel, itemStack, poseStack, multiBufferSource, i); - } - } -} diff --git a/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java b/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java index 43910213..015beda3 100644 --- a/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java +++ b/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java @@ -6,7 +6,6 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.Util; import net.minecraft.client.model.HorseModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; @@ -18,21 +17,29 @@ import net.minecraft.world.entity.animal.horse.Markings; @Environment(EnvType.CLIENT) public class HorseMarkingLayer extends RenderLayer { - private static final Map LOCATION_BY_MARKINGS = Util.make(Maps.newEnumMap(Markings.class), enumMap -> { - enumMap.put(Markings.NONE, null); - enumMap.put(Markings.WHITE, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_white.png")); - enumMap.put(Markings.WHITE_FIELD, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_whitefield.png")); - enumMap.put(Markings.WHITE_DOTS, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_whitedots.png")); - enumMap.put(Markings.BLACK_DOTS, ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_blackdots.png")); - }); + private static final ResourceLocation INVISIBLE_TEXTURE = ResourceLocation.withDefaultNamespace("invisible"); + private static final Map LOCATION_BY_MARKINGS = Maps.newEnumMap( + Map.of( + Markings.NONE, + INVISIBLE_TEXTURE, + Markings.WHITE, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_white.png"), + Markings.WHITE_FIELD, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_whitefield.png"), + Markings.WHITE_DOTS, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_whitedots.png"), + Markings.BLACK_DOTS, + ResourceLocation.withDefaultNamespace("textures/entity/horse/horse_markings_blackdots.png") + ) + ); - public HorseMarkingLayer(RenderLayerParent renderer) { - super(renderer); + public HorseMarkingLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, HorseRenderState horseRenderState, float f, float g) { ResourceLocation resourceLocation = (ResourceLocation)LOCATION_BY_MARKINGS.get(horseRenderState.markings); - if (resourceLocation != null && !horseRenderState.isInvisible) { + if (resourceLocation != INVISIBLE_TEXTURE && !horseRenderState.isInvisible) { VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityTranslucent(resourceLocation)); this.getParentModel().renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(horseRenderState, 0.0F)); } diff --git a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java index bfeb3fd5..dade2643 100644 --- a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java @@ -7,11 +7,12 @@ import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.HumanoidRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.core.component.DataComponents; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.ResourceKey; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.EquipmentModel; +import net.minecraft.world.item.equipment.EquipmentAsset; import net.minecraft.world.item.equipment.Equippable; @Environment(EnvType.CLIENT) @@ -22,60 +23,55 @@ public class HumanoidArmorLayer renderLayerParent, A humanoidModel, A humanoidModel2, EquipmentLayerRenderer equipmentLayerRenderer) { - this(renderLayerParent, humanoidModel, humanoidModel2, humanoidModel, humanoidModel2, equipmentLayerRenderer); + public HumanoidArmorLayer(RenderLayerParent renderer, A innerModel, A outerModel, EquipmentLayerRenderer equipmentRenderer) { + this(renderer, innerModel, outerModel, innerModel, outerModel, equipmentRenderer); } public HumanoidArmorLayer( - RenderLayerParent renderLayerParent, - A humanoidModel, - A humanoidModel2, - A humanoidModel3, - A humanoidModel4, - EquipmentLayerRenderer equipmentLayerRenderer + RenderLayerParent renderer, A innerModel, A outerModel, A innerModelBaby, A outerModelBaby, EquipmentLayerRenderer equipmentRenderer ) { - super(renderLayerParent); - this.innerModel = humanoidModel; - this.outerModel = humanoidModel2; - this.innerModelBaby = humanoidModel3; - this.outerModelBaby = humanoidModel4; - this.equipmentRenderer = equipmentLayerRenderer; + super(renderer); + this.innerModel = innerModel; + this.outerModel = outerModel; + this.innerModelBaby = innerModelBaby; + this.outerModelBaby = outerModelBaby; + this.equipmentRenderer = equipmentRenderer; } - public static boolean shouldRender(ItemStack itemStack, EquipmentSlot equipmentSlot) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - return equippable != null && shouldRender(equippable, equipmentSlot); + public static boolean shouldRender(ItemStack stack, EquipmentSlot slot) { + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); + return equippable != null && shouldRender(equippable, slot); } - private static boolean shouldRender(Equippable equippable, EquipmentSlot equipmentSlot) { - return equippable.model().isPresent() && equippable.slot() == equipmentSlot; + private static boolean shouldRender(Equippable equippable, EquipmentSlot slot) { + return equippable.assetId().isPresent() && equippable.slot() == slot; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S humanoidRenderState, float f, float g) { this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.chestItem, EquipmentSlot.CHEST, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.CHEST) + poseStack, multiBufferSource, humanoidRenderState.chestEquipment, EquipmentSlot.CHEST, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.CHEST) ); this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.legsItem, EquipmentSlot.LEGS, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.LEGS) + poseStack, multiBufferSource, humanoidRenderState.legsEquipment, EquipmentSlot.LEGS, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.LEGS) ); this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.feetItem, EquipmentSlot.FEET, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.FEET) + poseStack, multiBufferSource, humanoidRenderState.feetEquipment, EquipmentSlot.FEET, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.FEET) ); this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.headItem, EquipmentSlot.HEAD, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.HEAD) + poseStack, multiBufferSource, humanoidRenderState.headEquipment, EquipmentSlot.HEAD, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.HEAD) ); } - private void renderArmorPiece( - PoseStack poseStack, MultiBufferSource multiBufferSource, ItemStack itemStack, EquipmentSlot equipmentSlot, int i, A humanoidModel - ) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && shouldRender(equippable, equipmentSlot)) { - this.getParentModel().copyPropertiesTo(humanoidModel); - this.setPartVisibility(humanoidModel, equipmentSlot); - ResourceLocation resourceLocation = (ResourceLocation)equippable.model().orElseThrow(); - EquipmentModel.LayerType layerType = this.usesInnerModel(equipmentSlot) ? EquipmentModel.LayerType.HUMANOID_LEGGINGS : EquipmentModel.LayerType.HUMANOID; - this.equipmentRenderer.renderLayers(layerType, resourceLocation, humanoidModel, itemStack, poseStack, multiBufferSource, i); + private void renderArmorPiece(PoseStack poseStack, MultiBufferSource bufferSource, ItemStack armorItem, EquipmentSlot slot, int packedLight, A model) { + Equippable equippable = armorItem.get(DataComponents.EQUIPPABLE); + if (equippable != null && shouldRender(equippable, slot)) { + this.getParentModel().copyPropertiesTo(model); + this.setPartVisibility(model, slot); + EquipmentClientInfo.LayerType layerType = this.usesInnerModel(slot) + ? EquipmentClientInfo.LayerType.HUMANOID_LEGGINGS + : EquipmentClientInfo.LayerType.HUMANOID; + this.equipmentRenderer + .renderLayers(layerType, (ResourceKey)equippable.assetId().orElseThrow(), model, armorItem, poseStack, bufferSource, packedLight); } } @@ -102,11 +98,11 @@ public class HumanoidArmorLayer renderer) { - super(renderer); + public IronGolemCrackinessLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, IronGolemRenderState ironGolemRenderState, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/layers/ItemInHandLayer.java b/net/minecraft/client/renderer/entity/layers/ItemInHandLayer.java index 5b2af91b..b52a5863 100644 --- a/net/minecraft/client/renderer/entity/layers/ItemInHandLayer.java +++ b/net/minecraft/client/renderer/entity/layers/ItemInHandLayer.java @@ -7,66 +7,34 @@ import net.fabricmc.api.Environment; import net.minecraft.client.model.ArmedModel; import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; -import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; +import net.minecraft.client.renderer.entity.state.ArmedEntityRenderState; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class ItemInHandLayer & ArmedModel> extends RenderLayer { - private final ItemRenderer itemRenderer; - - public ItemInHandLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { +public class ItemInHandLayer & ArmedModel> extends RenderLayer { + public ItemInHandLayer(RenderLayerParent renderLayerParent) { super(renderLayerParent); - this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - this.renderArmWithItem( - livingEntityRenderState, - livingEntityRenderState.rightHandItemModel, - livingEntityRenderState.rightHandItem, - ItemDisplayContext.THIRD_PERSON_RIGHT_HAND, - HumanoidArm.RIGHT, - poseStack, - multiBufferSource, - i - ); - this.renderArmWithItem( - livingEntityRenderState, - livingEntityRenderState.leftHandItemModel, - livingEntityRenderState.leftHandItem, - ItemDisplayContext.THIRD_PERSON_LEFT_HAND, - HumanoidArm.LEFT, - poseStack, - multiBufferSource, - i - ); + public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S armedEntityRenderState, float f, float g) { + this.renderArmWithItem(armedEntityRenderState, armedEntityRenderState.rightHandItem, HumanoidArm.RIGHT, poseStack, multiBufferSource, i); + this.renderArmWithItem(armedEntityRenderState, armedEntityRenderState.leftHandItem, HumanoidArm.LEFT, poseStack, multiBufferSource, i); } protected void renderArmWithItem( - S livingEntityRenderState, - @Nullable BakedModel bakedModel, - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - HumanoidArm humanoidArm, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + S renderState, ItemStackRenderState itemStackRenderState, HumanoidArm arm, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight ) { - if (bakedModel != null && !itemStack.isEmpty()) { + if (!itemStackRenderState.isEmpty()) { poseStack.pushPose(); - this.getParentModel().translateToHand(humanoidArm, poseStack); + this.getParentModel().translateToHand(arm, poseStack); poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F)); poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); - boolean bl = humanoidArm == HumanoidArm.LEFT; + boolean bl = arm == HumanoidArm.LEFT; poseStack.translate((bl ? -1 : 1) / 16.0F, 0.125F, -0.625F); - this.itemRenderer.render(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + itemStackRenderState.render(poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java b/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java index f909a22f..9190cd28 100644 --- a/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java +++ b/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java @@ -23,23 +23,26 @@ public class LivingEntityEmissiveLayer alphaFunction; private final LivingEntityEmissiveLayer.DrawSelector drawSelector; private final Function bufferProvider; + private final boolean alwaysVisible; public LivingEntityEmissiveLayer( - RenderLayerParent renderLayerParent, - ResourceLocation resourceLocation, + RenderLayerParent renderer, + ResourceLocation texture, LivingEntityEmissiveLayer.AlphaFunction alphaFunction, LivingEntityEmissiveLayer.DrawSelector drawSelector, - Function function + Function bufferProvider, + boolean alwaysVisible ) { - super(renderLayerParent); - this.texture = resourceLocation; + super(renderer); + this.texture = texture; this.alphaFunction = alphaFunction; this.drawSelector = drawSelector; - this.bufferProvider = function; + this.bufferProvider = bufferProvider; + this.alwaysVisible = alwaysVisible; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - if (!livingEntityRenderState.isInvisible) { + if (!livingEntityRenderState.isInvisible || this.alwaysVisible) { if (this.onlyDrawSelectedParts(livingEntityRenderState)) { VertexConsumer vertexConsumer = multiBufferSource.getBuffer((RenderType)this.bufferProvider.apply(this.texture)); float h = this.alphaFunction.apply(livingEntityRenderState, livingEntityRenderState.ageInTicks); @@ -50,8 +53,8 @@ public class LivingEntityEmissiveLayer list = this.drawSelector.getPartsToDraw(this.getParentModel(), livingEntityRenderState); + private boolean onlyDrawSelectedParts(S renderState) { + List list = this.drawSelector.getPartsToDraw(this.getParentModel(), renderState); if (list.isEmpty()) { return false; } else { diff --git a/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java b/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java index 1a856edf..8a6f9a30 100644 --- a/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java @@ -9,11 +9,12 @@ import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.LlamaRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.core.component.DataComponents; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.EquipmentModel; -import net.minecraft.world.item.equipment.EquipmentModels; +import net.minecraft.world.item.equipment.EquipmentAsset; +import net.minecraft.world.item.equipment.EquipmentAssets; import net.minecraft.world.item.equipment.Equippable; @Environment(EnvType.CLIENT) @@ -22,30 +23,33 @@ public class LlamaDecorLayer extends RenderLayer { private final LlamaModel babyModel; private final EquipmentLayerRenderer equipmentRenderer; - public LlamaDecorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.equipmentRenderer = equipmentLayerRenderer; - this.adultModel = new LlamaModel(entityModelSet.bakeLayer(ModelLayers.LLAMA_DECOR)); - this.babyModel = new LlamaModel(entityModelSet.bakeLayer(ModelLayers.LLAMA_BABY_DECOR)); + public LlamaDecorLayer(RenderLayerParent renderer, EntityModelSet models, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.equipmentRenderer = equipmentRenderer; + this.adultModel = new LlamaModel(models.bakeLayer(ModelLayers.LLAMA_DECOR)); + this.babyModel = new LlamaModel(models.bakeLayer(ModelLayers.LLAMA_BABY_DECOR)); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, LlamaRenderState llamaRenderState, float f, float g) { ItemStack itemStack = llamaRenderState.bodyItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && equippable.model().isPresent()) { - this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, itemStack, (ResourceLocation)equippable.model().get(), i); + if (equippable != null && equippable.assetId().isPresent()) { + this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, itemStack, (ResourceKey)equippable.assetId().get(), i); } else if (llamaRenderState.isTraderLlama) { - this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, ItemStack.EMPTY, EquipmentModels.TRADER_LLAMA, i); + this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, ItemStack.EMPTY, EquipmentAssets.TRADER_LLAMA, i); } } private void renderEquipment( - PoseStack poseStack, MultiBufferSource multiBufferSource, LlamaRenderState llamaRenderState, ItemStack itemStack, ResourceLocation resourceLocation, int i + PoseStack poseStack, + MultiBufferSource bufferSource, + LlamaRenderState renderState, + ItemStack stack, + ResourceKey equipmentAsset, + int packedLight ) { - LlamaModel llamaModel = llamaRenderState.isBaby ? this.babyModel : this.adultModel; - llamaModel.setupAnim(llamaRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.LLAMA_BODY, resourceLocation, llamaModel, itemStack, poseStack, multiBufferSource, i); + LlamaModel llamaModel = renderState.isBaby ? this.babyModel : this.adultModel; + llamaModel.setupAnim(renderState); + this.equipmentRenderer.renderLayers(EquipmentClientInfo.LayerType.LLAMA_BODY, equipmentAsset, llamaModel, stack, poseStack, bufferSource, packedLight); } } diff --git a/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java b/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java index 14be15b4..0e0e7619 100644 --- a/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java +++ b/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java @@ -8,11 +8,12 @@ import net.minecraft.client.model.CowModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockRenderDispatcher; +import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.MushroomCowRenderState; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.level.block.state.BlockState; @Environment(EnvType.CLIENT) @@ -30,13 +31,13 @@ public class MushroomCowMushroomLayer extends RenderLayer { - private final ItemRenderer itemRenderer; - - public PandaHoldsItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { + public PandaHoldsItemLayer(RenderLayerParent renderLayerParent) { super(renderLayerParent); - this.itemRenderer = itemRenderer; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PandaRenderState pandaRenderState, float f, float g) { - BakedModel bakedModel = pandaRenderState.getMainHandItemModel(); - if (bakedModel != null && pandaRenderState.isSitting && !pandaRenderState.isScared) { + ItemStackRenderState itemStackRenderState = pandaRenderState.heldItem; + if (!itemStackRenderState.isEmpty() && pandaRenderState.isSitting && !pandaRenderState.isScared) { float h = -0.6F; float j = 1.4F; if (pandaRenderState.isEating) { @@ -35,8 +29,7 @@ public class PandaHoldsItemLayer extends RenderLayer & ArmedModel & HeadedModel> extends ItemInHandLayer { - private final ItemRenderer itemRenderer; private static final float X_ROT_MIN = (float) (-Math.PI / 6); private static final float X_ROT_MAX = (float) (Math.PI / 2); - public PlayerItemInHandLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent, itemRenderer); - this.itemRenderer = itemRenderer; + public PlayerItemInHandLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } protected void renderArmWithItem( - S playerRenderState, - @Nullable BakedModel bakedModel, - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - HumanoidArm humanoidArm, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + S playerRenderState, ItemStackRenderState itemStackRenderState, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int i ) { - if (bakedModel != null) { + if (!itemStackRenderState.isEmpty()) { InteractionHand interactionHand = humanoidArm == playerRenderState.mainArm ? InteractionHand.MAIN_HAND : InteractionHand.OFF_HAND; if (playerRenderState.isUsingItem && playerRenderState.useItemHand == interactionHand && playerRenderState.attackTime < 1.0E-5F - && itemStack.is(Items.SPYGLASS)) { - this.renderArmWithSpyglass(bakedModel, itemStack, humanoidArm, poseStack, multiBufferSource, i); + && !playerRenderState.heldOnHead.isEmpty()) { + this.renderItemHeldToEye(playerRenderState.heldOnHead, humanoidArm, poseStack, multiBufferSource, i); } else { - super.renderArmWithItem(playerRenderState, bakedModel, itemStack, itemDisplayContext, humanoidArm, poseStack, multiBufferSource, i); + super.renderArmWithItem(playerRenderState, itemStackRenderState, humanoidArm, poseStack, multiBufferSource, i); } } } - private void renderArmWithSpyglass( - BakedModel bakedModel, ItemStack itemStack, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int i - ) { + private void renderItemHeldToEye(ItemStackRenderState renderState, HumanoidArm arm, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { poseStack.pushPose(); this.getParentModel().root().translateAndRotate(poseStack); ModelPart modelPart = this.getParentModel().getHead(); @@ -66,9 +50,9 @@ public class PlayerItemInHandLayer void coloredCutoutModelCopyLayerRender( - EntityModel entityModel, - ResourceLocation resourceLocation, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - S livingEntityRenderState, - int j + EntityModel model, ResourceLocation textureLocation, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, int color ) { - if (!livingEntityRenderState.isInvisible) { - entityModel.setupAnim(livingEntityRenderState); - renderColoredCutoutModel(entityModel, resourceLocation, poseStack, multiBufferSource, i, livingEntityRenderState, j); + if (!renderState.isInvisible) { + model.setupAnim(renderState); + renderColoredCutoutModel(model, textureLocation, poseStack, bufferSource, packedLight, renderState, color); } } protected static void renderColoredCutoutModel( - EntityModel entityModel, - ResourceLocation resourceLocation, + EntityModel model, + ResourceLocation textureLocation, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - LivingEntityRenderState livingEntityRenderState, - int j + MultiBufferSource bufferSource, + int packedLight, + LivingEntityRenderState renderState, + int color ) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityCutoutNoCull(resourceLocation)); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntityRenderState, 0.0F), j); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entityCutoutNoCull(textureLocation)); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F), color); } public M getParentModel() { return this.renderer.getModel(); } - public abstract void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S entityRenderState, float f, float g); + public abstract void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot); } diff --git a/net/minecraft/client/renderer/entity/layers/SaddleLayer.java b/net/minecraft/client/renderer/entity/layers/SaddleLayer.java deleted file mode 100644 index b320f866..00000000 --- a/net/minecraft/client/renderer/entity/layers/SaddleLayer.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.minecraft.client.renderer.entity.layers; - -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.model.EntityModel; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.RenderLayerParent; -import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; -import net.minecraft.client.renderer.entity.state.SaddleableRenderState; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public class SaddleLayer> extends RenderLayer { - private final ResourceLocation textureLocation; - private final M adultModel; - private final M babyModel; - - public SaddleLayer(RenderLayerParent renderLayerParent, M entityModel, M entityModel2, ResourceLocation resourceLocation) { - super(renderLayerParent); - this.adultModel = entityModel; - this.babyModel = entityModel2; - this.textureLocation = resourceLocation; - } - - public SaddleLayer(RenderLayerParent renderer, M model, ResourceLocation textureLocation) { - this(renderer, model, model, textureLocation); - } - - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - if (livingEntityRenderState.isSaddled()) { - M entityModel = livingEntityRenderState.isBaby ? this.babyModel : this.adultModel; - entityModel.setupAnim(livingEntityRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityCutoutNoCull(this.textureLocation)); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); - } - } -} diff --git a/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java b/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java index cd9b7dd8..e225b805 100644 --- a/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java @@ -15,21 +15,17 @@ import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.SheepRenderState; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.ARGB; -import net.minecraft.util.Mth; -import net.minecraft.world.entity.animal.Sheep; -import net.minecraft.world.item.DyeColor; @Environment(EnvType.CLIENT) public class SheepWoolLayer extends RenderLayer { - private static final ResourceLocation SHEEP_FUR_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/sheep/sheep_fur.png"); + private static final ResourceLocation SHEEP_WOOL_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/sheep/sheep_wool.png"); private final EntityModel adultModel; private final EntityModel babyModel; - public SheepWoolLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet) { - super(renderLayerParent); - this.adultModel = new SheepFurModel(entityModelSet.bakeLayer(ModelLayers.SHEEP_WOOL)); - this.babyModel = new SheepFurModel(entityModelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL)); + public SheepWoolLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + super(renderer); + this.adultModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_WOOL)); + this.babyModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL)); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, SheepRenderState sheepRenderState, float f, float g) { @@ -38,27 +34,11 @@ public class SheepWoolLayer extends RenderLayer { if (sheepRenderState.isInvisible) { if (sheepRenderState.appearsGlowing) { entityModel.setupAnim(sheepRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.outline(SHEEP_FUR_LOCATION)); + VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.outline(SHEEP_WOOL_LOCATION)); entityModel.renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(sheepRenderState, 0.0F), -16777216); } } else { - int r; - if (sheepRenderState.customName != null && "jeb_".equals(sheepRenderState.customName.getString())) { - int j = 25; - int k = Mth.floor(sheepRenderState.ageInTicks); - int l = k / 25 + sheepRenderState.id; - int m = DyeColor.values().length; - int n = l % m; - int o = (l + 1) % m; - float h = (k % 25 + Mth.frac(sheepRenderState.ageInTicks)) / 25.0F; - int p = Sheep.getColor(DyeColor.byId(n)); - int q = Sheep.getColor(DyeColor.byId(o)); - r = ARGB.lerp(h, p, q); - } else { - r = Sheep.getColor(sheepRenderState.woolColor); - } - - coloredCutoutModelCopyLayerRender(entityModel, SHEEP_FUR_LOCATION, poseStack, multiBufferSource, i, sheepRenderState, r); + coloredCutoutModelCopyLayerRender(entityModel, SHEEP_WOOL_LOCATION, poseStack, multiBufferSource, i, sheepRenderState, sheepRenderState.getWoolColor()); } } } diff --git a/net/minecraft/client/renderer/entity/layers/SheepWoolUndercoatLayer.java b/net/minecraft/client/renderer/entity/layers/SheepWoolUndercoatLayer.java new file mode 100644 index 00000000..5b4e222d --- /dev/null +++ b/net/minecraft/client/renderer/entity/layers/SheepWoolUndercoatLayer.java @@ -0,0 +1,37 @@ +package net.minecraft.client.renderer.entity.layers; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.EntityModel; +import net.minecraft.client.model.SheepFurModel; +import net.minecraft.client.model.SheepModel; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.RenderLayerParent; +import net.minecraft.client.renderer.entity.state.SheepRenderState; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.DyeColor; + +@Environment(EnvType.CLIENT) +public class SheepWoolUndercoatLayer extends RenderLayer { + private static final ResourceLocation SHEEP_WOOL_UNDERCOAT_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/sheep/sheep_wool_undercoat.png"); + private final EntityModel adultModel; + private final EntityModel babyModel; + + public SheepWoolUndercoatLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + super(renderer); + this.adultModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_WOOL_UNDERCOAT)); + this.babyModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL_UNDERCOAT)); + } + + public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, SheepRenderState sheepRenderState, float f, float g) { + if (!sheepRenderState.isInvisible && (sheepRenderState.isJebSheep() || sheepRenderState.woolColor != DyeColor.WHITE)) { + EntityModel entityModel = sheepRenderState.isBaby ? this.babyModel : this.adultModel; + coloredCutoutModelCopyLayerRender( + entityModel, SHEEP_WOOL_UNDERCOAT_LOCATION, poseStack, multiBufferSource, i, sheepRenderState, sheepRenderState.getWoolColor() + ); + } + } +} diff --git a/net/minecraft/client/renderer/entity/layers/SimpleEquipmentLayer.java b/net/minecraft/client/renderer/entity/layers/SimpleEquipmentLayer.java new file mode 100644 index 00000000..a51de79e --- /dev/null +++ b/net/minecraft/client/renderer/entity/layers/SimpleEquipmentLayer.java @@ -0,0 +1,59 @@ +package net.minecraft.client.renderer.entity.layers; + +import com.mojang.blaze3d.vertex.PoseStack; +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.EntityModel; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.RenderLayerParent; +import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; +import net.minecraft.client.resources.model.EquipmentClientInfo; +import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.equipment.EquipmentAsset; +import net.minecraft.world.item.equipment.Equippable; + +@Environment(EnvType.CLIENT) +public class SimpleEquipmentLayer, EM extends EntityModel> + extends RenderLayer { + private final EquipmentLayerRenderer equipmentRenderer; + private final EquipmentClientInfo.LayerType layer; + private final Function itemGetter; + private final EM adultModel; + private final EM babyModel; + + public SimpleEquipmentLayer( + RenderLayerParent renderer, + EquipmentLayerRenderer equipmentRenderer, + EquipmentClientInfo.LayerType layer, + Function itemGetter, + EM adultModel, + EM babyModel + ) { + super(renderer); + this.equipmentRenderer = equipmentRenderer; + this.layer = layer; + this.itemGetter = itemGetter; + this.adultModel = adultModel; + this.babyModel = babyModel; + } + + public SimpleEquipmentLayer( + RenderLayerParent renderer, EquipmentLayerRenderer equipmentRenderer, EM model, EquipmentClientInfo.LayerType layer, Function itemGetter + ) { + this(renderer, equipmentRenderer, layer, itemGetter, model, model); + } + + public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { + ItemStack itemStack = (ItemStack)this.itemGetter.apply(livingEntityRenderState); + Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); + if (equippable != null && !equippable.assetId().isEmpty()) { + EM entityModel = livingEntityRenderState.isBaby ? this.babyModel : this.adultModel; + entityModel.setupAnim(livingEntityRenderState); + this.equipmentRenderer + .renderLayers(this.layer, (ResourceKey)equippable.assetId().get(), entityModel, itemStack, poseStack, multiBufferSource, i); + } + } +} diff --git a/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java b/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java index 81c3b5c2..07bad114 100644 --- a/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java @@ -1,71 +1,50 @@ package net.minecraft.client.renderer.entity.layers; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.SnowGolemModel; +import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockRenderDispatcher; -import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.block.ModelBlockRenderer; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; -import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; +import net.minecraft.client.renderer.entity.state.SnowGolemRenderState; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.ItemDisplayContext; -import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; @Environment(EnvType.CLIENT) -public class SnowGolemHeadLayer extends RenderLayer { +public class SnowGolemHeadLayer extends RenderLayer { private final BlockRenderDispatcher blockRenderer; - private final ItemRenderer itemRenderer; - public SnowGolemHeadLayer(RenderLayerParent renderer, BlockRenderDispatcher blockRenderer, ItemRenderer itemRenderer) { + public SnowGolemHeadLayer(RenderLayerParent renderer, BlockRenderDispatcher blockRenderer) { super(renderer); this.blockRenderer = blockRenderer; - this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, LivingEntityRenderState livingEntityRenderState, float f, float g) { - BakedModel bakedModel = livingEntityRenderState.headItemModel; - if (bakedModel != null) { - boolean bl = livingEntityRenderState.appearsGlowing && livingEntityRenderState.isInvisible; - if (!livingEntityRenderState.isInvisible || bl) { + public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, SnowGolemRenderState snowGolemRenderState, float f, float g) { + if (snowGolemRenderState.hasPumpkin) { + if (!snowGolemRenderState.isInvisible || snowGolemRenderState.appearsGlowing) { poseStack.pushPose(); this.getParentModel().getHead().translateAndRotate(poseStack); float h = 0.625F; poseStack.translate(0.0F, -0.34375F, 0.0F); poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); poseStack.scale(0.625F, -0.625F, -0.625F); - ItemStack itemStack = livingEntityRenderState.headItem; - if (bl && itemStack.getItem() instanceof BlockItem blockItem) { - BlockState blockState = blockItem.getBlock().defaultBlockState(); - BakedModel bakedModel2 = this.blockRenderer.getBlockModel(blockState); - int j = LivingEntityRenderer.getOverlayCoords(livingEntityRenderState, 0.0F); - poseStack.translate(-0.5F, -0.5F, -0.5F); - this.blockRenderer - .getModelRenderer() - .renderModel( - poseStack.last(), multiBufferSource.getBuffer(RenderType.outline(TextureAtlas.LOCATION_BLOCKS)), blockState, bakedModel2, 0.0F, 0.0F, 0.0F, i, j - ); - } else { - this.itemRenderer - .render( - itemStack, - ItemDisplayContext.HEAD, - false, - poseStack, - multiBufferSource, - i, - LivingEntityRenderer.getOverlayCoords(livingEntityRenderState, 0.0F), - bakedModel - ); - } - + BlockState blockState = Blocks.CARVED_PUMPKIN.defaultBlockState(); + BlockStateModel blockStateModel = this.blockRenderer.getBlockModel(blockState); + int j = LivingEntityRenderer.getOverlayCoords(snowGolemRenderState, 0.0F); + poseStack.translate(-0.5F, -0.5F, -0.5F); + VertexConsumer vertexConsumer = snowGolemRenderState.appearsGlowing && snowGolemRenderState.isInvisible + ? multiBufferSource.getBuffer(RenderType.outline(TextureAtlas.LOCATION_BLOCKS)) + : multiBufferSource.getBuffer(ItemBlockRenderTypes.getRenderType(blockState)); + ModelBlockRenderer.renderModel(poseStack.last(), vertexConsumer, blockStateModel, 0.0F, 0.0F, 0.0F, i, j); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/StuckInBodyLayer.java b/net/minecraft/client/renderer/entity/layers/StuckInBodyLayer.java index 3539dcbe..9136b585 100644 --- a/net/minecraft/client/renderer/entity/layers/StuckInBodyLayer.java +++ b/net/minecraft/client/renderer/entity/layers/StuckInBodyLayer.java @@ -22,26 +22,23 @@ public abstract class StuckInBodyLayer extends RenderLaye private final StuckInBodyLayer.PlacementStyle placementStyle; public StuckInBodyLayer( - LivingEntityRenderer livingEntityRenderer, - Model model, - ResourceLocation resourceLocation, - StuckInBodyLayer.PlacementStyle placementStyle + LivingEntityRenderer renderer, Model model, ResourceLocation texture, StuckInBodyLayer.PlacementStyle placementStyle ) { - super(livingEntityRenderer); + super(renderer); this.model = model; - this.texture = resourceLocation; + this.texture = texture; this.placementStyle = placementStyle; } - protected abstract int numStuck(PlayerRenderState playerRenderState); + protected abstract int numStuck(PlayerRenderState renderState); - private void renderStuckItem(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, float f, float g, float h) { - float j = Mth.sqrt(f * f + h * h); - float k = (float)(Math.atan2(f, h) * 180.0F / (float)Math.PI); - float l = (float)(Math.atan2(g, j) * 180.0F / (float)Math.PI); - poseStack.mulPose(Axis.YP.rotationDegrees(k - 90.0F)); - poseStack.mulPose(Axis.ZP.rotationDegrees(l)); - this.model.renderToBuffer(poseStack, multiBufferSource.getBuffer(this.model.renderType(this.texture)), i, OverlayTexture.NO_OVERLAY); + private void renderStuckItem(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, float x, float y, float z) { + float f = Mth.sqrt(x * x + z * z); + float g = (float)(Math.atan2(x, z) * 180.0F / (float)Math.PI); + float h = (float)(Math.atan2(y, f) * 180.0F / (float)Math.PI); + poseStack.mulPose(Axis.YP.rotationDegrees(g - 90.0F)); + poseStack.mulPose(Axis.ZP.rotationDegrees(h)); + this.model.renderToBuffer(poseStack, bufferSource.getBuffer(this.model.renderType(this.texture)), packedLight, OverlayTexture.NO_OVERLAY); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PlayerRenderState playerRenderState, float f, float g) { @@ -78,8 +75,8 @@ public abstract class StuckInBodyLayer extends RenderLaye } } - private static float snapToFace(float f) { - return f > 0.5F ? 1.0F : 0.5F; + private static float snapToFace(float value) { + return value > 0.5F ? 1.0F : 0.5F; } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java b/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java index c0142b0f..69201818 100644 --- a/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java +++ b/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java @@ -38,7 +38,7 @@ public class TropicalFishPatternLayer extends RenderLayer entityModel = (EntityModel)(switch (pattern.base()) { case SMALL -> this.modelA; diff --git a/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java b/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java index b05ec4f7..e903a17b 100644 --- a/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java +++ b/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java @@ -12,15 +12,15 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.model.EntityModel; -import net.minecraft.client.model.VillagerHeadModel; +import net.minecraft.client.model.VillagerLikeModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; import net.minecraft.client.renderer.entity.state.VillagerDataHolderRenderState; -import net.minecraft.client.resources.metadata.animation.VillagerMetaDataSection; -import net.minecraft.client.resources.metadata.animation.VillagerMetaDataSection.Hat; -import net.minecraft.core.DefaultedRegistry; -import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; +import net.minecraft.client.resources.metadata.animation.VillagerMetadataSection; +import net.minecraft.core.Holder; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.util.Mth; @@ -29,7 +29,7 @@ import net.minecraft.world.entity.npc.VillagerProfession; import net.minecraft.world.entity.npc.VillagerType; @Environment(EnvType.CLIENT) -public class VillagerProfessionLayer & VillagerHeadModel> +public class VillagerProfessionLayer & VillagerLikeModel> extends RenderLayer { private static final Int2ObjectMap LEVEL_LOCATIONS = Util.make(new Int2ObjectOpenHashMap<>(), int2ObjectOpenHashMap -> { int2ObjectOpenHashMap.put(1, ResourceLocation.withDefaultNamespace("stone")); @@ -38,8 +38,8 @@ public class VillagerProfessionLayer typeHatCache = new Object2ObjectOpenHashMap<>(); - private final Object2ObjectMap professionHatCache = new Object2ObjectOpenHashMap<>(); + private final Object2ObjectMap, VillagerMetadataSection.Hat> typeHatCache = new Object2ObjectOpenHashMap<>(); + private final Object2ObjectMap, VillagerMetadataSection.Hat> professionHatCache = new Object2ObjectOpenHashMap<>(); private final ResourceManager resourceManager; private final String path; @@ -52,23 +52,25 @@ public class VillagerProfessionLayer holder = villagerData.type(); + Holder holder2 = villagerData.profession(); + VillagerMetadataSection.Hat hat = this.getHatData(this.typeHatCache, "type", holder); + VillagerMetadataSection.Hat hat2 = this.getHatData(this.professionHatCache, "profession", holder2); + M entityModel = this.getParentModel(); + entityModel.hatVisible(hat2 == VillagerMetadataSection.Hat.NONE || hat2 == VillagerMetadataSection.Hat.PARTIAL && hat != VillagerMetadataSection.Hat.FULL); + ResourceLocation resourceLocation = this.getResourceLocation("type", holder); + renderColoredCutoutModel(entityModel, resourceLocation, poseStack, multiBufferSource, i, livingEntityRenderState, -1); + entityModel.hatVisible(true); + if (!holder2.is(VillagerProfession.NONE) && !livingEntityRenderState.isBaby) { + ResourceLocation resourceLocation2 = this.getResourceLocation("profession", holder2); + renderColoredCutoutModel(entityModel, resourceLocation2, poseStack, multiBufferSource, i, livingEntityRenderState, -1); + if (!holder2.is(VillagerProfession.NITWIT)) { + ResourceLocation resourceLocation3 = this.getResourceLocation( + "profession_level", LEVEL_LOCATIONS.get(Mth.clamp(villagerData.level(), 1, LEVEL_LOCATIONS.size())) + ); + renderColoredCutoutModel(entityModel, resourceLocation3, poseStack, multiBufferSource, i, livingEntityRenderState, -1); + } } } } @@ -78,15 +80,25 @@ public class VillagerProfessionLayer)(string2 -> "textures/entity/" + this.path + "/" + folder + "/" + string2 + ".png")); } - public Hat getHatData(Object2ObjectMap cache, String folder, DefaultedRegistry villagerTypeRegistry, K key) { - return cache.computeIfAbsent( - key, object2 -> (Hat)this.resourceManager.getResource(this.getResourceLocation(folder, villagerTypeRegistry.getKey(key))).flatMap(resource -> { - try { - return resource.metadata().getSection(VillagerMetaDataSection.SERIALIZER).map(VillagerMetaDataSection::getHat); - } catch (IOException var2) { - return Optional.empty(); - } - }).orElse(Hat.NONE) - ); + private ResourceLocation getResourceLocation(String folder, Holder holder) { + return (ResourceLocation)holder.unwrapKey() + .map(resourceKey -> this.getResourceLocation(folder, resourceKey.location())) + .orElse(MissingTextureAtlasSprite.getLocation()); + } + + public VillagerMetadataSection.Hat getHatData(Object2ObjectMap, VillagerMetadataSection.Hat> cache, String folder, Holder key) { + ResourceKey resourceKey = (ResourceKey)key.unwrapKey().orElse(null); + return resourceKey == null + ? VillagerMetadataSection.Hat.NONE + : cache.computeIfAbsent( + resourceKey, + object -> (VillagerMetadataSection.Hat)this.resourceManager.getResource(this.getResourceLocation(folder, resourceKey.location())).flatMap(resource -> { + try { + return resource.metadata().getSection(VillagerMetadataSection.TYPE).map(VillagerMetadataSection::hat); + } catch (IOException var2) { + return Optional.empty(); + } + }).orElse(VillagerMetadataSection.Hat.NONE) + ); } } diff --git a/net/minecraft/client/renderer/entity/layers/WingsLayer.java b/net/minecraft/client/renderer/entity/layers/WingsLayer.java index 1530fae6..3dc4d430 100644 --- a/net/minecraft/client/renderer/entity/layers/WingsLayer.java +++ b/net/minecraft/client/renderer/entity/layers/WingsLayer.java @@ -12,10 +12,12 @@ import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.HumanoidRenderState; import net.minecraft.client.renderer.entity.state.PlayerRenderState; import net.minecraft.client.resources.PlayerSkin; +import net.minecraft.client.resources.model.EquipmentClientInfo; import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.equipment.EquipmentModel; +import net.minecraft.world.item.equipment.EquipmentAsset; import net.minecraft.world.item.equipment.Equippable; import org.jetbrains.annotations.Nullable; @@ -25,32 +27,40 @@ public class WingsLayer> private final ElytraModel elytraBabyModel; private final EquipmentLayerRenderer equipmentRenderer; - public WingsLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer) { - super(renderLayerParent); - this.elytraModel = new ElytraModel(entityModelSet.bakeLayer(ModelLayers.ELYTRA)); - this.elytraBabyModel = new ElytraModel(entityModelSet.bakeLayer(ModelLayers.ELYTRA_BABY)); - this.equipmentRenderer = equipmentLayerRenderer; + public WingsLayer(RenderLayerParent renderer, EntityModelSet models, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.elytraModel = new ElytraModel(models.bakeLayer(ModelLayers.ELYTRA)); + this.elytraBabyModel = new ElytraModel(models.bakeLayer(ModelLayers.ELYTRA_BABY)); + this.equipmentRenderer = equipmentRenderer; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S humanoidRenderState, float f, float g) { - ItemStack itemStack = humanoidRenderState.chestItem; + ItemStack itemStack = humanoidRenderState.chestEquipment; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && !equippable.model().isEmpty()) { + if (equippable != null && !equippable.assetId().isEmpty()) { ResourceLocation resourceLocation = getPlayerElytraTexture(humanoidRenderState); ElytraModel elytraModel = humanoidRenderState.isBaby ? this.elytraBabyModel : this.elytraModel; - ResourceLocation resourceLocation2 = (ResourceLocation)equippable.model().get(); poseStack.pushPose(); poseStack.translate(0.0F, 0.0F, 0.125F); elytraModel.setupAnim(humanoidRenderState); this.equipmentRenderer - .renderLayers(EquipmentModel.LayerType.WINGS, resourceLocation2, elytraModel, itemStack, poseStack, multiBufferSource, i, resourceLocation); + .renderLayers( + EquipmentClientInfo.LayerType.WINGS, + (ResourceKey)equippable.assetId().get(), + elytraModel, + itemStack, + poseStack, + multiBufferSource, + i, + resourceLocation + ); poseStack.popPose(); } } @Nullable - private static ResourceLocation getPlayerElytraTexture(HumanoidRenderState humanoidRenderState) { - if (humanoidRenderState instanceof PlayerRenderState playerRenderState) { + private static ResourceLocation getPlayerElytraTexture(HumanoidRenderState renderState) { + if (renderState instanceof PlayerRenderState playerRenderState) { PlayerSkin playerSkin = playerRenderState.skin; if (playerSkin.elytraTexture() != null) { return playerSkin.elytraTexture(); diff --git a/net/minecraft/client/renderer/entity/layers/WitchItemLayer.java b/net/minecraft/client/renderer/entity/layers/WitchItemLayer.java index eca956cc..3b174334 100644 --- a/net/minecraft/client/renderer/entity/layers/WitchItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/WitchItemLayer.java @@ -5,21 +5,17 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.WitchModel; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.WitchRenderState; -import net.minecraft.world.item.Items; @Environment(EnvType.CLIENT) public class WitchItemLayer extends CrossedArmsItemLayer { - public WitchItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent, itemRenderer); + public WitchItemLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, WitchRenderState witchRenderState, float f, float g) { - poseStack.pushPose(); - if (witchRenderState.rightHandItem.is(Items.POTION)) { + protected void applyTranslation(WitchRenderState witchRenderState, PoseStack poseStack) { + if (witchRenderState.isHoldingPotion) { this.getParentModel().root().translateAndRotate(poseStack); this.getParentModel().getHead().translateAndRotate(poseStack); this.getParentModel().getNose().translateAndRotate(poseStack); @@ -27,10 +23,9 @@ public class WitchItemLayer extends CrossedArmsItemLayer { ResourceLocation.withDefaultNamespace("textures/entity/wolf/wolf_armor_crackiness_high.png") ); - public WolfArmorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.adultModel = new WolfModel(entityModelSet.bakeLayer(ModelLayers.WOLF_ARMOR)); - this.babyModel = new WolfModel(entityModelSet.bakeLayer(ModelLayers.WOLF_BABY_ARMOR)); - this.equipmentRenderer = equipmentLayerRenderer; + public WolfArmorLayer(RenderLayerParent renderer, EntityModelSet entityModels, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.adultModel = new WolfModel(entityModels.bakeLayer(ModelLayers.WOLF_ARMOR)); + this.babyModel = new WolfModel(entityModels.bakeLayer(ModelLayers.WOLF_BABY_ARMOR)); + this.equipmentRenderer = equipmentRenderer; } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, WolfRenderState wolfRenderState, float f, float g) { ItemStack itemStack = wolfRenderState.bodyArmorItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && !equippable.model().isEmpty()) { + if (equippable != null && !equippable.assetId().isEmpty()) { WolfModel wolfModel = wolfRenderState.isBaby ? this.babyModel : this.adultModel; - ResourceLocation resourceLocation = (ResourceLocation)equippable.model().get(); wolfModel.setupAnim(wolfRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.WOLF_BODY, resourceLocation, wolfModel, itemStack, poseStack, multiBufferSource, i); + this.equipmentRenderer + .renderLayers( + EquipmentClientInfo.LayerType.WOLF_BODY, (ResourceKey)equippable.assetId().get(), wolfModel, itemStack, poseStack, multiBufferSource, i + ); this.maybeRenderCracks(poseStack, multiBufferSource, i, itemStack, wolfModel); } } - private void maybeRenderCracks(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ItemStack itemStack, Model model) { - Level level = Crackiness.WOLF_ARMOR.byDamage(itemStack); + private void maybeRenderCracks(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ItemStack armorItem, Model model) { + Level level = Crackiness.WOLF_ARMOR.byDamage(armorItem); if (level != Level.NONE) { ResourceLocation resourceLocation = (ResourceLocation)ARMOR_CRACK_LOCATIONS.get(level); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.armorTranslucent(resourceLocation)); - model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.armorTranslucent(resourceLocation)); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } } } diff --git a/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java b/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java index 6ad13f8c..b56055e8 100644 --- a/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java +++ b/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java @@ -17,8 +17,8 @@ import net.minecraft.world.item.DyeColor; public class WolfCollarLayer extends RenderLayer { private static final ResourceLocation WOLF_COLLAR_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/wolf/wolf_collar.png"); - public WolfCollarLayer(RenderLayerParent renderer) { - super(renderer); + public WolfCollarLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, WolfRenderState wolfRenderState, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java index 887e2126..8b2a2916 100644 --- a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java +++ b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java @@ -5,16 +5,16 @@ import com.mojang.math.Axis; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.HumanoidArmorModel; -import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.model.PlayerModel; +import net.minecraft.client.model.HumanoidModel.ArmPose; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.HumanoidMobRenderer; import net.minecraft.client.renderer.entity.LivingEntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; import net.minecraft.client.renderer.entity.layers.ArrowLayer; import net.minecraft.client.renderer.entity.layers.BeeStingerLayer; import net.minecraft.client.renderer.entity.layers.CapeLayer; @@ -37,8 +37,10 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.animal.Parrot; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.PlayerModelPart; import net.minecraft.world.item.CrossbowItem; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemUseAnimation; import net.minecraft.world.item.Items; @@ -51,7 +53,7 @@ import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class PlayerRenderer extends LivingEntityRenderer { - public PlayerRenderer(EntityRendererProvider.Context context, boolean useSlimModel) { + public PlayerRenderer(Context context, boolean useSlimModel) { super(context, new PlayerModel(context.bakeLayer(useSlimModel ? ModelLayers.PLAYER_SLIM : ModelLayers.PLAYER), useSlimModel), 0.5F); this.addLayer( new HumanoidArmorLayer<>( @@ -61,11 +63,11 @@ public class PlayerRenderer extends LivingEntityRenderer(this, context.getItemRenderer())); + this.addLayer(new PlayerItemInHandLayer<>(this)); this.addLayer(new ArrowLayer<>(this, context)); this.addLayer(new Deadmau5EarsLayer(this, context.getModelSet())); - this.addLayer(new CapeLayer(this, context.getModelSet(), context.getEquipmentModels())); - this.addLayer(new CustomHeadLayer<>(this, context.getModelSet(), context.getItemRenderer())); + this.addLayer(new CapeLayer(this, context.getModelSet(), context.getEquipmentAssets())); + this.addLayer(new CustomHeadLayer<>(this, context.getModelSet())); this.addLayer(new WingsLayer<>(this, context.getModelSet(), context.getEquipmentRenderer())); this.addLayer(new ParrotOnShoulderLayer(this, context.getModelSet())); this.addLayer(new SpinAttackEffectLayer(this, context.getModelSet())); @@ -81,54 +83,56 @@ public class PlayerRenderer extends LivingEntityRenderer 0) { - ItemUseAnimation itemUseAnimation = handState.useAnimation; + if (player.getUsedItemHand() == hand && player.getUseItemRemainingTicks() > 0) { + ItemUseAnimation itemUseAnimation = stack.getUseAnimation(); if (itemUseAnimation == ItemUseAnimation.BLOCK) { - return HumanoidModel.ArmPose.BLOCK; + return ArmPose.BLOCK; } if (itemUseAnimation == ItemUseAnimation.BOW) { - return HumanoidModel.ArmPose.BOW_AND_ARROW; + return ArmPose.BOW_AND_ARROW; } if (itemUseAnimation == ItemUseAnimation.SPEAR) { - return HumanoidModel.ArmPose.THROW_SPEAR; + return ArmPose.THROW_SPEAR; } if (itemUseAnimation == ItemUseAnimation.CROSSBOW) { - return HumanoidModel.ArmPose.CROSSBOW_CHARGE; + return ArmPose.CROSSBOW_CHARGE; } if (itemUseAnimation == ItemUseAnimation.SPYGLASS) { - return HumanoidModel.ArmPose.SPYGLASS; + return ArmPose.SPYGLASS; } if (itemUseAnimation == ItemUseAnimation.TOOT_HORN) { - return HumanoidModel.ArmPose.TOOT_HORN; + return ArmPose.TOOT_HORN; } if (itemUseAnimation == ItemUseAnimation.BRUSH) { - return HumanoidModel.ArmPose.BRUSH; + return ArmPose.BRUSH; } - } else if (!playerRenderState.swinging && handState.holdsChargedCrossbow) { - return HumanoidModel.ArmPose.CROSSBOW_HOLD; } - return HumanoidModel.ArmPose.ITEM; + return ArmPose.ITEM; } } @@ -158,7 +162,9 @@ public class PlayerRenderer extends LivingEntityRenderer 0.0 && e > 0.0) { - playerRenderState.shouldApplyFlyingYRot = true; - double g = (vec32.x * vec3.x + vec32.z * vec3.z) / Math.sqrt(d * e); - double h = vec32.x * vec3.z - vec32.z * vec3.x; - playerRenderState.flyingYRot = (float)(Math.signum(h) * Math.acos(g)); - } else { - playerRenderState.shouldApplyFlyingYRot = false; - playerRenderState.flyingYRot = 0.0F; + playerRenderState.heldOnHead.clear(); + if (playerRenderState.isUsingItem) { + ItemStack itemStack = abstractClientPlayer.getItemInHand(playerRenderState.useItemHand); + if (itemStack.is(Items.SPYGLASS)) { + this.itemModelResolver.updateForLiving(playerRenderState.heldOnHead, itemStack, ItemDisplayContext.HEAD, abstractClientPlayer); + } } } - private void extractHandState(AbstractClientPlayer abstractClientPlayer, PlayerRenderState.HandState handState, InteractionHand interactionHand) { - ItemStack itemStack = abstractClientPlayer.getItemInHand(interactionHand); - handState.isEmpty = itemStack.isEmpty(); - handState.useAnimation = !itemStack.isEmpty() ? itemStack.getUseAnimation() : null; - handState.holdsChargedCrossbow = itemStack.is(Items.CROSSBOW) && CrossbowItem.isCharged(itemStack); + private static void extractFlightData(AbstractClientPlayer player, PlayerRenderState renderState, float partialTick) { + renderState.fallFlyingTimeInTicks = player.getFallFlyingTicks() + partialTick; + Vec3 vec3 = player.getViewVector(partialTick); + Vec3 vec32 = player.getDeltaMovementLerped(partialTick); + if (vec32.horizontalDistanceSqr() > 1.0E-5F && vec3.horizontalDistanceSqr() > 1.0E-5F) { + renderState.shouldApplyFlyingYRot = true; + double d = vec32.horizontal().normalize().dot(vec3.horizontal().normalize()); + double e = vec32.x * vec3.z - vec32.z * vec3.x; + renderState.flyingYRot = (float)(Math.signum(e) * Math.acos(Math.min(1.0, Math.abs(d)))); + } else { + renderState.shouldApplyFlyingYRot = false; + renderState.flyingYRot = 0.0F; + } } - private static void extractCapeState(AbstractClientPlayer abstractClientPlayer, PlayerRenderState playerRenderState, float f) { - double d = Mth.lerp((double)f, abstractClientPlayer.xCloakO, abstractClientPlayer.xCloak) - - Mth.lerp((double)f, abstractClientPlayer.xo, abstractClientPlayer.getX()); - double e = Mth.lerp((double)f, abstractClientPlayer.yCloakO, abstractClientPlayer.yCloak) - - Mth.lerp((double)f, abstractClientPlayer.yo, abstractClientPlayer.getY()); - double g = Mth.lerp((double)f, abstractClientPlayer.zCloakO, abstractClientPlayer.zCloak) - - Mth.lerp((double)f, abstractClientPlayer.zo, abstractClientPlayer.getZ()); - float h = Mth.rotLerp(f, abstractClientPlayer.yBodyRotO, abstractClientPlayer.yBodyRot); - double i = Mth.sin(h * (float) (Math.PI / 180.0)); - double j = -Mth.cos(h * (float) (Math.PI / 180.0)); - playerRenderState.capeFlap = (float)e * 10.0F; - playerRenderState.capeFlap = Mth.clamp(playerRenderState.capeFlap, -6.0F, 32.0F); - playerRenderState.capeLean = (float)(d * i + g * j) * 100.0F; - playerRenderState.capeLean = playerRenderState.capeLean * (1.0F - playerRenderState.fallFlyingScale()); - playerRenderState.capeLean = Mth.clamp(playerRenderState.capeLean, 0.0F, 150.0F); - playerRenderState.capeLean2 = (float)(d * j - g * i) * 100.0F; - playerRenderState.capeLean2 = Mth.clamp(playerRenderState.capeLean2, -20.0F, 20.0F); - float k = Mth.lerp(f, abstractClientPlayer.oBob, abstractClientPlayer.bob); - float l = Mth.lerp(f, abstractClientPlayer.walkDistO, abstractClientPlayer.walkDist); - playerRenderState.capeFlap = playerRenderState.capeFlap + Mth.sin(l * 6.0F) * 32.0F * k; + private static void extractCapeState(AbstractClientPlayer player, PlayerRenderState renderState, float partialTick) { + double d = Mth.lerp((double)partialTick, player.xCloakO, player.xCloak) - Mth.lerp((double)partialTick, player.xo, player.getX()); + double e = Mth.lerp((double)partialTick, player.yCloakO, player.yCloak) - Mth.lerp((double)partialTick, player.yo, player.getY()); + double f = Mth.lerp((double)partialTick, player.zCloakO, player.zCloak) - Mth.lerp((double)partialTick, player.zo, player.getZ()); + float g = Mth.rotLerp(partialTick, player.yBodyRotO, player.yBodyRot); + double h = Mth.sin(g * (float) (Math.PI / 180.0)); + double i = -Mth.cos(g * (float) (Math.PI / 180.0)); + renderState.capeFlap = (float)e * 10.0F; + renderState.capeFlap = Mth.clamp(renderState.capeFlap, -6.0F, 32.0F); + renderState.capeLean = (float)(d * h + f * i) * 100.0F; + renderState.capeLean = renderState.capeLean * (1.0F - renderState.fallFlyingScale()); + renderState.capeLean = Mth.clamp(renderState.capeLean, 0.0F, 150.0F); + renderState.capeLean2 = (float)(d * i - f * h) * 100.0F; + renderState.capeLean2 = Mth.clamp(renderState.capeLean2, -20.0F, 20.0F); + float j = Mth.lerp(partialTick, player.oBob, player.bob); + float k = Mth.lerp(partialTick, player.walkDistO, player.walkDist); + renderState.capeFlap = renderState.capeFlap + Mth.sin(k * 6.0F) * 32.0F * j; } @Nullable - private static Parrot.Variant getParrotOnShoulder(AbstractClientPlayer abstractClientPlayer, boolean bl) { - CompoundTag compoundTag = bl ? abstractClientPlayer.getShoulderEntityLeft() : abstractClientPlayer.getShoulderEntityRight(); - return EntityType.byString(compoundTag.getString("id")).filter(entityType -> entityType == EntityType.PARROT).isPresent() - ? Parrot.Variant.byId(compoundTag.getInt("Variant")) - : null; + private static Parrot.Variant getParrotOnShoulder(AbstractClientPlayer player, boolean leftShoulder) { + CompoundTag compoundTag = leftShoulder ? player.getShoulderEntityLeft() : player.getShoulderEntityRight(); + if (compoundTag.isEmpty()) { + return null; + } else { + EntityType entityType = (EntityType)compoundTag.read("id", EntityType.CODEC).orElse(null); + return entityType == EntityType.PARROT ? (Parrot.Variant)compoundTag.read("Variant", Parrot.Variant.LEGACY_CODEC).orElse(Parrot.Variant.RED_BLUE) : null; + } } - public void renderRightHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, boolean bl) { - this.renderHand(poseStack, multiBufferSource, i, resourceLocation, this.model.rightArm, bl); + public void renderRightHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, boolean isSleeveVisible) { + this.renderHand(poseStack, bufferSource, packedLight, skinTexture, this.model.rightArm, isSleeveVisible); } - public void renderLeftHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, boolean bl) { - this.renderHand(poseStack, multiBufferSource, i, resourceLocation, this.model.leftArm, bl); + public void renderLeftHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, boolean isSleeveVisible) { + this.renderHand(poseStack, bufferSource, packedLight, skinTexture, this.model.leftArm, isSleeveVisible); } - private void renderHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, ModelPart modelPart, boolean bl) { + private void renderHand( + PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, ModelPart arm, boolean isSleeveVisible + ) { PlayerModel playerModel = this.getModel(); - modelPart.resetPose(); - modelPart.visible = true; - playerModel.leftSleeve.visible = bl; - playerModel.rightSleeve.visible = bl; + arm.resetPose(); + arm.visible = true; + playerModel.leftSleeve.visible = isSleeveVisible; + playerModel.rightSleeve.visible = isSleeveVisible; playerModel.leftArm.zRot = -0.1F; playerModel.rightArm.zRot = 0.1F; - modelPart.render(poseStack, multiBufferSource.getBuffer(RenderType.entityTranslucent(resourceLocation)), i, OverlayTexture.NO_OVERLAY); + arm.render(poseStack, bufferSource.getBuffer(RenderType.entityTranslucent(skinTexture)), packedLight, OverlayTexture.NO_OVERLAY); } protected void setupRotations(PlayerRenderState playerRenderState, PoseStack poseStack, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/state/AllayRenderState.java b/net/minecraft/client/renderer/entity/state/AllayRenderState.java index 0a7e0085..23ed3f02 100644 --- a/net/minecraft/client/renderer/entity/state/AllayRenderState.java +++ b/net/minecraft/client/renderer/entity/state/AllayRenderState.java @@ -4,7 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class AllayRenderState extends LivingEntityRenderState { +public class AllayRenderState extends ArmedEntityRenderState { public boolean isDancing; public boolean isSpinning; public float spinningProgress; diff --git a/net/minecraft/client/renderer/entity/state/ArmedEntityRenderState.java b/net/minecraft/client/renderer/entity/state/ArmedEntityRenderState.java new file mode 100644 index 00000000..34dbb89e --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/ArmedEntityRenderState.java @@ -0,0 +1,29 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.HumanoidModel.ArmPose; +import net.minecraft.client.renderer.item.ItemModelResolver; +import net.minecraft.client.renderer.item.ItemStackRenderState; +import net.minecraft.world.entity.HumanoidArm; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class ArmedEntityRenderState extends LivingEntityRenderState { + public HumanoidArm mainArm = HumanoidArm.RIGHT; + public ArmPose rightArmPose = ArmPose.EMPTY; + public final ItemStackRenderState rightHandItem = new ItemStackRenderState(); + public ArmPose leftArmPose = ArmPose.EMPTY; + public final ItemStackRenderState leftHandItem = new ItemStackRenderState(); + + public ItemStackRenderState getMainHandItem() { + return this.mainArm == HumanoidArm.RIGHT ? this.rightHandItem : this.leftHandItem; + } + + public static void extractArmedEntityRenderState(LivingEntity entity, ArmedEntityRenderState reusedState, ItemModelResolver itemModelResolver) { + reusedState.mainArm = entity.getMainArm(); + itemModelResolver.updateForLiving(reusedState.rightHandItem, entity.getItemHeldByArm(HumanoidArm.RIGHT), ItemDisplayContext.THIRD_PERSON_RIGHT_HAND, entity); + itemModelResolver.updateForLiving(reusedState.leftHandItem, entity.getItemHeldByArm(HumanoidArm.LEFT), ItemDisplayContext.THIRD_PERSON_LEFT_HAND, entity); + } +} diff --git a/net/minecraft/client/renderer/entity/state/AxolotlRenderState.java b/net/minecraft/client/renderer/entity/state/AxolotlRenderState.java index e6918f79..179a9ea6 100644 --- a/net/minecraft/client/renderer/entity/state/AxolotlRenderState.java +++ b/net/minecraft/client/renderer/entity/state/AxolotlRenderState.java @@ -6,7 +6,7 @@ import net.minecraft.world.entity.animal.axolotl.Axolotl; @Environment(EnvType.CLIENT) public class AxolotlRenderState extends LivingEntityRenderState { - public Axolotl.Variant variant = Axolotl.Variant.LUCY; + public Axolotl.Variant variant = Axolotl.Variant.DEFAULT; public float playingDeadFactor; public float movingFactor; public float inWaterFactor = 1.0F; diff --git a/net/minecraft/client/renderer/entity/state/CamelRenderState.java b/net/minecraft/client/renderer/entity/state/CamelRenderState.java index 503b895f..d407c514 100644 --- a/net/minecraft/client/renderer/entity/state/CamelRenderState.java +++ b/net/minecraft/client/renderer/entity/state/CamelRenderState.java @@ -3,10 +3,11 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.world.entity.AnimationState; +import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class CamelRenderState extends LivingEntityRenderState { - public boolean isSaddled; + public ItemStack saddle = ItemStack.EMPTY; public boolean isRidden; public float jumpCooldown; public final AnimationState sitAnimationState = new AnimationState(); diff --git a/net/minecraft/client/renderer/entity/state/ChickenRenderState.java b/net/minecraft/client/renderer/entity/state/ChickenRenderState.java index 203b2fab..5782d407 100644 --- a/net/minecraft/client/renderer/entity/state/ChickenRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ChickenRenderState.java @@ -2,9 +2,13 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.world.entity.animal.ChickenVariant; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ChickenRenderState extends LivingEntityRenderState { public float flap; public float flapSpeed; + @Nullable + public ChickenVariant variant; } diff --git a/net/minecraft/client/renderer/entity/state/CowRenderState.java b/net/minecraft/client/renderer/entity/state/CowRenderState.java new file mode 100644 index 00000000..587fc376 --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/CowRenderState.java @@ -0,0 +1,12 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.world.entity.animal.CowVariant; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CowRenderState extends LivingEntityRenderState { + @Nullable + public CowVariant variant; +} diff --git a/net/minecraft/client/renderer/entity/state/CreakingRenderState.java b/net/minecraft/client/renderer/entity/state/CreakingRenderState.java index 632802a0..4c6482e2 100644 --- a/net/minecraft/client/renderer/entity/state/CreakingRenderState.java +++ b/net/minecraft/client/renderer/entity/state/CreakingRenderState.java @@ -6,8 +6,9 @@ import net.minecraft.world.entity.AnimationState; @Environment(EnvType.CLIENT) public class CreakingRenderState extends LivingEntityRenderState { - public AnimationState invulnerabilityAnimationState = new AnimationState(); - public AnimationState attackAnimationState = new AnimationState(); - public boolean isActive; + public final AnimationState invulnerabilityAnimationState = new AnimationState(); + public final AnimationState attackAnimationState = new AnimationState(); + public final AnimationState deathAnimationState = new AnimationState(); + public boolean eyesGlowing; public boolean canMove; } diff --git a/net/minecraft/client/renderer/entity/state/DolphinRenderState.java b/net/minecraft/client/renderer/entity/state/DolphinRenderState.java index 98b14b65..430df31a 100644 --- a/net/minecraft/client/renderer/entity/state/DolphinRenderState.java +++ b/net/minecraft/client/renderer/entity/state/DolphinRenderState.java @@ -4,6 +4,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class DolphinRenderState extends LivingEntityRenderState { +public class DolphinRenderState extends HoldingEntityRenderState { public boolean isMoving; } diff --git a/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java b/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java index 0eedc9bb..9c849659 100644 --- a/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java +++ b/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java @@ -3,6 +3,7 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory; +import net.minecraft.world.entity.boss.enderdragon.DragonFlightHistory.Sample; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; @@ -19,20 +20,20 @@ public class EnderDragonRenderState extends EntityRenderState { public float partialTicks; public final DragonFlightHistory flightHistory = new DragonFlightHistory(); - public DragonFlightHistory.Sample getHistoricalPos(int i) { - return this.flightHistory.get(i, this.partialTicks); + public Sample getHistoricalPos(int index) { + return this.flightHistory.get(index, this.partialTicks); } - public float getHeadPartYOffset(int i, DragonFlightHistory.Sample sample, DragonFlightHistory.Sample sample2) { + public float getHeadPartYOffset(int part, Sample start, Sample current) { double d; if (this.isLandingOrTakingOff) { - d = i / Math.max(this.distanceToEgg / 4.0, 1.0); + d = part / Math.max(this.distanceToEgg / 4.0, 1.0); } else if (this.isSitting) { - d = i; - } else if (i == 6) { + d = part; + } else if (part == 6) { d = 0.0; } else { - d = sample2.y() - sample.y(); + d = current.y() - start.y(); } return (float)d; diff --git a/net/minecraft/client/renderer/entity/state/EntityRenderState.java b/net/minecraft/client/renderer/entity/state/EntityRenderState.java index 7e7f8336..f78e2f10 100644 --- a/net/minecraft/client/renderer/entity/state/EntityRenderState.java +++ b/net/minecraft/client/renderer/entity/state/EntityRenderState.java @@ -1,13 +1,17 @@ package net.minecraft.client.renderer.entity.state; +import java.util.Locale; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.CrashReportCategory; import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class EntityRenderState { + public EntityType entityType; public double x; public double y; public double z; @@ -27,6 +31,15 @@ public class EntityRenderState { public Vec3 nameTagAttachment; @Nullable public EntityRenderState.LeashState leashState; + @Nullable + public HitboxesRenderState hitboxesRenderState; + @Nullable + public ServerHitboxesRenderState serverHitboxesRenderState; + + public void fillCrashReportCategory(CrashReportCategory crashReportCategory) { + crashReportCategory.setDetail("EntityRenderState", this.getClass().getCanonicalName()); + crashReportCategory.setDetail("Entity's Exact location", String.format(Locale.ROOT, "%.2f, %.2f, %.2f", this.x, this.y, this.z)); + } @Environment(EnvType.CLIENT) public static class LeashState { diff --git a/net/minecraft/client/renderer/entity/state/EquineRenderState.java b/net/minecraft/client/renderer/entity/state/EquineRenderState.java index b27dedc5..224db166 100644 --- a/net/minecraft/client/renderer/entity/state/EquineRenderState.java +++ b/net/minecraft/client/renderer/entity/state/EquineRenderState.java @@ -2,10 +2,11 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class EquineRenderState extends LivingEntityRenderState { - public boolean isSaddled; + public ItemStack saddle = ItemStack.EMPTY; public boolean isRidden; public boolean animateTail; public float eatAnimation; diff --git a/net/minecraft/client/renderer/entity/state/FireworkRocketRenderState.java b/net/minecraft/client/renderer/entity/state/FireworkRocketRenderState.java index 12334e2a..74a8defe 100644 --- a/net/minecraft/client/renderer/entity/state/FireworkRocketRenderState.java +++ b/net/minecraft/client/renderer/entity/state/FireworkRocketRenderState.java @@ -2,14 +2,10 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; +import net.minecraft.client.renderer.item.ItemStackRenderState; @Environment(EnvType.CLIENT) public class FireworkRocketRenderState extends EntityRenderState { public boolean isShotAtAngle; - @Nullable - public BakedModel itemModel; - public ItemStack item = ItemStack.EMPTY; + public final ItemStackRenderState item = new ItemStackRenderState(); } diff --git a/net/minecraft/client/renderer/entity/state/FoxRenderState.java b/net/minecraft/client/renderer/entity/state/FoxRenderState.java index 679e2d4e..6d789a29 100644 --- a/net/minecraft/client/renderer/entity/state/FoxRenderState.java +++ b/net/minecraft/client/renderer/entity/state/FoxRenderState.java @@ -5,7 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.world.entity.animal.Fox; @Environment(EnvType.CLIENT) -public class FoxRenderState extends LivingEntityRenderState { +public class FoxRenderState extends HoldingEntityRenderState { public float headRollAngle; public float crouchAmount; public boolean isCrouching; @@ -13,5 +13,5 @@ public class FoxRenderState extends LivingEntityRenderState { public boolean isSitting; public boolean isFaceplanted; public boolean isPouncing; - public Fox.Variant variant = Fox.Variant.RED; + public Fox.Variant variant = Fox.Variant.DEFAULT; } diff --git a/net/minecraft/client/renderer/entity/state/HitboxRenderState.java b/net/minecraft/client/renderer/entity/state/HitboxRenderState.java new file mode 100644 index 00000000..66e380cc --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/HitboxRenderState.java @@ -0,0 +1,13 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public record HitboxRenderState( + double x0, double y0, double z0, double x1, double y1, double z1, float offsetX, float offsetY, float offsetZ, float red, float green, float blue +) { + public HitboxRenderState(double x0, double y0, double z0, double x1, double y1, double z1, float red, float green, float blue) { + this(x0, y0, z0, x1, y1, z1, 0.0F, 0.0F, 0.0F, red, green, blue); + } +} diff --git a/net/minecraft/client/renderer/entity/state/HitboxesRenderState.java b/net/minecraft/client/renderer/entity/state/HitboxesRenderState.java new file mode 100644 index 00000000..7a74e960 --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/HitboxesRenderState.java @@ -0,0 +1,9 @@ +package net.minecraft.client.renderer.entity.state; + +import com.google.common.collect.ImmutableList; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public record HitboxesRenderState(double viewX, double viewY, double viewZ, ImmutableList hitboxes) { +} diff --git a/net/minecraft/client/renderer/entity/state/HoldingEntityRenderState.java b/net/minecraft/client/renderer/entity/state/HoldingEntityRenderState.java new file mode 100644 index 00000000..6609c03d --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/HoldingEntityRenderState.java @@ -0,0 +1,17 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.item.ItemModelResolver; +import net.minecraft.client.renderer.item.ItemStackRenderState; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class HoldingEntityRenderState extends LivingEntityRenderState { + public final ItemStackRenderState heldItem = new ItemStackRenderState(); + + public static void extractHoldingEntityRenderState(LivingEntity entity, HoldingEntityRenderState reusedState, ItemModelResolver resolver) { + resolver.updateForLiving(reusedState.heldItem, entity.getMainHandItem(), ItemDisplayContext.GROUND, entity); + } +} diff --git a/net/minecraft/client/renderer/entity/state/HumanoidRenderState.java b/net/minecraft/client/renderer/entity/state/HumanoidRenderState.java index 7ee311a2..1cb5becc 100644 --- a/net/minecraft/client/renderer/entity/state/HumanoidRenderState.java +++ b/net/minecraft/client/renderer/entity/state/HumanoidRenderState.java @@ -7,7 +7,7 @@ import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) -public class HumanoidRenderState extends LivingEntityRenderState { +public class HumanoidRenderState extends ArmedEntityRenderState { public float swimAmount; public float attackTime; public float speedValue = 1.0F; @@ -23,7 +23,8 @@ public class HumanoidRenderState extends LivingEntityRenderState { public float elytraRotX; public float elytraRotY; public float elytraRotZ; - public ItemStack chestItem = ItemStack.EMPTY; - public ItemStack legsItem = ItemStack.EMPTY; - public ItemStack feetItem = ItemStack.EMPTY; + public ItemStack headEquipment = ItemStack.EMPTY; + public ItemStack chestEquipment = ItemStack.EMPTY; + public ItemStack legsEquipment = ItemStack.EMPTY; + public ItemStack feetEquipment = ItemStack.EMPTY; } diff --git a/net/minecraft/client/renderer/entity/state/IllagerRenderState.java b/net/minecraft/client/renderer/entity/state/IllagerRenderState.java index bdc13880..e4cebfb1 100644 --- a/net/minecraft/client/renderer/entity/state/IllagerRenderState.java +++ b/net/minecraft/client/renderer/entity/state/IllagerRenderState.java @@ -6,7 +6,7 @@ import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.monster.AbstractIllager; @Environment(EnvType.CLIENT) -public class IllagerRenderState extends LivingEntityRenderState { +public class IllagerRenderState extends ArmedEntityRenderState { public boolean isRiding; public boolean isAggressive; public HumanoidArm mainArm = HumanoidArm.RIGHT; diff --git a/net/minecraft/client/renderer/entity/state/ItemClusterRenderState.java b/net/minecraft/client/renderer/entity/state/ItemClusterRenderState.java new file mode 100644 index 00000000..ed381152 --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/ItemClusterRenderState.java @@ -0,0 +1,39 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.item.ItemModelResolver; +import net.minecraft.client.renderer.item.ItemStackRenderState; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; + +@Environment(EnvType.CLIENT) +public class ItemClusterRenderState extends EntityRenderState { + public final ItemStackRenderState item = new ItemStackRenderState(); + public int count; + public int seed; + + public void extractItemGroupRenderState(Entity entity, ItemStack stack, ItemModelResolver itemModelResolver) { + itemModelResolver.updateForNonLiving(this.item, stack, ItemDisplayContext.GROUND, entity); + this.count = getRenderedAmount(stack.getCount()); + this.seed = getSeedForItemStack(stack); + } + + public static int getSeedForItemStack(ItemStack stack) { + return stack.isEmpty() ? 187 : Item.getId(stack.getItem()) + stack.getDamageValue(); + } + + public static int getRenderedAmount(int count) { + if (count <= 1) { + return 1; + } else if (count <= 16) { + return 2; + } else if (count <= 32) { + return 3; + } else { + return count <= 48 ? 4 : 5; + } + } +} diff --git a/net/minecraft/client/renderer/entity/state/ItemDisplayEntityRenderState.java b/net/minecraft/client/renderer/entity/state/ItemDisplayEntityRenderState.java index b68b96a6..66859640 100644 --- a/net/minecraft/client/renderer/entity/state/ItemDisplayEntityRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ItemDisplayEntityRenderState.java @@ -2,19 +2,14 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.entity.Display.ItemDisplay.ItemRenderState; -import org.jetbrains.annotations.Nullable; +import net.minecraft.client.renderer.item.ItemStackRenderState; @Environment(EnvType.CLIENT) public class ItemDisplayEntityRenderState extends DisplayEntityRenderState { - @Nullable - public ItemRenderState itemRenderState; - @Nullable - public BakedModel itemModel; + public final ItemStackRenderState item = new ItemStackRenderState(); @Override public boolean hasSubState() { - return this.itemRenderState != null && this.itemModel != null; + return !this.item.isEmpty(); } } diff --git a/net/minecraft/client/renderer/entity/state/ItemEntityRenderState.java b/net/minecraft/client/renderer/entity/state/ItemEntityRenderState.java index 9613cf20..aa13985d 100644 --- a/net/minecraft/client/renderer/entity/state/ItemEntityRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ItemEntityRenderState.java @@ -2,14 +2,8 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class ItemEntityRenderState extends EntityRenderState { +public class ItemEntityRenderState extends ItemClusterRenderState { public float bobOffset; - @Nullable - public BakedModel itemModel; - public ItemStack item = ItemStack.EMPTY; } diff --git a/net/minecraft/client/renderer/entity/state/ItemFrameRenderState.java b/net/minecraft/client/renderer/entity/state/ItemFrameRenderState.java index 93a93232..9891ffd3 100644 --- a/net/minecraft/client/renderer/entity/state/ItemFrameRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ItemFrameRenderState.java @@ -2,22 +2,19 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.renderer.state.MapRenderState; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.Direction; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.saveddata.maps.MapId; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ItemFrameRenderState extends EntityRenderState { public Direction direction = Direction.NORTH; - public ItemStack itemStack = ItemStack.EMPTY; + public final ItemStackRenderState item = new ItemStackRenderState(); public int rotation; public boolean isGlowFrame; @Nullable - public BakedModel itemModel; - @Nullable public MapId mapId; public final MapRenderState mapRenderState = new MapRenderState(); } diff --git a/net/minecraft/client/renderer/entity/state/LivingEntityRenderState.java b/net/minecraft/client/renderer/entity/state/LivingEntityRenderState.java index 0244a952..a0f6447d 100644 --- a/net/minecraft/client/renderer/entity/state/LivingEntityRenderState.java +++ b/net/minecraft/client/renderer/entity/state/LivingEntityRenderState.java @@ -2,12 +2,12 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; -import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.Pose; -import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.ResolvableProfile; +import net.minecraft.world.level.block.SkullBlock; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -18,7 +18,6 @@ public class LivingEntityRenderState extends EntityRenderState { public float deathTime; public float walkAnimationPos; public float walkAnimationSpeed; - public float wornHeadAnimationPos; public float scale = 1.0F; public float ageScale = 1.0F; public boolean isUpsideDown; @@ -34,25 +33,12 @@ public class LivingEntityRenderState extends EntityRenderState { @Nullable public Component customName; public Pose pose = Pose.STANDING; + public final ItemStackRenderState headItem = new ItemStackRenderState(); + public float wornHeadAnimationPos; @Nullable - public BakedModel headItemModel; - public ItemStack headItem = ItemStack.EMPTY; - public HumanoidArm mainArm = HumanoidArm.RIGHT; + public SkullBlock.Type wornHeadType; @Nullable - public BakedModel rightHandItemModel; - public ItemStack rightHandItem = ItemStack.EMPTY; - @Nullable - public BakedModel leftHandItemModel; - public ItemStack leftHandItem = ItemStack.EMPTY; - - public ItemStack getMainHandItem() { - return this.mainArm == HumanoidArm.RIGHT ? this.rightHandItem : this.leftHandItem; - } - - @Nullable - public BakedModel getMainHandItemModel() { - return this.mainArm == HumanoidArm.RIGHT ? this.rightHandItemModel : this.leftHandItemModel; - } + public ResolvableProfile wornHeadProfile; public boolean hasPose(Pose pose) { return this.pose == pose; diff --git a/net/minecraft/client/renderer/entity/state/LlamaRenderState.java b/net/minecraft/client/renderer/entity/state/LlamaRenderState.java index 6cde9d20..7b366b01 100644 --- a/net/minecraft/client/renderer/entity/state/LlamaRenderState.java +++ b/net/minecraft/client/renderer/entity/state/LlamaRenderState.java @@ -7,7 +7,7 @@ import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) public class LlamaRenderState extends LivingEntityRenderState { - public Llama.Variant variant = Llama.Variant.CREAMY; + public Llama.Variant variant = Llama.Variant.DEFAULT; public boolean hasChest; public ItemStack bodyItem = ItemStack.EMPTY; public boolean isTraderLlama; diff --git a/net/minecraft/client/renderer/entity/state/OminousItemSpawnerRenderState.java b/net/minecraft/client/renderer/entity/state/OminousItemSpawnerRenderState.java deleted file mode 100644 index b50f1159..00000000 --- a/net/minecraft/client/renderer/entity/state/OminousItemSpawnerRenderState.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.minecraft.client.renderer.entity.state; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class OminousItemSpawnerRenderState extends EntityRenderState { - @Nullable - public BakedModel itemModel; - public ItemStack item = ItemStack.EMPTY; -} diff --git a/net/minecraft/client/renderer/entity/state/PandaRenderState.java b/net/minecraft/client/renderer/entity/state/PandaRenderState.java index 9c9d49bb..c6b069e1 100644 --- a/net/minecraft/client/renderer/entity/state/PandaRenderState.java +++ b/net/minecraft/client/renderer/entity/state/PandaRenderState.java @@ -5,7 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.world.entity.animal.Panda; @Environment(EnvType.CLIENT) -public class PandaRenderState extends LivingEntityRenderState { +public class PandaRenderState extends HoldingEntityRenderState { public Panda.Gene variant = Panda.Gene.NORMAL; public boolean isUnhappy; public boolean isSneezing; diff --git a/net/minecraft/client/renderer/entity/state/PigRenderState.java b/net/minecraft/client/renderer/entity/state/PigRenderState.java index f7f82f7e..fed9a0ee 100644 --- a/net/minecraft/client/renderer/entity/state/PigRenderState.java +++ b/net/minecraft/client/renderer/entity/state/PigRenderState.java @@ -2,13 +2,13 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.world.entity.animal.PigVariant; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class PigRenderState extends LivingEntityRenderState implements SaddleableRenderState { - public boolean isSaddled; - - @Override - public boolean isSaddled() { - return this.isSaddled; - } +public class PigRenderState extends LivingEntityRenderState { + public ItemStack saddle = ItemStack.EMPTY; + @Nullable + public PigVariant variant; } diff --git a/net/minecraft/client/renderer/entity/state/PlayerRenderState.java b/net/minecraft/client/renderer/entity/state/PlayerRenderState.java index e3e6e71b..05bf0e85 100644 --- a/net/minecraft/client/renderer/entity/state/PlayerRenderState.java +++ b/net/minecraft/client/renderer/entity/state/PlayerRenderState.java @@ -2,12 +2,12 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.item.ItemStackRenderState; import net.minecraft.client.resources.DefaultPlayerSkin; import net.minecraft.client.resources.PlayerSkin; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; import net.minecraft.world.entity.animal.Parrot; -import net.minecraft.world.item.ItemUseAnimation; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @@ -31,8 +31,6 @@ public class PlayerRenderState extends HumanoidRenderState { public boolean shouldApplyFlyingYRot; public float flyingYRot; public boolean swinging; - public PlayerRenderState.HandState mainHandState = new PlayerRenderState.HandState(); - public PlayerRenderState.HandState offhandState = new PlayerRenderState.HandState(); @Nullable public Component scoreText; @Nullable @@ -41,16 +39,9 @@ public class PlayerRenderState extends HumanoidRenderState { public Parrot.Variant parrotOnRightShoulder; public int id; public String name = "Steve"; + public final ItemStackRenderState heldOnHead = new ItemStackRenderState(); public float fallFlyingScale() { return Mth.clamp(this.fallFlyingTimeInTicks * this.fallFlyingTimeInTicks / 100.0F, 0.0F, 1.0F); } - - @Environment(EnvType.CLIENT) - public static class HandState { - public boolean isEmpty = true; - @Nullable - public ItemUseAnimation useAnimation; - public boolean holdsChargedCrossbow; - } } diff --git a/net/minecraft/client/renderer/entity/state/RabbitRenderState.java b/net/minecraft/client/renderer/entity/state/RabbitRenderState.java index eca65a4c..f456d689 100644 --- a/net/minecraft/client/renderer/entity/state/RabbitRenderState.java +++ b/net/minecraft/client/renderer/entity/state/RabbitRenderState.java @@ -8,5 +8,5 @@ import net.minecraft.world.entity.animal.Rabbit; public class RabbitRenderState extends LivingEntityRenderState { public float jumpCompletion; public boolean isToast; - public Rabbit.Variant variant = Rabbit.Variant.BROWN; + public Rabbit.Variant variant = Rabbit.Variant.DEFAULT; } diff --git a/net/minecraft/client/renderer/entity/state/SaddleableRenderState.java b/net/minecraft/client/renderer/entity/state/SaddleableRenderState.java deleted file mode 100644 index defbd316..00000000 --- a/net/minecraft/client/renderer/entity/state/SaddleableRenderState.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.minecraft.client.renderer.entity.state; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -public interface SaddleableRenderState { - boolean isSaddled(); -} diff --git a/net/minecraft/client/renderer/entity/state/ServerHitboxesRenderState.java b/net/minecraft/client/renderer/entity/state/ServerHitboxesRenderState.java new file mode 100644 index 00000000..8c4d30ec --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/ServerHitboxesRenderState.java @@ -0,0 +1,22 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record ServerHitboxesRenderState( + boolean missing, + double serverEntityX, + double serverEntityY, + double serverEntityZ, + double deltaMovementX, + double deltaMovementY, + double deltaMovementZ, + float eyeHeight, + @Nullable HitboxesRenderState hitboxes +) { + public ServerHitboxesRenderState(boolean missing) { + this(missing, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0F, null); + } +} diff --git a/net/minecraft/client/renderer/entity/state/SheepRenderState.java b/net/minecraft/client/renderer/entity/state/SheepRenderState.java index 63853bd5..e096388f 100644 --- a/net/minecraft/client/renderer/entity/state/SheepRenderState.java +++ b/net/minecraft/client/renderer/entity/state/SheepRenderState.java @@ -2,6 +2,9 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.util.ARGB; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.animal.sheep.Sheep; import net.minecraft.world.item.DyeColor; @Environment(EnvType.CLIENT) @@ -11,4 +14,25 @@ public class SheepRenderState extends LivingEntityRenderState { public boolean isSheared; public DyeColor woolColor = DyeColor.WHITE; public int id; + + public int getWoolColor() { + if (this.isJebSheep()) { + int i = 25; + int j = Mth.floor(this.ageInTicks); + int k = j / 25 + this.id; + int l = DyeColor.values().length; + int m = k % l; + int n = (k + 1) % l; + float f = (j % 25 + Mth.frac(this.ageInTicks)) / 25.0F; + int o = Sheep.getColor(DyeColor.byId(m)); + int p = Sheep.getColor(DyeColor.byId(n)); + return ARGB.lerp(f, o, p); + } else { + return Sheep.getColor(this.woolColor); + } + } + + public boolean isJebSheep() { + return this.customName != null && "jeb_".equals(this.customName.getString()); + } } diff --git a/net/minecraft/client/renderer/entity/state/SkeletonRenderState.java b/net/minecraft/client/renderer/entity/state/SkeletonRenderState.java index b9c74e5a..18151bb1 100644 --- a/net/minecraft/client/renderer/entity/state/SkeletonRenderState.java +++ b/net/minecraft/client/renderer/entity/state/SkeletonRenderState.java @@ -7,4 +7,5 @@ import net.fabricmc.api.Environment; public class SkeletonRenderState extends HumanoidRenderState { public boolean isAggressive; public boolean isShaking; + public boolean isHoldingBow; } diff --git a/net/minecraft/client/renderer/entity/state/SnowGolemRenderState.java b/net/minecraft/client/renderer/entity/state/SnowGolemRenderState.java new file mode 100644 index 00000000..f4c9651a --- /dev/null +++ b/net/minecraft/client/renderer/entity/state/SnowGolemRenderState.java @@ -0,0 +1,9 @@ +package net.minecraft.client.renderer.entity.state; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class SnowGolemRenderState extends LivingEntityRenderState { + public boolean hasPumpkin; +} diff --git a/net/minecraft/client/renderer/entity/state/StriderRenderState.java b/net/minecraft/client/renderer/entity/state/StriderRenderState.java index 086a1eb7..1256dd87 100644 --- a/net/minecraft/client/renderer/entity/state/StriderRenderState.java +++ b/net/minecraft/client/renderer/entity/state/StriderRenderState.java @@ -2,15 +2,11 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.world.item.ItemStack; @Environment(EnvType.CLIENT) -public class StriderRenderState extends LivingEntityRenderState implements SaddleableRenderState { - public boolean isSaddled; +public class StriderRenderState extends LivingEntityRenderState { + public ItemStack saddle = ItemStack.EMPTY; public boolean isSuffocating; public boolean isRidden; - - @Override - public boolean isSaddled() { - return this.isSaddled; - } } diff --git a/net/minecraft/client/renderer/entity/state/ThrownItemRenderState.java b/net/minecraft/client/renderer/entity/state/ThrownItemRenderState.java index 8dc2116c..323be9ca 100644 --- a/net/minecraft/client/renderer/entity/state/ThrownItemRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ThrownItemRenderState.java @@ -2,13 +2,9 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.model.BakedModel; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; +import net.minecraft.client.renderer.item.ItemStackRenderState; @Environment(EnvType.CLIENT) public class ThrownItemRenderState extends EntityRenderState { - @Nullable - public BakedModel itemModel; - public ItemStack item = ItemStack.EMPTY; + public final ItemStackRenderState item = new ItemStackRenderState(); } diff --git a/net/minecraft/client/renderer/entity/state/TropicalFishRenderState.java b/net/minecraft/client/renderer/entity/state/TropicalFishRenderState.java index 907edb4d..f631461c 100644 --- a/net/minecraft/client/renderer/entity/state/TropicalFishRenderState.java +++ b/net/minecraft/client/renderer/entity/state/TropicalFishRenderState.java @@ -6,7 +6,7 @@ import net.minecraft.world.entity.animal.TropicalFish; @Environment(EnvType.CLIENT) public class TropicalFishRenderState extends LivingEntityRenderState { - public TropicalFish.Pattern variant = TropicalFish.Pattern.FLOPPER; + public TropicalFish.Pattern pattern = TropicalFish.Pattern.FLOPPER; public int baseColor = -1; public int patternColor = -1; } diff --git a/net/minecraft/client/renderer/entity/state/VexRenderState.java b/net/minecraft/client/renderer/entity/state/VexRenderState.java index 3ec23cb5..5885b6c0 100644 --- a/net/minecraft/client/renderer/entity/state/VexRenderState.java +++ b/net/minecraft/client/renderer/entity/state/VexRenderState.java @@ -4,6 +4,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class VexRenderState extends LivingEntityRenderState { +public class VexRenderState extends ArmedEntityRenderState { public boolean isCharging; } diff --git a/net/minecraft/client/renderer/entity/state/VillagerDataHolderRenderState.java b/net/minecraft/client/renderer/entity/state/VillagerDataHolderRenderState.java index e44fc821..f42b0800 100644 --- a/net/minecraft/client/renderer/entity/state/VillagerDataHolderRenderState.java +++ b/net/minecraft/client/renderer/entity/state/VillagerDataHolderRenderState.java @@ -3,8 +3,10 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.world.entity.npc.VillagerData; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public interface VillagerDataHolderRenderState { + @Nullable VillagerData getVillagerData(); } diff --git a/net/minecraft/client/renderer/entity/state/VillagerRenderState.java b/net/minecraft/client/renderer/entity/state/VillagerRenderState.java index a00b2751..a62b95fa 100644 --- a/net/minecraft/client/renderer/entity/state/VillagerRenderState.java +++ b/net/minecraft/client/renderer/entity/state/VillagerRenderState.java @@ -3,14 +3,15 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.world.entity.npc.VillagerData; -import net.minecraft.world.entity.npc.VillagerProfession; -import net.minecraft.world.entity.npc.VillagerType; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) -public class VillagerRenderState extends LivingEntityRenderState implements VillagerDataHolderRenderState { +public class VillagerRenderState extends HoldingEntityRenderState implements VillagerDataHolderRenderState { public boolean isUnhappy; - public VillagerData villagerData = new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1); + @Nullable + public VillagerData villagerData; + @Nullable @Override public VillagerData getVillagerData() { return this.villagerData; diff --git a/net/minecraft/client/renderer/entity/state/WitchRenderState.java b/net/minecraft/client/renderer/entity/state/WitchRenderState.java index c278d7f2..098e438c 100644 --- a/net/minecraft/client/renderer/entity/state/WitchRenderState.java +++ b/net/minecraft/client/renderer/entity/state/WitchRenderState.java @@ -4,7 +4,8 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class WitchRenderState extends LivingEntityRenderState { +public class WitchRenderState extends HoldingEntityRenderState { public int entityId; public boolean isHoldingItem; + public boolean isHoldingPotion; } diff --git a/net/minecraft/client/renderer/entity/state/WolfRenderState.java b/net/minecraft/client/renderer/entity/state/WolfRenderState.java index 38674fc0..2a1fc00f 100644 --- a/net/minecraft/client/renderer/entity/state/WolfRenderState.java +++ b/net/minecraft/client/renderer/entity/state/WolfRenderState.java @@ -22,14 +22,14 @@ public class WolfRenderState extends LivingEntityRenderState { public DyeColor collarColor; public ItemStack bodyArmorItem = ItemStack.EMPTY; - public float getBodyRollAngle(float f) { - float g = (this.shakeAnim + f) / 1.8F; - if (g < 0.0F) { - g = 0.0F; - } else if (g > 1.0F) { - g = 1.0F; + public float getBodyRollAngle(float angle) { + float f = (this.shakeAnim + angle) / 1.8F; + if (f < 0.0F) { + f = 0.0F; + } else if (f > 1.0F) { + f = 1.0F; } - return Mth.sin(g * (float) Math.PI) * Mth.sin(g * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI; + return Mth.sin(f * (float) Math.PI) * Mth.sin(f * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI; } } diff --git a/net/minecraft/client/renderer/entity/state/ZombieVillagerRenderState.java b/net/minecraft/client/renderer/entity/state/ZombieVillagerRenderState.java index ebef3082..d90441ae 100644 --- a/net/minecraft/client/renderer/entity/state/ZombieVillagerRenderState.java +++ b/net/minecraft/client/renderer/entity/state/ZombieVillagerRenderState.java @@ -3,13 +3,14 @@ package net.minecraft.client.renderer.entity.state; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.world.entity.npc.VillagerData; -import net.minecraft.world.entity.npc.VillagerProfession; -import net.minecraft.world.entity.npc.VillagerType; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ZombieVillagerRenderState extends ZombieRenderState implements VillagerDataHolderRenderState { - public VillagerData villagerData = new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1); + @Nullable + public VillagerData villagerData; + @Nullable @Override public VillagerData getVillagerData() { return this.villagerData; diff --git a/net/minecraft/client/renderer/item/BlockModelWrapper.java b/net/minecraft/client/renderer/item/BlockModelWrapper.java new file mode 100644 index 00000000..b7417410 --- /dev/null +++ b/net/minecraft/client/renderer/item/BlockModelWrapper.java @@ -0,0 +1,118 @@ +package net.minecraft.client.renderer.item; + +import com.google.common.base.Suppliers; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.color.item.ItemTintSource; +import net.minecraft.client.color.item.ItemTintSources; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.ItemBlockRenderTypes; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.FaceBakery; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.resources.model.BlockModelRotation; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.client.resources.model.ResolvedModel; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.ItemTags; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import org.jetbrains.annotations.Nullable; +import org.joml.Vector3f; + +@Environment(EnvType.CLIENT) +public class BlockModelWrapper implements ItemModel { + private final List tints; + private final List quads; + private final Supplier extents; + private final ModelRenderProperties properties; + + public BlockModelWrapper(List tints, List quads, ModelRenderProperties properties) { + this.tints = tints; + this.quads = quads; + this.properties = properties; + this.extents = Suppliers.memoize(() -> computeExtents(this.quads)); + } + + public static Vector3f[] computeExtents(List quads) { + Set set = new HashSet(); + + for (BakedQuad bakedQuad : quads) { + FaceBakery.extractPositions(bakedQuad.vertices(), set::add); + } + + return (Vector3f[])set.toArray(Vector3f[]::new); + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + ItemStackRenderState.LayerRenderState layerRenderState = renderState.newLayer(); + if (stack.hasFoil()) { + layerRenderState.setFoilType(hasSpecialAnimatedTexture(stack) ? ItemStackRenderState.FoilType.SPECIAL : ItemStackRenderState.FoilType.STANDARD); + } + + int i = this.tints.size(); + int[] is = layerRenderState.prepareTintLayers(i); + + for (int j = 0; j < i; j++) { + is[j] = ((ItemTintSource)this.tints.get(j)).calculate(stack, level, entity); + } + + layerRenderState.setExtents(this.extents); + layerRenderState.setRenderType(ItemBlockRenderTypes.getRenderType(stack)); + this.properties.applyToLayer(layerRenderState, displayContext); + layerRenderState.prepareQuadList().addAll(this.quads); + } + + private static boolean hasSpecialAnimatedTexture(ItemStack stack) { + return stack.is(ItemTags.COMPASSES) || stack.is(Items.CLOCK); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ResourceLocation model, List tints) implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("model").forGetter(BlockModelWrapper.Unbaked::model), + ItemTintSources.CODEC.listOf().optionalFieldOf("tints", List.of()).forGetter(BlockModelWrapper.Unbaked::tints) + ) + .apply(instance, BlockModelWrapper.Unbaked::new) + ); + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + resolver.markDependency(this.model); + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + ModelBaker modelBaker = context.blockModelBaker(); + ResolvedModel resolvedModel = modelBaker.getModel(this.model); + TextureSlots textureSlots = resolvedModel.getTopTextureSlots(); + List list = resolvedModel.bakeTopGeometry(textureSlots, modelBaker, BlockModelRotation.X0_Y0).getAll(); + ModelRenderProperties modelRenderProperties = ModelRenderProperties.fromResolvedModel(modelBaker, resolvedModel, textureSlots); + return new BlockModelWrapper(this.tints, list, modelRenderProperties); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + } +} diff --git a/net/minecraft/client/renderer/item/BundleSelectedItemSpecialRenderer.java b/net/minecraft/client/renderer/item/BundleSelectedItemSpecialRenderer.java new file mode 100644 index 00000000..9ba00f22 --- /dev/null +++ b/net/minecraft/client/renderer/item/BundleSelectedItemSpecialRenderer.java @@ -0,0 +1,52 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.BundleItem; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class BundleSelectedItemSpecialRenderer implements ItemModel { + static final ItemModel INSTANCE = new BundleSelectedItemSpecialRenderer(); + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + ItemStack itemStack = BundleItem.getSelectedItemStack(stack); + if (!itemStack.isEmpty()) { + itemModelResolver.appendItemLayers(renderState, itemStack, displayContext, level, entity, seed); + } + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = MapCodec.unit(new BundleSelectedItemSpecialRenderer.Unbaked()); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + return BundleSelectedItemSpecialRenderer.INSTANCE; + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + } + } +} diff --git a/net/minecraft/client/renderer/item/ClampedItemPropertyFunction.java b/net/minecraft/client/renderer/item/ClampedItemPropertyFunction.java deleted file mode 100644 index cd6b2162..00000000 --- a/net/minecraft/client/renderer/item/ClampedItemPropertyFunction.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.minecraft.client.renderer.item; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.util.Mth; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public interface ClampedItemPropertyFunction extends ItemPropertyFunction { - @Deprecated - @Override - default float call(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i) { - return Mth.clamp(this.unclampedCall(itemStack, clientLevel, livingEntity, i), 0.0F, 1.0F); - } - - float unclampedCall(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i); -} diff --git a/net/minecraft/client/renderer/item/ClientItem.java b/net/minecraft/client/renderer/item/ClientItem.java new file mode 100644 index 00000000..6fc2a8fb --- /dev/null +++ b/net/minecraft/client/renderer/item/ClientItem.java @@ -0,0 +1,34 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.util.RegistryContextSwapper; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record ClientItem(ItemModel.Unbaked model, ClientItem.Properties properties, @Nullable RegistryContextSwapper registrySwapper) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group(ItemModels.CODEC.fieldOf("model").forGetter(ClientItem::model), ClientItem.Properties.MAP_CODEC.forGetter(ClientItem::properties)) + .apply(instance, ClientItem::new) + ); + + public ClientItem(ItemModel.Unbaked model, ClientItem.Properties properties) { + this(model, properties, null); + } + + public ClientItem withRegistrySwapper(RegistryContextSwapper registrySwapper) { + return new ClientItem(this.model, this.properties, registrySwapper); + } + + @Environment(EnvType.CLIENT) + public record Properties(boolean handAnimationOnSwap) { + public static final ClientItem.Properties DEFAULT = new ClientItem.Properties(true); + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(Codec.BOOL.optionalFieldOf("hand_animation_on_swap", true).forGetter(ClientItem.Properties::handAnimationOnSwap)) + .apply(instance, ClientItem.Properties::new) + ); + } +} diff --git a/net/minecraft/client/renderer/item/CompassItemPropertyFunction.java b/net/minecraft/client/renderer/item/CompassItemPropertyFunction.java deleted file mode 100644 index ca541e46..00000000 --- a/net/minecraft/client/renderer/item/CompassItemPropertyFunction.java +++ /dev/null @@ -1,119 +0,0 @@ -package net.minecraft.client.renderer.item; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.core.BlockPos; -import net.minecraft.core.GlobalPos; -import net.minecraft.util.Mth; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.phys.Vec3; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class CompassItemPropertyFunction implements ClampedItemPropertyFunction { - public static final int DEFAULT_ROTATION = 0; - private final CompassItemPropertyFunction.CompassWobble wobble = new CompassItemPropertyFunction.CompassWobble(); - private final CompassItemPropertyFunction.CompassWobble wobbleRandom = new CompassItemPropertyFunction.CompassWobble(); - public final CompassItemPropertyFunction.CompassTarget compassTarget; - - public CompassItemPropertyFunction(CompassItemPropertyFunction.CompassTarget compassTarget) { - this.compassTarget = compassTarget; - } - - @Override - public float unclampedCall(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i) { - Entity entity = (Entity)(livingEntity != null ? livingEntity : itemStack.getEntityRepresentation()); - if (entity == null) { - return 0.0F; - } else { - clientLevel = this.tryFetchLevelIfMissing(entity, clientLevel); - return clientLevel == null ? 0.0F : this.getCompassRotation(itemStack, clientLevel, i, entity); - } - } - - private float getCompassRotation(ItemStack stack, ClientLevel level, int seed, Entity entity) { - GlobalPos globalPos = this.compassTarget.getPos(level, stack, entity); - long l = level.getGameTime(); - return !this.isValidCompassTargetPos(entity, globalPos) - ? this.getRandomlySpinningRotation(seed, l) - : this.getRotationTowardsCompassTarget(entity, l, globalPos.pos()); - } - - private float getRandomlySpinningRotation(int seed, long ticks) { - if (this.wobbleRandom.shouldUpdate(ticks)) { - this.wobbleRandom.update(ticks, Math.random()); - } - - double d = this.wobbleRandom.rotation + this.hash(seed) / 2.1474836E9F; - return Mth.positiveModulo((float)d, 1.0F); - } - - private float getRotationTowardsCompassTarget(Entity entity, long ticks, BlockPos pos) { - double d = this.getAngleFromEntityToPos(entity, pos); - double e = this.getWrappedVisualRotationY(entity); - double f; - if (entity instanceof Player player && player.isLocalPlayer() && player.level().tickRateManager().runsNormally()) { - if (this.wobble.shouldUpdate(ticks)) { - this.wobble.update(ticks, 0.5 - (e - 0.25)); - } - - f = d + this.wobble.rotation; - } else { - f = 0.5 - (e - 0.25 - d); - } - - return Mth.positiveModulo((float)f, 1.0F); - } - - @Nullable - private ClientLevel tryFetchLevelIfMissing(Entity entity, @Nullable ClientLevel level) { - return level == null && entity.level() instanceof ClientLevel ? (ClientLevel)entity.level() : level; - } - - private boolean isValidCompassTargetPos(Entity entity, @Nullable GlobalPos pos) { - return pos != null && pos.dimension() == entity.level().dimension() && !(pos.pos().distToCenterSqr(entity.position()) < 1.0E-5F); - } - - private double getAngleFromEntityToPos(Entity entity, BlockPos pos) { - Vec3 vec3 = Vec3.atCenterOf(pos); - return Math.atan2(vec3.z() - entity.getZ(), vec3.x() - entity.getX()) / (float) (Math.PI * 2); - } - - private double getWrappedVisualRotationY(Entity entity) { - return Mth.positiveModulo((double)(entity.getVisualRotationYInDegrees() / 360.0F), 1.0); - } - - private int hash(int value) { - return value * 1327217883; - } - - @Environment(EnvType.CLIENT) - public interface CompassTarget { - @Nullable - GlobalPos getPos(ClientLevel clientLevel, ItemStack itemStack, Entity entity); - } - - @Environment(EnvType.CLIENT) - static class CompassWobble { - double rotation; - private double deltaRotation; - private long lastUpdateTick; - - boolean shouldUpdate(long ticks) { - return this.lastUpdateTick != ticks; - } - - void update(long ticks, double rotation) { - this.lastUpdateTick = ticks; - double d = rotation - this.rotation; - d = Mth.positiveModulo(d + 0.5, 1.0) - 0.5; - this.deltaRotation += d * 0.1; - this.deltaRotation *= 0.8; - this.rotation = Mth.positiveModulo(this.rotation + this.deltaRotation, 1.0); - } - } -} diff --git a/net/minecraft/client/renderer/item/CompositeModel.java b/net/minecraft/client/renderer/item/CompositeModel.java new file mode 100644 index 00000000..8e6c68c3 --- /dev/null +++ b/net/minecraft/client/renderer/item/CompositeModel.java @@ -0,0 +1,64 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CompositeModel implements ItemModel { + private final List models; + + public CompositeModel(List models) { + this.models = models; + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + renderState.ensureCapacity(this.models.size()); + + for (ItemModel itemModel : this.models) { + itemModel.update(renderState, stack, itemModelResolver, displayContext, level, entity, seed); + } + } + + @Environment(EnvType.CLIENT) + public record Unbaked(List models) implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ItemModels.CODEC.listOf().fieldOf("models").forGetter(CompositeModel.Unbaked::models)) + .apply(instance, CompositeModel.Unbaked::new) + ); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + for (ItemModel.Unbaked unbaked : this.models) { + unbaked.resolveDependencies(resolver); + } + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + return new CompositeModel(this.models.stream().map(unbaked -> unbaked.bake(context)).toList()); + } + } +} diff --git a/net/minecraft/client/renderer/item/ConditionalItemModel.java b/net/minecraft/client/renderer/item/ConditionalItemModel.java new file mode 100644 index 00000000..74184c15 --- /dev/null +++ b/net/minecraft/client/renderer/item/ConditionalItemModel.java @@ -0,0 +1,88 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.CacheSlot; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperties; +import net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty; +import net.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.util.RegistryContextSwapper; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class ConditionalItemModel implements ItemModel { + private final ItemModelPropertyTest property; + private final ItemModel onTrue; + private final ItemModel onFalse; + + public ConditionalItemModel(ItemModelPropertyTest property, ItemModel onTrue, ItemModel onFalse) { + this.property = property; + this.onTrue = onTrue; + this.onFalse = onFalse; + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + (this.property.get(stack, level, entity, seed, displayContext) ? this.onTrue : this.onFalse) + .update(renderState, stack, itemModelResolver, displayContext, level, entity, seed); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ConditionalItemModelProperty property, ItemModel.Unbaked onTrue, ItemModel.Unbaked onFalse) implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ConditionalItemModelProperties.MAP_CODEC.forGetter(ConditionalItemModel.Unbaked::property), + ItemModels.CODEC.fieldOf("on_true").forGetter(ConditionalItemModel.Unbaked::onTrue), + ItemModels.CODEC.fieldOf("on_false").forGetter(ConditionalItemModel.Unbaked::onFalse) + ) + .apply(instance, ConditionalItemModel.Unbaked::new) + ); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + return new ConditionalItemModel(this.adaptProperty(this.property, context.contextSwapper()), this.onTrue.bake(context), this.onFalse.bake(context)); + } + + private ItemModelPropertyTest adaptProperty(ConditionalItemModelProperty property, @Nullable RegistryContextSwapper contextSwapper) { + if (contextSwapper == null) { + return property; + } else { + CacheSlot cacheSlot = new CacheSlot<>(clientLevel -> swapContext(property, contextSwapper, clientLevel)); + return (itemStack, clientLevel, livingEntity, i, itemDisplayContext) -> { + ItemModelPropertyTest itemModelPropertyTest = (ItemModelPropertyTest)(clientLevel == null ? property : cacheSlot.compute(clientLevel)); + return itemModelPropertyTest.get(itemStack, clientLevel, livingEntity, i, itemDisplayContext); + }; + } + } + + private static T swapContext(T property, RegistryContextSwapper contextSwapper, ClientLevel level) { + return (T)contextSwapper.swapTo(property.type().codec(), property, level.registryAccess()).result().orElse(property); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.onTrue.resolveDependencies(resolver); + this.onFalse.resolveDependencies(resolver); + } + } +} diff --git a/net/minecraft/client/renderer/item/EmptyModel.java b/net/minecraft/client/renderer/item/EmptyModel.java new file mode 100644 index 00000000..7fc9b500 --- /dev/null +++ b/net/minecraft/client/renderer/item/EmptyModel.java @@ -0,0 +1,47 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class EmptyModel implements ItemModel { + public static final ItemModel INSTANCE = new EmptyModel(); + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = MapCodec.unit(EmptyModel.Unbaked::new); + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + return EmptyModel.INSTANCE; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + } +} diff --git a/net/minecraft/client/renderer/item/ItemModel.java b/net/minecraft/client/renderer/item/ItemModel.java new file mode 100644 index 00000000..0bcd0407 --- /dev/null +++ b/net/minecraft/client/renderer/item/ItemModel.java @@ -0,0 +1,40 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.util.RegistryContextSwapper; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface ItemModel { + void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ); + + @Environment(EnvType.CLIENT) + public record BakingContext( + ModelBaker blockModelBaker, EntityModelSet entityModelSet, ItemModel missingItemModel, @Nullable RegistryContextSwapper contextSwapper + ) { + } + + @Environment(EnvType.CLIENT) + public interface Unbaked extends ResolvableModel { + MapCodec type(); + + ItemModel bake(ItemModel.BakingContext context); + } +} diff --git a/net/minecraft/client/renderer/item/ItemModelResolver.java b/net/minecraft/client/renderer/item/ItemModelResolver.java new file mode 100644 index 00000000..d411dc87 --- /dev/null +++ b/net/minecraft/client/renderer/item/ItemModelResolver.java @@ -0,0 +1,74 @@ +package net.minecraft.client.renderer.item; + +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.resources.model.ModelManager; +import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.ResolvableProfile; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.AbstractSkullBlock; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class ItemModelResolver { + private final Function modelGetter; + private final Function clientProperties; + + public ItemModelResolver(ModelManager modelManager) { + this.modelGetter = modelManager::getItemModel; + this.clientProperties = modelManager::getItemProperties; + } + + public void updateForLiving(ItemStackRenderState renderState, ItemStack stack, ItemDisplayContext displayContext, LivingEntity entity) { + this.updateForTopItem(renderState, stack, displayContext, entity.level(), entity, entity.getId() + displayContext.ordinal()); + } + + public void updateForNonLiving(ItemStackRenderState renderState, ItemStack stack, ItemDisplayContext displayContext, Entity entity) { + this.updateForTopItem(renderState, stack, displayContext, entity.level(), null, entity.getId()); + } + + public void updateForTopItem( + ItemStackRenderState renderState, ItemStack stack, ItemDisplayContext displayContext, @Nullable Level level, @Nullable LivingEntity entity, int seed + ) { + renderState.clear(); + if (!stack.isEmpty()) { + renderState.displayContext = displayContext; + this.appendItemLayers(renderState, stack, displayContext, level, entity, seed); + } + } + + private static void fixupSkullProfile(ItemStack stack) { + if (stack.getItem() instanceof BlockItem blockItem && blockItem.getBlock() instanceof AbstractSkullBlock) { + ResolvableProfile resolvableProfile = stack.get(DataComponents.PROFILE); + if (resolvableProfile != null && !resolvableProfile.isResolved()) { + stack.remove(DataComponents.PROFILE); + resolvableProfile.resolve().thenAcceptAsync(resolvableProfilex -> stack.set(DataComponents.PROFILE, resolvableProfilex), Minecraft.getInstance()); + } + } + } + + public void appendItemLayers( + ItemStackRenderState renderState, ItemStack stack, ItemDisplayContext displayContext, @Nullable Level level, @Nullable LivingEntity entity, int seed + ) { + fixupSkullProfile(stack); + ResourceLocation resourceLocation = stack.get(DataComponents.ITEM_MODEL); + if (resourceLocation != null) { + ((ItemModel)this.modelGetter.apply(resourceLocation)) + .update(renderState, stack, this, displayContext, level instanceof ClientLevel clientLevel ? clientLevel : null, entity, seed); + } + } + + public boolean shouldPlaySwapAnimation(ItemStack stack) { + ResourceLocation resourceLocation = stack.get(DataComponents.ITEM_MODEL); + return resourceLocation == null ? true : ((ClientItem.Properties)this.clientProperties.apply(resourceLocation)).handAnimationOnSwap(); + } +} diff --git a/net/minecraft/client/renderer/item/ItemModels.java b/net/minecraft/client/renderer/item/ItemModels.java new file mode 100644 index 00000000..976c65c9 --- /dev/null +++ b/net/minecraft/client/renderer/item/ItemModels.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; + +@Environment(EnvType.CLIENT) +public class ItemModels { + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final Codec CODEC = ID_MAPPER.codec(ResourceLocation.CODEC).dispatch(ItemModel.Unbaked::type, mapCodec -> mapCodec); + + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("empty"), EmptyModel.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("model"), BlockModelWrapper.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("range_dispatch"), RangeSelectItemModel.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("special"), SpecialModelWrapper.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("composite"), CompositeModel.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("bundle/selected_item"), BundleSelectedItemSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("select"), SelectItemModel.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("condition"), ConditionalItemModel.Unbaked.MAP_CODEC); + } +} diff --git a/net/minecraft/client/renderer/item/ItemProperties.java b/net/minecraft/client/renderer/item/ItemProperties.java deleted file mode 100644 index 5a69b3ac..00000000 --- a/net/minecraft/client/renderer/item/ItemProperties.java +++ /dev/null @@ -1,254 +0,0 @@ -package net.minecraft.client.renderer.item; - -import com.google.common.collect.Maps; -import java.util.Map; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.core.GlobalPos; -import net.minecraft.core.component.DataComponents; -import net.minecraft.data.models.ItemModelGenerators; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.Mth; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.BundleItem; -import net.minecraft.world.item.CompassItem; -import net.minecraft.world.item.CrossbowItem; -import net.minecraft.world.item.FishingRodItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.component.BlockItemStateProperties; -import net.minecraft.world.item.component.ChargedProjectiles; -import net.minecraft.world.item.component.CustomModelData; -import net.minecraft.world.item.component.LodestoneTracker; -import net.minecraft.world.item.equipment.trim.ArmorTrim; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.BeehiveBlock; -import net.minecraft.world.level.block.LightBlock; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class ItemProperties { - private static final Map GENERIC_PROPERTIES = Maps.newHashMap(); - private static final ResourceLocation DAMAGED = ResourceLocation.withDefaultNamespace("damaged"); - private static final ResourceLocation DAMAGE = ResourceLocation.withDefaultNamespace("damage"); - private static final ClampedItemPropertyFunction PROPERTY_DAMAGED = (itemStack, clientLevel, livingEntity, i) -> itemStack.isDamaged() ? 1.0F : 0.0F; - private static final ClampedItemPropertyFunction PROPERTY_DAMAGE = (itemStack, clientLevel, livingEntity, i) -> Mth.clamp( - (float)itemStack.getDamageValue() / itemStack.getMaxDamage(), 0.0F, 1.0F - ); - private static final Map> PROPERTIES = Maps.>newHashMap(); - - private static ClampedItemPropertyFunction registerGeneric(ResourceLocation name, ClampedItemPropertyFunction property) { - GENERIC_PROPERTIES.put(name, property); - return property; - } - - private static void registerCustomModelData(ItemPropertyFunction property) { - GENERIC_PROPERTIES.put(ResourceLocation.withDefaultNamespace("custom_model_data"), property); - } - - private static void register(Item item, ResourceLocation name, ClampedItemPropertyFunction property) { - ((Map)PROPERTIES.computeIfAbsent(item, itemx -> Maps.newHashMap())).put(name, property); - } - - private static int honeyLevelProperty(ItemStack itemStack) { - BlockItemStateProperties blockItemStateProperties = itemStack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY); - Integer integer = blockItemStateProperties.get(BeehiveBlock.HONEY_LEVEL); - return integer != null && integer == 5 ? 1 : 0; - } - - @Nullable - public static ItemPropertyFunction getProperty(ItemStack stack, ResourceLocation location) { - if (stack.getMaxDamage() > 0) { - if (DAMAGE.equals(location)) { - return PROPERTY_DAMAGE; - } - - if (DAMAGED.equals(location)) { - return PROPERTY_DAMAGED; - } - } - - ItemPropertyFunction itemPropertyFunction = (ItemPropertyFunction)GENERIC_PROPERTIES.get(location); - if (itemPropertyFunction != null) { - return itemPropertyFunction; - } else { - Map map = (Map)PROPERTIES.get(stack.getItem()); - return map == null ? null : (ItemPropertyFunction)map.get(location); - } - } - - static { - registerGeneric( - ResourceLocation.withDefaultNamespace("lefthanded"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.getMainArm() != HumanoidArm.RIGHT ? 1.0F : 0.0F - ); - registerGeneric( - ResourceLocation.withDefaultNamespace("cooldown"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity instanceof Player - ? ((Player)livingEntity).getCooldowns().getCooldownPercent(itemStack, 0.0F) - : 0.0F - ); - ClampedItemPropertyFunction clampedItemPropertyFunction = (itemStack, clientLevel, livingEntity, i) -> { - ArmorTrim armorTrim = itemStack.get(DataComponents.TRIM); - return armorTrim != null ? armorTrim.material().value().itemModelIndex() : Float.NEGATIVE_INFINITY; - }; - registerGeneric(ItemModelGenerators.TRIM_TYPE_PREDICATE_ID, clampedItemPropertyFunction); - registerGeneric(ResourceLocation.withDefaultNamespace("broken"), (itemStack, clientLevel, livingEntity, i) -> itemStack.nextDamageWillBreak() ? 1.0F : 0.0F); - registerCustomModelData( - (itemStack, clientLevel, livingEntity, i) -> itemStack.getOrDefault(DataComponents.CUSTOM_MODEL_DATA, CustomModelData.DEFAULT).value() - ); - register(Items.BOW, ResourceLocation.withDefaultNamespace("pull"), (itemStack, clientLevel, livingEntity, i) -> { - if (livingEntity == null) { - return 0.0F; - } else { - return livingEntity.getUseItem() != itemStack ? 0.0F : (itemStack.getUseDuration(livingEntity) - livingEntity.getUseItemRemainingTicks()) / 20.0F; - } - }); - register( - Items.BRUSH, - ResourceLocation.withDefaultNamespace("brushing"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.getUseItem() == itemStack - ? livingEntity.getUseItemRemainingTicks() % 10 / 10.0F - : 0.0F - ); - register( - Items.BOW, - ResourceLocation.withDefaultNamespace("pulling"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.isUsingItem() && livingEntity.getUseItem() == itemStack ? 1.0F : 0.0F - ); - - for (BundleItem bundleItem : BundleItem.getAllBundleItemColors()) { - register( - bundleItem.asItem(), ResourceLocation.withDefaultNamespace("filled"), (itemStack, clientLevel, livingEntity, i) -> BundleItem.getFullnessDisplay(itemStack) - ); - } - - register(Items.CLOCK, ResourceLocation.withDefaultNamespace("time"), new ClampedItemPropertyFunction() { - private double rotation; - private double rota; - private long lastUpdateTick; - - @Override - public float unclampedCall(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i) { - Entity entity = (Entity)(livingEntity != null ? livingEntity : itemStack.getEntityRepresentation()); - if (entity == null) { - return 0.0F; - } else { - if (clientLevel == null && entity.level() instanceof ClientLevel) { - clientLevel = (ClientLevel)entity.level(); - } - - if (clientLevel == null) { - return 0.0F; - } else { - double d; - if (clientLevel.dimensionType().natural()) { - d = clientLevel.getTimeOfDay(1.0F); - } else { - d = Math.random(); - } - - d = this.wobble(clientLevel, d); - return (float)d; - } - } - } - - private double wobble(Level level, double rotation) { - if (level.getGameTime() != this.lastUpdateTick) { - this.lastUpdateTick = level.getGameTime(); - double d = rotation - this.rotation; - d = Mth.positiveModulo(d + 0.5, 1.0) - 0.5; - this.rota += d * 0.1; - this.rota *= 0.9; - this.rotation = Mth.positiveModulo(this.rotation + this.rota, 1.0); - } - - return this.rotation; - } - }); - register(Items.COMPASS, ResourceLocation.withDefaultNamespace("angle"), new CompassItemPropertyFunction((clientLevel, itemStack, entity) -> { - LodestoneTracker lodestoneTracker = itemStack.get(DataComponents.LODESTONE_TRACKER); - return lodestoneTracker != null ? (GlobalPos)lodestoneTracker.target().orElse(null) : CompassItem.getSpawnPosition(clientLevel); - })); - register( - Items.RECOVERY_COMPASS, - ResourceLocation.withDefaultNamespace("angle"), - new CompassItemPropertyFunction( - (clientLevel, itemStack, entity) -> entity instanceof Player player ? (GlobalPos)player.getLastDeathLocation().orElse(null) : null - ) - ); - register( - Items.CROSSBOW, - ResourceLocation.withDefaultNamespace("pull"), - (itemStack, clientLevel, livingEntity, i) -> { - if (livingEntity == null) { - return 0.0F; - } else { - return CrossbowItem.isCharged(itemStack) - ? 0.0F - : (float)(itemStack.getUseDuration(livingEntity) - livingEntity.getUseItemRemainingTicks()) / CrossbowItem.getChargeDuration(itemStack, livingEntity); - } - } - ); - register( - Items.CROSSBOW, - ResourceLocation.withDefaultNamespace("pulling"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null - && livingEntity.isUsingItem() - && livingEntity.getUseItem() == itemStack - && !CrossbowItem.isCharged(itemStack) - ? 1.0F - : 0.0F - ); - register( - Items.CROSSBOW, - ResourceLocation.withDefaultNamespace("charged"), - (itemStack, clientLevel, livingEntity, i) -> CrossbowItem.isCharged(itemStack) ? 1.0F : 0.0F - ); - register(Items.CROSSBOW, ResourceLocation.withDefaultNamespace("firework"), (itemStack, clientLevel, livingEntity, i) -> { - ChargedProjectiles chargedProjectiles = itemStack.get(DataComponents.CHARGED_PROJECTILES); - return chargedProjectiles != null && chargedProjectiles.contains(Items.FIREWORK_ROCKET) ? 1.0F : 0.0F; - }); - register(Items.FISHING_ROD, ResourceLocation.withDefaultNamespace("cast"), (itemStack, clientLevel, livingEntity, i) -> { - if (livingEntity == null) { - return 0.0F; - } else { - boolean bl = livingEntity.getMainHandItem() == itemStack; - boolean bl2 = livingEntity.getOffhandItem() == itemStack; - if (livingEntity.getMainHandItem().getItem() instanceof FishingRodItem) { - bl2 = false; - } - - return (bl || bl2) && livingEntity instanceof Player && ((Player)livingEntity).fishing != null ? 1.0F : 0.0F; - } - }); - register( - Items.SHIELD, - ResourceLocation.withDefaultNamespace("blocking"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.isUsingItem() && livingEntity.getUseItem() == itemStack ? 1.0F : 0.0F - ); - register( - Items.TRIDENT, - ResourceLocation.withDefaultNamespace("throwing"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.isUsingItem() && livingEntity.getUseItem() == itemStack ? 1.0F : 0.0F - ); - register(Items.LIGHT, ResourceLocation.withDefaultNamespace("level"), (itemStack, clientLevel, livingEntity, i) -> { - BlockItemStateProperties blockItemStateProperties = itemStack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY); - Integer integer = blockItemStateProperties.get(LightBlock.LEVEL); - return integer != null ? integer.intValue() / 16.0F : 1.0F; - }); - register( - Items.GOAT_HORN, - ResourceLocation.withDefaultNamespace("tooting"), - (itemStack, clientLevel, livingEntity, i) -> livingEntity != null && livingEntity.isUsingItem() && livingEntity.getUseItem() == itemStack ? 1.0F : 0.0F - ); - register(Items.BEE_NEST, ResourceLocation.withDefaultNamespace("honey_level"), (itemStack, clientLevel, livingEntity, i) -> honeyLevelProperty(itemStack)); - register(Items.BEEHIVE, ResourceLocation.withDefaultNamespace("honey_level"), (itemStack, clientLevel, livingEntity, i) -> honeyLevelProperty(itemStack)); - } -} diff --git a/net/minecraft/client/renderer/item/ItemPropertyFunction.java b/net/minecraft/client/renderer/item/ItemPropertyFunction.java deleted file mode 100644 index ee759583..00000000 --- a/net/minecraft/client/renderer/item/ItemPropertyFunction.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.minecraft.client.renderer.item; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.multiplayer.ClientLevel; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; - -@Deprecated -@Environment(EnvType.CLIENT) -public interface ItemPropertyFunction { - float call(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i); -} diff --git a/net/minecraft/client/renderer/item/ItemStackRenderState.java b/net/minecraft/client/renderer/item/ItemStackRenderState.java new file mode 100644 index 00000000..34db4a6b --- /dev/null +++ b/net/minecraft/client/renderer/item/ItemStackRenderState.java @@ -0,0 +1,207 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.blaze3d.vertex.PoseStack; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.renderer.block.model.ItemTransform; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.special.SpecialModelRenderer; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.RandomSource; +import net.minecraft.world.item.ItemDisplayContext; +import org.jetbrains.annotations.Nullable; +import org.joml.Matrix4f; +import org.joml.Vector3f; +import org.joml.Vector3fc; + +@Environment(EnvType.CLIENT) +public class ItemStackRenderState { + ItemDisplayContext displayContext = ItemDisplayContext.NONE; + private int activeLayerCount; + private ItemStackRenderState.LayerRenderState[] layers = new ItemStackRenderState.LayerRenderState[]{new ItemStackRenderState.LayerRenderState()}; + + public void ensureCapacity(int expectedSize) { + int i = this.layers.length; + int j = this.activeLayerCount + expectedSize; + if (j > i) { + this.layers = (ItemStackRenderState.LayerRenderState[])Arrays.copyOf(this.layers, j); + + for (int k = i; k < j; k++) { + this.layers[k] = new ItemStackRenderState.LayerRenderState(); + } + } + } + + public ItemStackRenderState.LayerRenderState newLayer() { + this.ensureCapacity(1); + return this.layers[this.activeLayerCount++]; + } + + public void clear() { + this.displayContext = ItemDisplayContext.NONE; + + for (int i = 0; i < this.activeLayerCount; i++) { + this.layers[i].clear(); + } + + this.activeLayerCount = 0; + } + + private ItemStackRenderState.LayerRenderState firstLayer() { + return this.layers[0]; + } + + public boolean isEmpty() { + return this.activeLayerCount == 0; + } + + public boolean usesBlockLight() { + return this.firstLayer().usesBlockLight; + } + + @Nullable + public TextureAtlasSprite pickParticleIcon(RandomSource random) { + return this.activeLayerCount == 0 ? null : this.layers[random.nextInt(this.activeLayerCount)].particleIcon; + } + + public void visitExtents(Consumer visitor) { + Vector3f vector3f = new Vector3f(); + PoseStack.Pose pose = new PoseStack.Pose(); + + for (int i = 0; i < this.activeLayerCount; i++) { + ItemStackRenderState.LayerRenderState layerRenderState = this.layers[i]; + layerRenderState.transform.apply(this.displayContext.leftHand(), pose); + Matrix4f matrix4f = pose.pose(); + Vector3f[] vector3fs = (Vector3f[])layerRenderState.extents.get(); + + for (Vector3f vector3f2 : vector3fs) { + visitor.accept(vector3f.set(vector3f2).mulPosition(matrix4f)); + } + + pose.setIdentity(); + } + } + + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + for (int i = 0; i < this.activeLayerCount; i++) { + this.layers[i].render(poseStack, bufferSource, packedLight, packedOverlay); + } + } + + @Environment(EnvType.CLIENT) + public static enum FoilType { + NONE, + STANDARD, + SPECIAL; + } + + @Environment(EnvType.CLIENT) + public class LayerRenderState { + private static final Vector3f[] NO_EXTENTS = new Vector3f[0]; + public static final Supplier NO_EXTENTS_SUPPLIER = () -> NO_EXTENTS; + private final List quads = new ArrayList(); + boolean usesBlockLight; + @Nullable + TextureAtlasSprite particleIcon; + ItemTransform transform = ItemTransform.NO_TRANSFORM; + @Nullable + private RenderType renderType; + private ItemStackRenderState.FoilType foilType = ItemStackRenderState.FoilType.NONE; + private int[] tintLayers = new int[0]; + @Nullable + private SpecialModelRenderer specialRenderer; + @Nullable + private Object argumentForSpecialRendering; + Supplier extents = NO_EXTENTS_SUPPLIER; + + public void clear() { + this.quads.clear(); + this.renderType = null; + this.foilType = ItemStackRenderState.FoilType.NONE; + this.specialRenderer = null; + this.argumentForSpecialRendering = null; + Arrays.fill(this.tintLayers, -1); + this.usesBlockLight = false; + this.particleIcon = null; + this.transform = ItemTransform.NO_TRANSFORM; + this.extents = NO_EXTENTS_SUPPLIER; + } + + public List prepareQuadList() { + return this.quads; + } + + public void setRenderType(RenderType renderType) { + this.renderType = renderType; + } + + public void setUsesBlockLight(boolean usesBlockLight) { + this.usesBlockLight = usesBlockLight; + } + + public void setExtents(Supplier extents) { + this.extents = extents; + } + + public void setParticleIcon(TextureAtlasSprite particleIcon) { + this.particleIcon = particleIcon; + } + + public void setTransform(ItemTransform transform) { + this.transform = transform; + } + + public void setupSpecialModel(SpecialModelRenderer renderer, @Nullable T argument) { + this.specialRenderer = eraseSpecialRenderer(renderer); + this.argumentForSpecialRendering = argument; + } + + private static SpecialModelRenderer eraseSpecialRenderer(SpecialModelRenderer specialRenderer) { + return (SpecialModelRenderer)specialRenderer; + } + + public void setFoilType(ItemStackRenderState.FoilType foilType) { + this.foilType = foilType; + } + + public int[] prepareTintLayers(int count) { + if (count > this.tintLayers.length) { + this.tintLayers = new int[count]; + Arrays.fill(this.tintLayers, -1); + } + + return this.tintLayers; + } + + void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) { + poseStack.pushPose(); + this.transform.apply(ItemStackRenderState.this.displayContext.leftHand(), poseStack.last()); + if (this.specialRenderer != null) { + this.specialRenderer + .render( + this.argumentForSpecialRendering, + ItemStackRenderState.this.displayContext, + poseStack, + bufferSource, + packedLight, + packedOverlay, + this.foilType != ItemStackRenderState.FoilType.NONE + ); + } else if (this.renderType != null) { + ItemRenderer.renderItem( + ItemStackRenderState.this.displayContext, poseStack, bufferSource, packedLight, packedOverlay, this.tintLayers, this.quads, this.renderType, this.foilType + ); + } + + poseStack.popPose(); + } + } +} diff --git a/net/minecraft/client/renderer/item/MissingItemModel.java b/net/minecraft/client/renderer/item/MissingItemModel.java new file mode 100644 index 00000000..13ceb111 --- /dev/null +++ b/net/minecraft/client/renderer/item/MissingItemModel.java @@ -0,0 +1,45 @@ +package net.minecraft.client.renderer.item; + +import com.google.common.base.Suppliers; +import java.util.List; +import java.util.function.Supplier; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; +import org.joml.Vector3f; + +@Environment(EnvType.CLIENT) +public class MissingItemModel implements ItemModel { + private final List quads; + private final Supplier extents; + private final ModelRenderProperties properties; + + public MissingItemModel(List quads, ModelRenderProperties properties) { + this.quads = quads; + this.properties = properties; + this.extents = Suppliers.memoize(() -> BlockModelWrapper.computeExtents(this.quads)); + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + ItemStackRenderState.LayerRenderState layerRenderState = renderState.newLayer(); + layerRenderState.setRenderType(Sheets.cutoutBlockSheet()); + this.properties.applyToLayer(layerRenderState, displayContext); + layerRenderState.setExtents(this.extents); + layerRenderState.prepareQuadList().addAll(this.quads); + } +} diff --git a/net/minecraft/client/renderer/item/ModelRenderProperties.java b/net/minecraft/client/renderer/item/ModelRenderProperties.java new file mode 100644 index 00000000..e4095352 --- /dev/null +++ b/net/minecraft/client/renderer/item/ModelRenderProperties.java @@ -0,0 +1,24 @@ +package net.minecraft.client.renderer.item; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvedModel; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public record ModelRenderProperties(boolean usesBlockLight, TextureAtlasSprite particleIcon, ItemTransforms transforms) { + public static ModelRenderProperties fromResolvedModel(ModelBaker baker, ResolvedModel model, TextureSlots textureSlots) { + TextureAtlasSprite textureAtlasSprite = model.resolveParticleSprite(textureSlots, baker); + return new ModelRenderProperties(model.getTopGuiLight().lightLikeBlock(), textureAtlasSprite, model.getTopTransforms()); + } + + public void applyToLayer(ItemStackRenderState.LayerRenderState renderState, ItemDisplayContext displayContext) { + renderState.setUsesBlockLight(this.usesBlockLight); + renderState.setParticleIcon(this.particleIcon); + renderState.setTransform(this.transforms.getTransform(displayContext)); + } +} diff --git a/net/minecraft/client/renderer/item/RangeSelectItemModel.java b/net/minecraft/client/renderer/item/RangeSelectItemModel.java new file mode 100644 index 00000000..6a4c6c44 --- /dev/null +++ b/net/minecraft/client/renderer/item/RangeSelectItemModel.java @@ -0,0 +1,134 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperties; +import net.minecraft.client.renderer.item.properties.numeric.RangeSelectItemModelProperty; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class RangeSelectItemModel implements ItemModel { + private static final int LINEAR_SEARCH_THRESHOLD = 16; + private final RangeSelectItemModelProperty property; + private final float scale; + private final float[] thresholds; + private final ItemModel[] models; + private final ItemModel fallback; + + RangeSelectItemModel(RangeSelectItemModelProperty property, float scale, float[] thresholds, ItemModel[] models, ItemModel fallback) { + this.property = property; + this.thresholds = thresholds; + this.models = models; + this.fallback = fallback; + this.scale = scale; + } + + private static int lastIndexLessOrEqual(float[] thresholds, float value) { + if (thresholds.length < 16) { + for (int i = 0; i < thresholds.length; i++) { + if (thresholds[i] > value) { + return i - 1; + } + } + + return thresholds.length - 1; + } else { + int ix = Arrays.binarySearch(thresholds, value); + if (ix < 0) { + int j = ~ix; + return j - 1; + } else { + return ix; + } + } + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + float f = this.property.get(stack, level, entity, seed) * this.scale; + ItemModel itemModel; + if (Float.isNaN(f)) { + itemModel = this.fallback; + } else { + int i = lastIndexLessOrEqual(this.thresholds, f); + itemModel = i == -1 ? this.fallback : this.models[i]; + } + + itemModel.update(renderState, stack, itemModelResolver, displayContext, level, entity, seed); + } + + @Environment(EnvType.CLIENT) + public record Entry(float threshold, ItemModel.Unbaked model) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Codec.FLOAT.fieldOf("threshold").forGetter(RangeSelectItemModel.Entry::threshold), + ItemModels.CODEC.fieldOf("model").forGetter(RangeSelectItemModel.Entry::model) + ) + .apply(instance, RangeSelectItemModel.Entry::new) + ); + public static final Comparator BY_THRESHOLD = Comparator.comparingDouble(RangeSelectItemModel.Entry::threshold); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(RangeSelectItemModelProperty property, float scale, List entries, Optional fallback) + implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + RangeSelectItemModelProperties.MAP_CODEC.forGetter(RangeSelectItemModel.Unbaked::property), + Codec.FLOAT.optionalFieldOf("scale", 1.0F).forGetter(RangeSelectItemModel.Unbaked::scale), + RangeSelectItemModel.Entry.CODEC.listOf().fieldOf("entries").forGetter(RangeSelectItemModel.Unbaked::entries), + ItemModels.CODEC.optionalFieldOf("fallback").forGetter(RangeSelectItemModel.Unbaked::fallback) + ) + .apply(instance, RangeSelectItemModel.Unbaked::new) + ); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + float[] fs = new float[this.entries.size()]; + ItemModel[] itemModels = new ItemModel[this.entries.size()]; + List list = new ArrayList(this.entries); + list.sort(RangeSelectItemModel.Entry.BY_THRESHOLD); + + for (int i = 0; i < list.size(); i++) { + RangeSelectItemModel.Entry entry = (RangeSelectItemModel.Entry)list.get(i); + fs[i] = entry.threshold; + itemModels[i] = entry.model.bake(context); + } + + ItemModel itemModel = (ItemModel)this.fallback.map(unbaked -> unbaked.bake(context)).orElse(context.missingItemModel()); + return new RangeSelectItemModel(this.property, this.scale, fs, itemModels, itemModel); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.fallback.ifPresent(unbaked -> unbaked.resolveDependencies(resolver)); + this.entries.forEach(entry -> entry.model.resolveDependencies(resolver)); + } + } +} diff --git a/net/minecraft/client/renderer/item/SelectItemModel.java b/net/minecraft/client/renderer/item/SelectItemModel.java new file mode 100644 index 00000000..ce1cbbc1 --- /dev/null +++ b/net/minecraft/client/renderer/item/SelectItemModel.java @@ -0,0 +1,153 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import java.util.List; +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.CacheSlot; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperties; +import net.minecraft.client.renderer.item.properties.select.SelectItemModelProperty; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.util.RegistryContextSwapper; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class SelectItemModel implements ItemModel { + private final SelectItemModelProperty property; + private final SelectItemModel.ModelSelector models; + + public SelectItemModel(SelectItemModelProperty property, SelectItemModel.ModelSelector models) { + this.property = property; + this.models = models; + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + T object = this.property.get(stack, level, entity, seed, displayContext); + ItemModel itemModel = this.models.get(object, level); + if (itemModel != null) { + itemModel.update(renderState, stack, itemModelResolver, displayContext, level, entity, seed); + } + } + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface ModelSelector { + @Nullable + ItemModel get(@Nullable T object, @Nullable ClientLevel clientLevel); + } + + @Environment(EnvType.CLIENT) + public record SwitchCase(List values, ItemModel.Unbaked model) { + + public static Codec> codec(Codec codec) { + return RecordCodecBuilder.create( + instance -> instance.group( + ExtraCodecs.nonEmptyList(ExtraCodecs.compactListCodec(codec)).fieldOf("when").forGetter(SelectItemModel.SwitchCase::values), + ItemModels.CODEC.fieldOf("model").forGetter(SelectItemModel.SwitchCase::model) + ) + .apply(instance, SelectItemModel.SwitchCase::new) + ); + } + } + + @Environment(EnvType.CLIENT) + public record Unbaked(SelectItemModel.UnbakedSwitch unbakedSwitch, Optional fallback) implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + SelectItemModel.UnbakedSwitch.MAP_CODEC.forGetter(SelectItemModel.Unbaked::unbakedSwitch), + ItemModels.CODEC.optionalFieldOf("fallback").forGetter(SelectItemModel.Unbaked::fallback) + ) + .apply(instance, SelectItemModel.Unbaked::new) + ); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + ItemModel itemModel = (ItemModel)this.fallback.map(unbaked -> unbaked.bake(context)).orElse(context.missingItemModel()); + return this.unbakedSwitch.bake(context, itemModel); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.unbakedSwitch.resolveDependencies(resolver); + this.fallback.ifPresent(unbaked -> unbaked.resolveDependencies(resolver)); + } + } + + @Environment(EnvType.CLIENT) + public record UnbakedSwitch

, T>(P property, List> cases) { + public static final MapCodec> MAP_CODEC = SelectItemModelProperties.CODEC + .dispatchMap("property", unbakedSwitch -> unbakedSwitch.property().type(), SelectItemModelProperty.Type::switchCodec); + + public ItemModel bake(ItemModel.BakingContext bakingContext, ItemModel model) { + Object2ObjectMap object2ObjectMap = new Object2ObjectOpenHashMap<>(); + + for (SelectItemModel.SwitchCase switchCase : this.cases) { + ItemModel.Unbaked unbaked = switchCase.model; + ItemModel itemModel = unbaked.bake(bakingContext); + + for (T object : switchCase.values) { + object2ObjectMap.put(object, itemModel); + } + } + + object2ObjectMap.defaultReturnValue(model); + return new SelectItemModel<>(this.property, this.createModelGetter(object2ObjectMap, bakingContext.contextSwapper())); + } + + private SelectItemModel.ModelSelector createModelGetter(Object2ObjectMap models, @Nullable RegistryContextSwapper contextSwapper) { + if (contextSwapper == null) { + return (object, clientLevel) -> models.get(object); + } else { + ItemModel itemModel = models.defaultReturnValue(); + CacheSlot> cacheSlot = new CacheSlot<>( + clientLevel -> { + Object2ObjectMap object2ObjectMap2 = new Object2ObjectOpenHashMap<>(models.size()); + object2ObjectMap2.defaultReturnValue(itemModel); + models.forEach( + (object, itemModelxx) -> contextSwapper.swapTo(this.property.valueCodec(), (T)object, clientLevel.registryAccess()) + .ifSuccess(objectx -> object2ObjectMap2.put((T)objectx, itemModelxx)) + ); + return object2ObjectMap2; + } + ); + return (object, clientLevel) -> { + if (clientLevel == null) { + return models.get(object); + } else { + return object == null ? itemModel : cacheSlot.compute(clientLevel).get(object); + } + }; + } + } + + public void resolveDependencies(ResolvableModel.Resolver resolver) { + for (SelectItemModel.SwitchCase switchCase : this.cases) { + switchCase.model.resolveDependencies(resolver); + } + } + } +} diff --git a/net/minecraft/client/renderer/item/SpecialModelWrapper.java b/net/minecraft/client/renderer/item/SpecialModelWrapper.java new file mode 100644 index 00000000..c973f34b --- /dev/null +++ b/net/minecraft/client/renderer/item/SpecialModelWrapper.java @@ -0,0 +1,99 @@ +package net.minecraft.client.renderer.item; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.special.SpecialModelRenderer; +import net.minecraft.client.renderer.special.SpecialModelRenderers; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ResolvableModel; +import net.minecraft.client.resources.model.ResolvedModel; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; +import org.joml.Vector3f; + +@Environment(EnvType.CLIENT) +public class SpecialModelWrapper implements ItemModel { + private static final Vector3f[] EXTENTS = new Vector3f[]{ + new Vector3f(0.0F, 0.0F, 0.0F), + new Vector3f(0.0F, 0.0F, 1.0F), + new Vector3f(0.0F, 1.0F, 1.0F), + new Vector3f(0.0F, 1.0F, 0.0F), + new Vector3f(1.0F, 1.0F, 0.0F), + new Vector3f(1.0F, 1.0F, 1.0F), + new Vector3f(1.0F, 0.0F, 1.0F), + new Vector3f(1.0F, 0.0F, 0.0F) + }; + private final SpecialModelRenderer specialRenderer; + private final ModelRenderProperties properties; + + public SpecialModelWrapper(SpecialModelRenderer specialRenderer, ModelRenderProperties properties) { + this.specialRenderer = specialRenderer; + this.properties = properties; + } + + @Override + public void update( + ItemStackRenderState renderState, + ItemStack stack, + ItemModelResolver itemModelResolver, + ItemDisplayContext displayContext, + @Nullable ClientLevel level, + @Nullable LivingEntity entity, + int seed + ) { + ItemStackRenderState.LayerRenderState layerRenderState = renderState.newLayer(); + if (stack.hasFoil()) { + layerRenderState.setFoilType(ItemStackRenderState.FoilType.STANDARD); + } + + layerRenderState.setExtents(() -> EXTENTS); + layerRenderState.setupSpecialModel(this.specialRenderer, this.specialRenderer.extractArgument(stack)); + this.properties.applyToLayer(layerRenderState, displayContext); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ResourceLocation base, SpecialModelRenderer.Unbaked specialModel) implements ItemModel.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("base").forGetter(SpecialModelWrapper.Unbaked::base), + SpecialModelRenderers.CODEC.fieldOf("model").forGetter(SpecialModelWrapper.Unbaked::specialModel) + ) + .apply(instance, SpecialModelWrapper.Unbaked::new) + ); + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + resolver.markDependency(this.base); + } + + @Override + public ItemModel bake(ItemModel.BakingContext context) { + SpecialModelRenderer specialModelRenderer = this.specialModel.bake(context.entityModelSet()); + if (specialModelRenderer == null) { + return context.missingItemModel(); + } else { + ModelRenderProperties modelRenderProperties = this.getProperties(context); + return new SpecialModelWrapper<>(specialModelRenderer, modelRenderProperties); + } + } + + private ModelRenderProperties getProperties(ItemModel.BakingContext context) { + ModelBaker modelBaker = context.blockModelBaker(); + ResolvedModel resolvedModel = modelBaker.getModel(this.base); + TextureSlots textureSlots = resolvedModel.getTopTextureSlots(); + return ModelRenderProperties.fromResolvedModel(modelBaker, resolvedModel, textureSlots); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/Broken.java b/net/minecraft/client/renderer/item/properties/conditional/Broken.java new file mode 100644 index 00000000..c0f17a22 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/Broken.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Broken() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new Broken()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return itemStack.nextDamageWillBreak(); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/BundleHasSelectedItem.java b/net/minecraft/client/renderer/item/properties/conditional/BundleHasSelectedItem.java new file mode 100644 index 00000000..6056bad6 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/BundleHasSelectedItem.java @@ -0,0 +1,26 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.BundleItem; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record BundleHasSelectedItem() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new BundleHasSelectedItem()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return BundleItem.hasSelectedItem(itemStack); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/ComponentMatches.java b/net/minecraft/client/renderer/item/properties/conditional/ComponentMatches.java new file mode 100644 index 00000000..1353a90f --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/ComponentMatches.java @@ -0,0 +1,29 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.predicates.DataComponentPredicate; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record ComponentMatches(DataComponentPredicate.Single predicate) implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(DataComponentPredicate.singleCodec("predicate").forGetter(ComponentMatches::predicate)).apply(instance, ComponentMatches::new) + ); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return this.predicate.predicate().matches(itemStack); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperties.java b/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperties.java new file mode 100644 index 00000000..6820e0bf --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperties.java @@ -0,0 +1,30 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; + +@Environment(EnvType.CLIENT) +public class ConditionalItemModelProperties { + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final MapCodec MAP_CODEC = ID_MAPPER.codec(ResourceLocation.CODEC) + .dispatchMap("property", ConditionalItemModelProperty::type, mapCodec -> mapCodec); + + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("custom_model_data"), CustomModelDataProperty.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("using_item"), IsUsingItem.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("broken"), Broken.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("damaged"), Damaged.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("fishing_rod/cast"), FishingRodCast.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("has_component"), HasComponent.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("bundle/has_selected_item"), BundleHasSelectedItem.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("selected"), IsSelected.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("carried"), IsCarried.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("extended_view"), ExtendedView.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("keybind_down"), IsKeybindDown.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("view_entity"), IsViewEntity.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("component"), ComponentMatches.MAP_CODEC); + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperty.java b/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperty.java new file mode 100644 index 00000000..efa13aa2 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/ConditionalItemModelProperty.java @@ -0,0 +1,10 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public interface ConditionalItemModelProperty extends ItemModelPropertyTest { + MapCodec type(); +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/CustomModelDataProperty.java b/net/minecraft/client/renderer/item/properties/conditional/CustomModelDataProperty.java new file mode 100644 index 00000000..22895538 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/CustomModelDataProperty.java @@ -0,0 +1,33 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.CustomModelData; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record CustomModelDataProperty(int index) implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.NON_NEGATIVE_INT.optionalFieldOf("index", 0).forGetter(CustomModelDataProperty::index)) + .apply(instance, CustomModelDataProperty::new) + ); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + CustomModelData customModelData = itemStack.get(DataComponents.CUSTOM_MODEL_DATA); + return customModelData != null ? customModelData.getBoolean(this.index) == Boolean.TRUE : false; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/Damaged.java b/net/minecraft/client/renderer/item/properties/conditional/Damaged.java new file mode 100644 index 00000000..d062010e --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/Damaged.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Damaged() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new Damaged()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return itemStack.isDamaged(); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/ExtendedView.java b/net/minecraft/client/renderer/item/properties/conditional/ExtendedView.java new file mode 100644 index 00000000..3660083c --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/ExtendedView.java @@ -0,0 +1,26 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record ExtendedView() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new ExtendedView()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return itemDisplayContext == ItemDisplayContext.GUI && Screen.hasShiftDown(); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/FishingRodCast.java b/net/minecraft/client/renderer/item/properties/conditional/FishingRodCast.java new file mode 100644 index 00000000..ea35fd18 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/FishingRodCast.java @@ -0,0 +1,33 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.entity.FishingHookRenderer; +import net.minecraft.world.entity.HumanoidArm; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record FishingRodCast() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new FishingRodCast()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + if (livingEntity instanceof Player player && player.fishing != null) { + HumanoidArm humanoidArm = FishingHookRenderer.getHoldingArm(player); + return livingEntity.getItemHeldByArm(humanoidArm) == itemStack; + } else { + return false; + } + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/HasComponent.java b/net/minecraft/client/renderer/item/properties/conditional/HasComponent.java new file mode 100644 index 00000000..6624f5c4 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/HasComponent.java @@ -0,0 +1,35 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record HasComponent(DataComponentType componentType, boolean ignoreDefault) implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + BuiltInRegistries.DATA_COMPONENT_TYPE.byNameCodec().fieldOf("component").forGetter(HasComponent::componentType), + Codec.BOOL.optionalFieldOf("ignore_default", false).forGetter(HasComponent::ignoreDefault) + ) + .apply(instance, HasComponent::new) + ); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return this.ignoreDefault ? itemStack.hasNonDefault(this.componentType) : itemStack.has(this.componentType); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/IsCarried.java b/net/minecraft/client/renderer/item/properties/conditional/IsCarried.java new file mode 100644 index 00000000..919a1c56 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/IsCarried.java @@ -0,0 +1,26 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record IsCarried() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new IsCarried()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return livingEntity instanceof LocalPlayer localPlayer && localPlayer.containerMenu.getCarried() == itemStack; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/IsKeybindDown.java b/net/minecraft/client/renderer/item/properties/conditional/IsKeybindDown.java new file mode 100644 index 00000000..5fb4fe05 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/IsKeybindDown.java @@ -0,0 +1,35 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.KeyMapping; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record IsKeybindDown(KeyMapping keybind) implements ConditionalItemModelProperty { + private static final Codec KEYBIND_CODEC = Codec.STRING.comapFlatMap(string -> { + KeyMapping keyMapping = KeyMapping.get(string); + return keyMapping != null ? DataResult.success(keyMapping) : DataResult.error(() -> "Invalid keybind: " + string); + }, KeyMapping::getName); + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(KEYBIND_CODEC.fieldOf("keybind").forGetter(IsKeybindDown::keybind)).apply(instance, IsKeybindDown::new) + ); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return this.keybind.isDown(); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/IsSelected.java b/net/minecraft/client/renderer/item/properties/conditional/IsSelected.java new file mode 100644 index 00000000..2e42de81 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/IsSelected.java @@ -0,0 +1,26 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record IsSelected() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new IsSelected()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return livingEntity instanceof LocalPlayer localPlayer && localPlayer.getInventory().getSelectedItem() == itemStack; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/IsUsingItem.java b/net/minecraft/client/renderer/item/properties/conditional/IsUsingItem.java new file mode 100644 index 00000000..3a6143ce --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/IsUsingItem.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record IsUsingItem() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new IsUsingItem()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + return livingEntity == null ? false : livingEntity.isUsingItem() && livingEntity.getUseItem() == itemStack; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/IsViewEntity.java b/net/minecraft/client/renderer/item/properties/conditional/IsViewEntity.java new file mode 100644 index 00000000..4887be6e --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/IsViewEntity.java @@ -0,0 +1,29 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record IsViewEntity() implements ConditionalItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new IsViewEntity()); + + @Override + public boolean get(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext) { + Minecraft minecraft = Minecraft.getInstance(); + Entity entity = minecraft.getCameraEntity(); + return entity != null ? livingEntity == entity : livingEntity == minecraft.player; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/ItemModelPropertyTest.java b/net/minecraft/client/renderer/item/properties/conditional/ItemModelPropertyTest.java new file mode 100644 index 00000000..e4a3c445 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/ItemModelPropertyTest.java @@ -0,0 +1,15 @@ +package net.minecraft.client.renderer.item.properties.conditional; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@FunctionalInterface +@Environment(EnvType.CLIENT) +public interface ItemModelPropertyTest { + boolean get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed, ItemDisplayContext displayContext); +} diff --git a/net/minecraft/client/renderer/item/properties/conditional/package-info.java b/net/minecraft/client/renderer/item/properties/conditional/package-info.java new file mode 100644 index 00000000..eac3f291 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/conditional/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.renderer.item.properties.conditional; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/renderer/item/properties/numeric/BundleFullness.java b/net/minecraft/client/renderer/item/properties/numeric/BundleFullness.java new file mode 100644 index 00000000..0f35c04e --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/BundleFullness.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.BundleItem; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record BundleFullness() implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new BundleFullness()); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + return BundleItem.getFullnessDisplay(stack); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/CompassAngle.java b/net/minecraft/client/renderer/item/properties/numeric/CompassAngle.java new file mode 100644 index 00000000..f725dc6b --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/CompassAngle.java @@ -0,0 +1,33 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CompassAngle implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = CompassAngleState.MAP_CODEC.xmap(CompassAngle::new, compassAngle -> compassAngle.state); + private final CompassAngleState state; + + public CompassAngle(boolean wobble, CompassAngleState.CompassTarget compassTarget) { + this(new CompassAngleState(wobble, compassTarget)); + } + + private CompassAngle(CompassAngleState state) { + this.state = state; + } + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + return this.state.get(stack, level, entity, seed); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/CompassAngleState.java b/net/minecraft/client/renderer/item/properties/numeric/CompassAngleState.java new file mode 100644 index 00000000..27450ef7 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/CompassAngleState.java @@ -0,0 +1,120 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.properties.numeric.NeedleDirectionHelper.Wobbler; +import net.minecraft.core.BlockPos; +import net.minecraft.core.GlobalPos; +import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; +import net.minecraft.util.StringRepresentable; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CompassAngleState extends NeedleDirectionHelper { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + Codec.BOOL.optionalFieldOf("wobble", true).forGetter(NeedleDirectionHelper::wobble), + CompassAngleState.CompassTarget.CODEC.fieldOf("target").forGetter(CompassAngleState::target) + ) + .apply(instance, CompassAngleState::new) + ); + private final Wobbler wobbler; + private final Wobbler noTargetWobbler; + private final CompassAngleState.CompassTarget compassTarget; + private final RandomSource random = RandomSource.create(); + + public CompassAngleState(boolean wobble, CompassAngleState.CompassTarget compassTarget) { + super(wobble); + this.wobbler = this.newWobbler(0.8F); + this.noTargetWobbler = this.newWobbler(0.8F); + this.compassTarget = compassTarget; + } + + @Override + protected float calculate(ItemStack stack, ClientLevel level, int seed, Entity entity) { + GlobalPos globalPos = this.compassTarget.get(level, stack, entity); + long l = level.getGameTime(); + return !isValidCompassTargetPos(entity, globalPos) + ? this.getRandomlySpinningRotation(seed, l) + : this.getRotationTowardsCompassTarget(entity, l, globalPos.pos()); + } + + private float getRandomlySpinningRotation(int seed, long gameTime) { + if (this.noTargetWobbler.shouldUpdate(gameTime)) { + this.noTargetWobbler.update(gameTime, this.random.nextFloat()); + } + + float f = this.noTargetWobbler.rotation() + hash(seed) / 2.1474836E9F; + return Mth.positiveModulo(f, 1.0F); + } + + private float getRotationTowardsCompassTarget(Entity entity, long gameTime, BlockPos targetPos) { + float f = (float)getAngleFromEntityToPos(entity, targetPos); + float g = getWrappedVisualRotationY(entity); + float h; + if (entity instanceof Player player && player.isLocalPlayer() && player.level().tickRateManager().runsNormally()) { + if (this.wobbler.shouldUpdate(gameTime)) { + this.wobbler.update(gameTime, 0.5F - (g - 0.25F)); + } + + h = f + this.wobbler.rotation(); + } else { + h = 0.5F - (g - 0.25F - f); + } + + return Mth.positiveModulo(h, 1.0F); + } + + private static boolean isValidCompassTargetPos(Entity entity, @Nullable GlobalPos pos) { + return pos != null && pos.dimension() == entity.level().dimension() && !(pos.pos().distToCenterSqr(entity.position()) < 1.0E-5F); + } + + private static double getAngleFromEntityToPos(Entity entity, BlockPos pos) { + Vec3 vec3 = Vec3.atCenterOf(pos); + return Math.atan2(vec3.z() - entity.getZ(), vec3.x() - entity.getX()) / (float) (Math.PI * 2); + } + + private static float getWrappedVisualRotationY(Entity entity) { + return Mth.positiveModulo(entity.getVisualRotationYInDegrees() / 360.0F, 1.0F); + } + + private static int hash(int seed) { + return seed * 1327217883; + } + + protected CompassAngleState.CompassTarget target() { + return this.compassTarget; + } + + @Environment(EnvType.CLIENT) + public static enum CompassTarget implements StringRepresentable { + NONE("NONE", 0, "none"), + LODESTONE("LODESTONE", 1, "lodestone"), + SPAWN("SPAWN", 2, "spawn"), + RECOVERY("RECOVERY", 3, "recovery"); + + public static final Codec CODEC = StringRepresentable.fromEnum(CompassAngleState.CompassTarget::values); + private final String name; + + CompassTarget(final String name) { + this.name = name; + } + + @Override + public String getSerializedName() { + return this.name; + } + + @Nullable + abstract GlobalPos get(ClientLevel level, ItemStack stack, Entity entity); + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/Cooldown.java b/net/minecraft/client/renderer/item/properties/numeric/Cooldown.java new file mode 100644 index 00000000..f68ae74b --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/Cooldown.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Cooldown() implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new Cooldown()); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + return entity instanceof Player player ? player.getCooldowns().getCooldownPercent(stack, 0.0F) : 0.0F; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/Count.java b/net/minecraft/client/renderer/item/properties/numeric/Count.java new file mode 100644 index 00000000..04241953 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/Count.java @@ -0,0 +1,31 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Count(boolean normalize) implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(Codec.BOOL.optionalFieldOf("normalize", true).forGetter(Count::normalize)).apply(instance, Count::new) + ); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + float f = stack.getCount(); + float g = stack.getMaxStackSize(); + return this.normalize ? Mth.clamp(f / g, 0.0F, 1.0F) : Mth.clamp(f, 0.0F, g); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/CrossbowPull.java b/net/minecraft/client/renderer/item/properties/numeric/CrossbowPull.java new file mode 100644 index 00000000..2e84ea72 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/CrossbowPull.java @@ -0,0 +1,32 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.CrossbowItem; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class CrossbowPull implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = MapCodec.unit(new CrossbowPull()); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + if (entity == null) { + return 0.0F; + } else if (CrossbowItem.isCharged(stack)) { + return 0.0F; + } else { + int i = CrossbowItem.getChargeDuration(stack, entity); + return (float)UseDuration.useDuration(stack, entity) / i; + } + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/CustomModelDataProperty.java b/net/minecraft/client/renderer/item/properties/numeric/CustomModelDataProperty.java new file mode 100644 index 00000000..e45df71a --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/CustomModelDataProperty.java @@ -0,0 +1,39 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.CustomModelData; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record CustomModelDataProperty(int index) implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ExtraCodecs.NON_NEGATIVE_INT.optionalFieldOf("index", 0).forGetter(CustomModelDataProperty::index)) + .apply(instance, CustomModelDataProperty::new) + ); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + CustomModelData customModelData = stack.get(DataComponents.CUSTOM_MODEL_DATA); + if (customModelData != null) { + Float float_ = customModelData.getFloat(this.index); + if (float_ != null) { + return float_; + } + } + + return 0.0F; + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/Damage.java b/net/minecraft/client/renderer/item/properties/numeric/Damage.java new file mode 100644 index 00000000..7ff6f8f2 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/Damage.java @@ -0,0 +1,31 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record Damage(boolean normalize) implements RangeSelectItemModelProperty { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(Codec.BOOL.optionalFieldOf("normalize", true).forGetter(Damage::normalize)).apply(instance, Damage::new) + ); + + @Override + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + float f = stack.getDamageValue(); + float g = stack.getMaxDamage(); + return this.normalize ? Mth.clamp(f / g, 0.0F, 1.0F) : Mth.clamp(f, 0.0F, g); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/NeedleDirectionHelper.java b/net/minecraft/client/renderer/item/properties/numeric/NeedleDirectionHelper.java new file mode 100644 index 00000000..13e39292 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/NeedleDirectionHelper.java @@ -0,0 +1,99 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public abstract class NeedleDirectionHelper { + private final boolean wobble; + + protected NeedleDirectionHelper(boolean wobble) { + this.wobble = wobble; + } + + public float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + Entity entity2 = (Entity)(entity != null ? entity : stack.getEntityRepresentation()); + if (entity2 == null) { + return 0.0F; + } else { + if (level == null && entity2.level() instanceof ClientLevel clientLevel) { + level = clientLevel; + } + + return level == null ? 0.0F : this.calculate(stack, level, seed, entity2); + } + } + + protected abstract float calculate(ItemStack stack, ClientLevel level, int seed, Entity entity); + + protected boolean wobble() { + return this.wobble; + } + + protected NeedleDirectionHelper.Wobbler newWobbler(float scale) { + return this.wobble ? standardWobbler(scale) : nonWobbler(); + } + + public static NeedleDirectionHelper.Wobbler standardWobbler(float scale) { + return new NeedleDirectionHelper.Wobbler() { + private float rotation; + private float deltaRotation; + private long lastUpdateTick; + + @Override + public float rotation() { + return this.rotation; + } + + @Override + public boolean shouldUpdate(long gameTime) { + return this.lastUpdateTick != gameTime; + } + + @Override + public void update(long gameTime, float targetValue) { + this.lastUpdateTick = gameTime; + float f = Mth.positiveModulo(targetValue - this.rotation + 0.5F, 1.0F) - 0.5F; + this.deltaRotation += f * 0.1F; + this.deltaRotation = this.deltaRotation * scale; + this.rotation = Mth.positiveModulo(this.rotation + this.deltaRotation, 1.0F); + } + }; + } + + public static NeedleDirectionHelper.Wobbler nonWobbler() { + return new NeedleDirectionHelper.Wobbler() { + private float targetValue; + + @Override + public float rotation() { + return this.targetValue; + } + + @Override + public boolean shouldUpdate(long gameTime) { + return true; + } + + @Override + public void update(long gameTime, float targetValue) { + this.targetValue = targetValue; + } + }; + } + + @Environment(EnvType.CLIENT) + public interface Wobbler { + float rotation(); + + boolean shouldUpdate(long gameTime); + + void update(long gameTime, float targetValue); + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperties.java b/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperties.java new file mode 100644 index 00000000..79034716 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperties.java @@ -0,0 +1,27 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; + +@Environment(EnvType.CLIENT) +public class RangeSelectItemModelProperties { + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final MapCodec MAP_CODEC = ID_MAPPER.codec(ResourceLocation.CODEC) + .dispatchMap("property", RangeSelectItemModelProperty::type, mapCodec -> mapCodec); + + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("custom_model_data"), CustomModelDataProperty.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("bundle/fullness"), BundleFullness.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("damage"), Damage.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("cooldown"), Cooldown.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("time"), Time.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("compass"), CompassAngle.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("crossbow/pull"), CrossbowPull.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("use_cycle"), UseCycle.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("use_duration"), UseDuration.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("count"), Count.MAP_CODEC); + } +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperty.java b/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperty.java new file mode 100644 index 00000000..0dae06ac --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/RangeSelectItemModelProperty.java @@ -0,0 +1,16 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface RangeSelectItemModelProperty { + float get(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed); + + MapCodec type(); +} diff --git a/net/minecraft/client/renderer/item/properties/numeric/Time.java b/net/minecraft/client/renderer/item/properties/numeric/Time.java new file mode 100644 index 00000000..c011314c --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/numeric/Time.java @@ -0,0 +1,69 @@ +package net.minecraft.client.renderer.item.properties.numeric; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.properties.numeric.NeedleDirectionHelper.Wobbler; +import net.minecraft.util.RandomSource; +import net.minecraft.util.StringRepresentable; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.ItemStack; + +@Environment(EnvType.CLIENT) +public class Time extends NeedleDirectionHelper implements RangeSelectItemModelProperty { + public static final MapCodec

, T>(MapCodec> switchCodec) { + public static

, T> SelectItemModelProperty.Type create(MapCodec

mapCodec, Codec codec) { + MapCodec> mapCodec2 = RecordCodecBuilder.mapCodec( + instance -> instance.group( + mapCodec.forGetter(SelectItemModel.UnbakedSwitch::property), createCasesFieldCodec(codec).forGetter(SelectItemModel.UnbakedSwitch::cases) + ) + .apply(instance, SelectItemModel.UnbakedSwitch::new) + ); + return new SelectItemModelProperty.Type<>(mapCodec2); + } + + public static MapCodec>> createCasesFieldCodec(Codec codec) { + return SelectItemModel.SwitchCase.codec(codec).listOf().validate(SelectItemModelProperty.Type::validateCases).fieldOf("cases"); + } + + private static DataResult>> validateCases(List> cases) { + if (cases.isEmpty()) { + return DataResult.error(() -> "Empty case list"); + } else { + Multiset multiset = HashMultiset.create(); + + for (SelectItemModel.SwitchCase switchCase : cases) { + multiset.addAll(switchCase.values()); + } + + return multiset.size() != multiset.entrySet().size() + ? DataResult.error( + () -> "Duplicate case conditions: " + + (String)multiset.entrySet() + .stream() + .filter(entry -> entry.getCount() > 1) + .map(entry -> entry.getElement().toString()) + .collect(Collectors.joining(", ")) + ) + : DataResult.success(cases); + } + } + } +} diff --git a/net/minecraft/client/renderer/item/properties/select/TrimMaterialProperty.java b/net/minecraft/client/renderer/item/properties/select/TrimMaterialProperty.java new file mode 100644 index 00000000..4ee3b92b --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/select/TrimMaterialProperty.java @@ -0,0 +1,42 @@ +package net.minecraft.client.renderer.item.properties.select; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.component.DataComponents; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.equipment.trim.ArmorTrim; +import net.minecraft.world.item.equipment.trim.TrimMaterial; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record TrimMaterialProperty() implements SelectItemModelProperty> { + public static final Codec> VALUE_CODEC = ResourceKey.codec(Registries.TRIM_MATERIAL); + public static final SelectItemModelProperty.Type> TYPE = SelectItemModelProperty.Type.create( + MapCodec.unit(new TrimMaterialProperty()), VALUE_CODEC + ); + + @Nullable + public ResourceKey get( + ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i, ItemDisplayContext itemDisplayContext + ) { + ArmorTrim armorTrim = itemStack.get(DataComponents.TRIM); + return armorTrim == null ? null : (ResourceKey)armorTrim.material().unwrapKey().orElse(null); + } + + @Override + public SelectItemModelProperty.Type> type() { + return TYPE; + } + + @Override + public Codec> valueCodec() { + return VALUE_CODEC; + } +} diff --git a/net/minecraft/client/renderer/item/properties/select/package-info.java b/net/minecraft/client/renderer/item/properties/select/package-info.java new file mode 100644 index 00000000..489b2565 --- /dev/null +++ b/net/minecraft/client/renderer/item/properties/select/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.renderer.item.properties.select; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/renderer/special/BannerSpecialRenderer.java b/net/minecraft/client/renderer/special/BannerSpecialRenderer.java new file mode 100644 index 00000000..14b8ae25 --- /dev/null +++ b/net/minecraft/client/renderer/special/BannerSpecialRenderer.java @@ -0,0 +1,66 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Objects; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BannerRenderer; +import net.minecraft.core.component.DataComponents; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BannerPatternLayers; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class BannerSpecialRenderer implements SpecialModelRenderer { + private final BannerRenderer bannerRenderer; + private final DyeColor baseColor; + + public BannerSpecialRenderer(DyeColor baseColor, BannerRenderer bannerRenderer) { + this.bannerRenderer = bannerRenderer; + this.baseColor = baseColor; + } + + @Nullable + public BannerPatternLayers extractArgument(ItemStack itemStack) { + return itemStack.get(DataComponents.BANNER_PATTERNS); + } + + public void render( + @Nullable BannerPatternLayers bannerPatternLayers, + ItemDisplayContext itemDisplayContext, + PoseStack poseStack, + MultiBufferSource multiBufferSource, + int i, + int j, + boolean bl + ) { + this.bannerRenderer + .renderInHand( + poseStack, multiBufferSource, i, j, this.baseColor, (BannerPatternLayers)Objects.requireNonNullElse(bannerPatternLayers, BannerPatternLayers.EMPTY) + ); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(DyeColor baseColor) implements SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(DyeColor.CODEC.fieldOf("color").forGetter(BannerSpecialRenderer.Unbaked::baseColor)) + .apply(instance, BannerSpecialRenderer.Unbaked::new) + ); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new BannerSpecialRenderer(this.baseColor, new BannerRenderer(modelSet)); + } + } +} diff --git a/net/minecraft/client/renderer/special/BedSpecialRenderer.java b/net/minecraft/client/renderer/special/BedSpecialRenderer.java new file mode 100644 index 00000000..0d5e90aa --- /dev/null +++ b/net/minecraft/client/renderer/special/BedSpecialRenderer.java @@ -0,0 +1,55 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.BedRenderer; +import net.minecraft.client.resources.model.Material; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class BedSpecialRenderer implements NoDataSpecialModelRenderer { + private final BedRenderer bedRenderer; + private final Material material; + + public BedSpecialRenderer(BedRenderer bedRenderer, Material material) { + this.bedRenderer = bedRenderer; + this.material = material; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + this.bedRenderer.renderInHand(poseStack, bufferSource, packedLight, packedOverlay, this.material); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ResourceLocation texture) implements net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ResourceLocation.CODEC.fieldOf("texture").forGetter(BedSpecialRenderer.Unbaked::texture)) + .apply(instance, BedSpecialRenderer.Unbaked::new) + ); + + public Unbaked(DyeColor color) { + this(Sheets.colorToResourceMaterial(color)); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new BedSpecialRenderer(new BedRenderer(modelSet), Sheets.BED_MAPPER.apply(this.texture)); + } + } +} diff --git a/net/minecraft/client/renderer/special/ChestSpecialRenderer.java b/net/minecraft/client/renderer/special/ChestSpecialRenderer.java new file mode 100644 index 00000000..a75771ac --- /dev/null +++ b/net/minecraft/client/renderer/special/ChestSpecialRenderer.java @@ -0,0 +1,71 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.ChestModel; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.resources.model.Material; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class ChestSpecialRenderer implements NoDataSpecialModelRenderer { + public static final ResourceLocation GIFT_CHEST_TEXTURE = ResourceLocation.withDefaultNamespace("christmas"); + public static final ResourceLocation NORMAL_CHEST_TEXTURE = ResourceLocation.withDefaultNamespace("normal"); + public static final ResourceLocation TRAPPED_CHEST_TEXTURE = ResourceLocation.withDefaultNamespace("trapped"); + public static final ResourceLocation ENDER_CHEST_TEXTURE = ResourceLocation.withDefaultNamespace("ender"); + private final ChestModel model; + private final Material material; + private final float openness; + + public ChestSpecialRenderer(ChestModel model, Material material, float openness) { + this.model = model; + this.material = material; + this.openness = openness; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + VertexConsumer vertexConsumer = this.material.buffer(bufferSource, RenderType::entitySolid); + this.model.setupAnim(this.openness); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ResourceLocation texture, float openness) implements net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("texture").forGetter(ChestSpecialRenderer.Unbaked::texture), + Codec.FLOAT.optionalFieldOf("openness", 0.0F).forGetter(ChestSpecialRenderer.Unbaked::openness) + ) + .apply(instance, ChestSpecialRenderer.Unbaked::new) + ); + + public Unbaked(ResourceLocation texture) { + this(texture, 0.0F); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + ChestModel chestModel = new ChestModel(modelSet.bakeLayer(ModelLayers.CHEST)); + Material material = Sheets.CHEST_MAPPER.apply(this.texture); + return new ChestSpecialRenderer(chestModel, material, this.openness); + } + } +} diff --git a/net/minecraft/client/renderer/special/ConduitSpecialRenderer.java b/net/minecraft/client/renderer/special/ConduitSpecialRenderer.java new file mode 100644 index 00000000..a8304d4a --- /dev/null +++ b/net/minecraft/client/renderer/special/ConduitSpecialRenderer.java @@ -0,0 +1,49 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.blockentity.ConduitRenderer; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class ConduitSpecialRenderer implements NoDataSpecialModelRenderer { + private final ModelPart model; + + public ConduitSpecialRenderer(ModelPart model) { + this.model = model; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + VertexConsumer vertexConsumer = ConduitRenderer.SHELL_TEXTURE.buffer(bufferSource, RenderType::entitySolid); + poseStack.pushPose(); + poseStack.translate(0.5F, 0.5F, 0.5F); + this.model.render(poseStack, vertexConsumer, packedLight, packedOverlay); + poseStack.popPose(); + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = MapCodec.unit(new ConduitSpecialRenderer.Unbaked()); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new ConduitSpecialRenderer(modelSet.bakeLayer(ModelLayers.CONDUIT_SHELL)); + } + } +} diff --git a/net/minecraft/client/renderer/special/DecoratedPotSpecialRenderer.java b/net/minecraft/client/renderer/special/DecoratedPotSpecialRenderer.java new file mode 100644 index 00000000..16072d8d --- /dev/null +++ b/net/minecraft/client/renderer/special/DecoratedPotSpecialRenderer.java @@ -0,0 +1,56 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import java.util.Objects; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.DecoratedPotRenderer; +import net.minecraft.core.component.DataComponents; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.PotDecorations; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class DecoratedPotSpecialRenderer implements SpecialModelRenderer { + private final DecoratedPotRenderer decoratedPotRenderer; + + public DecoratedPotSpecialRenderer(DecoratedPotRenderer decoratedPotRenderer) { + this.decoratedPotRenderer = decoratedPotRenderer; + } + + @Nullable + public PotDecorations extractArgument(ItemStack itemStack) { + return itemStack.get(DataComponents.POT_DECORATIONS); + } + + public void render( + @Nullable PotDecorations potDecorations, + ItemDisplayContext itemDisplayContext, + PoseStack poseStack, + MultiBufferSource multiBufferSource, + int i, + int j, + boolean bl + ) { + this.decoratedPotRenderer.renderInHand(poseStack, multiBufferSource, i, j, (PotDecorations)Objects.requireNonNullElse(potDecorations, PotDecorations.EMPTY)); + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = MapCodec.unit(new DecoratedPotSpecialRenderer.Unbaked()); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new DecoratedPotSpecialRenderer(new DecoratedPotRenderer(modelSet)); + } + } +} diff --git a/net/minecraft/client/renderer/special/HangingSignSpecialRenderer.java b/net/minecraft/client/renderer/special/HangingSignSpecialRenderer.java new file mode 100644 index 00000000..8ee069de --- /dev/null +++ b/net/minecraft/client/renderer/special/HangingSignSpecialRenderer.java @@ -0,0 +1,62 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.Model; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.HangingSignRenderer; +import net.minecraft.client.resources.model.Material; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.level.block.state.properties.WoodType; + +@Environment(EnvType.CLIENT) +public class HangingSignSpecialRenderer implements NoDataSpecialModelRenderer { + private final Model model; + private final Material material; + + public HangingSignSpecialRenderer(Model model, Material material) { + this.model = model; + this.material = material; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + HangingSignRenderer.renderInHand(poseStack, bufferSource, packedLight, packedOverlay, this.model, this.material); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(WoodType woodType, Optional texture) implements net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + WoodType.CODEC.fieldOf("wood_type").forGetter(HangingSignSpecialRenderer.Unbaked::woodType), + ResourceLocation.CODEC.optionalFieldOf("texture").forGetter(HangingSignSpecialRenderer.Unbaked::texture) + ) + .apply(instance, HangingSignSpecialRenderer.Unbaked::new) + ); + + public Unbaked(WoodType woodType) { + this(woodType, Optional.empty()); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + Model model = HangingSignRenderer.createSignModel(modelSet, this.woodType, HangingSignRenderer.AttachmentType.CEILING_MIDDLE); + Material material = (Material)this.texture.map(Sheets.HANGING_SIGN_MAPPER::apply).orElseGet(() -> Sheets.getHangingSignMaterial(this.woodType)); + return new HangingSignSpecialRenderer(model, material); + } + } +} diff --git a/net/minecraft/client/renderer/special/NoDataSpecialModelRenderer.java b/net/minecraft/client/renderer/special/NoDataSpecialModelRenderer.java new file mode 100644 index 00000000..cf7a512b --- /dev/null +++ b/net/minecraft/client/renderer/special/NoDataSpecialModelRenderer.java @@ -0,0 +1,25 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface NoDataSpecialModelRenderer extends SpecialModelRenderer { + @Nullable + default Void extractArgument(ItemStack itemStack) { + return null; + } + + default void render( + @Nullable Void void_, ItemDisplayContext itemDisplayContext, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, int j, boolean bl + ) { + this.render(itemDisplayContext, poseStack, multiBufferSource, i, j, bl); + } + + void render(ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType); +} diff --git a/net/minecraft/client/renderer/special/ShieldSpecialRenderer.java b/net/minecraft/client/renderer/special/ShieldSpecialRenderer.java new file mode 100644 index 00000000..102586cb --- /dev/null +++ b/net/minecraft/client/renderer/special/ShieldSpecialRenderer.java @@ -0,0 +1,94 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.serialization.MapCodec; +import java.util.Objects; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.ShieldModel; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BannerRenderer; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.core.component.DataComponentMap; +import net.minecraft.core.component.DataComponents; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BannerPatternLayers; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class ShieldSpecialRenderer implements SpecialModelRenderer { + private final ShieldModel model; + + public ShieldSpecialRenderer(ShieldModel model) { + this.model = model; + } + + @Nullable + public DataComponentMap extractArgument(ItemStack itemStack) { + return itemStack.immutableComponents(); + } + + public void render( + @Nullable DataComponentMap dataComponentMap, + ItemDisplayContext itemDisplayContext, + PoseStack poseStack, + MultiBufferSource multiBufferSource, + int i, + int j, + boolean bl + ) { + BannerPatternLayers bannerPatternLayers = dataComponentMap != null + ? dataComponentMap.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY) + : BannerPatternLayers.EMPTY; + DyeColor dyeColor = dataComponentMap != null ? dataComponentMap.get(DataComponents.BASE_COLOR) : null; + boolean bl2 = !bannerPatternLayers.layers().isEmpty() || dyeColor != null; + poseStack.pushPose(); + poseStack.scale(1.0F, -1.0F, -1.0F); + Material material = bl2 ? ModelBakery.SHIELD_BASE : ModelBakery.NO_PATTERN_SHIELD; + VertexConsumer vertexConsumer = material.sprite() + .wrap(ItemRenderer.getFoilBuffer(multiBufferSource, this.model.renderType(material.atlasLocation()), itemDisplayContext == ItemDisplayContext.GUI, bl)); + this.model.handle().render(poseStack, vertexConsumer, i, j); + if (bl2) { + BannerRenderer.renderPatterns( + poseStack, + multiBufferSource, + i, + j, + this.model.plate(), + material, + false, + (DyeColor)Objects.requireNonNullElse(dyeColor, DyeColor.WHITE), + bannerPatternLayers, + bl, + false + ); + } else { + this.model.plate().render(poseStack, vertexConsumer, i, j); + } + + poseStack.popPose(); + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements SpecialModelRenderer.Unbaked { + public static final ShieldSpecialRenderer.Unbaked INSTANCE = new ShieldSpecialRenderer.Unbaked(); + public static final MapCodec MAP_CODEC = MapCodec.unit(INSTANCE); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new ShieldSpecialRenderer(new ShieldModel(modelSet.bakeLayer(ModelLayers.SHIELD))); + } + } +} diff --git a/net/minecraft/client/renderer/special/ShulkerBoxSpecialRenderer.java b/net/minecraft/client/renderer/special/ShulkerBoxSpecialRenderer.java new file mode 100644 index 00000000..aa84b525 --- /dev/null +++ b/net/minecraft/client/renderer/special/ShulkerBoxSpecialRenderer.java @@ -0,0 +1,70 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.ShulkerBoxRenderer; +import net.minecraft.client.resources.model.Material; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class ShulkerBoxSpecialRenderer implements NoDataSpecialModelRenderer { + private final ShulkerBoxRenderer shulkerBoxRenderer; + private final float openness; + private final Direction orientation; + private final Material material; + + public ShulkerBoxSpecialRenderer(ShulkerBoxRenderer shulkerBoxRenderer, float openness, Direction orientation, Material material) { + this.shulkerBoxRenderer = shulkerBoxRenderer; + this.openness = openness; + this.orientation = orientation; + this.material = material; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + this.shulkerBoxRenderer.render(poseStack, bufferSource, packedLight, packedOverlay, this.orientation, this.openness, this.material); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(ResourceLocation texture, float openness, Direction orientation) + implements net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("texture").forGetter(ShulkerBoxSpecialRenderer.Unbaked::texture), + Codec.FLOAT.optionalFieldOf("openness", 0.0F).forGetter(ShulkerBoxSpecialRenderer.Unbaked::openness), + Direction.CODEC.optionalFieldOf("orientation", Direction.UP).forGetter(ShulkerBoxSpecialRenderer.Unbaked::orientation) + ) + .apply(instance, ShulkerBoxSpecialRenderer.Unbaked::new) + ); + + public Unbaked() { + this(ResourceLocation.withDefaultNamespace("shulker"), 0.0F, Direction.UP); + } + + public Unbaked(DyeColor color) { + this(Sheets.colorToShulkerMaterial(color), 0.0F, Direction.UP); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new ShulkerBoxSpecialRenderer(new ShulkerBoxRenderer(modelSet), this.openness, this.orientation, Sheets.SHULKER_MAPPER.apply(this.texture)); + } + } +} diff --git a/net/minecraft/client/renderer/special/SkullSpecialRenderer.java b/net/minecraft/client/renderer/special/SkullSpecialRenderer.java new file mode 100644 index 00000000..5cb56610 --- /dev/null +++ b/net/minecraft/client/renderer/special/SkullSpecialRenderer.java @@ -0,0 +1,87 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Optional; +import java.util.function.UnaryOperator; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.SkullModelBase; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.blockentity.SkullBlockRenderer; +import net.minecraft.core.component.DataComponents; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.ResolvableProfile; +import net.minecraft.world.level.block.SkullBlock.Type; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class SkullSpecialRenderer implements SpecialModelRenderer { + private final Type skullType; + private final SkullModelBase model; + @Nullable + private final ResourceLocation textureOverride; + private final float animation; + + public SkullSpecialRenderer(Type skullType, SkullModelBase model, @Nullable ResourceLocation textureOverride, float animation) { + this.skullType = skullType; + this.model = model; + this.textureOverride = textureOverride; + this.animation = animation; + } + + @Nullable + public ResolvableProfile extractArgument(ItemStack itemStack) { + return itemStack.get(DataComponents.PROFILE); + } + + public void render( + @Nullable ResolvableProfile resolvableProfile, + ItemDisplayContext itemDisplayContext, + PoseStack poseStack, + MultiBufferSource multiBufferSource, + int i, + int j, + boolean bl + ) { + RenderType renderType = SkullBlockRenderer.getRenderType(this.skullType, resolvableProfile, this.textureOverride); + SkullBlockRenderer.renderSkull(null, 180.0F, this.animation, poseStack, multiBufferSource, i, this.model, renderType); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(Type kind, Optional textureOverride, float animation) implements SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + Type.CODEC.fieldOf("kind").forGetter(SkullSpecialRenderer.Unbaked::kind), + ResourceLocation.CODEC.optionalFieldOf("texture").forGetter(SkullSpecialRenderer.Unbaked::textureOverride), + Codec.FLOAT.optionalFieldOf("animation", 0.0F).forGetter(SkullSpecialRenderer.Unbaked::animation) + ) + .apply(instance, SkullSpecialRenderer.Unbaked::new) + ); + + public Unbaked(Type type) { + this(type, Optional.empty(), 0.0F); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Nullable + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + SkullModelBase skullModelBase = SkullBlockRenderer.createModel(modelSet, this.kind); + ResourceLocation resourceLocation = (ResourceLocation)this.textureOverride + .map(resourceLocationx -> resourceLocationx.withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png"))) + .orElse(null); + return skullModelBase != null ? new SkullSpecialRenderer(this.kind, skullModelBase, resourceLocation, this.animation) : null; + } + } +} diff --git a/net/minecraft/client/renderer/special/SpecialModelRenderer.java b/net/minecraft/client/renderer/special/SpecialModelRenderer.java new file mode 100644 index 00000000..85374323 --- /dev/null +++ b/net/minecraft/client/renderer/special/SpecialModelRenderer.java @@ -0,0 +1,35 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface SpecialModelRenderer { + void render( + @Nullable T patterns, + ItemDisplayContext displayContext, + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + int packedOverlay, + boolean hasFoilType + ); + + @Nullable + T extractArgument(ItemStack stack); + + @Environment(EnvType.CLIENT) + public interface Unbaked { + @Nullable + SpecialModelRenderer bake(EntityModelSet modelSet); + + MapCodec type(); + } +} diff --git a/net/minecraft/client/renderer/special/SpecialModelRenderers.java b/net/minecraft/client/renderer/special/SpecialModelRenderers.java new file mode 100644 index 00000000..66809d13 --- /dev/null +++ b/net/minecraft/client/renderer/special/SpecialModelRenderers.java @@ -0,0 +1,192 @@ +package net.minecraft.client.renderer.special; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; +import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; +import java.util.HashMap; +import java.util.Map; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.blockentity.ChestRenderer; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.SkullBlock.Types; +import net.minecraft.world.level.block.state.properties.WoodType; + +@Environment(EnvType.CLIENT) +public class SpecialModelRenderers { + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final Codec CODEC = ID_MAPPER.codec(ResourceLocation.CODEC) + .dispatch(SpecialModelRenderer.Unbaked::type, mapCodec -> mapCodec); + private static final Map STATIC_BLOCK_MAPPING = ImmutableMap.builder() + .put(Blocks.SKELETON_SKULL, new SkullSpecialRenderer.Unbaked(Types.SKELETON)) + .put(Blocks.ZOMBIE_HEAD, new SkullSpecialRenderer.Unbaked(Types.ZOMBIE)) + .put(Blocks.CREEPER_HEAD, new SkullSpecialRenderer.Unbaked(Types.CREEPER)) + .put(Blocks.DRAGON_HEAD, new SkullSpecialRenderer.Unbaked(Types.DRAGON)) + .put(Blocks.PIGLIN_HEAD, new SkullSpecialRenderer.Unbaked(Types.PIGLIN)) + .put(Blocks.PLAYER_HEAD, new SkullSpecialRenderer.Unbaked(Types.PLAYER)) + .put(Blocks.WITHER_SKELETON_SKULL, new SkullSpecialRenderer.Unbaked(Types.WITHER_SKELETON)) + .put(Blocks.SKELETON_WALL_SKULL, new SkullSpecialRenderer.Unbaked(Types.SKELETON)) + .put(Blocks.ZOMBIE_WALL_HEAD, new SkullSpecialRenderer.Unbaked(Types.ZOMBIE)) + .put(Blocks.CREEPER_WALL_HEAD, new SkullSpecialRenderer.Unbaked(Types.CREEPER)) + .put(Blocks.DRAGON_WALL_HEAD, new SkullSpecialRenderer.Unbaked(Types.DRAGON)) + .put(Blocks.PIGLIN_WALL_HEAD, new SkullSpecialRenderer.Unbaked(Types.PIGLIN)) + .put(Blocks.PLAYER_WALL_HEAD, new SkullSpecialRenderer.Unbaked(Types.PLAYER)) + .put(Blocks.WITHER_SKELETON_WALL_SKULL, new SkullSpecialRenderer.Unbaked(Types.WITHER_SKELETON)) + .put(Blocks.WHITE_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.WHITE)) + .put(Blocks.ORANGE_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.ORANGE)) + .put(Blocks.MAGENTA_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.MAGENTA)) + .put(Blocks.LIGHT_BLUE_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIGHT_BLUE)) + .put(Blocks.YELLOW_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.YELLOW)) + .put(Blocks.LIME_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIME)) + .put(Blocks.PINK_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.PINK)) + .put(Blocks.GRAY_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.GRAY)) + .put(Blocks.LIGHT_GRAY_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIGHT_GRAY)) + .put(Blocks.CYAN_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.CYAN)) + .put(Blocks.PURPLE_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.PURPLE)) + .put(Blocks.BLUE_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BLUE)) + .put(Blocks.BROWN_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BROWN)) + .put(Blocks.GREEN_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.GREEN)) + .put(Blocks.RED_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.RED)) + .put(Blocks.BLACK_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BLACK)) + .put(Blocks.WHITE_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.WHITE)) + .put(Blocks.ORANGE_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.ORANGE)) + .put(Blocks.MAGENTA_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.MAGENTA)) + .put(Blocks.LIGHT_BLUE_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIGHT_BLUE)) + .put(Blocks.YELLOW_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.YELLOW)) + .put(Blocks.LIME_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIME)) + .put(Blocks.PINK_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.PINK)) + .put(Blocks.GRAY_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.GRAY)) + .put(Blocks.LIGHT_GRAY_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.LIGHT_GRAY)) + .put(Blocks.CYAN_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.CYAN)) + .put(Blocks.PURPLE_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.PURPLE)) + .put(Blocks.BLUE_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BLUE)) + .put(Blocks.BROWN_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BROWN)) + .put(Blocks.GREEN_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.GREEN)) + .put(Blocks.RED_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.RED)) + .put(Blocks.BLACK_WALL_BANNER, new BannerSpecialRenderer.Unbaked(DyeColor.BLACK)) + .put(Blocks.WHITE_BED, new BedSpecialRenderer.Unbaked(DyeColor.WHITE)) + .put(Blocks.ORANGE_BED, new BedSpecialRenderer.Unbaked(DyeColor.ORANGE)) + .put(Blocks.MAGENTA_BED, new BedSpecialRenderer.Unbaked(DyeColor.MAGENTA)) + .put(Blocks.LIGHT_BLUE_BED, new BedSpecialRenderer.Unbaked(DyeColor.LIGHT_BLUE)) + .put(Blocks.YELLOW_BED, new BedSpecialRenderer.Unbaked(DyeColor.YELLOW)) + .put(Blocks.LIME_BED, new BedSpecialRenderer.Unbaked(DyeColor.LIME)) + .put(Blocks.PINK_BED, new BedSpecialRenderer.Unbaked(DyeColor.PINK)) + .put(Blocks.GRAY_BED, new BedSpecialRenderer.Unbaked(DyeColor.GRAY)) + .put(Blocks.LIGHT_GRAY_BED, new BedSpecialRenderer.Unbaked(DyeColor.LIGHT_GRAY)) + .put(Blocks.CYAN_BED, new BedSpecialRenderer.Unbaked(DyeColor.CYAN)) + .put(Blocks.PURPLE_BED, new BedSpecialRenderer.Unbaked(DyeColor.PURPLE)) + .put(Blocks.BLUE_BED, new BedSpecialRenderer.Unbaked(DyeColor.BLUE)) + .put(Blocks.BROWN_BED, new BedSpecialRenderer.Unbaked(DyeColor.BROWN)) + .put(Blocks.GREEN_BED, new BedSpecialRenderer.Unbaked(DyeColor.GREEN)) + .put(Blocks.RED_BED, new BedSpecialRenderer.Unbaked(DyeColor.RED)) + .put(Blocks.BLACK_BED, new BedSpecialRenderer.Unbaked(DyeColor.BLACK)) + .put(Blocks.SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked()) + .put(Blocks.WHITE_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.WHITE)) + .put(Blocks.ORANGE_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.ORANGE)) + .put(Blocks.MAGENTA_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.MAGENTA)) + .put(Blocks.LIGHT_BLUE_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.LIGHT_BLUE)) + .put(Blocks.YELLOW_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.YELLOW)) + .put(Blocks.LIME_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.LIME)) + .put(Blocks.PINK_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.PINK)) + .put(Blocks.GRAY_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.GRAY)) + .put(Blocks.LIGHT_GRAY_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.LIGHT_GRAY)) + .put(Blocks.CYAN_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.CYAN)) + .put(Blocks.PURPLE_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.PURPLE)) + .put(Blocks.BLUE_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.BLUE)) + .put(Blocks.BROWN_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.BROWN)) + .put(Blocks.GREEN_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.GREEN)) + .put(Blocks.RED_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.RED)) + .put(Blocks.BLACK_SHULKER_BOX, new ShulkerBoxSpecialRenderer.Unbaked(DyeColor.BLACK)) + .put(Blocks.OAK_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.OAK)) + .put(Blocks.SPRUCE_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.SPRUCE)) + .put(Blocks.BIRCH_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.BIRCH)) + .put(Blocks.ACACIA_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.ACACIA)) + .put(Blocks.CHERRY_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.CHERRY)) + .put(Blocks.JUNGLE_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.JUNGLE)) + .put(Blocks.DARK_OAK_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.DARK_OAK)) + .put(Blocks.PALE_OAK_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.PALE_OAK)) + .put(Blocks.MANGROVE_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.MANGROVE)) + .put(Blocks.BAMBOO_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.BAMBOO)) + .put(Blocks.CRIMSON_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.CRIMSON)) + .put(Blocks.WARPED_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.WARPED)) + .put(Blocks.OAK_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.OAK)) + .put(Blocks.SPRUCE_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.SPRUCE)) + .put(Blocks.BIRCH_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.BIRCH)) + .put(Blocks.ACACIA_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.ACACIA)) + .put(Blocks.CHERRY_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.CHERRY)) + .put(Blocks.JUNGLE_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.JUNGLE)) + .put(Blocks.DARK_OAK_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.DARK_OAK)) + .put(Blocks.PALE_OAK_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.PALE_OAK)) + .put(Blocks.MANGROVE_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.MANGROVE)) + .put(Blocks.BAMBOO_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.BAMBOO)) + .put(Blocks.CRIMSON_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.CRIMSON)) + .put(Blocks.WARPED_WALL_SIGN, new StandingSignSpecialRenderer.Unbaked(WoodType.WARPED)) + .put(Blocks.OAK_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.OAK)) + .put(Blocks.SPRUCE_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.SPRUCE)) + .put(Blocks.BIRCH_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.BIRCH)) + .put(Blocks.ACACIA_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.ACACIA)) + .put(Blocks.CHERRY_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.CHERRY)) + .put(Blocks.JUNGLE_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.JUNGLE)) + .put(Blocks.DARK_OAK_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.DARK_OAK)) + .put(Blocks.PALE_OAK_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.PALE_OAK)) + .put(Blocks.MANGROVE_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.MANGROVE)) + .put(Blocks.BAMBOO_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.BAMBOO)) + .put(Blocks.CRIMSON_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.CRIMSON)) + .put(Blocks.WARPED_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.WARPED)) + .put(Blocks.OAK_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.OAK)) + .put(Blocks.SPRUCE_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.SPRUCE)) + .put(Blocks.BIRCH_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.BIRCH)) + .put(Blocks.ACACIA_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.ACACIA)) + .put(Blocks.CHERRY_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.CHERRY)) + .put(Blocks.JUNGLE_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.JUNGLE)) + .put(Blocks.DARK_OAK_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.DARK_OAK)) + .put(Blocks.PALE_OAK_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.PALE_OAK)) + .put(Blocks.MANGROVE_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.MANGROVE)) + .put(Blocks.BAMBOO_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.BAMBOO)) + .put(Blocks.CRIMSON_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.CRIMSON)) + .put(Blocks.WARPED_WALL_HANGING_SIGN, new HangingSignSpecialRenderer.Unbaked(WoodType.WARPED)) + .put(Blocks.CONDUIT, new ConduitSpecialRenderer.Unbaked()) + .put(Blocks.CHEST, new ChestSpecialRenderer.Unbaked(ChestSpecialRenderer.NORMAL_CHEST_TEXTURE)) + .put(Blocks.TRAPPED_CHEST, new ChestSpecialRenderer.Unbaked(ChestSpecialRenderer.TRAPPED_CHEST_TEXTURE)) + .put(Blocks.ENDER_CHEST, new ChestSpecialRenderer.Unbaked(ChestSpecialRenderer.ENDER_CHEST_TEXTURE)) + .put(Blocks.DECORATED_POT, new DecoratedPotSpecialRenderer.Unbaked()) + .build(); + private static final ChestSpecialRenderer.Unbaked GIFT_CHEST = new ChestSpecialRenderer.Unbaked(ChestSpecialRenderer.GIFT_CHEST_TEXTURE); + + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("bed"), BedSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("banner"), BannerSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("conduit"), ConduitSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("chest"), ChestSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("head"), SkullSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("shulker_box"), ShulkerBoxSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("shield"), ShieldSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("trident"), TridentSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("decorated_pot"), DecoratedPotSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("standing_sign"), StandingSignSpecialRenderer.Unbaked.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("hanging_sign"), HangingSignSpecialRenderer.Unbaked.MAP_CODEC); + } + + public static Map> createBlockRenderers(EntityModelSet modelSet) { + Map map = new HashMap(STATIC_BLOCK_MAPPING); + if (ChestRenderer.xmasTextures()) { + map.put(Blocks.CHEST, GIFT_CHEST); + map.put(Blocks.TRAPPED_CHEST, GIFT_CHEST); + } + + Builder> builder = ImmutableMap.builder(); + map.forEach((block, unbaked) -> { + SpecialModelRenderer specialModelRenderer = unbaked.bake(modelSet); + if (specialModelRenderer != null) { + builder.put(block, specialModelRenderer); + } + }); + return builder.build(); + } +} diff --git a/net/minecraft/client/renderer/special/StandingSignSpecialRenderer.java b/net/minecraft/client/renderer/special/StandingSignSpecialRenderer.java new file mode 100644 index 00000000..9b3a3aee --- /dev/null +++ b/net/minecraft/client/renderer/special/StandingSignSpecialRenderer.java @@ -0,0 +1,62 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Optional; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.Model; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.blockentity.SignRenderer; +import net.minecraft.client.resources.model.Material; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.level.block.state.properties.WoodType; + +@Environment(EnvType.CLIENT) +public class StandingSignSpecialRenderer implements NoDataSpecialModelRenderer { + private final Model model; + private final Material material; + + public StandingSignSpecialRenderer(Model model, Material material) { + this.model = model; + this.material = material; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + SignRenderer.renderInHand(poseStack, bufferSource, packedLight, packedOverlay, this.model, this.material); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(WoodType woodType, Optional texture) implements net.minecraft.client.renderer.special.SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group( + WoodType.CODEC.fieldOf("wood_type").forGetter(StandingSignSpecialRenderer.Unbaked::woodType), + ResourceLocation.CODEC.optionalFieldOf("texture").forGetter(StandingSignSpecialRenderer.Unbaked::texture) + ) + .apply(instance, StandingSignSpecialRenderer.Unbaked::new) + ); + + public Unbaked(WoodType woodType) { + this(woodType, Optional.empty()); + } + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + Model model = SignRenderer.createSignModel(modelSet, this.woodType, true); + Material material = (Material)this.texture.map(Sheets.SIGN_MAPPER::apply).orElseGet(() -> Sheets.getSignMaterial(this.woodType)); + return new StandingSignSpecialRenderer(model, material); + } + } +} diff --git a/net/minecraft/client/renderer/special/TridentSpecialRenderer.java b/net/minecraft/client/renderer/special/TridentSpecialRenderer.java new file mode 100644 index 00000000..0a9a634c --- /dev/null +++ b/net/minecraft/client/renderer/special/TridentSpecialRenderer.java @@ -0,0 +1,48 @@ +package net.minecraft.client.renderer.special; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.serialization.MapCodec; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.model.TridentModel; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.world.item.ItemDisplayContext; + +@Environment(EnvType.CLIENT) +public class TridentSpecialRenderer implements NoDataSpecialModelRenderer { + private final TridentModel model; + + public TridentSpecialRenderer(TridentModel model) { + this.model = model; + } + + @Override + public void render( + ItemDisplayContext displayContext, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay, boolean hasFoilType + ) { + poseStack.pushPose(); + poseStack.scale(1.0F, -1.0F, -1.0F); + VertexConsumer vertexConsumer = ItemRenderer.getFoilBuffer(bufferSource, this.model.renderType(TridentModel.TEXTURE), false, hasFoilType); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); + poseStack.popPose(); + } + + @Environment(EnvType.CLIENT) + public record Unbaked() implements SpecialModelRenderer.Unbaked { + public static final MapCodec MAP_CODEC = MapCodec.unit(new TridentSpecialRenderer.Unbaked()); + + @Override + public MapCodec type() { + return MAP_CODEC; + } + + @Override + public SpecialModelRenderer bake(EntityModelSet modelSet) { + return new TridentSpecialRenderer(new TridentModel(modelSet.bakeLayer(ModelLayers.TRIDENT))); + } + } +} diff --git a/net/minecraft/client/renderer/special/package-info.java b/net/minecraft/client/renderer/special/package-info.java new file mode 100644 index 00000000..3916c62d --- /dev/null +++ b/net/minecraft/client/renderer/special/package-info.java @@ -0,0 +1,11 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@FieldsAreNonnullByDefault +@Environment(EnvType.CLIENT) +package net.minecraft.client.renderer.special; + +import javax.annotation.ParametersAreNonnullByDefault; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FieldsAreNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; diff --git a/net/minecraft/client/renderer/texture/AbstractTexture.java b/net/minecraft/client/renderer/texture/AbstractTexture.java index 7758ade6..40fff5fe 100644 --- a/net/minecraft/client/renderer/texture/AbstractTexture.java +++ b/net/minecraft/client/renderer/texture/AbstractTexture.java @@ -1,82 +1,54 @@ package net.minecraft.client.renderer.texture; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.platform.TextureUtil; -import com.mojang.blaze3d.systems.RenderSystem; -import java.io.IOException; -import java.util.concurrent.Executor; +import com.mojang.blaze3d.textures.AddressMode; +import com.mojang.blaze3d.textures.FilterMode; +import com.mojang.blaze3d.textures.GpuTexture; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.util.TriState; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public abstract class AbstractTexture implements AutoCloseable { - public static final int NOT_ASSIGNED = -1; - protected int id = -1; + @Nullable + protected GpuTexture texture; protected boolean defaultBlur; + public void setClamp(boolean clamp) { + if (this.texture == null) { + throw new IllegalStateException("Texture does not exist, can't change its clamp before something initializes it"); + } else { + this.texture.setAddressMode(clamp ? AddressMode.CLAMP_TO_EDGE : AddressMode.REPEAT); + } + } + + public void setFilter(TriState blur, boolean mipmap) { + this.setFilter(blur.toBoolean(this.defaultBlur), mipmap); + } + /** * @param mipmap {@code true} if a mipmap is being used (mip level is greater than 0) */ public void setFilter(boolean blur, boolean mipmap) { - RenderSystem.assertOnRenderThreadOrInit(); - int i; - int j; - if (blur) { - i = mipmap ? 9987 : 9729; - j = 9729; + if (this.texture == null) { + throw new IllegalStateException("Texture does not exist, can't get change its filter before something initializes it"); } else { - i = mipmap ? 9986 : 9728; - j = 9728; + this.texture.setTextureFilter(blur ? FilterMode.LINEAR : FilterMode.NEAREST, mipmap); } - - this.bind(); - GlStateManager._texParameter(3553, 10241, i); - GlStateManager._texParameter(3553, 10240, j); - } - - public int getId() { - RenderSystem.assertOnRenderThreadOrInit(); - if (this.id == -1) { - this.id = TextureUtil.generateTextureId(); - } - - return this.id; - } - - public void releaseId() { - if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> { - if (this.id != -1) { - TextureUtil.releaseTextureId(this.id); - this.id = -1; - } - }); - } else if (this.id != -1) { - TextureUtil.releaseTextureId(this.id); - this.id = -1; - } - } - - public boolean getDefaultBlur() { - return this.defaultBlur; - } - - public abstract void load(ResourceManager resourceManager) throws IOException; - - public void bind() { - if (!RenderSystem.isOnRenderThreadOrInit()) { - RenderSystem.recordRenderCall(() -> GlStateManager._bindTexture(this.getId())); - } else { - GlStateManager._bindTexture(this.getId()); - } - } - - public void reset(TextureManager textureManager, ResourceManager resourceManager, ResourceLocation path, Executor executor) { - textureManager.register(path, this); } public void close() { + if (this.texture != null) { + this.texture.close(); + this.texture = null; + } + } + + public GpuTexture getTexture() { + if (this.texture == null) { + throw new IllegalStateException("Texture does not exist, can't get it before something initializes it"); + } else { + return this.texture; + } } } diff --git a/net/minecraft/client/renderer/texture/DynamicTexture.java b/net/minecraft/client/renderer/texture/DynamicTexture.java index f8fb10a4..0fdbc6c1 100644 --- a/net/minecraft/client/renderer/texture/DynamicTexture.java +++ b/net/minecraft/client/renderer/texture/DynamicTexture.java @@ -1,15 +1,15 @@ package net.minecraft.client.renderer.texture; import com.mojang.blaze3d.platform.NativeImage; -import com.mojang.blaze3d.platform.TextureUtil; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.TextureFormat; import com.mojang.logging.LogUtils; import java.io.IOException; import java.nio.file.Path; +import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -19,34 +19,27 @@ public class DynamicTexture extends AbstractTexture implements Dumpable { @Nullable private NativeImage pixels; - public DynamicTexture(NativeImage pixels) { + public DynamicTexture(Supplier label, NativeImage pixels) { this.pixels = pixels; - if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> { - TextureUtil.prepareImage(this.getId(), this.pixels.getWidth(), this.pixels.getHeight()); - this.upload(); - }); - } else { - TextureUtil.prepareImage(this.getId(), this.pixels.getWidth(), this.pixels.getHeight()); - this.upload(); - } + this.texture = RenderSystem.getDevice().createTexture(label, TextureFormat.RGBA8, this.pixels.getWidth(), this.pixels.getHeight(), 1); + this.upload(); } - public DynamicTexture(int width, int height, boolean useCalloc) { + public DynamicTexture(String label, int width, int height, boolean useCalloc) { this.pixels = new NativeImage(width, height, useCalloc); - TextureUtil.prepareImage(this.getId(), this.pixels.getWidth(), this.pixels.getHeight()); + this.texture = RenderSystem.getDevice().createTexture(label, TextureFormat.RGBA8, this.pixels.getWidth(), this.pixels.getHeight(), 1); } - @Override - public void load(ResourceManager resourceManager) { + public DynamicTexture(Supplier label, int width, int height, boolean useCalloc) { + this.pixels = new NativeImage(width, height, useCalloc); + this.texture = RenderSystem.getDevice().createTexture(label, TextureFormat.RGBA8, this.pixels.getWidth(), this.pixels.getHeight(), 1); } public void upload() { - if (this.pixels != null) { - this.bind(); - this.pixels.upload(0, 0, 0, false); + if (this.pixels != null && this.texture != null) { + RenderSystem.getDevice().createCommandEncoder().writeToTexture(this.texture, this.pixels); } else { - LOGGER.warn("Trying to upload disposed texture {}", this.getId()); + LOGGER.warn("Trying to upload disposed texture {}", this.getTexture().getLabel()); } } @@ -67,9 +60,10 @@ public class DynamicTexture extends AbstractTexture implements Dumpable { public void close() { if (this.pixels != null) { this.pixels.close(); - this.releaseId(); this.pixels = null; } + + super.close(); } @Override diff --git a/net/minecraft/client/renderer/texture/HttpTexture.java b/net/minecraft/client/renderer/texture/HttpTexture.java deleted file mode 100644 index 1d4a5e44..00000000 --- a/net/minecraft/client/renderer/texture/HttpTexture.java +++ /dev/null @@ -1,215 +0,0 @@ -package net.minecraft.client.renderer.texture; - -import com.mojang.blaze3d.platform.NativeImage; -import com.mojang.blaze3d.platform.TextureUtil; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.logging.LogUtils; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.concurrent.CompletableFuture; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.Util; -import net.minecraft.client.Minecraft; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.util.ARGB; -import org.apache.commons.io.FileUtils; -import org.jetbrains.annotations.Nullable; -import org.slf4j.Logger; - -@Environment(EnvType.CLIENT) -public class HttpTexture extends SimpleTexture { - private static final Logger LOGGER = LogUtils.getLogger(); - private static final int SKIN_WIDTH = 64; - private static final int SKIN_HEIGHT = 64; - private static final int LEGACY_SKIN_HEIGHT = 32; - @Nullable - private final File file; - private final String urlString; - private final boolean processLegacySkin; - @Nullable - private final Runnable onDownloaded; - @Nullable - private CompletableFuture future; - private boolean uploaded; - - public HttpTexture(@Nullable File file, String urlString, ResourceLocation location, boolean processLegacySkin, @Nullable Runnable onDownloaded) { - super(location); - this.file = file; - this.urlString = urlString; - this.processLegacySkin = processLegacySkin; - this.onDownloaded = onDownloaded; - } - - private void loadCallback(NativeImage image) { - if (this.onDownloaded != null) { - this.onDownloaded.run(); - } - - Minecraft.getInstance().execute(() -> { - this.uploaded = true; - if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> this.upload(image)); - } else { - this.upload(image); - } - }); - } - - private void upload(NativeImage image) { - TextureUtil.prepareImage(this.getId(), image.getWidth(), image.getHeight()); - image.upload(0, 0, 0, true); - } - - @Override - public void load(ResourceManager resourceManager) throws IOException { - Minecraft.getInstance().execute(() -> { - if (!this.uploaded) { - try { - super.load(resourceManager); - } catch (IOException var3x) { - LOGGER.warn("Failed to load texture: {}", this.location, var3x); - } - - this.uploaded = true; - } - }); - if (this.future == null) { - NativeImage nativeImage; - if (this.file != null && this.file.isFile()) { - LOGGER.debug("Loading http texture from local cache ({})", this.file); - FileInputStream fileInputStream = new FileInputStream(this.file); - nativeImage = this.load(fileInputStream); - } else { - nativeImage = null; - } - - if (nativeImage != null) { - this.loadCallback(nativeImage); - } else { - this.future = CompletableFuture.runAsync(() -> { - HttpURLConnection httpURLConnection = null; - LOGGER.debug("Downloading http texture from {} to {}", this.urlString, this.file); - - try { - httpURLConnection = (HttpURLConnection)new URL(this.urlString).openConnection(Minecraft.getInstance().getProxy()); - httpURLConnection.setDoInput(true); - httpURLConnection.setDoOutput(false); - httpURLConnection.connect(); - if (httpURLConnection.getResponseCode() / 100 == 2) { - InputStream inputStream; - if (this.file != null) { - FileUtils.copyInputStreamToFile(httpURLConnection.getInputStream(), this.file); - inputStream = new FileInputStream(this.file); - } else { - inputStream = httpURLConnection.getInputStream(); - } - - Minecraft.getInstance().execute(() -> { - NativeImage nativeImagex = this.load(inputStream); - if (nativeImagex != null) { - this.loadCallback(nativeImagex); - } - }); - return; - } - } catch (Exception var6) { - LOGGER.error("Couldn't download http texture", (Throwable)var6); - return; - } finally { - if (httpURLConnection != null) { - httpURLConnection.disconnect(); - } - } - }, Util.backgroundExecutor().forName("downloadTexture")); - } - } - } - - @Nullable - private NativeImage load(InputStream stream) { - NativeImage nativeImage = null; - - try { - nativeImage = NativeImage.read(stream); - if (this.processLegacySkin) { - nativeImage = this.processLegacySkin(nativeImage); - } - } catch (Exception var4) { - LOGGER.warn("Error while loading the skin texture", (Throwable)var4); - } - - return nativeImage; - } - - @Nullable - private NativeImage processLegacySkin(NativeImage image) { - int i = image.getHeight(); - int j = image.getWidth(); - if (j == 64 && (i == 32 || i == 64)) { - boolean bl = i == 32; - if (bl) { - NativeImage nativeImage = new NativeImage(64, 64, true); - nativeImage.copyFrom(image); - image.close(); - image = nativeImage; - nativeImage.fillRect(0, 32, 64, 32, 0); - nativeImage.copyRect(4, 16, 16, 32, 4, 4, true, false); - nativeImage.copyRect(8, 16, 16, 32, 4, 4, true, false); - nativeImage.copyRect(0, 20, 24, 32, 4, 12, true, false); - nativeImage.copyRect(4, 20, 16, 32, 4, 12, true, false); - nativeImage.copyRect(8, 20, 8, 32, 4, 12, true, false); - nativeImage.copyRect(12, 20, 16, 32, 4, 12, true, false); - nativeImage.copyRect(44, 16, -8, 32, 4, 4, true, false); - nativeImage.copyRect(48, 16, -8, 32, 4, 4, true, false); - nativeImage.copyRect(40, 20, 0, 32, 4, 12, true, false); - nativeImage.copyRect(44, 20, -8, 32, 4, 12, true, false); - nativeImage.copyRect(48, 20, -16, 32, 4, 12, true, false); - nativeImage.copyRect(52, 20, -8, 32, 4, 12, true, false); - } - - setNoAlpha(image, 0, 0, 32, 16); - if (bl) { - doNotchTransparencyHack(image, 32, 0, 64, 32); - } - - setNoAlpha(image, 0, 16, 64, 32); - setNoAlpha(image, 16, 48, 48, 64); - return image; - } else { - image.close(); - LOGGER.warn("Discarding incorrectly sized ({}x{}) skin texture from {}", j, i, this.urlString); - return null; - } - } - - private static void doNotchTransparencyHack(NativeImage image, int x, int y, int width, int height) { - for (int i = x; i < width; i++) { - for (int j = y; j < height; j++) { - int k = image.getPixel(i, j); - if (ARGB.alpha(k) < 128) { - return; - } - } - } - - for (int i = x; i < width; i++) { - for (int jx = y; jx < height; jx++) { - image.setPixel(i, jx, image.getPixel(i, jx) & 16777215); - } - } - } - - private static void setNoAlpha(NativeImage image, int x, int y, int width, int height) { - for (int i = x; i < width; i++) { - for (int j = y; j < height; j++) { - image.setPixel(i, j, ARGB.opaque(image.getPixel(i, j))); - } - } - } -} diff --git a/net/minecraft/client/renderer/texture/MissingTextureAtlasSprite.java b/net/minecraft/client/renderer/texture/MissingTextureAtlasSprite.java index 6cf9e43d..ea64a3f0 100644 --- a/net/minecraft/client/renderer/texture/MissingTextureAtlasSprite.java +++ b/net/minecraft/client/renderer/texture/MissingTextureAtlasSprite.java @@ -1,17 +1,11 @@ package net.minecraft.client.renderer.texture; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.platform.NativeImage; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.metadata.animation.AnimationFrame; -import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; import net.minecraft.client.resources.metadata.animation.FrameSize; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceMetadata; -import net.minecraft.server.packs.resources.ResourceMetadata.Builder; -import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public final class MissingTextureAtlasSprite { @@ -19,13 +13,12 @@ public final class MissingTextureAtlasSprite { private static final int MISSING_IMAGE_HEIGHT = 16; private static final String MISSING_TEXTURE_NAME = "missingno"; private static final ResourceLocation MISSING_TEXTURE_LOCATION = ResourceLocation.withDefaultNamespace("missingno"); - private static final ResourceMetadata SPRITE_METADATA = new Builder() - .put(AnimationMetadataSection.SERIALIZER, new AnimationMetadataSection(ImmutableList.of(new AnimationFrame(0, -1)), 16, 16, 1, false)) - .build(); - @Nullable - private static DynamicTexture missingTexture; - private static NativeImage generateMissingImage(int width, int height) { + public static NativeImage generateMissingImage() { + return generateMissingImage(16, 16); + } + + public static NativeImage generateMissingImage(int width, int height) { NativeImage nativeImage = new NativeImage(width, height, false); int i = -524040; @@ -44,21 +37,10 @@ public final class MissingTextureAtlasSprite { public static SpriteContents create() { NativeImage nativeImage = generateMissingImage(16, 16); - return new SpriteContents(MISSING_TEXTURE_LOCATION, new FrameSize(16, 16), nativeImage, SPRITE_METADATA); + return new SpriteContents(MISSING_TEXTURE_LOCATION, new FrameSize(16, 16), nativeImage, ResourceMetadata.EMPTY); } public static ResourceLocation getLocation() { return MISSING_TEXTURE_LOCATION; } - - public static DynamicTexture getTexture() { - if (missingTexture == null) { - NativeImage nativeImage = generateMissingImage(16, 16); - nativeImage.untrack(); - missingTexture = new DynamicTexture(nativeImage); - Minecraft.getInstance().getTextureManager().register(MISSING_TEXTURE_LOCATION, missingTexture); - } - - return missingTexture; - } } diff --git a/net/minecraft/client/renderer/texture/OverlayTexture.java b/net/minecraft/client/renderer/texture/OverlayTexture.java index 8369268b..2f4cd90d 100644 --- a/net/minecraft/client/renderer/texture/OverlayTexture.java +++ b/net/minecraft/client/renderer/texture/OverlayTexture.java @@ -13,7 +13,7 @@ public class OverlayTexture implements AutoCloseable { public static final int RED_OVERLAY_V = 3; public static final int WHITE_OVERLAY_V = 10; public static final int NO_OVERLAY = pack(0, 10); - private final DynamicTexture texture = new DynamicTexture(16, 16, false); + private final DynamicTexture texture = new DynamicTexture("Entity Color Overlay", 16, 16, false); public OverlayTexture() { NativeImage nativeImage = this.texture.getPixels(); @@ -29,10 +29,9 @@ public class OverlayTexture implements AutoCloseable { } } - RenderSystem.activeTexture(33985); - this.texture.bind(); - nativeImage.upload(0, 0, 0, 0, 0, nativeImage.getWidth(), nativeImage.getHeight(), false, true, false, false); - RenderSystem.activeTexture(33984); + this.texture.setFilter(false, false); + this.texture.setClamp(true); + this.texture.upload(); } public void close() { @@ -40,7 +39,7 @@ public class OverlayTexture implements AutoCloseable { } public void setupOverlayColor() { - RenderSystem.setupOverlayColor(this.texture.getId(), 16); + RenderSystem.setupOverlayColor(this.texture.getTexture()); } public static int u(float u) { diff --git a/net/minecraft/client/renderer/texture/PreloadedTexture.java b/net/minecraft/client/renderer/texture/PreloadedTexture.java deleted file mode 100644 index cfa832de..00000000 --- a/net/minecraft/client/renderer/texture/PreloadedTexture.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.minecraft.client.renderer.texture; - -import com.mojang.blaze3d.systems.RenderSystem; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.Util; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class PreloadedTexture extends SimpleTexture { - @Nullable - private CompletableFuture future; - - public PreloadedTexture(ResourceManager resourceManager, ResourceLocation location, Executor backgroundExecutor) { - super(location); - this.future = CompletableFuture.supplyAsync(() -> SimpleTexture.TextureImage.load(resourceManager, location), backgroundExecutor); - } - - @Override - protected SimpleTexture.TextureImage getTextureImage(ResourceManager resourceManager) { - if (this.future != null) { - SimpleTexture.TextureImage textureImage = (SimpleTexture.TextureImage)this.future.join(); - this.future = null; - return textureImage; - } else { - return SimpleTexture.TextureImage.load(resourceManager, this.location); - } - } - - public CompletableFuture getFuture() { - return this.future == null ? CompletableFuture.completedFuture(null) : this.future.thenApply(textureImage -> null); - } - - @Override - public void reset(TextureManager textureManager, ResourceManager resourceManager, ResourceLocation path, Executor executor) { - this.future = CompletableFuture.supplyAsync(() -> SimpleTexture.TextureImage.load(resourceManager, this.location), Util.backgroundExecutor()); - this.future.thenRunAsync(() -> textureManager.register(this.location, this), executor(executor)); - } - - private static Executor executor(Executor executor) { - return runnable -> executor.execute(() -> RenderSystem.recordRenderCall(runnable::run)); - } -} diff --git a/net/minecraft/client/renderer/texture/ReloadableTexture.java b/net/minecraft/client/renderer/texture/ReloadableTexture.java new file mode 100644 index 00000000..9c8476d5 --- /dev/null +++ b/net/minecraft/client/renderer/texture/ReloadableTexture.java @@ -0,0 +1,44 @@ +package net.minecraft.client.renderer.texture; + +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.systems.GpuDevice; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.TextureFormat; +import java.io.IOException; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.ResourceManager; + +@Environment(EnvType.CLIENT) +public abstract class ReloadableTexture extends AbstractTexture { + private final ResourceLocation resourceId; + + public ReloadableTexture(ResourceLocation resourceId) { + this.resourceId = resourceId; + } + + public ResourceLocation resourceId() { + return this.resourceId; + } + + public void apply(TextureContents textureContents) { + boolean bl = textureContents.clamp(); + boolean bl2 = textureContents.blur(); + this.defaultBlur = bl2; + + try (NativeImage nativeImage = textureContents.image()) { + this.doLoad(nativeImage, bl2, bl); + } + } + + private void doLoad(NativeImage image, boolean blur, boolean clamp) { + GpuDevice gpuDevice = RenderSystem.getDevice(); + this.texture = gpuDevice.createTexture(this.resourceId::toString, TextureFormat.RGBA8, image.getWidth(), image.getHeight(), 1); + this.setFilter(blur, false); + this.setClamp(clamp); + gpuDevice.createCommandEncoder().writeToTexture(this.texture, image); + } + + public abstract TextureContents loadContents(ResourceManager resourceManager) throws IOException; +} diff --git a/net/minecraft/client/renderer/texture/SimpleTexture.java b/net/minecraft/client/renderer/texture/SimpleTexture.java index b0207f9d..e765b602 100644 --- a/net/minecraft/client/renderer/texture/SimpleTexture.java +++ b/net/minecraft/client/renderer/texture/SimpleTexture.java @@ -1,143 +1,19 @@ package net.minecraft.client.renderer.texture; -import com.mojang.blaze3d.platform.NativeImage; -import com.mojang.blaze3d.platform.TextureUtil; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.logging.LogUtils; -import java.io.Closeable; import java.io.IOException; -import java.io.InputStream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.resources.metadata.texture.TextureMetadataSection; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceManager; -import org.jetbrains.annotations.Nullable; -import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class SimpleTexture extends AbstractTexture { - static final Logger LOGGER = LogUtils.getLogger(); - protected final ResourceLocation location; - +public class SimpleTexture extends ReloadableTexture { public SimpleTexture(ResourceLocation location) { - this.location = location; + super(location); } @Override - public void load(ResourceManager resourceManager) throws IOException { - SimpleTexture.TextureImage textureImage = this.getTextureImage(resourceManager); - textureImage.throwIfError(); - TextureMetadataSection textureMetadataSection = textureImage.getTextureMetadata(); - boolean bl; - if (textureMetadataSection != null) { - this.defaultBlur = textureMetadataSection.isBlur(); - bl = textureMetadataSection.isClamp(); - } else { - this.defaultBlur = false; - bl = false; - } - - NativeImage nativeImage = textureImage.getImage(); - if (!RenderSystem.isOnRenderThreadOrInit()) { - RenderSystem.recordRenderCall(() -> this.doLoad(nativeImage, this.defaultBlur, bl)); - } else { - this.doLoad(nativeImage, this.defaultBlur, bl); - } - } - - private void doLoad(NativeImage image, boolean blur, boolean clamp) { - TextureUtil.prepareImage(this.getId(), 0, image.getWidth(), image.getHeight()); - image.upload(0, 0, 0, 0, 0, image.getWidth(), image.getHeight(), blur, clamp, false, true); - } - - protected SimpleTexture.TextureImage getTextureImage(ResourceManager resourceManager) { - return SimpleTexture.TextureImage.load(resourceManager, this.location); - } - - @Environment(EnvType.CLIENT) - protected static class TextureImage implements Closeable { - @Nullable - private final TextureMetadataSection metadata; - @Nullable - private final NativeImage image; - @Nullable - private final IOException exception; - - public TextureImage(IOException exception) { - this.exception = exception; - this.metadata = null; - this.image = null; - } - - public TextureImage(@Nullable TextureMetadataSection metadata, NativeImage image) { - this.exception = null; - this.metadata = metadata; - this.image = image; - } - - public static SimpleTexture.TextureImage load(ResourceManager resourceManager, ResourceLocation location) { - try { - Resource resource = resourceManager.getResourceOrThrow(location); - InputStream inputStream = resource.open(); - - NativeImage nativeImage; - try { - nativeImage = NativeImage.read(inputStream); - } catch (Throwable var9) { - if (inputStream != null) { - try { - inputStream.close(); - } catch (Throwable var7) { - var9.addSuppressed(var7); - } - } - - throw var9; - } - - if (inputStream != null) { - inputStream.close(); - } - - TextureMetadataSection textureMetadataSection = null; - - try { - textureMetadataSection = (TextureMetadataSection)resource.metadata().getSection(TextureMetadataSection.SERIALIZER).orElse(null); - } catch (RuntimeException var8) { - SimpleTexture.LOGGER.warn("Failed reading metadata of: {}", location, var8); - } - - return new SimpleTexture.TextureImage(textureMetadataSection, nativeImage); - } catch (IOException var10) { - return new SimpleTexture.TextureImage(var10); - } - } - - @Nullable - public TextureMetadataSection getTextureMetadata() { - return this.metadata; - } - - public NativeImage getImage() throws IOException { - if (this.exception != null) { - throw this.exception; - } else { - return this.image; - } - } - - public void close() { - if (this.image != null) { - this.image.close(); - } - } - - public void throwIfError() throws IOException { - if (this.exception != null) { - throw this.exception; - } - } + public TextureContents loadContents(ResourceManager resourceManager) throws IOException { + return TextureContents.load(resourceManager, this.resourceId()); } } diff --git a/net/minecraft/client/renderer/texture/SkinTextureDownloader.java b/net/minecraft/client/renderer/texture/SkinTextureDownloader.java new file mode 100644 index 00000000..bf8363d9 --- /dev/null +++ b/net/minecraft/client/renderer/texture/SkinTextureDownloader.java @@ -0,0 +1,176 @@ +package net.minecraft.client.renderer.texture; + +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.logging.LogUtils; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.OpenOption; +import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.FileUtil; +import net.minecraft.Util; +import net.minecraft.client.Minecraft; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ARGB; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class SkinTextureDownloader { + private static final Logger LOGGER = LogUtils.getLogger(); + private static final int SKIN_WIDTH = 64; + private static final int SKIN_HEIGHT = 64; + private static final int LEGACY_SKIN_HEIGHT = 32; + + public static CompletableFuture downloadAndRegisterSkin(ResourceLocation textureLocation, Path path, String url, boolean isLegacySkin) { + return CompletableFuture.supplyAsync(() -> { + NativeImage nativeImage; + try { + nativeImage = downloadSkin(path, url); + } catch (IOException var5) { + throw new UncheckedIOException(var5); + } + + return isLegacySkin ? processLegacySkin(nativeImage, url) : nativeImage; + }, Util.nonCriticalIoPool().forName("downloadTexture")).thenCompose(nativeImage -> registerTextureInManager(textureLocation, nativeImage)); + } + + private static NativeImage downloadSkin(Path path, String url) throws IOException { + if (Files.isRegularFile(path, new LinkOption[0])) { + LOGGER.debug("Loading HTTP texture from local cache ({})", path); + InputStream inputStream = Files.newInputStream(path); + + NativeImage var17; + try { + var17 = NativeImage.read(inputStream); + } catch (Throwable var14) { + if (inputStream != null) { + try { + inputStream.close(); + } catch (Throwable var12) { + var14.addSuppressed(var12); + } + } + + throw var14; + } + + if (inputStream != null) { + inputStream.close(); + } + + return var17; + } else { + HttpURLConnection httpURLConnection = null; + LOGGER.debug("Downloading HTTP texture from {} to {}", url, path); + URI uRI = URI.create(url); + + NativeImage iOException; + try { + httpURLConnection = (HttpURLConnection)uRI.toURL().openConnection(Minecraft.getInstance().getProxy()); + httpURLConnection.setDoInput(true); + httpURLConnection.setDoOutput(false); + httpURLConnection.connect(); + int i = httpURLConnection.getResponseCode(); + if (i / 100 != 2) { + throw new IOException("Failed to open " + uRI + ", HTTP error code: " + i); + } + + byte[] bs = httpURLConnection.getInputStream().readAllBytes(); + + try { + FileUtil.createDirectoriesSafe(path.getParent()); + Files.write(path, bs, new OpenOption[0]); + } catch (IOException var13) { + LOGGER.warn("Failed to cache texture {} in {}", url, path); + } + + iOException = NativeImage.read(bs); + } finally { + if (httpURLConnection != null) { + httpURLConnection.disconnect(); + } + } + + return iOException; + } + } + + private static CompletableFuture registerTextureInManager(ResourceLocation location, NativeImage image) { + Minecraft minecraft = Minecraft.getInstance(); + return CompletableFuture.supplyAsync(() -> { + minecraft.getTextureManager().register(location, new DynamicTexture(location::toString, image)); + return location; + }, minecraft); + } + + private static NativeImage processLegacySkin(NativeImage image, String url) { + int i = image.getHeight(); + int j = image.getWidth(); + if (j == 64 && (i == 32 || i == 64)) { + boolean bl = i == 32; + if (bl) { + NativeImage nativeImage = new NativeImage(64, 64, true); + nativeImage.copyFrom(image); + image.close(); + image = nativeImage; + nativeImage.fillRect(0, 32, 64, 32, 0); + nativeImage.copyRect(4, 16, 16, 32, 4, 4, true, false); + nativeImage.copyRect(8, 16, 16, 32, 4, 4, true, false); + nativeImage.copyRect(0, 20, 24, 32, 4, 12, true, false); + nativeImage.copyRect(4, 20, 16, 32, 4, 12, true, false); + nativeImage.copyRect(8, 20, 8, 32, 4, 12, true, false); + nativeImage.copyRect(12, 20, 16, 32, 4, 12, true, false); + nativeImage.copyRect(44, 16, -8, 32, 4, 4, true, false); + nativeImage.copyRect(48, 16, -8, 32, 4, 4, true, false); + nativeImage.copyRect(40, 20, 0, 32, 4, 12, true, false); + nativeImage.copyRect(44, 20, -8, 32, 4, 12, true, false); + nativeImage.copyRect(48, 20, -16, 32, 4, 12, true, false); + nativeImage.copyRect(52, 20, -8, 32, 4, 12, true, false); + } + + setNoAlpha(image, 0, 0, 32, 16); + if (bl) { + doNotchTransparencyHack(image, 32, 0, 64, 32); + } + + setNoAlpha(image, 0, 16, 64, 32); + setNoAlpha(image, 16, 48, 48, 64); + return image; + } else { + image.close(); + throw new IllegalStateException("Discarding incorrectly sized (" + j + "x" + i + ") skin texture from " + url); + } + } + + private static void doNotchTransparencyHack(NativeImage image, int minX, int minY, int maxX, int maxY) { + for (int i = minX; i < maxX; i++) { + for (int j = minY; j < maxY; j++) { + int k = image.getPixel(i, j); + if (ARGB.alpha(k) < 128) { + return; + } + } + } + + for (int i = minX; i < maxX; i++) { + for (int jx = minY; jx < maxY; jx++) { + image.setPixel(i, jx, image.getPixel(i, jx) & 16777215); + } + } + } + + private static void setNoAlpha(NativeImage image, int minX, int minY, int maxX, int maxY) { + for (int i = minX; i < maxX; i++) { + for (int j = minY; j < maxY; j++) { + image.setPixel(i, j, ARGB.opaque(image.getPixel(i, j))); + } + } + } +} diff --git a/net/minecraft/client/renderer/texture/SpriteContents.java b/net/minecraft/client/renderer/texture/SpriteContents.java index 99bda1d5..a5064265 100644 --- a/net/minecraft/client/renderer/texture/SpriteContents.java +++ b/net/minecraft/client/renderer/texture/SpriteContents.java @@ -1,7 +1,8 @@ package net.minecraft.client.renderer.texture; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import it.unimi.dsi.fastutil.ints.IntSet; @@ -17,6 +18,7 @@ import net.minecraft.CrashReportCategory; import net.minecraft.CrashReportDetail; import net.minecraft.ReportedException; import net.minecraft.client.renderer.texture.Stitcher.Entry; +import net.minecraft.client.resources.metadata.animation.AnimationFrame; import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; import net.minecraft.client.resources.metadata.animation.FrameSize; import net.minecraft.resources.ResourceLocation; @@ -42,9 +44,9 @@ public class SpriteContents implements Entry, AutoCloseable { this.width = frameSize.width(); this.height = frameSize.height(); this.metadata = metadata; - AnimationMetadataSection animationMetadataSection = (AnimationMetadataSection)metadata.getSection(AnimationMetadataSection.SERIALIZER) - .orElse(AnimationMetadataSection.EMPTY); - this.animatedTexture = this.createAnimatedTexture(frameSize, originalImage.getWidth(), originalImage.getHeight(), animationMetadataSection); + this.animatedTexture = (SpriteContents.AnimatedTexture)metadata.getSection(AnimationMetadataSection.TYPE) + .map(animationMetadataSection -> this.createAnimatedTexture(frameSize, originalImage.getWidth(), originalImage.getHeight(), animationMetadataSection)) + .orElse(null); this.originalImage = originalImage; this.byMipLevel = new NativeImage[]{this.originalImage}; } @@ -82,26 +84,35 @@ public class SpriteContents implements Entry, AutoCloseable { int i = width / frameSize.width(); int j = height / frameSize.height(); int k = i * j; - List list = new ArrayList(); - metadata.forEachFrame((ix, jx) -> list.add(new SpriteContents.FrameInfo(ix, jx))); - if (list.isEmpty()) { - for (int l = 0; l < k; l++) { - list.add(new SpriteContents.FrameInfo(l, metadata.getDefaultFrameTime())); + int l = metadata.defaultFrameTime(); + List list; + if (metadata.frames().isEmpty()) { + list = new ArrayList(k); + + for (int m = 0; m < k; m++) { + list.add(new SpriteContents.FrameInfo(m, l)); } } else { - int l = 0; + List list2 = (List)metadata.frames().get(); + list = new ArrayList(list2.size()); + + for (AnimationFrame animationFrame : list2) { + list.add(new SpriteContents.FrameInfo(animationFrame.index(), animationFrame.timeOr(l))); + } + + int n = 0; IntSet intSet = new IntOpenHashSet(); - for (Iterator iterator = list.iterator(); iterator.hasNext(); l++) { + for (Iterator iterator = list.iterator(); iterator.hasNext(); n++) { SpriteContents.FrameInfo frameInfo = (SpriteContents.FrameInfo)iterator.next(); boolean bl = true; if (frameInfo.time <= 0) { - LOGGER.warn("Invalid frame duration on sprite {} frame {}: {}", this.name, l, frameInfo.time); + LOGGER.warn("Invalid frame duration on sprite {} frame {}: {}", this.name, n, frameInfo.time); bl = false; } if (frameInfo.index < 0 || frameInfo.index >= k) { - LOGGER.warn("Invalid frame index on sprite {} frame {}: {}", this.name, l, frameInfo.index); + LOGGER.warn("Invalid frame index on sprite {} frame {}: {}", this.name, n, frameInfo.index); bl = false; } @@ -118,12 +129,14 @@ public class SpriteContents implements Entry, AutoCloseable { } } - return list.size() <= 1 ? null : new SpriteContents.AnimatedTexture(ImmutableList.copyOf(list), i, metadata.isInterpolatedFrames()); + return list.size() <= 1 ? null : new SpriteContents.AnimatedTexture(List.copyOf(list), i, metadata.interpolatedFrames()); } - void upload(int x, int y, int frameX, int frameY, NativeImage[] atlasData) { + void upload(int x, int y, int sourceX, int sourceY, NativeImage[] images, GpuTexture texture) { for (int i = 0; i < this.byMipLevel.length; i++) { - atlasData[i].upload(i, x >> i, y >> i, frameX >> i, frameY >> i, this.width >> i, this.height >> i, this.byMipLevel.length > 1, false); + RenderSystem.getDevice() + .createCommandEncoder() + .writeToTexture(texture, images[i], i, x >> i, y >> i, this.width >> i, this.height >> i, sourceX >> i, sourceY >> i); } } @@ -176,11 +189,11 @@ public class SpriteContents implements Entry, AutoCloseable { return ARGB.alpha(this.originalImage.getPixel(i, j)) == 0; } - public void uploadFirstFrame(int x, int y) { + public void uploadFirstFrame(int x, int y, GpuTexture texture) { if (this.animatedTexture != null) { - this.animatedTexture.uploadFirstFrame(x, y); + this.animatedTexture.uploadFirstFrame(x, y, texture); } else { - this.upload(x, y, 0, 0, this.byMipLevel); + this.upload(x, y, 0, 0, this.byMipLevel, texture); } } @@ -204,18 +217,18 @@ public class SpriteContents implements Entry, AutoCloseable { return frameIndex / this.frameRowSize; } - void uploadFrame(int x, int y, int frameIndex) { + void uploadFrame(int x, int y, int frameIndex, GpuTexture texture) { int i = this.getFrameX(frameIndex) * SpriteContents.this.width; int j = this.getFrameY(frameIndex) * SpriteContents.this.height; - SpriteContents.this.upload(x, y, i, j, SpriteContents.this.byMipLevel); + SpriteContents.this.upload(x, y, i, j, SpriteContents.this.byMipLevel, texture); } public SpriteTicker createTicker() { return SpriteContents.this.new Ticker(this, this.interpolateFrames ? SpriteContents.this.new InterpolationData() : null); } - public void uploadFirstFrame(int x, int y) { - this.uploadFrame(x, y, ((SpriteContents.FrameInfo)this.frames.get(0)).index); + public void uploadFirstFrame(int x, int y, GpuTexture texture) { + this.uploadFrame(x, y, ((SpriteContents.FrameInfo)this.frames.get(0)).index, texture); } public IntStream getUniqueFrames() { @@ -224,14 +237,7 @@ public class SpriteContents implements Entry, AutoCloseable { } @Environment(EnvType.CLIENT) - static class FrameInfo { - final int index; - final int time; - - FrameInfo(int index, int time) { - this.index = index; - this.time = time; - } + record FrameInfo(int index, int time) { } @Environment(EnvType.CLIENT) @@ -246,7 +252,7 @@ public class SpriteContents implements Entry, AutoCloseable { } } - void uploadInterpolatedFrame(int x, int y, SpriteContents.Ticker ticker) { + void uploadInterpolatedFrame(int x, int y, SpriteContents.Ticker ticker, GpuTexture texture) { SpriteContents.AnimatedTexture animatedTexture = ticker.animationInfo; List list = animatedTexture.frames; SpriteContents.FrameInfo frameInfo = (SpriteContents.FrameInfo)list.get(ticker.frame); @@ -267,7 +273,7 @@ public class SpriteContents implements Entry, AutoCloseable { } } - SpriteContents.this.upload(x, y, 0, 0, this.activeFrame); + SpriteContents.this.upload(x, y, 0, 0, this.activeFrame, texture); } } @@ -300,7 +306,7 @@ public class SpriteContents implements Entry, AutoCloseable { } @Override - public void tickAndUpload(int x, int y) { + public void tickAndUpload(int x, int y, GpuTexture texture) { this.subFrame++; SpriteContents.FrameInfo frameInfo = (SpriteContents.FrameInfo)this.animationInfo.frames.get(this.frame); if (this.subFrame >= frameInfo.time) { @@ -309,10 +315,10 @@ public class SpriteContents implements Entry, AutoCloseable { this.subFrame = 0; int j = ((SpriteContents.FrameInfo)this.animationInfo.frames.get(this.frame)).index; if (i != j) { - this.animationInfo.uploadFrame(x, y, j); + this.animationInfo.uploadFrame(x, y, j, texture); } } else if (this.interpolationData != null) { - this.interpolationData.uploadInterpolatedFrame(x, y, this); + this.interpolationData.uploadInterpolatedFrame(x, y, this, texture); } } diff --git a/net/minecraft/client/renderer/texture/SpriteLoader.java b/net/minecraft/client/renderer/texture/SpriteLoader.java index 686534f7..a77be0d8 100644 --- a/net/minecraft/client/renderer/texture/SpriteLoader.java +++ b/net/minecraft/client/renderer/texture/SpriteLoader.java @@ -11,6 +11,7 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.function.Function; +import java.util.function.Supplier; import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -22,14 +23,16 @@ import net.minecraft.client.renderer.texture.atlas.SpriteResourceLoader; import net.minecraft.client.renderer.texture.atlas.SpriteSourceList; import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; +import net.minecraft.server.packs.metadata.MetadataSectionType; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.util.Mth; +import net.minecraft.util.profiling.Profiler; +import net.minecraft.util.profiling.Zone; import org.slf4j.Logger; @Environment(EnvType.CLIENT) public class SpriteLoader { - public static final Set> DEFAULT_METADATA_SECTIONS = Set.of(AnimationMetadataSection.SERIALIZER); + public static final Set> DEFAULT_METADATA_SECTIONS = Set.of(AnimationMetadataSection.TYPE); private static final Logger LOGGER = LogUtils.getLogger(); private final ResourceLocation location; private final int maxSupportedTextureSize; @@ -48,69 +51,74 @@ public class SpriteLoader { } public SpriteLoader.Preparations stitch(List contents, int mipLevel, Executor executor) { - int i = this.maxSupportedTextureSize; - Stitcher stitcher = new Stitcher<>(i, i, mipLevel); - int j = Integer.MAX_VALUE; - int k = 1 << mipLevel; + SpriteLoader.Preparations var17; + try (Zone zone = Profiler.get().zone((Supplier)(() -> "stitch " + this.location))) { + int i = this.maxSupportedTextureSize; + Stitcher stitcher = new Stitcher<>(i, i, mipLevel); + int j = Integer.MAX_VALUE; + int k = 1 << mipLevel; - for (SpriteContents spriteContents : contents) { - j = Math.min(j, Math.min(spriteContents.width(), spriteContents.height())); - int l = Math.min(Integer.lowestOneBit(spriteContents.width()), Integer.lowestOneBit(spriteContents.height())); - if (l < k) { - LOGGER.warn( - "Texture {} with size {}x{} limits mip level from {} to {}", - spriteContents.name(), - spriteContents.width(), - spriteContents.height(), - Mth.log2(k), - Mth.log2(l) - ); - k = l; + for (SpriteContents spriteContents : contents) { + j = Math.min(j, Math.min(spriteContents.width(), spriteContents.height())); + int l = Math.min(Integer.lowestOneBit(spriteContents.width()), Integer.lowestOneBit(spriteContents.height())); + if (l < k) { + LOGGER.warn( + "Texture {} with size {}x{} limits mip level from {} to {}", + spriteContents.name(), + spriteContents.width(), + spriteContents.height(), + Mth.log2(k), + Mth.log2(l) + ); + k = l; + } + + stitcher.registerSprite(spriteContents); } - stitcher.registerSprite(spriteContents); + int m = Math.min(j, k); + int n = Mth.log2(m); + int l; + if (n < mipLevel) { + LOGGER.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.location, mipLevel, n, m); + l = n; + } else { + l = mipLevel; + } + + try { + stitcher.stitch(); + } catch (StitcherException var19) { + CrashReport crashReport = CrashReport.forThrowable(var19, "Stitching"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Stitcher"); + crashReportCategory.setDetail( + "Sprites", + var19.getAllSprites() + .stream() + .map(entry -> String.format(Locale.ROOT, "%s[%dx%d]", entry.name(), entry.width(), entry.height())) + .collect(Collectors.joining(",")) + ); + crashReportCategory.setDetail("Max Texture Size", i); + throw new ReportedException(crashReport); + } + + int o = Math.max(stitcher.getWidth(), this.minWidth); + int p = Math.max(stitcher.getHeight(), this.minHeight); + Map map = this.getStitchedSprites(stitcher, o, p); + TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)map.get(MissingTextureAtlasSprite.getLocation()); + CompletableFuture completableFuture; + if (l > 0) { + completableFuture = CompletableFuture.runAsync( + () -> map.values().forEach(textureAtlasSpritex -> textureAtlasSpritex.contents().increaseMipLevel(l)), executor + ); + } else { + completableFuture = CompletableFuture.completedFuture(null); + } + + var17 = new SpriteLoader.Preparations(o, p, l, textureAtlasSprite, map, completableFuture); } - int m = Math.min(j, k); - int n = Mth.log2(m); - int l; - if (n < mipLevel) { - LOGGER.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.location, mipLevel, n, m); - l = n; - } else { - l = mipLevel; - } - - try { - stitcher.stitch(); - } catch (StitcherException var16) { - CrashReport crashReport = CrashReport.forThrowable(var16, "Stitching"); - CrashReportCategory crashReportCategory = crashReport.addCategory("Stitcher"); - crashReportCategory.setDetail( - "Sprites", - var16.getAllSprites() - .stream() - .map(entry -> String.format(Locale.ROOT, "%s[%dx%d]", entry.name(), entry.width(), entry.height())) - .collect(Collectors.joining(",")) - ); - crashReportCategory.setDetail("Max Texture Size", i); - throw new ReportedException(crashReport); - } - - int o = Math.max(stitcher.getWidth(), this.minWidth); - int p = Math.max(stitcher.getHeight(), this.minHeight); - Map map = this.getStitchedSprites(stitcher, o, p); - TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)map.get(MissingTextureAtlasSprite.getLocation()); - CompletableFuture completableFuture; - if (l > 0) { - completableFuture = CompletableFuture.runAsync( - () -> map.values().forEach(textureAtlasSpritex -> textureAtlasSpritex.contents().increaseMipLevel(l)), executor - ); - } else { - completableFuture = CompletableFuture.completedFuture(null); - } - - return new SpriteLoader.Preparations(o, p, l, textureAtlasSprite, map, completableFuture); + return var17; } public static CompletableFuture> runSpriteSuppliers( @@ -127,7 +135,7 @@ public class SpriteLoader { } public CompletableFuture loadAndStitch( - ResourceManager resourceManager, ResourceLocation location, int mipLevel, Executor executor, Collection> sectionSerializers + ResourceManager resourceManager, ResourceLocation location, int mipLevel, Executor executor, Collection> sectionSerializers ) { SpriteResourceLoader spriteResourceLoader = SpriteResourceLoader.create(sectionSerializers); return CompletableFuture.supplyAsync(() -> SpriteSourceList.load(resourceManager, location).list(resourceManager), executor) diff --git a/net/minecraft/client/renderer/texture/SpriteTicker.java b/net/minecraft/client/renderer/texture/SpriteTicker.java index 000cf47e..929091e4 100644 --- a/net/minecraft/client/renderer/texture/SpriteTicker.java +++ b/net/minecraft/client/renderer/texture/SpriteTicker.java @@ -1,11 +1,12 @@ package net.minecraft.client.renderer.texture; +import com.mojang.blaze3d.textures.GpuTexture; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) public interface SpriteTicker extends AutoCloseable { - void tickAndUpload(int x, int y); + void tickAndUpload(int x, int y, GpuTexture texture); void close(); } diff --git a/net/minecraft/client/renderer/texture/TextureAtlas.java b/net/minecraft/client/renderer/texture/TextureAtlas.java index defeada5..83fccb2a 100644 --- a/net/minecraft/client/renderer/texture/TextureAtlas.java +++ b/net/minecraft/client/renderer/texture/TextureAtlas.java @@ -2,6 +2,7 @@ package net.minecraft.client.renderer.texture; import com.mojang.blaze3d.platform.TextureUtil; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.TextureFormat; import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.Writer; @@ -17,11 +18,7 @@ import net.fabricmc.api.Environment; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; import net.minecraft.ReportedException; -import net.minecraft.client.renderer.texture.SpriteLoader.Preparations; -import net.minecraft.client.renderer.texture.TextureAtlasSprite.Ticker; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.world.inventory.InventoryMenu; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -29,11 +26,11 @@ import org.slf4j.Logger; public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable { private static final Logger LOGGER = LogUtils.getLogger(); @Deprecated - public static final ResourceLocation LOCATION_BLOCKS = InventoryMenu.BLOCK_ATLAS; + public static final ResourceLocation LOCATION_BLOCKS = ResourceLocation.withDefaultNamespace("textures/atlas/blocks.png"); @Deprecated public static final ResourceLocation LOCATION_PARTICLES = ResourceLocation.withDefaultNamespace("textures/atlas/particles.png"); private List sprites = List.of(); - private List animatedTextures = List.of(); + private List animatedTextures = List.of(); private Map texturesByName = Map.of(); @Nullable private TextureAtlasSprite missingSprite; @@ -45,33 +42,31 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable public TextureAtlas(ResourceLocation location) { this.location = location; - this.maxSupportedTextureSize = RenderSystem.maxSupportedTextureSize(); + this.maxSupportedTextureSize = RenderSystem.getDevice().getMaxTextureSize(); } - @Override - public void load(ResourceManager resourceManager) { - } - - public void upload(Preparations preparations) { + public void upload(SpriteLoader.Preparations preparations) { LOGGER.info("Created: {}x{}x{} {}-atlas", preparations.width(), preparations.height(), preparations.mipLevel(), this.location); - TextureUtil.prepareImage(this.getId(), preparations.mipLevel(), preparations.width(), preparations.height()); + this.texture = RenderSystem.getDevice() + .createTexture(this.location::toString, TextureFormat.RGBA8, preparations.width(), preparations.height(), preparations.mipLevel() + 1); this.width = preparations.width(); this.height = preparations.height(); this.mipLevel = preparations.mipLevel(); this.clearTextureData(); + this.setFilter(false, this.mipLevel > 1); this.texturesByName = Map.copyOf(preparations.regions()); this.missingSprite = (TextureAtlasSprite)this.texturesByName.get(MissingTextureAtlasSprite.getLocation()); if (this.missingSprite == null) { throw new IllegalStateException("Atlas '" + this.location + "' (" + this.texturesByName.size() + " sprites) has no missing texture sprite"); } else { List list = new ArrayList(); - List list2 = new ArrayList(); + List list2 = new ArrayList(); for (TextureAtlasSprite textureAtlasSprite : preparations.regions().values()) { list.add(textureAtlasSprite.contents()); try { - textureAtlasSprite.uploadFirstFrame(); + textureAtlasSprite.uploadFirstFrame(this.texture); } catch (Throwable var9) { CrashReport crashReport = CrashReport.forThrowable(var9, "Stitching texture atlas"); CrashReportCategory crashReportCategory = crashReport.addCategory("Texture being stitched together"); @@ -80,7 +75,7 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable throw new ReportedException(crashReport); } - Ticker ticker = textureAtlasSprite.createTicker(); + TextureAtlasSprite.Ticker ticker = textureAtlasSprite.createTicker(); if (ticker != null) { list2.add(ticker); } @@ -94,7 +89,7 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable @Override public void dumpContents(ResourceLocation resourceLocation, Path path) throws IOException { String string = resourceLocation.toDebugFileName(); - TextureUtil.writeAsPNG(path, string, this.getId(), this.mipLevel, this.width, this.height); + TextureUtil.writeAsPNG(path, string, this.getTexture(), this.mipLevel, i -> i); dumpSpriteNames(path, string, this.texturesByName); } @@ -140,10 +135,10 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable } public void cycleAnimationFrames() { - this.bind(); - - for (Ticker ticker : this.animatedTextures) { - ticker.tickAndUpload(); + if (this.texture != null) { + for (TextureAtlasSprite.Ticker ticker : this.animatedTextures) { + ticker.tickAndUpload(this.texture); + } } } @@ -163,7 +158,7 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable public void clearTextureData() { this.sprites.forEach(SpriteContents::close); - this.animatedTextures.forEach(Ticker::close); + this.animatedTextures.forEach(TextureAtlasSprite.Ticker::close); this.sprites = List.of(); this.animatedTextures = List.of(); this.texturesByName = Map.of(); @@ -185,8 +180,4 @@ public class TextureAtlas extends AbstractTexture implements Dumpable, Tickable int getHeight() { return this.height; } - - public void updateFilter(Preparations preparations) { - this.setFilter(false, preparations.mipLevel() > 0); - } } diff --git a/net/minecraft/client/renderer/texture/TextureAtlasSprite.java b/net/minecraft/client/renderer/texture/TextureAtlasSprite.java index a3709a30..07cbf451 100644 --- a/net/minecraft/client/renderer/texture/TextureAtlasSprite.java +++ b/net/minecraft/client/renderer/texture/TextureAtlasSprite.java @@ -1,5 +1,6 @@ package net.minecraft.client.renderer.texture; +import com.mojang.blaze3d.textures.GpuTexture; import com.mojang.blaze3d.vertex.VertexConsumer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -60,8 +61,8 @@ public class TextureAtlasSprite { final SpriteTicker spriteTicker = this.contents.createTicker(); return spriteTicker != null ? new TextureAtlasSprite.Ticker() { @Override - public void tickAndUpload() { - spriteTicker.tickAndUpload(TextureAtlasSprite.this.x, TextureAtlasSprite.this.y); + public void tickAndUpload(GpuTexture texture) { + spriteTicker.tickAndUpload(TextureAtlasSprite.this.x, TextureAtlasSprite.this.y, texture); } @Override @@ -113,8 +114,8 @@ public class TextureAtlasSprite { return "TextureAtlasSprite{contents='" + this.contents + "', u0=" + this.u0 + ", u1=" + this.u1 + ", v0=" + this.v0 + ", v1=" + this.v1 + "}"; } - public void uploadFirstFrame() { - this.contents.uploadFirstFrame(this.x, this.y); + public void uploadFirstFrame(GpuTexture texture) { + this.contents.uploadFirstFrame(this.x, this.y, texture); } private float atlasSize() { @@ -133,7 +134,7 @@ public class TextureAtlasSprite { @Environment(EnvType.CLIENT) public interface Ticker extends AutoCloseable { - void tickAndUpload(); + void tickAndUpload(GpuTexture texture); void close(); } diff --git a/net/minecraft/client/renderer/texture/TextureContents.java b/net/minecraft/client/renderer/texture/TextureContents.java new file mode 100644 index 00000000..9b545327 --- /dev/null +++ b/net/minecraft/client/renderer/texture/TextureContents.java @@ -0,0 +1,59 @@ +package net.minecraft.client.renderer.texture; + +import com.mojang.blaze3d.platform.NativeImage; +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.resources.metadata.texture.TextureMetadataSection; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.Resource; +import net.minecraft.server.packs.resources.ResourceManager; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record TextureContents(NativeImage image, @Nullable TextureMetadataSection metadata) implements Closeable { + public static TextureContents load(ResourceManager resourceManager, ResourceLocation textureId) throws IOException { + Resource resource = resourceManager.getResourceOrThrow(textureId); + InputStream inputStream = resource.open(); + + NativeImage nativeImage; + try { + nativeImage = NativeImage.read(inputStream); + } catch (Throwable var8) { + if (inputStream != null) { + try { + inputStream.close(); + } catch (Throwable var7) { + var8.addSuppressed(var7); + } + } + + throw var8; + } + + if (inputStream != null) { + inputStream.close(); + } + + TextureMetadataSection textureMetadataSection = (TextureMetadataSection)resource.metadata().getSection(TextureMetadataSection.TYPE).orElse(null); + return new TextureContents(nativeImage, textureMetadataSection); + } + + public static TextureContents createMissing() { + return new TextureContents(MissingTextureAtlasSprite.generateMissingImage(), null); + } + + public boolean blur() { + return this.metadata != null ? this.metadata.blur() : false; + } + + public boolean clamp() { + return this.metadata != null ? this.metadata.clamp() : false; + } + + public void close() { + this.image.close(); + } +} diff --git a/net/minecraft/client/renderer/texture/TextureManager.java b/net/minecraft/client/renderer/texture/TextureManager.java index 89385a2f..6ac8be37 100644 --- a/net/minecraft/client/renderer/texture/TextureManager.java +++ b/net/minecraft/client/renderer/texture/TextureManager.java @@ -1,28 +1,26 @@ package net.minecraft.client.renderer.texture; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; -import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.platform.NativeImage; import com.mojang.logging.LogUtils; import com.mojang.realmsclient.gui.screens.AddRealmPopupScreen; +import java.io.FileNotFoundException; import java.io.IOException; +import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Iterator; -import java.util.Locale; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; -import java.util.Map.Entry; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; -import net.minecraft.CrashReportDetail; import net.minecraft.ReportedException; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.screens.TitleScreen; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.PreparableReloadListener; import net.minecraft.server.packs.resources.ResourceManager; @@ -32,102 +30,75 @@ import org.slf4j.Logger; public class TextureManager implements PreparableReloadListener, Tickable, AutoCloseable { private static final Logger LOGGER = LogUtils.getLogger(); public static final ResourceLocation INTENTIONAL_MISSING_TEXTURE = ResourceLocation.withDefaultNamespace(""); - private final Map byPath = Maps.newHashMap(); - private final Set tickableTextures = Sets.newHashSet(); - private final Map prefixRegister = Maps.newHashMap(); + private final Map byPath = new HashMap(); + private final Set tickableTextures = new HashSet(); private final ResourceManager resourceManager; public TextureManager(ResourceManager resourceManager) { this.resourceManager = resourceManager; + NativeImage nativeImage = MissingTextureAtlasSprite.generateMissingImage(); + this.register(MissingTextureAtlasSprite.getLocation(), new DynamicTexture(() -> "(intentionally-)Missing Texture", nativeImage)); + } + + public void registerAndLoad(ResourceLocation textureId, ReloadableTexture texture) { + try { + texture.apply(this.loadContentsSafe(textureId, texture)); + } catch (Throwable var6) { + CrashReport crashReport = CrashReport.forThrowable(var6, "Uploading texture"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Uploaded texture"); + crashReportCategory.setDetail("Resource location", texture.resourceId()); + crashReportCategory.setDetail("Texture id", textureId); + throw new ReportedException(crashReport); + } + + this.register(textureId, texture); + } + + private TextureContents loadContentsSafe(ResourceLocation textureId, ReloadableTexture texture) { + try { + return loadContents(this.resourceManager, textureId, texture); + } catch (Exception var4) { + LOGGER.error("Failed to load texture {} into slot {}", texture.resourceId(), textureId, var4); + return TextureContents.createMissing(); + } + } + + public void registerForNextReload(ResourceLocation textureId) { + this.register(textureId, new SimpleTexture(textureId)); } public void register(ResourceLocation path, AbstractTexture texture) { - texture = this.loadTexture(path, texture); AbstractTexture abstractTexture = (AbstractTexture)this.byPath.put(path, texture); if (abstractTexture != texture) { - if (abstractTexture != null && abstractTexture != MissingTextureAtlasSprite.getTexture()) { + if (abstractTexture != null) { this.safeClose(path, abstractTexture); } - if (texture instanceof Tickable) { - this.tickableTextures.add((Tickable)texture); + if (texture instanceof Tickable tickable) { + this.tickableTextures.add(tickable); } } } private void safeClose(ResourceLocation path, AbstractTexture texture) { - if (texture != MissingTextureAtlasSprite.getTexture()) { - this.tickableTextures.remove(texture); + this.tickableTextures.remove(texture); - try { - texture.close(); - } catch (Exception var4) { - LOGGER.warn("Failed to close texture {}", path, var4); - } - } - - texture.releaseId(); - } - - private AbstractTexture loadTexture(ResourceLocation path, AbstractTexture texture) { try { - texture.load(this.resourceManager); - return texture; - } catch (IOException var6) { - if (path != INTENTIONAL_MISSING_TEXTURE) { - LOGGER.warn("Failed to load texture: {}", path, var6); - } - - return MissingTextureAtlasSprite.getTexture(); - } catch (Throwable var7) { - CrashReport crashReport = CrashReport.forThrowable(var7, "Registering texture"); - CrashReportCategory crashReportCategory = crashReport.addCategory("Resource location being registered"); - crashReportCategory.setDetail("Resource location", path); - crashReportCategory.setDetail("Texture object class", (CrashReportDetail)(() -> texture.getClass().getName())); - throw new ReportedException(crashReport); + texture.close(); + } catch (Exception var4) { + LOGGER.warn("Failed to close texture {}", path, var4); } } public AbstractTexture getTexture(ResourceLocation path) { AbstractTexture abstractTexture = (AbstractTexture)this.byPath.get(path); - if (abstractTexture == null) { - abstractTexture = new SimpleTexture(path); - this.register(path, abstractTexture); - } - - return abstractTexture; - } - - public AbstractTexture getTexture(ResourceLocation path, AbstractTexture defaultTexture) { - return (AbstractTexture)this.byPath.getOrDefault(path, defaultTexture); - } - - public ResourceLocation register(String name, DynamicTexture texture) { - Integer integer = (Integer)this.prefixRegister.get(name); - if (integer == null) { - integer = 1; + if (abstractTexture != null) { + return abstractTexture; } else { - integer = integer + 1; + SimpleTexture simpleTexture = new SimpleTexture(path); + this.registerAndLoad(path, simpleTexture); + return simpleTexture; } - - this.prefixRegister.put(name, integer); - ResourceLocation resourceLocation = ResourceLocation.withDefaultNamespace(String.format(Locale.ROOT, "dynamic/%s_%d", name, integer)); - this.register(resourceLocation, texture); - return resourceLocation; - } - - public CompletableFuture preload(ResourceLocation path, Executor backgroundExecutor) { - if (!this.byPath.containsKey(path)) { - PreloadedTexture preloadedTexture = new PreloadedTexture(this.resourceManager, path, backgroundExecutor); - this.byPath.put(path, preloadedTexture); - return preloadedTexture.getFuture().thenRunAsync(() -> this.register(path, preloadedTexture), TextureManager::execute); - } else { - return CompletableFuture.completedFuture(null); - } - } - - private static void execute(Runnable runnable) { - Minecraft.getInstance().execute(() -> RenderSystem.recordRenderCall(runnable::run)); } @Override @@ -148,44 +119,30 @@ public class TextureManager implements PreparableReloadListener, Tickable, AutoC this.byPath.forEach(this::safeClose); this.byPath.clear(); this.tickableTextures.clear(); - this.prefixRegister.clear(); } @Override public CompletableFuture reload( PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 ) { - CompletableFuture completableFuture = new CompletableFuture(); - TitleScreen.preloadResources(this, executor).thenCompose(preparationBarrier::wait).thenAcceptAsync(void_ -> { - MissingTextureAtlasSprite.getTexture(); - AddRealmPopupScreen.updateCarouselImages(this.resourceManager); - Iterator> iterator = this.byPath.entrySet().iterator(); - - while (iterator.hasNext()) { - Entry entry = (Entry)iterator.next(); - ResourceLocation resourceLocation = (ResourceLocation)entry.getKey(); - AbstractTexture abstractTexture = (AbstractTexture)entry.getValue(); - if (abstractTexture == MissingTextureAtlasSprite.getTexture() && !resourceLocation.equals(MissingTextureAtlasSprite.getLocation())) { - iterator.remove(); - } else { - abstractTexture.reset(this, resourceManager, resourceLocation, executor2); - } + List list = new ArrayList(); + this.byPath.forEach((resourceLocation, abstractTexture) -> { + if (abstractTexture instanceof ReloadableTexture reloadableTexture) { + list.add(scheduleLoad(resourceManager, resourceLocation, reloadableTexture, executor)); } + }); + return CompletableFuture.allOf((CompletableFuture[])list.stream().map(TextureManager.PendingReload::newContents).toArray(CompletableFuture[]::new)) + .thenCompose(preparationBarrier::wait) + .thenAcceptAsync(void_ -> { + AddRealmPopupScreen.updateCarouselImages(this.resourceManager); - Minecraft.getInstance().schedule(() -> completableFuture.complete(null)); - }, runnable -> RenderSystem.recordRenderCall(runnable::run)); - return completableFuture; + for (TextureManager.PendingReload pendingReload : list) { + pendingReload.texture.apply((TextureContents)pendingReload.newContents.join()); + } + }, executor2); } public void dumpAllSheets(Path path) { - if (!RenderSystem.isOnRenderThread()) { - RenderSystem.recordRenderCall(() -> this._dumpAllSheets(path)); - } else { - this._dumpAllSheets(path); - } - } - - private void _dumpAllSheets(Path path) { try { Files.createDirectories(path); } catch (IOException var3) { @@ -203,4 +160,32 @@ public class TextureManager implements PreparableReloadListener, Tickable, AutoC } }); } + + private static TextureContents loadContents(ResourceManager resourceManager, ResourceLocation textureId, ReloadableTexture texture) throws IOException { + try { + return texture.loadContents(resourceManager); + } catch (FileNotFoundException var4) { + if (textureId != INTENTIONAL_MISSING_TEXTURE) { + LOGGER.warn("Missing resource {} referenced from {}", texture.resourceId(), textureId); + } + + return TextureContents.createMissing(); + } + } + + private static TextureManager.PendingReload scheduleLoad( + ResourceManager resourceManager, ResourceLocation textureId, ReloadableTexture texture, Executor executor + ) { + return new TextureManager.PendingReload(texture, CompletableFuture.supplyAsync(() -> { + try { + return loadContents(resourceManager, textureId, texture); + } catch (IOException var4) { + throw new UncheckedIOException(var4); + } + }, executor)); + } + + @Environment(EnvType.CLIENT) + record PendingReload(ReloadableTexture texture, CompletableFuture newContents) { + } } diff --git a/net/minecraft/client/renderer/texture/atlas/SpriteResourceLoader.java b/net/minecraft/client/renderer/texture/atlas/SpriteResourceLoader.java index d4457ed8..9f05580d 100644 --- a/net/minecraft/client/renderer/texture/atlas/SpriteResourceLoader.java +++ b/net/minecraft/client/renderer/texture/atlas/SpriteResourceLoader.java @@ -5,13 +5,14 @@ import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.InputStream; import java.util.Collection; +import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.SpriteContents; import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; import net.minecraft.client.resources.metadata.animation.FrameSize; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; +import net.minecraft.server.packs.metadata.MetadataSectionType; import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceMetadata; import net.minecraft.util.Mth; @@ -23,7 +24,7 @@ import org.slf4j.Logger; public interface SpriteResourceLoader { Logger LOGGER = LogUtils.getLogger(); - static SpriteResourceLoader create(Collection> collection) { + static SpriteResourceLoader create(Collection> collection) { return (resourceLocation, resource) -> { ResourceMetadata resourceMetadata; try { @@ -59,23 +60,27 @@ public interface SpriteResourceLoader { return null; } - AnimationMetadataSection animationMetadataSection = (AnimationMetadataSection)resourceMetadata.getSection(AnimationMetadataSection.SERIALIZER) - .orElse(AnimationMetadataSection.EMPTY); - FrameSize frameSize = animationMetadataSection.calculateFrameSize(nativeImage.getWidth(), nativeImage.getHeight()); - if (Mth.isMultipleOf(nativeImage.getWidth(), frameSize.width()) && Mth.isMultipleOf(nativeImage.getHeight(), frameSize.height())) { - return new SpriteContents(resourceLocation, frameSize, nativeImage, resourceMetadata); + Optional optional = resourceMetadata.getSection(AnimationMetadataSection.TYPE); + FrameSize frameSize; + if (optional.isPresent()) { + frameSize = ((AnimationMetadataSection)optional.get()).calculateFrameSize(nativeImage.getWidth(), nativeImage.getHeight()); + if (!Mth.isMultipleOf(nativeImage.getWidth(), frameSize.width()) || !Mth.isMultipleOf(nativeImage.getHeight(), frameSize.height())) { + LOGGER.error( + "Image {} size {},{} is not multiple of frame size {},{}", + resourceLocation, + nativeImage.getWidth(), + nativeImage.getHeight(), + frameSize.width(), + frameSize.height() + ); + nativeImage.close(); + return null; + } } else { - LOGGER.error( - "Image {} size {},{} is not multiple of frame size {},{}", - resourceLocation, - nativeImage.getWidth(), - nativeImage.getHeight(), - frameSize.width(), - frameSize.height() - ); - nativeImage.close(); - return null; + frameSize = new FrameSize(nativeImage.getWidth(), nativeImage.getHeight()); } + + return new SpriteContents(resourceLocation, frameSize, nativeImage, resourceMetadata); }; } diff --git a/net/minecraft/client/renderer/texture/atlas/SpriteSource.java b/net/minecraft/client/renderer/texture/atlas/SpriteSource.java index 644a14b2..37d35327 100644 --- a/net/minecraft/client/renderer/texture/atlas/SpriteSource.java +++ b/net/minecraft/client/renderer/texture/atlas/SpriteSource.java @@ -1,5 +1,6 @@ package net.minecraft.client.renderer.texture.atlas; +import com.mojang.serialization.MapCodec; import java.util.function.Function; import java.util.function.Predicate; import net.fabricmc.api.EnvType; @@ -16,7 +17,7 @@ public interface SpriteSource { void run(ResourceManager resourceManager, SpriteSource.Output output); - SpriteSourceType type(); + MapCodec codec(); @Environment(EnvType.CLIENT) public interface Output { diff --git a/net/minecraft/client/renderer/texture/atlas/SpriteSourceType.java b/net/minecraft/client/renderer/texture/atlas/SpriteSourceType.java deleted file mode 100644 index 9b71d08f..00000000 --- a/net/minecraft/client/renderer/texture/atlas/SpriteSourceType.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.minecraft.client.renderer.texture.atlas; - -import com.mojang.serialization.MapCodec; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -public record SpriteSourceType(MapCodec codec) { -} diff --git a/net/minecraft/client/renderer/texture/atlas/SpriteSources.java b/net/minecraft/client/renderer/texture/atlas/SpriteSources.java index 4b8d6505..7ca47992 100644 --- a/net/minecraft/client/renderer/texture/atlas/SpriteSources.java +++ b/net/minecraft/client/renderer/texture/atlas/SpriteSources.java @@ -1,9 +1,6 @@ package net.minecraft.client.renderer.texture.atlas; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; import com.mojang.serialization.Codec; -import com.mojang.serialization.DataResult; import com.mojang.serialization.MapCodec; import java.util.List; import net.fabricmc.api.EnvType; @@ -14,33 +11,19 @@ import net.minecraft.client.renderer.texture.atlas.sources.SingleFile; import net.minecraft.client.renderer.texture.atlas.sources.SourceFilter; import net.minecraft.client.renderer.texture.atlas.sources.Unstitcher; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; @Environment(EnvType.CLIENT) public class SpriteSources { - private static final BiMap TYPES = HashBiMap.create(); - public static final SpriteSourceType SINGLE_FILE = register("single", SingleFile.CODEC); - public static final SpriteSourceType DIRECTORY = register("directory", DirectoryLister.CODEC); - public static final SpriteSourceType FILTER = register("filter", SourceFilter.CODEC); - public static final SpriteSourceType UNSTITCHER = register("unstitch", Unstitcher.CODEC); - public static final SpriteSourceType PALETTED_PERMUTATIONS = register("paletted_permutations", PalettedPermutations.CODEC); - public static Codec TYPE_CODEC = ResourceLocation.CODEC.flatXmap(resourceLocation -> { - SpriteSourceType spriteSourceType = (SpriteSourceType)TYPES.get(resourceLocation); - return spriteSourceType != null ? DataResult.success(spriteSourceType) : DataResult.error(() -> "Unknown type " + resourceLocation); - }, spriteSourceType -> { - ResourceLocation resourceLocation = (ResourceLocation)TYPES.inverse().get(spriteSourceType); - return spriteSourceType != null ? DataResult.success(resourceLocation) : DataResult.error(() -> "Unknown type " + resourceLocation); - }); - public static Codec CODEC = TYPE_CODEC.dispatch(SpriteSource::type, SpriteSourceType::codec); - public static Codec> FILE_CODEC = CODEC.listOf().fieldOf("sources").codec(); + private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper<>(); + public static final Codec CODEC = ID_MAPPER.codec(ResourceLocation.CODEC).dispatch(SpriteSource::codec, mapCodec -> mapCodec); + public static final Codec> FILE_CODEC = CODEC.listOf().fieldOf("sources").codec(); - private static SpriteSourceType register(String name, MapCodec codec) { - SpriteSourceType spriteSourceType = new SpriteSourceType(codec); - ResourceLocation resourceLocation = ResourceLocation.withDefaultNamespace(name); - SpriteSourceType spriteSourceType2 = (SpriteSourceType)TYPES.putIfAbsent(resourceLocation, spriteSourceType); - if (spriteSourceType2 != null) { - throw new IllegalStateException("Duplicate registration " + resourceLocation); - } else { - return spriteSourceType; - } + public static void bootstrap() { + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("single"), SingleFile.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("directory"), DirectoryLister.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("filter"), SourceFilter.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("unstitch"), Unstitcher.MAP_CODEC); + ID_MAPPER.put(ResourceLocation.withDefaultNamespace("paletted_permutations"), PalettedPermutations.MAP_CODEC); } } diff --git a/net/minecraft/client/renderer/texture/atlas/sources/DirectoryLister.java b/net/minecraft/client/renderer/texture/atlas/sources/DirectoryLister.java index d5b3ef6d..8ba74f06 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/DirectoryLister.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/DirectoryLister.java @@ -6,28 +6,18 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.atlas.SpriteSource; -import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; -import net.minecraft.client.renderer.texture.atlas.SpriteSources; import net.minecraft.resources.FileToIdConverter; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; @Environment(EnvType.CLIENT) -public class DirectoryLister implements SpriteSource { - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( +public record DirectoryLister(String sourcePath, String idPrefix) implements SpriteSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( instance -> instance.group( - Codec.STRING.fieldOf("source").forGetter(directoryLister -> directoryLister.sourcePath), - Codec.STRING.fieldOf("prefix").forGetter(directoryLister -> directoryLister.idPrefix) + Codec.STRING.fieldOf("source").forGetter(DirectoryLister::sourcePath), Codec.STRING.fieldOf("prefix").forGetter(DirectoryLister::idPrefix) ) .apply(instance, DirectoryLister::new) ); - private final String sourcePath; - private final String idPrefix; - - public DirectoryLister(String sourcePath, String idPrefix) { - this.sourcePath = sourcePath; - this.idPrefix = idPrefix; - } @Override public void run(ResourceManager resourceManager, SpriteSource.Output output) { @@ -39,7 +29,7 @@ public class DirectoryLister implements SpriteSource { } @Override - public SpriteSourceType type() { - return SpriteSources.DIRECTORY; + public MapCodec codec() { + return MAP_CODEC; } } diff --git a/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java b/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java index 755843f1..7b58e792 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java @@ -22,10 +22,6 @@ import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.SpriteContents; import net.minecraft.client.renderer.texture.atlas.SpriteResourceLoader; import net.minecraft.client.renderer.texture.atlas.SpriteSource; -import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; -import net.minecraft.client.renderer.texture.atlas.SpriteSources; -import net.minecraft.client.renderer.texture.atlas.SpriteSource.Output; -import net.minecraft.client.renderer.texture.atlas.SpriteSource.SpriteSupplier; import net.minecraft.client.resources.metadata.animation.FrameSize; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.Resource; @@ -36,28 +32,26 @@ import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class PalettedPermutations implements SpriteSource { +public record PalettedPermutations(List textures, ResourceLocation paletteKey, Map permutations, String separator) + implements SpriteSource { static final Logger LOGGER = LogUtils.getLogger(); - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + public static final String DEFAULT_SEPARATOR = "_"; + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( instance -> instance.group( - Codec.list(ResourceLocation.CODEC).fieldOf("textures").forGetter(palettedPermutations -> palettedPermutations.textures), - ResourceLocation.CODEC.fieldOf("palette_key").forGetter(palettedPermutations -> palettedPermutations.paletteKey), - Codec.unboundedMap(Codec.STRING, ResourceLocation.CODEC).fieldOf("permutations").forGetter(palettedPermutations -> palettedPermutations.permutations) + Codec.list(ResourceLocation.CODEC).fieldOf("textures").forGetter(PalettedPermutations::textures), + ResourceLocation.CODEC.fieldOf("palette_key").forGetter(PalettedPermutations::paletteKey), + Codec.unboundedMap(Codec.STRING, ResourceLocation.CODEC).fieldOf("permutations").forGetter(PalettedPermutations::permutations), + Codec.STRING.optionalFieldOf("separator", "_").forGetter(PalettedPermutations::separator) ) .apply(instance, PalettedPermutations::new) ); - private final List textures; - private final Map permutations; - private final ResourceLocation paletteKey; - private PalettedPermutations(List textures, ResourceLocation paletteKey, Map permutations) { - this.textures = textures; - this.permutations = permutations; - this.paletteKey = paletteKey; + public PalettedPermutations(List textures, ResourceLocation paletteKey, Map permutations) { + this(textures, paletteKey, permutations, "_"); } @Override - public void run(ResourceManager resourceManager, Output output) { + public void run(ResourceManager resourceManager, SpriteSource.Output output) { Supplier supplier = Suppliers.memoize(() -> loadPaletteEntryFromImage(resourceManager, this.paletteKey)); Map> map = new HashMap(); this.permutations @@ -76,7 +70,7 @@ public class PalettedPermutations implements SpriteSource { LazyLoadedImage lazyLoadedImage = new LazyLoadedImage(resourceLocation2, (Resource)optional.get(), map.size()); for (Entry> entry : map.entrySet()) { - ResourceLocation resourceLocation3 = resourceLocation.withSuffix("_" + (String)entry.getKey()); + ResourceLocation resourceLocation3 = resourceLocation.withSuffix(this.separator + (String)entry.getKey()); output.add( resourceLocation3, new PalettedPermutations.PalettedSpriteSupplier(lazyLoadedImage, (Supplier)entry.getValue(), resourceLocation3) ); @@ -85,17 +79,17 @@ public class PalettedPermutations implements SpriteSource { } } - private static IntUnaryOperator createPaletteMapping(int[] is, int[] js) { - if (js.length != is.length) { - LOGGER.warn("Palette mapping has different sizes: {} and {}", is.length, js.length); + private static IntUnaryOperator createPaletteMapping(int[] keys, int[] values) { + if (values.length != keys.length) { + LOGGER.warn("Palette mapping has different sizes: {} and {}", keys.length, values.length); throw new IllegalArgumentException(); } else { - Int2IntMap int2IntMap = new Int2IntOpenHashMap(js.length); + Int2IntMap int2IntMap = new Int2IntOpenHashMap(values.length); - for (int i = 0; i < is.length; i++) { - int j = is[i]; + for (int i = 0; i < keys.length; i++) { + int j = keys[i]; if (ARGB.alpha(j) != 0) { - int2IntMap.put(ARGB.transparent(j), js[i]); + int2IntMap.put(ARGB.transparent(j), values[i]); } } @@ -150,12 +144,13 @@ public class PalettedPermutations implements SpriteSource { } @Override - public SpriteSourceType type() { - return SpriteSources.PALETTED_PERMUTATIONS; + public MapCodec codec() { + return MAP_CODEC; } @Environment(EnvType.CLIENT) - record PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier palette, ResourceLocation permutationLocation) implements SpriteSupplier { + record PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier palette, ResourceLocation permutationLocation) + implements SpriteSource.SpriteSupplier { @Nullable public SpriteContents apply(SpriteResourceLoader spriteResourceLoader) { Object var3; diff --git a/net/minecraft/client/renderer/texture/atlas/sources/SingleFile.java b/net/minecraft/client/renderer/texture/atlas/sources/SingleFile.java index f8f0bcf7..2d06e0ac 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/SingleFile.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/SingleFile.java @@ -7,29 +7,24 @@ import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.atlas.SpriteSource; -import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; -import net.minecraft.client.renderer.texture.atlas.SpriteSources; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceManager; import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class SingleFile implements SpriteSource { +public record SingleFile(ResourceLocation resourceId, Optional spriteId) implements SpriteSource { private static final Logger LOGGER = LogUtils.getLogger(); - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( instance -> instance.group( - ResourceLocation.CODEC.fieldOf("resource").forGetter(singleFile -> singleFile.resourceId), - ResourceLocation.CODEC.optionalFieldOf("sprite").forGetter(singleFile -> singleFile.spriteId) + ResourceLocation.CODEC.fieldOf("resource").forGetter(SingleFile::resourceId), + ResourceLocation.CODEC.optionalFieldOf("sprite").forGetter(SingleFile::spriteId) ) .apply(instance, SingleFile::new) ); - private final ResourceLocation resourceId; - private final Optional spriteId; - public SingleFile(ResourceLocation resourceId, Optional spriteId) { - this.resourceId = resourceId; - this.spriteId = spriteId; + public SingleFile(ResourceLocation resourceId) { + this(resourceId, Optional.empty()); } @Override @@ -44,7 +39,7 @@ public class SingleFile implements SpriteSource { } @Override - public SpriteSourceType type() { - return SpriteSources.SINGLE_FILE; + public MapCodec codec() { + return MAP_CODEC; } } diff --git a/net/minecraft/client/renderer/texture/atlas/sources/SourceFilter.java b/net/minecraft/client/renderer/texture/atlas/sources/SourceFilter.java index b969c592..07feb1a7 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/SourceFilter.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/SourceFilter.java @@ -5,22 +5,14 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.atlas.SpriteSource; -import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; -import net.minecraft.client.renderer.texture.atlas.SpriteSources; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.util.ResourceLocationPattern; @Environment(EnvType.CLIENT) -public class SourceFilter implements SpriteSource { - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( - instance -> instance.group(ResourceLocationPattern.CODEC.fieldOf("pattern").forGetter(sourceFilter -> sourceFilter.filter)) - .apply(instance, SourceFilter::new) +public record SourceFilter(ResourceLocationPattern filter) implements SpriteSource { + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( + instance -> instance.group(ResourceLocationPattern.CODEC.fieldOf("pattern").forGetter(SourceFilter::filter)).apply(instance, SourceFilter::new) ); - private final ResourceLocationPattern filter; - - public SourceFilter(ResourceLocationPattern filter) { - this.filter = filter; - } @Override public void run(ResourceManager resourceManager, SpriteSource.Output output) { @@ -28,7 +20,7 @@ public class SourceFilter implements SpriteSource { } @Override - public SpriteSourceType type() { - return SpriteSources.FILTER; + public MapCodec codec() { + return MAP_CODEC; } } diff --git a/net/minecraft/client/renderer/texture/atlas/sources/Unstitcher.java b/net/minecraft/client/renderer/texture/atlas/sources/Unstitcher.java index bb237622..d87d293a 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/Unstitcher.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/Unstitcher.java @@ -13,8 +13,6 @@ import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.client.renderer.texture.SpriteContents; import net.minecraft.client.renderer.texture.atlas.SpriteResourceLoader; import net.minecraft.client.renderer.texture.atlas.SpriteSource; -import net.minecraft.client.renderer.texture.atlas.SpriteSourceType; -import net.minecraft.client.renderer.texture.atlas.SpriteSources; import net.minecraft.client.resources.metadata.animation.FrameSize; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.Resource; @@ -25,28 +23,17 @@ import net.minecraft.util.Mth; import org.slf4j.Logger; @Environment(EnvType.CLIENT) -public class Unstitcher implements SpriteSource { +public record Unstitcher(ResourceLocation resource, List regions, double xDivisor, double yDivisor) implements SpriteSource { static final Logger LOGGER = LogUtils.getLogger(); - public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( + public static final MapCodec MAP_CODEC = RecordCodecBuilder.mapCodec( instance -> instance.group( - ResourceLocation.CODEC.fieldOf("resource").forGetter(unstitcher -> unstitcher.resource), - ExtraCodecs.nonEmptyList(Unstitcher.Region.CODEC.listOf()).fieldOf("regions").forGetter(unstitcher -> unstitcher.regions), - Codec.DOUBLE.optionalFieldOf("divisor_x", 1.0).forGetter(unstitcher -> unstitcher.xDivisor), - Codec.DOUBLE.optionalFieldOf("divisor_y", 1.0).forGetter(unstitcher -> unstitcher.yDivisor) + ResourceLocation.CODEC.fieldOf("resource").forGetter(Unstitcher::resource), + ExtraCodecs.nonEmptyList(Unstitcher.Region.CODEC.listOf()).fieldOf("regions").forGetter(Unstitcher::regions), + Codec.DOUBLE.optionalFieldOf("divisor_x", 1.0).forGetter(Unstitcher::xDivisor), + Codec.DOUBLE.optionalFieldOf("divisor_y", 1.0).forGetter(Unstitcher::yDivisor) ) .apply(instance, Unstitcher::new) ); - private final ResourceLocation resource; - private final List regions; - private final double xDivisor; - private final double yDivisor; - - public Unstitcher(ResourceLocation resource, List regions, double xDivisor, double yDivisor) { - this.resource = resource; - this.regions = regions; - this.xDivisor = xDivisor; - this.yDivisor = yDivisor; - } @Override public void run(ResourceManager resourceManager, SpriteSource.Output output) { @@ -64,12 +51,12 @@ public class Unstitcher implements SpriteSource { } @Override - public SpriteSourceType type() { - return SpriteSources.UNSTITCHER; + public MapCodec codec() { + return MAP_CODEC; } @Environment(EnvType.CLIENT) - record Region(ResourceLocation sprite, double x, double y, double width, double height) { + public record Region(ResourceLocation sprite, double x, double y, double width, double height) { public static final Codec CODEC = RecordCodecBuilder.create( instance -> instance.group( ResourceLocation.CODEC.fieldOf("sprite").forGetter(Unstitcher.Region::sprite), diff --git a/net/minecraft/client/resources/ClientPackSource.java b/net/minecraft/client/resources/ClientPackSource.java index 3cbd7e1d..e3978d0d 100644 --- a/net/minecraft/client/resources/ClientPackSource.java +++ b/net/minecraft/client/resources/ClientPackSource.java @@ -25,6 +25,8 @@ import net.minecraft.server.packs.repository.BuiltInPackSource; import net.minecraft.server.packs.repository.KnownPack; import net.minecraft.server.packs.repository.Pack; import net.minecraft.server.packs.repository.PackSource; +import net.minecraft.server.packs.repository.Pack.Position; +import net.minecraft.server.packs.repository.Pack.ResourcesSupplier; import net.minecraft.world.level.validation.DirectoryValidator; import org.jetbrains.annotations.Nullable; @@ -41,8 +43,8 @@ public class ClientPackSource extends BuiltInPackSource { private static final PackLocationInfo VANILLA_PACK_INFO = new PackLocationInfo( "vanilla", Component.translatable("resourcePack.vanilla.name"), PackSource.BUILT_IN, Optional.of(CORE_PACK_INFO) ); - private static final PackSelectionConfig VANILLA_SELECTION_CONFIG = new PackSelectionConfig(true, Pack.Position.BOTTOM, false); - private static final PackSelectionConfig BUILT_IN_SELECTION_CONFIG = new PackSelectionConfig(false, Pack.Position.TOP, false); + private static final PackSelectionConfig VANILLA_SELECTION_CONFIG = new PackSelectionConfig(true, Position.BOTTOM, false); + private static final PackSelectionConfig BUILT_IN_SELECTION_CONFIG = new PackSelectionConfig(false, Position.TOP, false); private static final ResourceLocation PACKS_DIR = ResourceLocation.withDefaultNamespace("resourcepacks"); @Nullable private final Path externalAssetDir; @@ -89,7 +91,7 @@ public class ClientPackSource extends BuiltInPackSource { @Nullable @Override - protected Pack createBuiltinPack(String id, Pack.ResourcesSupplier resources, Component title) { + protected Pack createBuiltinPack(String id, ResourcesSupplier resources, Component title) { return Pack.readMetaAndCreate(createBuiltInPackLocation(id, title), resources, PackType.CLIENT_RESOURCES, BUILT_IN_SELECTION_CONFIG); } diff --git a/net/minecraft/client/resources/DryFoliageColorReloadListener.java b/net/minecraft/client/resources/DryFoliageColorReloadListener.java new file mode 100644 index 00000000..c945a67b --- /dev/null +++ b/net/minecraft/client/resources/DryFoliageColorReloadListener.java @@ -0,0 +1,27 @@ +package net.minecraft.client.resources; + +import java.io.IOException; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.server.packs.resources.SimplePreparableReloadListener; +import net.minecraft.util.profiling.ProfilerFiller; +import net.minecraft.world.level.DryFoliageColor; + +@Environment(EnvType.CLIENT) +public class DryFoliageColorReloadListener extends SimplePreparableReloadListener { + private static final ResourceLocation LOCATION = ResourceLocation.withDefaultNamespace("textures/colormap/dry_foliage.png"); + + protected int[] prepare(ResourceManager resourceManager, ProfilerFiller profiler) { + try { + return LegacyStuffWrapper.getPixels(resourceManager, LOCATION); + } catch (IOException var4) { + throw new IllegalStateException("Failed to load dry foliage color texture", var4); + } + } + + protected void apply(int[] is, ResourceManager resourceManager, ProfilerFiller profilerFiller) { + DryFoliageColor.init(is); + } +} diff --git a/net/minecraft/client/resources/MapDecorationTextureManager.java b/net/minecraft/client/resources/MapDecorationTextureManager.java index 053f97c6..107bc2ea 100644 --- a/net/minecraft/client/resources/MapDecorationTextureManager.java +++ b/net/minecraft/client/resources/MapDecorationTextureManager.java @@ -4,13 +4,14 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.resources.model.AtlasIds; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.saveddata.maps.MapDecoration; @Environment(EnvType.CLIENT) public class MapDecorationTextureManager extends TextureAtlasHolder { public MapDecorationTextureManager(TextureManager textureManager) { - super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/map_decorations.png"), ResourceLocation.withDefaultNamespace("map_decorations")); + super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/map_decorations.png"), AtlasIds.MAP_DECORATIONS); } public TextureAtlasSprite get(MapDecoration mapDecoration) { diff --git a/net/minecraft/client/resources/MapTextureManager.java b/net/minecraft/client/resources/MapTextureManager.java index e2d68820..087a52ce 100644 --- a/net/minecraft/client/resources/MapTextureManager.java +++ b/net/minecraft/client/resources/MapTextureManager.java @@ -21,12 +21,12 @@ public class MapTextureManager implements AutoCloseable { this.textureManager = textureManager; } - public void update(MapId mapId, MapItemSavedData mapItemSavedData) { - this.getOrCreateMapInstance(mapId, mapItemSavedData).forceUpload(); + public void update(MapId id, MapItemSavedData data) { + this.getOrCreateMapInstance(id, data).forceUpload(); } - public ResourceLocation prepareMapTexture(MapId mapId, MapItemSavedData mapItemSavedData) { - MapTextureManager.MapInstance mapInstance = this.getOrCreateMapInstance(mapId, mapItemSavedData); + public ResourceLocation prepareMapTexture(MapId id, MapItemSavedData data) { + MapTextureManager.MapInstance mapInstance = this.getOrCreateMapInstance(id, data); mapInstance.updateTextureIfNeeded(); return mapInstance.location; } @@ -39,12 +39,12 @@ public class MapTextureManager implements AutoCloseable { this.maps.clear(); } - private MapTextureManager.MapInstance getOrCreateMapInstance(MapId mapId, MapItemSavedData mapItemSavedData) { - return this.maps.compute(mapId.id(), (integer, mapInstance) -> { + private MapTextureManager.MapInstance getOrCreateMapInstance(MapId id, MapItemSavedData data) { + return this.maps.compute(id.id(), (integer, mapInstance) -> { if (mapInstance == null) { - return new MapTextureManager.MapInstance(integer, mapItemSavedData); + return new MapTextureManager.MapInstance(integer, data); } else { - mapInstance.replaceMapData(mapItemSavedData); + mapInstance.replaceMapData(data); return mapInstance; } }); @@ -61,15 +61,16 @@ public class MapTextureManager implements AutoCloseable { private boolean requiresUpload = true; final ResourceLocation location; - MapInstance(final int i, final MapItemSavedData mapItemSavedData) { - this.data = mapItemSavedData; - this.texture = new DynamicTexture(128, 128, true); - this.location = MapTextureManager.this.textureManager.register("map/" + i, this.texture); + MapInstance(final int id, final MapItemSavedData data) { + this.data = data; + this.texture = new DynamicTexture(() -> "Map " + id, 128, 128, true); + this.location = ResourceLocation.withDefaultNamespace("map/" + id); + MapTextureManager.this.textureManager.register(this.location, this.texture); } - void replaceMapData(MapItemSavedData mapItemSavedData) { - boolean bl = this.data != mapItemSavedData; - this.data = mapItemSavedData; + void replaceMapData(MapItemSavedData data) { + boolean bl = this.data != data; + this.data = data; this.requiresUpload |= bl; } diff --git a/net/minecraft/client/resources/MobEffectTextureManager.java b/net/minecraft/client/resources/MobEffectTextureManager.java index e2f91d35..909d126c 100644 --- a/net/minecraft/client/resources/MobEffectTextureManager.java +++ b/net/minecraft/client/resources/MobEffectTextureManager.java @@ -5,6 +5,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.resources.model.AtlasIds; import net.minecraft.core.Holder; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -13,7 +14,7 @@ import net.minecraft.world.effect.MobEffect; @Environment(EnvType.CLIENT) public class MobEffectTextureManager extends TextureAtlasHolder { public MobEffectTextureManager(TextureManager textureManager) { - super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/mob_effects.png"), ResourceLocation.withDefaultNamespace("mob_effects")); + super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/mob_effects.png"), AtlasIds.MOB_EFFECTS); } public TextureAtlasSprite get(Holder effect) { diff --git a/net/minecraft/client/resources/PaintingTextureManager.java b/net/minecraft/client/resources/PaintingTextureManager.java index e00d2c6d..93eb9e8e 100644 --- a/net/minecraft/client/resources/PaintingTextureManager.java +++ b/net/minecraft/client/resources/PaintingTextureManager.java @@ -4,6 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.resources.model.AtlasIds; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.decoration.PaintingVariant; @@ -12,7 +13,7 @@ public class PaintingTextureManager extends TextureAtlasHolder { private static final ResourceLocation BACK_SPRITE_LOCATION = ResourceLocation.withDefaultNamespace("back"); public PaintingTextureManager(TextureManager textureManager) { - super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/paintings.png"), ResourceLocation.withDefaultNamespace("paintings")); + super(textureManager, ResourceLocation.withDefaultNamespace("textures/atlas/paintings.png"), AtlasIds.PAINTINGS); } public TextureAtlasSprite get(PaintingVariant paintingVariant) { diff --git a/net/minecraft/client/resources/SkinManager.java b/net/minecraft/client/resources/SkinManager.java index 86674ec1..0501883a 100644 --- a/net/minecraft/client/resources/SkinManager.java +++ b/net/minecraft/client/resources/SkinManager.java @@ -16,6 +16,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import java.nio.file.Path; import java.time.Duration; import java.util.Map; +import java.util.Optional; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; @@ -24,8 +25,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Optionull; import net.minecraft.Util; -import net.minecraft.client.renderer.texture.HttpTexture; -import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.texture.SkinTextureDownloader; import net.minecraft.client.resources.PlayerSkin.Model; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.Nullable; @@ -35,21 +35,21 @@ import org.slf4j.Logger; public class SkinManager { static final Logger LOGGER = LogUtils.getLogger(); private final MinecraftSessionService sessionService; - private final LoadingCache> skinCache; + private final LoadingCache>> skinCache; private final SkinManager.TextureCache skinTextures; private final SkinManager.TextureCache capeTextures; private final SkinManager.TextureCache elytraTextures; - public SkinManager(TextureManager textureManager, Path root, MinecraftSessionService sessionService, Executor executor) { + public SkinManager(Path skinDirectory, MinecraftSessionService sessionService, Executor executor) { this.sessionService = sessionService; - this.skinTextures = new SkinManager.TextureCache(textureManager, root, Type.SKIN); - this.capeTextures = new SkinManager.TextureCache(textureManager, root, Type.CAPE); - this.elytraTextures = new SkinManager.TextureCache(textureManager, root, Type.ELYTRA); + this.skinTextures = new SkinManager.TextureCache(skinDirectory, Type.SKIN); + this.capeTextures = new SkinManager.TextureCache(skinDirectory, Type.CAPE); + this.elytraTextures = new SkinManager.TextureCache(skinDirectory, Type.ELYTRA); this.skinCache = CacheBuilder.newBuilder() .expireAfterAccess(Duration.ofSeconds(15L)) .build( - new CacheLoader>() { - public CompletableFuture load(SkinManager.CacheKey cacheKey) { + new CacheLoader>>() { + public CompletableFuture> load(SkinManager.CacheKey cacheKey) { return CompletableFuture.supplyAsync(() -> { Property property = cacheKey.packedTextures(); if (property == null) { @@ -63,24 +63,31 @@ public class SkinManager { return minecraftProfileTextures; } }, Util.backgroundExecutor().forName("unpackSkinTextures")) - .thenComposeAsync(minecraftProfileTextures -> SkinManager.this.registerTextures(cacheKey.profileId(), minecraftProfileTextures), executor); + .thenComposeAsync(minecraftProfileTextures -> SkinManager.this.registerTextures(cacheKey.profileId(), minecraftProfileTextures), executor) + .handle((playerSkin, throwable) -> { + if (throwable != null) { + SkinManager.LOGGER.warn("Failed to load texture for profile {}", cacheKey.profileId, throwable); + } + + return Optional.ofNullable(playerSkin); + }); } } ); } public Supplier lookupInsecure(GameProfile profile) { - CompletableFuture completableFuture = this.getOrLoad(profile); + CompletableFuture> completableFuture = this.getOrLoad(profile); PlayerSkin playerSkin = DefaultPlayerSkin.get(profile); - return () -> (PlayerSkin)completableFuture.getNow(playerSkin); + return () -> (PlayerSkin)((Optional)completableFuture.getNow(Optional.empty())).orElse(playerSkin); } public PlayerSkin getInsecureSkin(GameProfile profile) { - PlayerSkin playerSkin = (PlayerSkin)this.getOrLoad(profile).getNow(null); + PlayerSkin playerSkin = (PlayerSkin)((Optional)this.getOrLoad(profile).getNow(Optional.empty())).orElse(null); return playerSkin != null ? playerSkin : DefaultPlayerSkin.get(profile); } - public CompletableFuture getOrLoad(GameProfile profile) { + public CompletableFuture> getOrLoad(GameProfile profile) { Property property = this.sessionService.getPackedTextures(profile); return this.skinCache.getUnchecked(new SkinManager.CacheKey(profile.getId(), property)); } @@ -126,13 +133,11 @@ public class SkinManager { @Environment(EnvType.CLIENT) static class TextureCache { - private final TextureManager textureManager; private final Path root; private final Type type; private final Map> textures = new Object2ObjectOpenHashMap<>(); - TextureCache(TextureManager textureManager, Path root, Type type) { - this.textureManager = textureManager; + TextureCache(Path root, Type type) { this.root = root; this.type = type; } @@ -152,12 +157,7 @@ public class SkinManager { String string = Hashing.sha1().hashUnencodedChars(texture.getHash()).toString(); ResourceLocation resourceLocation = this.getTextureLocation(string); Path path = this.root.resolve(string.length() > 2 ? string.substring(0, 2) : "xx").resolve(string); - CompletableFuture completableFuture = new CompletableFuture(); - HttpTexture httpTexture = new HttpTexture( - path.toFile(), texture.getUrl(), DefaultPlayerSkin.getDefaultTexture(), this.type == Type.SKIN, () -> completableFuture.complete(resourceLocation) - ); - this.textureManager.register(resourceLocation, httpTexture); - return completableFuture; + return SkinTextureDownloader.downloadAndRegisterSkin(resourceLocation, path, texture.getUrl(), this.type == Type.SKIN); } private ResourceLocation getTextureLocation(String name) { diff --git a/net/minecraft/client/resources/TextureAtlasHolder.java b/net/minecraft/client/resources/TextureAtlasHolder.java index 34396086..69007963 100644 --- a/net/minecraft/client/resources/TextureAtlasHolder.java +++ b/net/minecraft/client/resources/TextureAtlasHolder.java @@ -9,9 +9,8 @@ import net.minecraft.client.renderer.texture.SpriteLoader; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.texture.SpriteLoader.Preparations; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; +import net.minecraft.server.packs.metadata.MetadataSectionType; import net.minecraft.server.packs.resources.PreparableReloadListener; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.util.profiling.Profiler; @@ -21,14 +20,14 @@ import net.minecraft.util.profiling.Zone; public abstract class TextureAtlasHolder implements PreparableReloadListener, AutoCloseable { private final TextureAtlas textureAtlas; private final ResourceLocation atlasInfoLocation; - private final Set> metadataSections; + private final Set> metadataSections; public TextureAtlasHolder(TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation) { this(textureManager, textureAtlasLocation, atlasInfoLocation, SpriteLoader.DEFAULT_METADATA_SECTIONS); } public TextureAtlasHolder( - TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation, Set> metadataSections + TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation, Set> metadataSections ) { this.atlasInfoLocation = atlasInfoLocation; this.textureAtlas = new TextureAtlas(textureAtlasLocation); @@ -49,14 +48,14 @@ public abstract class TextureAtlasHolder implements PreparableReloadListener, Au ) { return SpriteLoader.create(this.textureAtlas) .loadAndStitch(resourceManager, this.atlasInfoLocation, 0, executor, this.metadataSections) - .thenCompose(Preparations::waitForUpload) + .thenCompose(SpriteLoader.Preparations::waitForUpload) .thenCompose(preparationBarrier::wait) .thenAcceptAsync(this::apply, executor2); } - private void apply(Preparations preparations) { + private void apply(SpriteLoader.Preparations preperations) { try (Zone zone = Profiler.get().zone("upload")) { - this.textureAtlas.upload(preparations); + this.textureAtlas.upload(preperations); } } diff --git a/net/minecraft/client/resources/metadata/animation/AnimationFrame.java b/net/minecraft/client/resources/metadata/animation/AnimationFrame.java index 3c93d6c9..3eb91d75 100644 --- a/net/minecraft/client/resources/metadata/animation/AnimationFrame.java +++ b/net/minecraft/client/resources/metadata/animation/AnimationFrame.java @@ -1,28 +1,33 @@ package net.minecraft.client.resources.metadata.animation; +import com.mojang.datafixers.util.Either; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.util.ExtraCodecs; @Environment(EnvType.CLIENT) -public class AnimationFrame { - public static final int UNKNOWN_FRAME_TIME = -1; - private final int index; - private final int time; +public record AnimationFrame(int index, Optional time) { + public static final Codec FULL_CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ExtraCodecs.NON_NEGATIVE_INT.fieldOf("index").forGetter(AnimationFrame::index), + ExtraCodecs.POSITIVE_INT.optionalFieldOf("time").forGetter(AnimationFrame::time) + ) + .apply(instance, AnimationFrame::new) + ); + public static final Codec CODEC = Codec.either(ExtraCodecs.NON_NEGATIVE_INT, FULL_CODEC) + .xmap( + either -> either.map(AnimationFrame::new, animationFrame -> animationFrame), + animationFrame -> animationFrame.time.isPresent() ? Either.right(animationFrame) : Either.left(animationFrame.index) + ); public AnimationFrame(int index) { - this(index, -1); + this(index, Optional.empty()); } - public AnimationFrame(int index, int time) { - this.index = index; - this.time = time; - } - - public int getTime(int defaultValue) { - return this.time == -1 ? defaultValue : this.time; - } - - public int getIndex() { - return this.index; + public int timeOr(int defaultValue) { + return (Integer)this.time.orElse(defaultValue); } } diff --git a/net/minecraft/client/resources/metadata/animation/AnimationMetadataSection.java b/net/minecraft/client/resources/metadata/animation/AnimationMetadataSection.java index 8ca49b2f..e39176a7 100644 --- a/net/minecraft/client/resources/metadata/animation/AnimationMetadataSection.java +++ b/net/minecraft/client/resources/metadata/animation/AnimationMetadataSection.java @@ -1,64 +1,40 @@ package net.minecraft.client.resources.metadata.animation; -import com.google.common.collect.Lists; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.List; +import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.server.packs.metadata.MetadataSectionType; +import net.minecraft.util.ExtraCodecs; @Environment(EnvType.CLIENT) -public class AnimationMetadataSection { - public static final AnimationMetadataSectionSerializer SERIALIZER = new AnimationMetadataSectionSerializer(); - public static final String SECTION_NAME = "animation"; - public static final int DEFAULT_FRAME_TIME = 1; - public static final int UNKNOWN_SIZE = -1; - public static final AnimationMetadataSection EMPTY = new AnimationMetadataSection(Lists.newArrayList(), -1, -1, 1, false) { - @Override - public FrameSize calculateFrameSize(int width, int height) { - return new FrameSize(width, height); - } - }; - private final List frames; - private final int frameWidth; - private final int frameHeight; - private final int defaultFrameTime; - private final boolean interpolatedFrames; - - public AnimationMetadataSection(List frames, int frameWidth, int frameHeight, int defaultFrameTime, boolean interpolatedFrames) { - this.frames = frames; - this.frameWidth = frameWidth; - this.frameHeight = frameHeight; - this.defaultFrameTime = defaultFrameTime; - this.interpolatedFrames = interpolatedFrames; - } +public record AnimationMetadataSection( + Optional> frames, Optional frameWidth, Optional frameHeight, int defaultFrameTime, boolean interpolatedFrames +) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + AnimationFrame.CODEC.listOf().optionalFieldOf("frames").forGetter(AnimationMetadataSection::frames), + ExtraCodecs.POSITIVE_INT.optionalFieldOf("width").forGetter(AnimationMetadataSection::frameWidth), + ExtraCodecs.POSITIVE_INT.optionalFieldOf("height").forGetter(AnimationMetadataSection::frameHeight), + ExtraCodecs.POSITIVE_INT.optionalFieldOf("frametime", 1).forGetter(AnimationMetadataSection::defaultFrameTime), + Codec.BOOL.optionalFieldOf("interpolate", false).forGetter(AnimationMetadataSection::interpolatedFrames) + ) + .apply(instance, AnimationMetadataSection::new) + ); + public static final MetadataSectionType TYPE = new MetadataSectionType<>("animation", CODEC); public FrameSize calculateFrameSize(int width, int height) { - if (this.frameWidth != -1) { - return this.frameHeight != -1 ? new FrameSize(this.frameWidth, this.frameHeight) : new FrameSize(this.frameWidth, height); - } else if (this.frameHeight != -1) { - return new FrameSize(width, this.frameHeight); + if (this.frameWidth.isPresent()) { + return this.frameHeight.isPresent() + ? new FrameSize((Integer)this.frameWidth.get(), (Integer)this.frameHeight.get()) + : new FrameSize((Integer)this.frameWidth.get(), height); + } else if (this.frameHeight.isPresent()) { + return new FrameSize(width, (Integer)this.frameHeight.get()); } else { int i = Math.min(width, height); return new FrameSize(i, i); } } - - public int getDefaultFrameTime() { - return this.defaultFrameTime; - } - - public boolean isInterpolatedFrames() { - return this.interpolatedFrames; - } - - public void forEachFrame(AnimationMetadataSection.FrameOutput output) { - for (AnimationFrame animationFrame : this.frames) { - output.accept(animationFrame.getIndex(), animationFrame.getTime(this.defaultFrameTime)); - } - } - - @FunctionalInterface - @Environment(EnvType.CLIENT) - public interface FrameOutput { - void accept(int i, int j); - } } diff --git a/net/minecraft/client/resources/metadata/animation/AnimationMetadataSectionSerializer.java b/net/minecraft/client/resources/metadata/animation/AnimationMetadataSectionSerializer.java deleted file mode 100644 index e4b9a657..00000000 --- a/net/minecraft/client/resources/metadata/animation/AnimationMetadataSectionSerializer.java +++ /dev/null @@ -1,78 +0,0 @@ -package net.minecraft.client.resources.metadata.animation; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableList.Builder; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; -import net.minecraft.util.GsonHelper; -import org.apache.commons.lang3.Validate; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class AnimationMetadataSectionSerializer implements MetadataSectionSerializer { - public AnimationMetadataSection fromJson(JsonObject json) { - Builder builder = ImmutableList.builder(); - int i = GsonHelper.getAsInt(json, "frametime", 1); - if (i != 1) { - Validate.inclusiveBetween(1L, 2147483647L, (long)i, "Invalid default frame time"); - } - - if (json.has("frames")) { - try { - JsonArray jsonArray = GsonHelper.getAsJsonArray(json, "frames"); - - for (int j = 0; j < jsonArray.size(); j++) { - JsonElement jsonElement = jsonArray.get(j); - AnimationFrame animationFrame = this.getFrame(j, jsonElement); - if (animationFrame != null) { - builder.add(animationFrame); - } - } - } catch (ClassCastException var8) { - throw new JsonParseException("Invalid animation->frames: expected array, was " + json.get("frames"), var8); - } - } - - int k = GsonHelper.getAsInt(json, "width", -1); - int jx = GsonHelper.getAsInt(json, "height", -1); - if (k != -1) { - Validate.inclusiveBetween(1L, 2147483647L, (long)k, "Invalid width"); - } - - if (jx != -1) { - Validate.inclusiveBetween(1L, 2147483647L, (long)jx, "Invalid height"); - } - - boolean bl = GsonHelper.getAsBoolean(json, "interpolate", false); - return new AnimationMetadataSection(builder.build(), k, jx, i, bl); - } - - @Nullable - private AnimationFrame getFrame(int frame, JsonElement element) { - if (element.isJsonPrimitive()) { - return new AnimationFrame(GsonHelper.convertToInt(element, "frames[" + frame + "]")); - } else if (element.isJsonObject()) { - JsonObject jsonObject = GsonHelper.convertToJsonObject(element, "frames[" + frame + "]"); - int i = GsonHelper.getAsInt(jsonObject, "time", -1); - if (jsonObject.has("time")) { - Validate.inclusiveBetween(1L, 2147483647L, (long)i, "Invalid frame time"); - } - - int j = GsonHelper.getAsInt(jsonObject, "index"); - Validate.inclusiveBetween(0L, 2147483647L, (long)j, "Invalid frame index"); - return new AnimationFrame(j, i); - } else { - return null; - } - } - - @Override - public String getMetadataSectionName() { - return "animation"; - } -} diff --git a/net/minecraft/client/resources/metadata/animation/VillagerMetaDataSection.java b/net/minecraft/client/resources/metadata/animation/VillagerMetaDataSection.java index 1632938c..a745740e 100644 --- a/net/minecraft/client/resources/metadata/animation/VillagerMetaDataSection.java +++ b/net/minecraft/client/resources/metadata/animation/VillagerMetaDataSection.java @@ -1,45 +1,36 @@ package net.minecraft.client.resources.metadata.animation; -import java.util.Arrays; -import java.util.Map; -import java.util.stream.Collectors; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.server.packs.metadata.MetadataSectionType; +import net.minecraft.util.StringRepresentable; @Environment(EnvType.CLIENT) -public class VillagerMetaDataSection { - public static final VillagerMetadataSectionSerializer SERIALIZER = new VillagerMetadataSectionSerializer(); - public static final String SECTION_NAME = "villager"; - private final VillagerMetaDataSection.Hat hat; - - public VillagerMetaDataSection(VillagerMetaDataSection.Hat hat) { - this.hat = hat; - } - - public VillagerMetaDataSection.Hat getHat() { - return this.hat; - } +public record VillagerMetadataSection(VillagerMetadataSection.Hat hat) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group(VillagerMetadataSection.Hat.CODEC.optionalFieldOf("hat", VillagerMetadataSection.Hat.NONE).forGetter(VillagerMetadataSection::hat)) + .apply(instance, VillagerMetadataSection::new) + ); + public static final MetadataSectionType TYPE = new MetadataSectionType<>("villager", CODEC); @Environment(EnvType.CLIENT) - public static enum Hat { + public static enum Hat implements StringRepresentable { NONE("none"), PARTIAL("partial"), FULL("full"); - private static final Map BY_NAME = (Map)Arrays.stream(values()) - .collect(Collectors.toMap(VillagerMetaDataSection.Hat::getName, hat -> hat)); + public static final Codec CODEC = StringRepresentable.fromEnum(VillagerMetadataSection.Hat::values); private final String name; private Hat(final String name) { this.name = name; } - public String getName() { + @Override + public String getSerializedName() { return this.name; } - - public static VillagerMetaDataSection.Hat getByName(String name) { - return (VillagerMetaDataSection.Hat)BY_NAME.getOrDefault(name, NONE); - } } } diff --git a/net/minecraft/client/resources/metadata/animation/VillagerMetadataSectionSerializer.java b/net/minecraft/client/resources/metadata/animation/VillagerMetadataSectionSerializer.java deleted file mode 100644 index 71442482..00000000 --- a/net/minecraft/client/resources/metadata/animation/VillagerMetadataSectionSerializer.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.minecraft.client.resources.metadata.animation; - -import com.google.gson.JsonObject; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; -import net.minecraft.util.GsonHelper; - -@Environment(EnvType.CLIENT) -public class VillagerMetadataSectionSerializer implements MetadataSectionSerializer { - public VillagerMetaDataSection fromJson(JsonObject json) { - return new VillagerMetaDataSection(VillagerMetaDataSection.Hat.getByName(GsonHelper.getAsString(json, "hat", "none"))); - } - - @Override - public String getMetadataSectionName() { - return "villager"; - } -} diff --git a/net/minecraft/client/resources/metadata/gui/GuiMetadataSection.java b/net/minecraft/client/resources/metadata/gui/GuiMetadataSection.java index cb7073aa..b8e67828 100644 --- a/net/minecraft/client/resources/metadata/gui/GuiMetadataSection.java +++ b/net/minecraft/client/resources/metadata/gui/GuiMetadataSection.java @@ -13,5 +13,5 @@ public record GuiMetadataSection(GuiSpriteScaling scaling) { instance -> instance.group(GuiSpriteScaling.CODEC.optionalFieldOf("scaling", GuiSpriteScaling.DEFAULT).forGetter(GuiMetadataSection::scaling)) .apply(instance, GuiMetadataSection::new) ); - public static final MetadataSectionType TYPE = MetadataSectionType.fromCodec("gui", CODEC); + public static final MetadataSectionType TYPE = new MetadataSectionType<>("gui", CODEC); } diff --git a/net/minecraft/client/resources/metadata/language/LanguageMetadataSection.java b/net/minecraft/client/resources/metadata/language/LanguageMetadataSection.java index bf2ff82a..15d492af 100644 --- a/net/minecraft/client/resources/metadata/language/LanguageMetadataSection.java +++ b/net/minecraft/client/resources/metadata/language/LanguageMetadataSection.java @@ -12,5 +12,5 @@ public record LanguageMetadataSection(Map languages) { public static final Codec LANGUAGE_CODE_CODEC = Codec.string(1, 16); public static final Codec CODEC = Codec.unboundedMap(LANGUAGE_CODE_CODEC, LanguageInfo.CODEC) .xmap(LanguageMetadataSection::new, LanguageMetadataSection::languages); - public static final MetadataSectionType TYPE = MetadataSectionType.fromCodec("language", CODEC); + public static final MetadataSectionType TYPE = new MetadataSectionType<>("language", CODEC); } diff --git a/net/minecraft/client/resources/metadata/texture/TextureMetadataSection.java b/net/minecraft/client/resources/metadata/texture/TextureMetadataSection.java index daf4dbe7..33c35df4 100644 --- a/net/minecraft/client/resources/metadata/texture/TextureMetadataSection.java +++ b/net/minecraft/client/resources/metadata/texture/TextureMetadataSection.java @@ -1,26 +1,21 @@ package net.minecraft.client.resources.metadata.texture; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.server.packs.metadata.MetadataSectionType; @Environment(EnvType.CLIENT) -public class TextureMetadataSection { - public static final TextureMetadataSectionSerializer SERIALIZER = new TextureMetadataSectionSerializer(); +public record TextureMetadataSection(boolean blur, boolean clamp) { public static final boolean DEFAULT_BLUR = false; public static final boolean DEFAULT_CLAMP = false; - private final boolean blur; - private final boolean clamp; - - public TextureMetadataSection(boolean blur, boolean clamp) { - this.blur = blur; - this.clamp = clamp; - } - - public boolean isBlur() { - return this.blur; - } - - public boolean isClamp() { - return this.clamp; - } + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Codec.BOOL.optionalFieldOf("blur", false).forGetter(TextureMetadataSection::blur), + Codec.BOOL.optionalFieldOf("clamp", false).forGetter(TextureMetadataSection::clamp) + ) + .apply(instance, TextureMetadataSection::new) + ); + public static final MetadataSectionType TYPE = new MetadataSectionType<>("texture", CODEC); } diff --git a/net/minecraft/client/resources/metadata/texture/TextureMetadataSectionSerializer.java b/net/minecraft/client/resources/metadata/texture/TextureMetadataSectionSerializer.java deleted file mode 100644 index 426254a7..00000000 --- a/net/minecraft/client/resources/metadata/texture/TextureMetadataSectionSerializer.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.minecraft.client.resources.metadata.texture; - -import com.google.gson.JsonObject; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.server.packs.metadata.MetadataSectionSerializer; -import net.minecraft.util.GsonHelper; - -@Environment(EnvType.CLIENT) -public class TextureMetadataSectionSerializer implements MetadataSectionSerializer { - public TextureMetadataSection fromJson(JsonObject json) { - boolean bl = GsonHelper.getAsBoolean(json, "blur", false); - boolean bl2 = GsonHelper.getAsBoolean(json, "clamp", false); - return new TextureMetadataSection(bl, bl2); - } - - @Override - public String getMetadataSectionName() { - return "texture"; - } -} diff --git a/net/minecraft/client/resources/model/AtlasIds.java b/net/minecraft/client/resources/model/AtlasIds.java new file mode 100644 index 00000000..5bac6690 --- /dev/null +++ b/net/minecraft/client/resources/model/AtlasIds.java @@ -0,0 +1,23 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +public class AtlasIds { + public static final ResourceLocation ARMOR_TRIMS = ResourceLocation.withDefaultNamespace("armor_trims"); + public static final ResourceLocation BANNER_PATTERNS = ResourceLocation.withDefaultNamespace("banner_patterns"); + public static final ResourceLocation BEDS = ResourceLocation.withDefaultNamespace("beds"); + public static final ResourceLocation BLOCKS = ResourceLocation.withDefaultNamespace("blocks"); + public static final ResourceLocation CHESTS = ResourceLocation.withDefaultNamespace("chests"); + public static final ResourceLocation DECORATED_POT = ResourceLocation.withDefaultNamespace("decorated_pot"); + public static final ResourceLocation GUI = ResourceLocation.withDefaultNamespace("gui"); + public static final ResourceLocation MAP_DECORATIONS = ResourceLocation.withDefaultNamespace("map_decorations"); + public static final ResourceLocation MOB_EFFECTS = ResourceLocation.withDefaultNamespace("mob_effects"); + public static final ResourceLocation PAINTINGS = ResourceLocation.withDefaultNamespace("paintings"); + public static final ResourceLocation PARTICLES = ResourceLocation.withDefaultNamespace("particles"); + public static final ResourceLocation SHIELD_PATTERNS = ResourceLocation.withDefaultNamespace("shield_patterns"); + public static final ResourceLocation SHULKER_BOXES = ResourceLocation.withDefaultNamespace("shulker_boxes"); + public static final ResourceLocation SIGNS = ResourceLocation.withDefaultNamespace("signs"); +} diff --git a/net/minecraft/client/resources/model/AtlasSet.java b/net/minecraft/client/resources/model/AtlasSet.java index 3f981510..8199261c 100644 --- a/net/minecraft/client/resources/model/AtlasSet.java +++ b/net/minecraft/client/resources/model/AtlasSet.java @@ -7,6 +7,7 @@ import java.util.concurrent.Executor; import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.Util; import net.minecraft.client.renderer.texture.SpriteLoader; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -37,20 +38,12 @@ public class AtlasSet implements AutoCloseable { } public Map> scheduleLoad(ResourceManager resourceManager, int mipLevel, Executor executor) { - return (Map>)this.atlases - .entrySet() - .stream() - .collect( - Collectors.toMap( - Entry::getKey, - entry -> { - AtlasSet.AtlasEntry atlasEntry = (AtlasSet.AtlasEntry)entry.getValue(); - return SpriteLoader.create(atlasEntry.atlas) - .loadAndStitch(resourceManager, atlasEntry.atlasInfoLocation, mipLevel, executor) - .thenApply(preparations -> new AtlasSet.StitchResult(atlasEntry.atlas, preparations)); - } - ) - ); + return Util.mapValues( + this.atlases, + atlasEntry -> SpriteLoader.create(atlasEntry.atlas) + .loadAndStitch(resourceManager, atlasEntry.atlasInfoLocation, mipLevel, executor) + .thenApply(preparations -> new AtlasSet.StitchResult(atlasEntry.atlas, preparations)) + ); } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/resources/model/BakedModel.java b/net/minecraft/client/resources/model/BakedModel.java deleted file mode 100644 index bc5daffd..00000000 --- a/net/minecraft/client/resources/model/BakedModel.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedOverrides; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public interface BakedModel { - List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random); - - boolean useAmbientOcclusion(); - - boolean isGui3d(); - - boolean usesBlockLight(); - - boolean isCustomRenderer(); - - TextureAtlasSprite getParticleIcon(); - - ItemTransforms getTransforms(); - - default BakedOverrides overrides() { - return BakedOverrides.EMPTY; - } -} diff --git a/net/minecraft/client/resources/model/BlockModelRotation.java b/net/minecraft/client/resources/model/BlockModelRotation.java index 3ec1522a..540c748e 100644 --- a/net/minecraft/client/resources/model/BlockModelRotation.java +++ b/net/minecraft/client/resources/model/BlockModelRotation.java @@ -1,72 +1,101 @@ package net.minecraft.client.resources.model; import com.mojang.math.OctahedralGroup; +import com.mojang.math.Quadrant; import com.mojang.math.Transformation; -import java.util.Arrays; +import java.util.EnumMap; import java.util.Map; -import java.util.stream.Collectors; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.util.Mth; -import org.joml.Quaternionf; +import net.minecraft.Util; +import net.minecraft.core.BlockMath; +import net.minecraft.core.Direction; +import org.joml.Matrix4f; +import org.joml.Matrix4fc; @Environment(EnvType.CLIENT) public enum BlockModelRotation implements ModelState { - X0_Y0(0, 0), - X0_Y90(0, 90), - X0_Y180(0, 180), - X0_Y270(0, 270), - X90_Y0(90, 0), - X90_Y90(90, 90), - X90_Y180(90, 180), - X90_Y270(90, 270), - X180_Y0(180, 0), - X180_Y90(180, 90), - X180_Y180(180, 180), - X180_Y270(180, 270), - X270_Y0(270, 0), - X270_Y90(270, 90), - X270_Y180(270, 180), - X270_Y270(270, 270); + X0_Y0(Quadrant.R0, Quadrant.R0), + X0_Y90(Quadrant.R0, Quadrant.R90), + X0_Y180(Quadrant.R0, Quadrant.R180), + X0_Y270(Quadrant.R0, Quadrant.R270), + X90_Y0(Quadrant.R90, Quadrant.R0), + X90_Y90(Quadrant.R90, Quadrant.R90), + X90_Y180(Quadrant.R90, Quadrant.R180), + X90_Y270(Quadrant.R90, Quadrant.R270), + X180_Y0(Quadrant.R180, Quadrant.R0), + X180_Y90(Quadrant.R180, Quadrant.R90), + X180_Y180(Quadrant.R180, Quadrant.R180), + X180_Y270(Quadrant.R180, Quadrant.R270), + X270_Y0(Quadrant.R270, Quadrant.R0), + X270_Y90(Quadrant.R270, Quadrant.R90), + X270_Y180(Quadrant.R270, Quadrant.R180), + X270_Y270(Quadrant.R270, Quadrant.R270); - private static final int DEGREES = 360; - private static final Map BY_INDEX = (Map)Arrays.stream(values()) - .collect(Collectors.toMap(blockModelRotation -> blockModelRotation.index, blockModelRotation -> blockModelRotation)); - private final Transformation transformation; + private static final BlockModelRotation[][] XY_TABLE = Util.make( + new BlockModelRotation[Quadrant.values().length][Quadrant.values().length], blockModelRotations -> { + for (BlockModelRotation blockModelRotation : values()) { + blockModelRotations[blockModelRotation.xRotation.ordinal()][blockModelRotation.yRotation.ordinal()] = blockModelRotation; + } + } + ); + private final Quadrant xRotation; + private final Quadrant yRotation; + final Transformation transformation; private final OctahedralGroup actualRotation; - private final int index; + final Map faceMapping = new EnumMap(Direction.class); + final Map inverseFaceMapping = new EnumMap(Direction.class); + private final BlockModelRotation.WithUvLock withUvLock = new BlockModelRotation.WithUvLock(this); - private static int getIndex(int x, int y) { - return x * 360 + y; - } - - private BlockModelRotation(final int x, final int y) { - this.index = getIndex(x, y); - Quaternionf quaternionf = new Quaternionf().rotateYXZ(-y * (float) (Math.PI / 180.0), -x * (float) (Math.PI / 180.0), 0.0F); - OctahedralGroup octahedralGroup = OctahedralGroup.IDENTITY; - - for (int j = 0; j < y; j += 90) { - octahedralGroup = octahedralGroup.compose(OctahedralGroup.ROT_90_Y_NEG); + private BlockModelRotation(final Quadrant xRotation, final Quadrant yRotation) { + this.xRotation = xRotation; + this.yRotation = yRotation; + this.actualRotation = OctahedralGroup.fromXYAngles(xRotation, yRotation); + if (this.actualRotation != OctahedralGroup.IDENTITY) { + this.transformation = new Transformation(new Matrix4f(this.actualRotation.transformation())); + } else { + this.transformation = Transformation.identity(); } - for (int j = 0; j < x; j += 90) { - octahedralGroup = octahedralGroup.compose(OctahedralGroup.ROT_90_X_NEG); + for (Direction direction : Direction.values()) { + Matrix4fc matrix4fc = BlockMath.getFaceTransformation(this.transformation, direction).getMatrix(); + this.faceMapping.put(direction, matrix4fc); + this.inverseFaceMapping.put(direction, matrix4fc.invertAffine(new Matrix4f())); } - - this.transformation = new Transformation(null, quaternionf, null, null); - this.actualRotation = octahedralGroup; } @Override - public Transformation getRotation() { + public Transformation transformation() { return this.transformation; } - public static BlockModelRotation by(int x, int y) { - return (BlockModelRotation)BY_INDEX.get(getIndex(Mth.positiveModulo(x, 360), Mth.positiveModulo(y, 360))); + public static BlockModelRotation by(Quadrant xRot, Quadrant yRot) { + return XY_TABLE[xRot.ordinal()][yRot.ordinal()]; } public OctahedralGroup actualRotation() { return this.actualRotation; } + + public ModelState withUvLock() { + return this.withUvLock; + } + + @Environment(EnvType.CLIENT) + record WithUvLock(BlockModelRotation parent) implements ModelState { + @Override + public Transformation transformation() { + return this.parent.transformation; + } + + @Override + public Matrix4fc faceTransformation(Direction facing) { + return (Matrix4fc)this.parent.faceMapping.getOrDefault(facing, NO_TRANSFORM); + } + + @Override + public Matrix4fc inverseFaceTransformation(Direction facing) { + return (Matrix4fc)this.parent.inverseFaceMapping.getOrDefault(facing, NO_TRANSFORM); + } + } } diff --git a/net/minecraft/client/resources/model/BlockStateDefinitions.java b/net/minecraft/client/resources/model/BlockStateDefinitions.java new file mode 100644 index 00000000..7e35fb39 --- /dev/null +++ b/net/minecraft/client/resources/model/BlockStateDefinitions.java @@ -0,0 +1,44 @@ +package net.minecraft.client.resources.model; + +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; + +@Environment(EnvType.CLIENT) +public class BlockStateDefinitions { + private static final StateDefinition ITEM_FRAME_FAKE_DEFINITION = createItemFrameFakeState(); + private static final StateDefinition GLOW_ITEM_FRAME_FAKE_DEFINITION = createItemFrameFakeState(); + private static final ResourceLocation GLOW_ITEM_FRAME_LOCATION = ResourceLocation.withDefaultNamespace("glow_item_frame"); + private static final ResourceLocation ITEM_FRAME_LOCATION = ResourceLocation.withDefaultNamespace("item_frame"); + private static final Map> STATIC_DEFINITIONS = Map.of( + ITEM_FRAME_LOCATION, ITEM_FRAME_FAKE_DEFINITION, GLOW_ITEM_FRAME_LOCATION, GLOW_ITEM_FRAME_FAKE_DEFINITION + ); + + private static StateDefinition createItemFrameFakeState() { + return new Builder(Blocks.AIR).add(BlockStateProperties.MAP).create(Block::defaultBlockState, BlockState::new); + } + + public static BlockState getItemFrameFakeState(boolean isGlowing, boolean map) { + return (isGlowing ? GLOW_ITEM_FRAME_FAKE_DEFINITION : ITEM_FRAME_FAKE_DEFINITION).any().setValue(BlockStateProperties.MAP, map); + } + + static Function> definitionLocationToBlockStateMapper() { + Map> map = new HashMap(STATIC_DEFINITIONS); + + for (Block block : BuiltInRegistries.BLOCK) { + map.put(block.builtInRegistryHolder().key().location(), block.getStateDefinition()); + } + + return map::get; + } +} diff --git a/net/minecraft/client/resources/model/BlockStateModelLoader.java b/net/minecraft/client/resources/model/BlockStateModelLoader.java index da588da1..2b10b1aa 100644 --- a/net/minecraft/client/resources/model/BlockStateModelLoader.java +++ b/net/minecraft/client/resources/model/BlockStateModelLoader.java @@ -1,103 +1,123 @@ package net.minecraft.client.resources.model; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.google.gson.JsonParser; import com.mojang.logging.LogUtils; -import java.util.HashMap; -import java.util.Iterator; +import com.mojang.serialization.JsonOps; +import java.io.Reader; +import java.util.ArrayList; +import java.util.IdentityHashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executor; import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.BlockModelShaper; +import net.minecraft.Util; import net.minecraft.client.renderer.block.model.BlockModelDefinition; -import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.resources.FileToIdConverter; import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.Resource; +import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; @Environment(EnvType.CLIENT) public class BlockStateModelLoader { private static final Logger LOGGER = LogUtils.getLogger(); - private static final String FRAME_MAP_PROPERTY = "map"; - private static final String FRAME_MAP_PROPERTY_TRUE = "map=true"; - private static final String FRAME_MAP_PROPERTY_FALSE = "map=false"; - private static final StateDefinition ITEM_FRAME_FAKE_DEFINITION = new StateDefinition.Builder(Blocks.AIR) - .add(BooleanProperty.create("map")) - .create(Block::defaultBlockState, BlockState::new); - private static final ResourceLocation GLOW_ITEM_FRAME_LOCATION = ResourceLocation.withDefaultNamespace("glow_item_frame"); - private static final ResourceLocation ITEM_FRAME_LOCATION = ResourceLocation.withDefaultNamespace("item_frame"); - private static final Map> STATIC_DEFINITIONS = Map.of( - ITEM_FRAME_LOCATION, ITEM_FRAME_FAKE_DEFINITION, GLOW_ITEM_FRAME_LOCATION, ITEM_FRAME_FAKE_DEFINITION - ); - public static final ModelResourceLocation GLOW_MAP_FRAME_LOCATION = new ModelResourceLocation(GLOW_ITEM_FRAME_LOCATION, "map=true"); - public static final ModelResourceLocation GLOW_FRAME_LOCATION = new ModelResourceLocation(GLOW_ITEM_FRAME_LOCATION, "map=false"); - public static final ModelResourceLocation MAP_FRAME_LOCATION = new ModelResourceLocation(ITEM_FRAME_LOCATION, "map=true"); - public static final ModelResourceLocation FRAME_LOCATION = new ModelResourceLocation(ITEM_FRAME_LOCATION, "map=false"); - private final UnbakedModel missingModel; + private static final FileToIdConverter BLOCKSTATE_LISTER = FileToIdConverter.json("blockstates"); - public BlockStateModelLoader(UnbakedModel unbakedModel) { - this.missingModel = unbakedModel; - } + public static CompletableFuture loadBlockStates(ResourceManager resourceManager, Executor executor) { + Function> function = BlockStateDefinitions.definitionLocationToBlockStateMapper(); + return CompletableFuture.supplyAsync(() -> BLOCKSTATE_LISTER.listMatchingResourceStacks(resourceManager), executor).thenCompose(map -> { + List> list = new ArrayList(map.size()); - public static Function> definitionLocationToBlockMapper() { - Map> map = new HashMap(STATIC_DEFINITIONS); + for (Entry> entry : map.entrySet()) { + list.add(CompletableFuture.supplyAsync(() -> { + ResourceLocation resourceLocation = BLOCKSTATE_LISTER.fileToId((ResourceLocation)entry.getKey()); + StateDefinition stateDefinition = (StateDefinition)function.apply(resourceLocation); + if (stateDefinition == null) { + LOGGER.debug("Discovered unknown block state definition {}, ignoring", resourceLocation); + return null; + } else { + List listx = (List)entry.getValue(); + List list2 = new ArrayList(listx.size()); - for (Block block : BuiltInRegistries.BLOCK) { - map.put(block.builtInRegistryHolder().key().location(), block.getStateDefinition()); - } + for (Resource resource : listx) { + try { + Reader reader = resource.openAsReader(); - return map::get; - } + try { + JsonElement jsonElement = JsonParser.parseReader(reader); + BlockModelDefinition blockModelDefinition = BlockModelDefinition.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonParseException::new); + list2.add(new BlockStateModelLoader.LoadedBlockModelDefinition(resource.sourcePackId(), blockModelDefinition)); + } catch (Throwable var13) { + if (reader != null) { + try { + reader.close(); + } catch (Throwable var12) { + var13.addSuppressed(var12); + } + } - public BlockStateModelLoader.LoadedModels loadBlockStateDefinitionStack( - ResourceLocation resourceLocation, StateDefinition stateDefinition, List list - ) { - List list2 = stateDefinition.getPossibleStates(); - Map map = new HashMap(); - Map map2 = new HashMap(); + throw var13; + } - try { - for (BlockStateModelLoader.LoadedBlockModelDefinition loadedBlockModelDefinition : list) { - loadedBlockModelDefinition.contents - .instantiate(stateDefinition, resourceLocation + "/" + loadedBlockModelDefinition.source) - .forEach((blockStatex, unbakedBlockStateModel) -> map.put(blockStatex, new BlockStateModelLoader.LoadedModel(blockStatex, unbakedBlockStateModel))); - } - } finally { - Iterator var12 = list2.iterator(); + if (reader != null) { + reader.close(); + } + } catch (Exception var14) { + LOGGER.error("Failed to load blockstate definition {} from pack {}", resourceLocation, resource.sourcePackId(), var14); + } + } - while (true) { - if (!var12.hasNext()) { - ; - } else { - BlockState blockState2 = (BlockState)var12.next(); - ModelResourceLocation modelResourceLocation2 = BlockModelShaper.stateToModelLocation(resourceLocation, blockState2); - BlockStateModelLoader.LoadedModel loadedModel2 = (BlockStateModelLoader.LoadedModel)map.get(blockState2); - if (loadedModel2 == null) { - LOGGER.warn("Missing blockstate definition: '{}' missing model for variant: '{}'", resourceLocation, modelResourceLocation2); - loadedModel2 = new BlockStateModelLoader.LoadedModel(blockState2, this.missingModel); + try { + return loadBlockStateDefinitionStack(resourceLocation, stateDefinition, list2); + } catch (Exception var11) { + LOGGER.error("Failed to load blockstate definition {}", resourceLocation, var11); + return null; + } } - - map2.put(modelResourceLocation2, loadedModel2); - } + }, executor)); } + + return Util.sequence(list).thenApply(listx -> { + Map mapx = new IdentityHashMap(); + + for (BlockStateModelLoader.LoadedModels loadedModels : listx) { + if (loadedModels != null) { + mapx.putAll(loadedModels.models()); + } + } + + return new BlockStateModelLoader.LoadedModels(mapx); + }); + }); + } + + private static BlockStateModelLoader.LoadedModels loadBlockStateDefinitionStack( + ResourceLocation blockStateId, StateDefinition stateDefinition, List modelDefinitions + ) { + Map map = new IdentityHashMap(); + + for (BlockStateModelLoader.LoadedBlockModelDefinition loadedBlockModelDefinition : modelDefinitions) { + map.putAll(loadedBlockModelDefinition.contents.instantiate(stateDefinition, () -> blockStateId + "/" + loadedBlockModelDefinition.source)); } - return new BlockStateModelLoader.LoadedModels(map2); + return new BlockStateModelLoader.LoadedModels(map); } @Environment(EnvType.CLIENT) - public record LoadedBlockModelDefinition(String source, BlockModelDefinition contents) { + record LoadedBlockModelDefinition(String source, BlockModelDefinition contents) { } @Environment(EnvType.CLIENT) - public record LoadedModel(BlockState state, UnbakedModel model) { - } - - @Environment(EnvType.CLIENT) - public record LoadedModels(Map models) { + public record LoadedModels(Map models) { } } diff --git a/net/minecraft/client/resources/model/BuiltInModel.java b/net/minecraft/client/resources/model/BuiltInModel.java deleted file mode 100644 index f712b2b2..00000000 --- a/net/minecraft/client/resources/model/BuiltInModel.java +++ /dev/null @@ -1,61 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.Collections; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class BuiltInModel implements BakedModel { - private final ItemTransforms itemTransforms; - private final TextureAtlasSprite particleTexture; - private final boolean usesBlockLight; - - public BuiltInModel(ItemTransforms itemTransforms, TextureAtlasSprite textureAtlasSprite, boolean bl) { - this.itemTransforms = itemTransforms; - this.particleTexture = textureAtlasSprite; - this.usesBlockLight = bl; - } - - @Override - public List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random) { - return Collections.emptyList(); - } - - @Override - public boolean useAmbientOcclusion() { - return false; - } - - @Override - public boolean isGui3d() { - return true; - } - - @Override - public boolean usesBlockLight() { - return this.usesBlockLight; - } - - @Override - public boolean isCustomRenderer() { - return true; - } - - @Override - public TextureAtlasSprite getParticleIcon() { - return this.particleTexture; - } - - @Override - public ItemTransforms getTransforms() { - return this.itemTransforms; - } -} diff --git a/net/minecraft/client/resources/model/ClientItemInfoLoader.java b/net/minecraft/client/resources/model/ClientItemInfoLoader.java new file mode 100644 index 00000000..3fb20a1f --- /dev/null +++ b/net/minecraft/client/resources/model/ClientItemInfoLoader.java @@ -0,0 +1,111 @@ +package net.minecraft.client.resources.model; + +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import com.mojang.logging.LogUtils; +import com.mojang.serialization.DynamicOps; +import com.mojang.serialization.JsonOps; +import java.io.Reader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executor; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.Util; +import net.minecraft.client.multiplayer.ClientRegistryLayer; +import net.minecraft.client.renderer.item.ClientItem; +import net.minecraft.core.RegistryAccess.Frozen; +import net.minecraft.resources.FileToIdConverter; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.util.PlaceholderLookupProvider; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; + +@Environment(EnvType.CLIENT) +public class ClientItemInfoLoader { + private static final Logger LOGGER = LogUtils.getLogger(); + private static final FileToIdConverter LISTER = FileToIdConverter.json("items"); + + public static CompletableFuture scheduleLoad(ResourceManager resourceManager, Executor executor) { + Frozen frozen = ClientRegistryLayer.createRegistryAccess().compositeAccess(); + return CompletableFuture.supplyAsync(() -> LISTER.listMatchingResources(resourceManager), executor) + .thenCompose( + map -> { + List> list = new ArrayList(map.size()); + map.forEach( + (resourceLocation, resource) -> list.add( + CompletableFuture.supplyAsync( + () -> { + ResourceLocation resourceLocation2 = LISTER.fileToId(resourceLocation); + + try { + Reader reader = resource.openAsReader(); + + ClientItemInfoLoader.PendingLoad var8; + try { + PlaceholderLookupProvider placeholderLookupProvider = new PlaceholderLookupProvider(frozen); + DynamicOps dynamicOps = placeholderLookupProvider.createSerializationContext(JsonOps.INSTANCE); + ClientItem clientItem = (ClientItem)ClientItem.CODEC + .parse(dynamicOps, JsonParser.parseReader(reader)) + .ifError(error -> LOGGER.error("Couldn't parse item model '{}' from pack '{}': {}", resourceLocation2, resource.sourcePackId(), error.message())) + .result() + .map( + clientItemx -> placeholderLookupProvider.hasRegisteredPlaceholders() + ? clientItemx.withRegistrySwapper(placeholderLookupProvider.createSwapper()) + : clientItemx + ) + .orElse(null); + var8 = new ClientItemInfoLoader.PendingLoad(resourceLocation2, clientItem); + } catch (Throwable var10) { + if (reader != null) { + try { + reader.close(); + } catch (Throwable var9) { + var10.addSuppressed(var9); + } + } + + throw var10; + } + + if (reader != null) { + reader.close(); + } + + return var8; + } catch (Exception var11) { + LOGGER.error("Failed to open item model {} from pack '{}'", resourceLocation, resource.sourcePackId(), var11); + return new ClientItemInfoLoader.PendingLoad(resourceLocation2, null); + } + }, + executor + ) + ) + ); + return Util.sequence(list).thenApply(listx -> { + Map mapx = new HashMap(); + + for (ClientItemInfoLoader.PendingLoad pendingLoad : listx) { + if (pendingLoad.clientItemInfo != null) { + mapx.put(pendingLoad.id, pendingLoad.clientItemInfo); + } + } + + return new ClientItemInfoLoader.LoadedClientInfos(mapx); + }); + } + ); + } + + @Environment(EnvType.CLIENT) + public record LoadedClientInfos(Map contents) { + } + + @Environment(EnvType.CLIENT) + record PendingLoad(ResourceLocation id, @Nullable ClientItem clientItemInfo) { + } +} diff --git a/net/minecraft/client/resources/model/DelegateBakedModel.java b/net/minecraft/client/resources/model/DelegateBakedModel.java deleted file mode 100644 index e019c896..00000000 --- a/net/minecraft/client/resources/model/DelegateBakedModel.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public abstract class DelegateBakedModel implements BakedModel { - protected final BakedModel parent; - - public DelegateBakedModel(BakedModel bakedModel) { - this.parent = bakedModel; - } - - @Override - public List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random) { - return this.parent.getQuads(state, direction, random); - } - - @Override - public boolean useAmbientOcclusion() { - return this.parent.useAmbientOcclusion(); - } - - @Override - public boolean isGui3d() { - return this.parent.isGui3d(); - } - - @Override - public boolean usesBlockLight() { - return this.parent.usesBlockLight(); - } - - @Override - public boolean isCustomRenderer() { - return this.parent.isCustomRenderer(); - } - - @Override - public TextureAtlasSprite getParticleIcon() { - return this.parent.getParticleIcon(); - } - - @Override - public ItemTransforms getTransforms() { - return this.parent.getTransforms(); - } -} diff --git a/net/minecraft/client/resources/model/EquipmentAssetManager.java b/net/minecraft/client/resources/model/EquipmentAssetManager.java new file mode 100644 index 00000000..ff945a41 --- /dev/null +++ b/net/minecraft/client/resources/model/EquipmentAssetManager.java @@ -0,0 +1,36 @@ +package net.minecraft.client.resources.model; + +import java.util.Map; +import java.util.Map.Entry; +import java.util.stream.Collectors; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.FileToIdConverter; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; +import net.minecraft.util.profiling.ProfilerFiller; +import net.minecraft.world.item.equipment.EquipmentAsset; +import net.minecraft.world.item.equipment.EquipmentAssets; + +@Environment(EnvType.CLIENT) +public class EquipmentAssetManager extends SimpleJsonResourceReloadListener { + public static final EquipmentClientInfo MISSING = new EquipmentClientInfo(Map.of()); + private static final FileToIdConverter ASSET_LISTER = FileToIdConverter.json("equipment"); + private Map, EquipmentClientInfo> equipmentAssets = Map.of(); + + public EquipmentAssetManager() { + super(EquipmentClientInfo.CODEC, ASSET_LISTER); + } + + protected void apply(Map map, ResourceManager resourceManager, ProfilerFiller profilerFiller) { + this.equipmentAssets = (Map, EquipmentClientInfo>)map.entrySet() + .stream() + .collect(Collectors.toUnmodifiableMap(entry -> ResourceKey.create(EquipmentAssets.ROOT_ID, (ResourceLocation)entry.getKey()), Entry::getValue)); + } + + public EquipmentClientInfo get(ResourceKey key) { + return (EquipmentClientInfo)this.equipmentAssets.getOrDefault(key, MISSING); + } +} diff --git a/net/minecraft/client/resources/model/EquipmentClientInfo.java b/net/minecraft/client/resources/model/EquipmentClientInfo.java new file mode 100644 index 00000000..08699fc9 --- /dev/null +++ b/net/minecraft/client/resources/model/EquipmentClientInfo.java @@ -0,0 +1,144 @@ +package net.minecraft.client.resources.model; + +import com.google.common.collect.ImmutableMap; +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Map.Entry; +import java.util.function.UnaryOperator; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.ExtraCodecs; +import net.minecraft.util.StringRepresentable; + +@Environment(EnvType.CLIENT) +public record EquipmentClientInfo(Map> layers) { + private static final Codec> LAYER_LIST_CODEC = ExtraCodecs.nonEmptyList(EquipmentClientInfo.Layer.CODEC.listOf()); + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ExtraCodecs.nonEmptyMap(Codec.unboundedMap(EquipmentClientInfo.LayerType.CODEC, LAYER_LIST_CODEC)).fieldOf("layers").forGetter(EquipmentClientInfo::layers) + ) + .apply(instance, EquipmentClientInfo::new) + ); + + public static EquipmentClientInfo.Builder builder() { + return new EquipmentClientInfo.Builder(); + } + + public List getLayers(EquipmentClientInfo.LayerType type) { + return (List)this.layers.getOrDefault(type, List.of()); + } + + @Environment(EnvType.CLIENT) + public static class Builder { + private final Map> layersByType = new EnumMap(EquipmentClientInfo.LayerType.class); + + Builder() { + } + + public EquipmentClientInfo.Builder addHumanoidLayers(ResourceLocation textureId) { + return this.addHumanoidLayers(textureId, false); + } + + public EquipmentClientInfo.Builder addHumanoidLayers(ResourceLocation textureId, boolean dyeable) { + this.addLayers(EquipmentClientInfo.LayerType.HUMANOID_LEGGINGS, EquipmentClientInfo.Layer.leatherDyeable(textureId, dyeable)); + this.addMainHumanoidLayer(textureId, dyeable); + return this; + } + + public EquipmentClientInfo.Builder addMainHumanoidLayer(ResourceLocation textureId, boolean dyeable) { + return this.addLayers(EquipmentClientInfo.LayerType.HUMANOID, EquipmentClientInfo.Layer.leatherDyeable(textureId, dyeable)); + } + + public EquipmentClientInfo.Builder addLayers(EquipmentClientInfo.LayerType type, EquipmentClientInfo.Layer... layers) { + Collections.addAll((Collection)this.layersByType.computeIfAbsent(type, layerType -> new ArrayList()), layers); + return this; + } + + public EquipmentClientInfo build() { + return new EquipmentClientInfo( + (Map>)this.layersByType + .entrySet() + .stream() + .collect(ImmutableMap.toImmutableMap(Entry::getKey, entry -> List.copyOf((Collection)entry.getValue()))) + ); + } + } + + @Environment(EnvType.CLIENT) + public record Dyeable(Optional colorWhenUndyed) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group(ExtraCodecs.RGB_COLOR_CODEC.optionalFieldOf("color_when_undyed").forGetter(EquipmentClientInfo.Dyeable::colorWhenUndyed)) + .apply(instance, EquipmentClientInfo.Dyeable::new) + ); + } + + @Environment(EnvType.CLIENT) + public record Layer(ResourceLocation textureId, Optional dyeable, boolean usePlayerTexture) { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + ResourceLocation.CODEC.fieldOf("texture").forGetter(EquipmentClientInfo.Layer::textureId), + EquipmentClientInfo.Dyeable.CODEC.optionalFieldOf("dyeable").forGetter(EquipmentClientInfo.Layer::dyeable), + Codec.BOOL.optionalFieldOf("use_player_texture", false).forGetter(EquipmentClientInfo.Layer::usePlayerTexture) + ) + .apply(instance, EquipmentClientInfo.Layer::new) + ); + + public Layer(ResourceLocation textureId) { + this(textureId, Optional.empty(), false); + } + + public static EquipmentClientInfo.Layer leatherDyeable(ResourceLocation textureId, boolean dyeable) { + return new EquipmentClientInfo.Layer(textureId, dyeable ? Optional.of(new EquipmentClientInfo.Dyeable(Optional.of(-6265536))) : Optional.empty(), false); + } + + public static EquipmentClientInfo.Layer onlyIfDyed(ResourceLocation textureId, boolean dyeable) { + return new EquipmentClientInfo.Layer(textureId, dyeable ? Optional.of(new EquipmentClientInfo.Dyeable(Optional.empty())) : Optional.empty(), false); + } + + public ResourceLocation getTextureLocation(EquipmentClientInfo.LayerType type) { + return this.textureId.withPath((UnaryOperator)(string -> "textures/entity/equipment/" + type.getSerializedName() + "/" + string + ".png")); + } + } + + @Environment(EnvType.CLIENT) + public static enum LayerType implements StringRepresentable { + HUMANOID("humanoid"), + HUMANOID_LEGGINGS("humanoid_leggings"), + WINGS("wings"), + WOLF_BODY("wolf_body"), + HORSE_BODY("horse_body"), + LLAMA_BODY("llama_body"), + PIG_SADDLE("pig_saddle"), + STRIDER_SADDLE("strider_saddle"), + CAMEL_SADDLE("camel_saddle"), + HORSE_SADDLE("horse_saddle"), + DONKEY_SADDLE("donkey_saddle"), + MULE_SADDLE("mule_saddle"), + ZOMBIE_HORSE_SADDLE("zombie_horse_saddle"), + SKELETON_HORSE_SADDLE("skeleton_horse_saddle"); + + public static final Codec CODEC = StringRepresentable.fromEnum(EquipmentClientInfo.LayerType::values); + private final String id; + + private LayerType(final String id) { + this.id = id; + } + + @Override + public String getSerializedName() { + return this.id; + } + + public String trimAssetPrefix() { + return "trims/entity/" + this.id; + } + } +} diff --git a/net/minecraft/client/resources/model/EquipmentModelSet.java b/net/minecraft/client/resources/model/EquipmentModelSet.java deleted file mode 100644 index 9e1194b5..00000000 --- a/net/minecraft/client/resources/model/EquipmentModelSet.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.Map; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; -import net.minecraft.util.profiling.ProfilerFiller; -import net.minecraft.world.item.equipment.EquipmentModel; - -@Environment(EnvType.CLIENT) -public class EquipmentModelSet extends SimpleJsonResourceReloadListener { - public static final EquipmentModel MISSING_MODEL = new EquipmentModel(Map.of()); - private Map models = Map.of(); - - public EquipmentModelSet() { - super(EquipmentModel.CODEC, "models/equipment"); - } - - protected void apply(Map map, ResourceManager resourceManager, ProfilerFiller profilerFiller) { - this.models = Map.copyOf(map); - } - - public EquipmentModel get(ResourceLocation resourceLocation) { - return (EquipmentModel)this.models.getOrDefault(resourceLocation, MISSING_MODEL); - } -} diff --git a/net/minecraft/client/resources/model/ItemModel.java b/net/minecraft/client/resources/model/ItemModel.java deleted file mode 100644 index 25eb90a5..00000000 --- a/net/minecraft/client/resources/model/ItemModel.java +++ /dev/null @@ -1,55 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.List; -import java.util.function.Function; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedOverrides; -import net.minecraft.client.renderer.block.model.BlockModel; -import net.minecraft.client.renderer.block.model.ItemOverride; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public class ItemModel implements UnbakedModel { - private final ResourceLocation id; - private List overrides = List.of(); - - public ItemModel(ResourceLocation resourceLocation) { - this.id = resourceLocation; - } - - @Override - public void resolveDependencies(UnbakedModel.Resolver resolver) { - if (resolver.resolve(this.id) instanceof BlockModel blockModel) { - this.overrides = blockModel.getOverrides(); - this.overrides.forEach(itemOverride -> resolver.resolve(itemOverride.model())); - } - } - - @Override - public BakedModel bake(ModelBaker baker, Function spriteGetter, ModelState state) { - BakedModel bakedModel = baker.bake(this.id, state); - if (this.overrides.isEmpty()) { - return bakedModel; - } else { - BakedOverrides bakedOverrides = new BakedOverrides(baker, this.overrides); - return new ItemModel.BakedModelWithOverrides(bakedModel, bakedOverrides); - } - } - - @Environment(EnvType.CLIENT) - static class BakedModelWithOverrides extends DelegateBakedModel { - private final BakedOverrides overrides; - - public BakedModelWithOverrides(BakedModel bakedModel, BakedOverrides bakedOverrides) { - super(bakedModel); - this.overrides = bakedOverrides; - } - - @Override - public BakedOverrides overrides() { - return this.overrides; - } - } -} diff --git a/net/minecraft/client/resources/model/Material.java b/net/minecraft/client/resources/model/Material.java index b18121eb..6991074c 100644 --- a/net/minecraft/client/resources/model/Material.java +++ b/net/minecraft/client/resources/model/Material.java @@ -47,12 +47,12 @@ public class Material { return this.renderType; } - public VertexConsumer buffer(MultiBufferSource buffer, Function renderTypeGetter) { - return this.sprite().wrap(buffer.getBuffer(this.renderType(renderTypeGetter))); + public VertexConsumer buffer(MultiBufferSource bufferSource, Function renderTypeGetter) { + return this.sprite().wrap(bufferSource.getBuffer(this.renderType(renderTypeGetter))); } - public VertexConsumer buffer(MultiBufferSource multiBufferSource, Function function, boolean bl, boolean bl2) { - return this.sprite().wrap(ItemRenderer.getFoilBuffer(multiBufferSource, this.renderType(function), bl, bl2)); + public VertexConsumer buffer(MultiBufferSource bufferSource, Function renderTypeGetter, boolean noEntity, boolean withGlint) { + return this.sprite().wrap(ItemRenderer.getFoilBuffer(bufferSource, this.renderType(renderTypeGetter), noEntity, withGlint)); } public boolean equals(Object object) { diff --git a/net/minecraft/client/resources/model/MissingBlockModel.java b/net/minecraft/client/resources/model/MissingBlockModel.java index 08d2cc68..0f7abd74 100644 --- a/net/minecraft/client/resources/model/MissingBlockModel.java +++ b/net/minecraft/client/resources/model/MissingBlockModel.java @@ -1,40 +1,42 @@ package net.minecraft.client.resources.model; -import com.mojang.datafixers.util.Either; -import java.util.EnumMap; +import com.mojang.math.Quadrant; import java.util.List; import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.Util; import net.minecraft.client.renderer.block.model.BlockElement; import net.minecraft.client.renderer.block.model.BlockElementFace; -import net.minecraft.client.renderer.block.model.BlockFaceUV; import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.SimpleUnbakedGeometry; +import net.minecraft.client.renderer.block.model.TextureSlots.Data.Builder; import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; +import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class MissingBlockModel { - public static final String NAME = "missing"; - public static final ResourceLocation LOCATION = SpecialModels.builtinModelId("missing"); - public static final ModelResourceLocation VARIANT = new ModelResourceLocation(LOCATION, "missing"); + private static final String TEXTURE_SLOT = "missingno"; + public static final ResourceLocation LOCATION = ResourceLocation.withDefaultNamespace("builtin/missing"); public static UnbakedModel missingModel() { - BlockFaceUV blockFaceUV = new BlockFaceUV(new float[]{0.0F, 0.0F, 16.0F, 16.0F}, 0); - Map map = new EnumMap(Direction.class); - - for (Direction direction : Direction.values()) { - map.put(direction, new BlockElementFace(direction, 0, MissingTextureAtlasSprite.getLocation().getPath(), blockFaceUV)); - } - + BlockElementFace.UVs uVs = new BlockElementFace.UVs(0.0F, 0.0F, 16.0F, 16.0F); + Map map = Util.makeEnumMap(Direction.class, direction -> new BlockElementFace(direction, -1, "missingno", uVs, Quadrant.R0)); BlockElement blockElement = new BlockElement(new Vector3f(0.0F, 0.0F, 0.0F), new Vector3f(16.0F, 16.0F, 16.0F), map); - BlockModel blockModel = new BlockModel( - null, List.of(blockElement), Map.of("particle", Either.left(BlockModel.MISSING_MATERIAL)), null, null, ItemTransforms.NO_TRANSFORMS, List.of() + return new BlockModel( + new SimpleUnbakedGeometry(List.of(blockElement)), + null, + null, + ItemTransforms.NO_TRANSFORMS, + new Builder() + .addReference("particle", "missingno") + .addTexture("missingno", new Material(TextureAtlas.LOCATION_BLOCKS, MissingTextureAtlasSprite.getLocation())) + .build(), + null ); - blockModel.name = "missingno"; - return blockModel; } } diff --git a/net/minecraft/client/resources/model/ModelBaker.java b/net/minecraft/client/resources/model/ModelBaker.java index f9bfb7e7..12413135 100644 --- a/net/minecraft/client/resources/model/ModelBaker.java +++ b/net/minecraft/client/resources/model/ModelBaker.java @@ -6,5 +6,15 @@ import net.minecraft.resources.ResourceLocation; @Environment(EnvType.CLIENT) public interface ModelBaker { - BakedModel bake(ResourceLocation location, ModelState transform); + ResolvedModel getModel(ResourceLocation modelLocation); + + SpriteGetter sprites(); + + T compute(ModelBaker.SharedOperationKey key); + + @FunctionalInterface + @Environment(EnvType.CLIENT) + public interface SharedOperationKey { + T compute(ModelBaker modelBaker); + } } diff --git a/net/minecraft/client/resources/model/ModelBakery.java b/net/minecraft/client/resources/model/ModelBakery.java index 04698f8a..4907b75a 100644 --- a/net/minecraft/client/resources/model/ModelBakery.java +++ b/net/minecraft/client/resources/model/ModelBakery.java @@ -1,23 +1,36 @@ package net.minecraft.client.resources.model; import com.mojang.logging.LogUtils; -import com.mojang.math.Transformation; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; import java.util.function.Function; import java.util.function.UnaryOperator; import java.util.stream.Collectors; import java.util.stream.IntStream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.Sheets; -import net.minecraft.client.renderer.block.model.BlockModel; -import net.minecraft.client.renderer.block.model.ItemModelGenerator; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.SimpleModelWrapper; +import net.minecraft.client.renderer.block.model.SingleVariant; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.item.ClientItem; +import net.minecraft.client.renderer.item.ItemModel; +import net.minecraft.client.renderer.item.MissingItemModel; +import net.minecraft.client.renderer.item.ModelRenderProperties; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.ModelBakery.MissingModels.1; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.thread.ParallelMapTransform; +import net.minecraft.world.level.block.state.BlockState; import org.slf4j.Logger; @Environment(EnvType.CLIENT) @@ -39,85 +52,112 @@ public class ModelBakery { .collect(Collectors.toList()); public static final List DESTROY_TYPES = (List)BREAKING_LOCATIONS.stream().map(RenderType::crumbling).collect(Collectors.toList()); static final Logger LOGGER = LogUtils.getLogger(); - static final ItemModelGenerator ITEM_MODEL_GENERATOR = new ItemModelGenerator(); - final Map bakedCache = new HashMap(); - private final Map bakedTopLevelModels = new HashMap(); - private final Map topModels; - final Map unbakedModels; - final UnbakedModel missingModel; + private final EntityModelSet entityModelSet; + private final Map unbakedBlockStateModels; + private final Map clientInfos; + final Map resolvedModels; + final ResolvedModel missingModel; - public ModelBakery(Map map, Map map2, UnbakedModel unbakedModel) { - this.topModels = map; - this.unbakedModels = map2; - this.missingModel = unbakedModel; + public ModelBakery( + EntityModelSet entityModelSet, + Map unbakedBlockStateModels, + Map clientInfos, + Map resolvedModels, + ResolvedModel missingModel + ) { + this.entityModelSet = entityModelSet; + this.unbakedBlockStateModels = unbakedBlockStateModels; + this.clientInfos = clientInfos; + this.resolvedModels = resolvedModels; + this.missingModel = missingModel; } - public void bakeModels(ModelBakery.TextureGetter textureGetter) { - this.topModels.forEach((modelResourceLocation, unbakedModel) -> { - BakedModel bakedModel = null; - + public CompletableFuture bakeModels(SpriteGetter sprites, Executor executor) { + ModelBakery.MissingModels missingModels = ModelBakery.MissingModels.bake(this.missingModel, sprites); + ModelBakery.ModelBakerImpl modelBakerImpl = new ModelBakery.ModelBakerImpl(sprites); + CompletableFuture> completableFuture = ParallelMapTransform.schedule( + this.unbakedBlockStateModels, (blockState, unbakedRoot) -> { + try { + return unbakedRoot.bake(blockState, modelBakerImpl); + } catch (Exception var4x) { + LOGGER.warn("Unable to bake model: '{}': {}", blockState, var4x); + return null; + } + }, executor + ); + CompletableFuture> completableFuture2 = ParallelMapTransform.schedule(this.clientInfos, (resourceLocation, clientItem) -> { try { - bakedModel = new ModelBakery.ModelBakerImpl(textureGetter, modelResourceLocation).bakeUncached(unbakedModel, BlockModelRotation.X0_Y0); - } catch (Exception var6) { - LOGGER.warn("Unable to bake model: '{}': {}", modelResourceLocation, var6); + return clientItem.model().bake(new ItemModel.BakingContext(modelBakerImpl, this.entityModelSet, missingModels.item, clientItem.registrySwapper())); + } catch (Exception var6x) { + LOGGER.warn("Unable to bake item model: '{}'", resourceLocation, var6x); + return null; } - - if (bakedModel != null) { - this.bakedTopLevelModels.put(modelResourceLocation, bakedModel); + }, executor); + Map map = new HashMap(this.clientInfos.size()); + this.clientInfos.forEach((resourceLocation, clientItem) -> { + ClientItem.Properties properties = clientItem.properties(); + if (!properties.equals(ClientItem.Properties.DEFAULT)) { + map.put(resourceLocation, properties); } }); - } - - public Map getBakedTopLevelModels() { - return this.bakedTopLevelModels; + return completableFuture.thenCombine(completableFuture2, (map2, map3) -> new ModelBakery.BakingResult(missingModels, map2, map3, map)); } @Environment(EnvType.CLIENT) - record BakedCacheKey(ResourceLocation id, Transformation transformation, boolean isUvLocked) { + public record BakingResult( + ModelBakery.MissingModels missingModels, + Map blockStateModels, + Map itemStackModels, + Map itemProperties + ) { + } + + @Environment(EnvType.CLIENT) + public record MissingModels(BlockStateModel block, ItemModel item) { + + public static ModelBakery.MissingModels bake(ResolvedModel model, SpriteGetter sprites) { + ModelBaker modelBaker = new 1(sprites); + TextureSlots textureSlots = model.getTopTextureSlots(); + boolean bl = model.getTopAmbientOcclusion(); + boolean bl2 = model.getTopGuiLight().lightLikeBlock(); + ItemTransforms itemTransforms = model.getTopTransforms(); + QuadCollection quadCollection = model.bakeTopGeometry(textureSlots, modelBaker, BlockModelRotation.X0_Y0); + TextureAtlasSprite textureAtlasSprite = model.resolveParticleSprite(textureSlots, modelBaker); + BlockStateModel blockStateModel = new SingleVariant(new SimpleModelWrapper(quadCollection, bl, textureAtlasSprite)); + ItemModel itemModel = new MissingItemModel(quadCollection.getAll(), new ModelRenderProperties(bl2, textureAtlasSprite, itemTransforms)); + return new ModelBakery.MissingModels(blockStateModel, itemModel); + } } @Environment(EnvType.CLIENT) class ModelBakerImpl implements ModelBaker { - private final Function modelTextureGetter; + private final SpriteGetter sprites; + private final Map, Object> operationCache = new ConcurrentHashMap(); + private final Function, Object> cacheComputeFunction = sharedOperationKey -> sharedOperationKey.compute(this); - ModelBakerImpl(final ModelBakery.TextureGetter textureGetter, final ModelResourceLocation modelLocation) { - this.modelTextureGetter = material -> textureGetter.get(modelLocation, material); + ModelBakerImpl(final SpriteGetter sprites) { + this.sprites = sprites; } - private UnbakedModel getModel(ResourceLocation location) { - UnbakedModel unbakedModel = (UnbakedModel)ModelBakery.this.unbakedModels.get(location); - if (unbakedModel == null) { - ModelBakery.LOGGER.warn("Requested a model that was not discovered previously: {}", location); + @Override + public SpriteGetter sprites() { + return this.sprites; + } + + @Override + public ResolvedModel getModel(ResourceLocation modelLocation) { + ResolvedModel resolvedModel = (ResolvedModel)ModelBakery.this.resolvedModels.get(modelLocation); + if (resolvedModel == null) { + ModelBakery.LOGGER.warn("Requested a model that was not discovered previously: {}", modelLocation); return ModelBakery.this.missingModel; } else { - return unbakedModel; + return resolvedModel; } } @Override - public BakedModel bake(ResourceLocation location, ModelState transform) { - ModelBakery.BakedCacheKey bakedCacheKey = new ModelBakery.BakedCacheKey(location, transform.getRotation(), transform.isUvLocked()); - BakedModel bakedModel = (BakedModel)ModelBakery.this.bakedCache.get(bakedCacheKey); - if (bakedModel != null) { - return bakedModel; - } else { - UnbakedModel unbakedModel = this.getModel(location); - BakedModel bakedModel2 = this.bakeUncached(unbakedModel, transform); - ModelBakery.this.bakedCache.put(bakedCacheKey, bakedModel2); - return bakedModel2; - } + public T compute(ModelBaker.SharedOperationKey key) { + return (T)this.operationCache.computeIfAbsent(key, this.cacheComputeFunction); } - - BakedModel bakeUncached(UnbakedModel model, ModelState state) { - return model instanceof BlockModel blockModel && blockModel.getRootModel() == SpecialModels.GENERATED_MARKER - ? ModelBakery.ITEM_MODEL_GENERATOR.generateBlockModel(this.modelTextureGetter, blockModel).bake(this.modelTextureGetter, state, false) - : model.bake(this, this.modelTextureGetter, state); - } - } - - @FunctionalInterface - @Environment(EnvType.CLIENT) - public interface TextureGetter { - TextureAtlasSprite get(ModelResourceLocation modelResourceLocation, Material material); } } diff --git a/net/minecraft/client/resources/model/ModelDebugName.java b/net/minecraft/client/resources/model/ModelDebugName.java new file mode 100644 index 00000000..7b1df778 --- /dev/null +++ b/net/minecraft/client/resources/model/ModelDebugName.java @@ -0,0 +1,10 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@FunctionalInterface +@Environment(EnvType.CLIENT) +public interface ModelDebugName { + String debugName(); +} diff --git a/net/minecraft/client/resources/model/ModelDiscovery.java b/net/minecraft/client/resources/model/ModelDiscovery.java index 21a56118..34d3ee55 100644 --- a/net/minecraft/client/resources/model/ModelDiscovery.java +++ b/net/minecraft/client/resources/model/ModelDiscovery.java @@ -1,138 +1,251 @@ package net.minecraft.client.resources.model; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import com.mojang.logging.LogUtils; +import it.unimi.dsi.fastutil.objects.Object2ObjectFunction; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import java.util.ArrayDeque; import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.function.UnaryOperator; -import java.util.stream.Collectors; +import java.util.Objects; +import java.util.Queue; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicReferenceArray; +import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.entity.ItemRenderer; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.BundleItem; -import net.minecraft.world.item.Item; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @Environment(EnvType.CLIENT) public class ModelDiscovery { - static final Logger LOGGER = LogUtils.getLogger(); - public static final String INVENTORY_MODEL_PREFIX = "item/"; - private final Map inputModels; - final UnbakedModel missingModel; - private final Map topModels = new HashMap(); - private final Map referencedModels = new HashMap(); + private static final Logger LOGGER = LogUtils.getLogger(); + private final Object2ObjectMap modelWrappers = new Object2ObjectOpenHashMap<>(); + private final ModelDiscovery.ModelWrapper missingModel; + private final Object2ObjectFunction uncachedResolver; + private final ResolvableModel.Resolver resolver; + private final Queue parentDiscoveryQueue = new ArrayDeque(); - public ModelDiscovery(Map map, UnbakedModel unbakedModel) { - this.inputModels = map; - this.missingModel = unbakedModel; - this.registerTopModel(MissingBlockModel.VARIANT, unbakedModel); - this.referencedModels.put(MissingBlockModel.LOCATION, unbakedModel); - } - - private static Set listMandatoryModels() { - Set set = new HashSet(); - BuiltInRegistries.ITEM.listElements().forEach(reference -> { - ResourceLocation resourceLocation = ((Item)reference.value()).components().get(DataComponents.ITEM_MODEL); - if (resourceLocation != null) { - set.add(ModelResourceLocation.inventory(resourceLocation)); + public ModelDiscovery(Map inputModels, UnbakedModel missingModel) { + this.missingModel = new ModelDiscovery.ModelWrapper(MissingBlockModel.LOCATION, missingModel, true); + this.modelWrappers.put(MissingBlockModel.LOCATION, this.missingModel); + this.uncachedResolver = object -> { + ResourceLocation resourceLocation = (ResourceLocation)object; + UnbakedModel unbakedModel = (UnbakedModel)inputModels.get(resourceLocation); + if (unbakedModel == null) { + LOGGER.warn("Missing block model: {}", resourceLocation); + return this.missingModel; + } else { + return this.createAndQueueWrapper(resourceLocation, unbakedModel); } + }; + this.resolver = this::getOrCreateModel; + } - if (reference.value() instanceof BundleItem bundleItem) { - set.add(ModelResourceLocation.inventory(bundleItem.openFrontModel())); - set.add(ModelResourceLocation.inventory(bundleItem.openBackModel())); + private static boolean isRoot(UnbakedModel model) { + return model.parent() == null; + } + + private ModelDiscovery.ModelWrapper getOrCreateModel(ResourceLocation location) { + return this.modelWrappers.computeIfAbsent(location, this.uncachedResolver); + } + + private ModelDiscovery.ModelWrapper createAndQueueWrapper(ResourceLocation id, UnbakedModel model) { + boolean bl = isRoot(model); + ModelDiscovery.ModelWrapper modelWrapper = new ModelDiscovery.ModelWrapper(id, model, bl); + if (!bl) { + this.parentDiscoveryQueue.add(modelWrapper); + } + + return modelWrapper; + } + + public void addRoot(ResolvableModel model) { + model.resolveDependencies(this.resolver); + } + + public void addSpecialModel(ResourceLocation id, UnbakedModel model) { + if (!isRoot(model)) { + LOGGER.warn("Trying to add non-root special model {}, ignoring", id); + } else { + ModelDiscovery.ModelWrapper modelWrapper = this.modelWrappers.put(id, this.createAndQueueWrapper(id, model)); + if (modelWrapper != null) { + LOGGER.warn("Duplicate special model {}", id); } - }); - set.add(ItemRenderer.TRIDENT_MODEL); - set.add(ItemRenderer.SPYGLASS_MODEL); - return set; - } - - private void registerTopModel(ModelResourceLocation modelResourceLocation, UnbakedModel unbakedModel) { - this.topModels.put(modelResourceLocation, unbakedModel); - } - - public void registerStandardModels(BlockStateModelLoader.LoadedModels loadedModels) { - this.referencedModels.put(SpecialModels.BUILTIN_GENERATED, SpecialModels.GENERATED_MARKER); - this.referencedModels.put(SpecialModels.BUILTIN_BLOCK_ENTITY, SpecialModels.BLOCK_ENTITY_MARKER); - Set set = listMandatoryModels(); - loadedModels.models().forEach((modelResourceLocation, loadedModel) -> { - this.registerTopModel(modelResourceLocation, loadedModel.model()); - set.remove(modelResourceLocation); - }); - this.inputModels - .keySet() - .forEach( - resourceLocation -> { - if (resourceLocation.getPath().startsWith("item/")) { - ModelResourceLocation modelResourceLocation = ModelResourceLocation.inventory( - resourceLocation.withPath((UnaryOperator)(string -> string.substring("item/".length()))) - ); - this.registerTopModel(modelResourceLocation, new ItemModel(resourceLocation)); - set.remove(modelResourceLocation); - } - } - ); - if (!set.isEmpty()) { - LOGGER.warn("Missing mandatory models: {}", set.stream().map(modelResourceLocation -> "\n\t" + modelResourceLocation).collect(Collectors.joining())); } } - public void discoverDependencies() { - this.topModels.values().forEach(unbakedModel -> unbakedModel.resolveDependencies(new ModelDiscovery.ResolverImpl())); + public ResolvedModel missingModel() { + return this.missingModel; } - public Map getTopModels() { - return this.topModels; + public Map resolve() { + List list = new ArrayList(); + this.discoverDependencies(list); + propagateValidity(list); + Builder builder = ImmutableMap.builder(); + this.modelWrappers.forEach((resourceLocation, modelWrapper) -> { + if (modelWrapper.valid) { + builder.put(resourceLocation, modelWrapper); + } else { + LOGGER.warn("Model {} ignored due to cyclic dependency", resourceLocation); + } + }); + return builder.build(); } - public Map getReferencedModels() { - return this.referencedModels; + private void discoverDependencies(List wrappers) { + ModelDiscovery.ModelWrapper modelWrapper; + while ((modelWrapper = (ModelDiscovery.ModelWrapper)this.parentDiscoveryQueue.poll()) != null) { + ResourceLocation resourceLocation = (ResourceLocation)Objects.requireNonNull(modelWrapper.wrapped.parent()); + ModelDiscovery.ModelWrapper modelWrapper2 = this.getOrCreateModel(resourceLocation); + modelWrapper.parent = modelWrapper2; + if (modelWrapper2.valid) { + modelWrapper.valid = true; + } else { + wrappers.add(modelWrapper); + } + } } - UnbakedModel getBlockModel(ResourceLocation resourceLocation) { - return (UnbakedModel)this.referencedModels.computeIfAbsent(resourceLocation, this::loadBlockModel); - } + private static void propagateValidity(List wrappers) { + boolean bl = true; - private UnbakedModel loadBlockModel(ResourceLocation resourceLocation) { - UnbakedModel unbakedModel = (UnbakedModel)this.inputModels.get(resourceLocation); - if (unbakedModel == null) { - LOGGER.warn("Missing block model: '{}'", resourceLocation); - return this.missingModel; - } else { - return unbakedModel; + while (bl) { + bl = false; + Iterator iterator = wrappers.iterator(); + + while (iterator.hasNext()) { + ModelDiscovery.ModelWrapper modelWrapper = (ModelDiscovery.ModelWrapper)iterator.next(); + if (((ModelDiscovery.ModelWrapper)Objects.requireNonNull(modelWrapper.parent)).valid) { + modelWrapper.valid = true; + iterator.remove(); + bl = true; + } + } } } @Environment(EnvType.CLIENT) - class ResolverImpl implements UnbakedModel.Resolver { - private final List stack = new ArrayList(); - private final Set resolvedModels = new HashSet(); + static class ModelWrapper implements ResolvedModel { + private static final ModelDiscovery.Slot KEY_AMBIENT_OCCLUSION = slot(0); + private static final ModelDiscovery.Slot KEY_GUI_LIGHT = slot(1); + private static final ModelDiscovery.Slot KEY_GEOMETRY = slot(2); + private static final ModelDiscovery.Slot KEY_TRANSFORMS = slot(3); + private static final ModelDiscovery.Slot KEY_TEXTURE_SLOTS = slot(4); + private static final ModelDiscovery.Slot KEY_PARTICLE_SPRITE = slot(5); + private static final ModelDiscovery.Slot KEY_DEFAULT_GEOMETRY = slot(6); + private static final int SLOT_COUNT = 7; + private final ResourceLocation id; + boolean valid; + @Nullable + ModelDiscovery.ModelWrapper parent; + final UnbakedModel wrapped; + private final AtomicReferenceArray fixedSlots = new AtomicReferenceArray(7); + private final Map modelBakeCache = new ConcurrentHashMap(); + + private static ModelDiscovery.Slot slot(int index) { + Objects.checkIndex(index, 7); + return new ModelDiscovery.Slot<>(index); + } + + ModelWrapper(ResourceLocation id, UnbakedModel wrapped, boolean valid) { + this.id = id; + this.wrapped = wrapped; + this.valid = valid; + } @Override - public UnbakedModel resolve(ResourceLocation resourceLocation) { - if (this.stack.contains(resourceLocation)) { - ModelDiscovery.LOGGER.warn("Detected model loading loop: {}->{}", this.stacktraceToString(), resourceLocation); - return ModelDiscovery.this.missingModel; - } else { - UnbakedModel unbakedModel = ModelDiscovery.this.getBlockModel(resourceLocation); - if (this.resolvedModels.add(resourceLocation)) { - this.stack.add(resourceLocation); - unbakedModel.resolveDependencies(this); - this.stack.remove(resourceLocation); - } - - return unbakedModel; - } + public UnbakedModel wrapped() { + return this.wrapped; } - private String stacktraceToString() { - return (String)this.stack.stream().map(ResourceLocation::toString).collect(Collectors.joining("->")); + @Nullable + @Override + public ResolvedModel parent() { + return this.parent; + } + + @Override + public String debugName() { + return this.id.toString(); + } + + @Nullable + private T getSlot(ModelDiscovery.Slot slot) { + return (T)this.fixedSlots.get(slot.index); + } + + private T updateSlot(ModelDiscovery.Slot slot, T value) { + T object = (T)this.fixedSlots.compareAndExchange(slot.index, null, value); + return object == null ? value : object; + } + + private T getSimpleProperty(ModelDiscovery.Slot slot, Function propertyGetter) { + T object = this.getSlot(slot); + return object != null ? object : this.updateSlot(slot, (T)propertyGetter.apply(this)); + } + + @Override + public boolean getTopAmbientOcclusion() { + return this.getSimpleProperty(KEY_AMBIENT_OCCLUSION, ResolvedModel::findTopAmbientOcclusion); + } + + @Override + public UnbakedModel.GuiLight getTopGuiLight() { + return this.getSimpleProperty(KEY_GUI_LIGHT, ResolvedModel::findTopGuiLight); + } + + @Override + public ItemTransforms getTopTransforms() { + return this.getSimpleProperty(KEY_TRANSFORMS, ResolvedModel::findTopTransforms); + } + + @Override + public UnbakedGeometry getTopGeometry() { + return this.getSimpleProperty(KEY_GEOMETRY, ResolvedModel::findTopGeometry); + } + + @Override + public TextureSlots getTopTextureSlots() { + return this.getSimpleProperty(KEY_TEXTURE_SLOTS, ResolvedModel::findTopTextureSlots); + } + + @Override + public TextureAtlasSprite resolveParticleSprite(TextureSlots textureSlots, ModelBaker modelBaker) { + TextureAtlasSprite textureAtlasSprite = this.getSlot(KEY_PARTICLE_SPRITE); + return textureAtlasSprite != null + ? textureAtlasSprite + : this.updateSlot(KEY_PARTICLE_SPRITE, ResolvedModel.resolveParticleSprite(textureSlots, modelBaker, this)); + } + + private QuadCollection bakeDefaultState(TextureSlots textureSlots, ModelBaker modelBaker, ModelState modelState) { + QuadCollection quadCollection = this.getSlot(KEY_DEFAULT_GEOMETRY); + return quadCollection != null + ? quadCollection + : this.updateSlot(KEY_DEFAULT_GEOMETRY, this.getTopGeometry().bake(textureSlots, modelBaker, modelState, this)); + } + + @Override + public QuadCollection bakeTopGeometry(TextureSlots textureSlots, ModelBaker modelBaker, ModelState modelState) { + return modelState == BlockModelRotation.X0_Y0 + ? this.bakeDefaultState(textureSlots, modelBaker, modelState) + : (QuadCollection)this.modelBakeCache.computeIfAbsent(modelState, modelStatex -> { + UnbakedGeometry unbakedGeometry = this.getTopGeometry(); + return unbakedGeometry.bake(textureSlots, modelBaker, modelStatex, this); + }); } } + + @Environment(EnvType.CLIENT) + record Slot(int index) { + } } diff --git a/net/minecraft/client/resources/model/ModelGroupCollector.java b/net/minecraft/client/resources/model/ModelGroupCollector.java index cf8ed09a..42434c70 100644 --- a/net/minecraft/client/resources/model/ModelGroupCollector.java +++ b/net/minecraft/client/resources/model/ModelGroupCollector.java @@ -11,7 +11,7 @@ import java.util.Set; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.color.block.BlockColors; -import net.minecraft.client.renderer.block.model.UnbakedBlockStateModel; +import net.minecraft.client.renderer.block.model.BlockStateModel; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; @@ -25,16 +25,11 @@ public class ModelGroupCollector { public static Object2IntMap build(BlockColors blockColors, BlockStateModelLoader.LoadedModels loadedModels) { Map>> map = new HashMap(); Map> map2 = new HashMap(); - loadedModels.models() - .forEach( - (modelResourceLocation, loadedModel) -> { - List> list = (List>)map.computeIfAbsent( - loadedModel.state().getBlock(), block -> List.copyOf(blockColors.getColoringProperties(block)) - ); - ModelGroupCollector.GroupKey groupKey = ModelGroupCollector.GroupKey.create(loadedModel.state(), loadedModel.model(), list); - ((Set)map2.computeIfAbsent(groupKey, groupKeyx -> Sets.newIdentityHashSet())).add(loadedModel.state()); - } - ); + loadedModels.models().forEach((blockState, unbakedRoot) -> { + List> list = (List>)map.computeIfAbsent(blockState.getBlock(), block -> List.copyOf(blockColors.getColoringProperties(block))); + ModelGroupCollector.GroupKey groupKey = ModelGroupCollector.GroupKey.create(blockState, unbakedRoot, list); + ((Set)map2.computeIfAbsent(groupKey, groupKeyx -> Sets.newIdentityHashSet())).add(blockState); + }); int i = 1; Object2IntMap object2IntMap = new Object2IntOpenHashMap<>(); object2IntMap.defaultReturnValue(-1); @@ -61,19 +56,17 @@ public class ModelGroupCollector { @Environment(EnvType.CLIENT) record GroupKey(Object equalityGroup, List coloringValues) { - public static ModelGroupCollector.GroupKey create(BlockState blockState, UnbakedModel unbakedModel, List> list) { - List list2 = getColoringValues(blockState, list); - Object object = unbakedModel instanceof UnbakedBlockStateModel unbakedBlockStateModel - ? unbakedBlockStateModel.visualEqualityGroup(blockState) - : unbakedModel; - return new ModelGroupCollector.GroupKey(object, list2); + public static ModelGroupCollector.GroupKey create(BlockState state, BlockStateModel.UnbakedRoot root, List> properties) { + List list = getColoringValues(state, properties); + Object object = root.visualEqualityGroup(state); + return new ModelGroupCollector.GroupKey(object, list); } - private static List getColoringValues(BlockState blockState, List> list) { - Object[] objects = new Object[list.size()]; + private static List getColoringValues(BlockState state, List> properties) { + Object[] objects = new Object[properties.size()]; - for (int i = 0; i < list.size(); i++) { - objects[i] = blockState.getValue((Property)list.get(i)); + for (int i = 0; i < properties.size(); i++) { + objects[i] = state.getValue((Property)properties.get(i)); } return List.of(objects); diff --git a/net/minecraft/client/resources/model/ModelManager.java b/net/minecraft/client/resources/model/ModelManager.java index 8b1800f3..5e76dc5d 100644 --- a/net/minecraft/client/resources/model/ModelManager.java +++ b/net/minecraft/client/resources/model/ModelManager.java @@ -2,82 +2,89 @@ package net.minecraft.client.resources.model; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import com.google.gson.JsonObject; +import com.google.common.collect.Multimaps; +import com.google.common.collect.Sets; import com.mojang.datafixers.util.Pair; import com.mojang.logging.LogUtils; import it.unimi.dsi.fastutil.objects.Object2IntMap; +import it.unimi.dsi.fastutil.objects.Object2IntMaps; import java.io.Reader; import java.util.ArrayList; -import java.util.HashMap; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Set; import java.util.Map.Entry; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; -import java.util.function.Function; +import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.color.block.BlockColors; +import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.SpecialBlockModelRenderer; import net.minecraft.client.renderer.block.BlockModelShaper; import net.minecraft.client.renderer.block.model.BlockModel; -import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.block.model.ItemModelGenerator; +import net.minecraft.client.renderer.item.ClientItem; +import net.minecraft.client.renderer.item.ItemModel; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.resources.model.AtlasSet.StitchResult; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.FileToIdConverter; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.PreparableReloadListener; import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.util.GsonHelper; import net.minecraft.util.profiling.Profiler; import net.minecraft.util.profiling.ProfilerFiller; +import net.minecraft.util.profiling.Zone; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.material.FluidState; import org.slf4j.Logger; @Environment(EnvType.CLIENT) public class ModelManager implements PreparableReloadListener, AutoCloseable { private static final Logger LOGGER = LogUtils.getLogger(); - private static final FileToIdConverter BLOCKSTATE_LISTER = FileToIdConverter.json("blockstates"); private static final FileToIdConverter MODEL_LISTER = FileToIdConverter.json("models"); private static final Map VANILLA_ATLASES = Map.of( Sheets.BANNER_SHEET, - ResourceLocation.withDefaultNamespace("banner_patterns"), + AtlasIds.BANNER_PATTERNS, Sheets.BED_SHEET, - ResourceLocation.withDefaultNamespace("beds"), + AtlasIds.BEDS, Sheets.CHEST_SHEET, - ResourceLocation.withDefaultNamespace("chests"), + AtlasIds.CHESTS, Sheets.SHIELD_SHEET, - ResourceLocation.withDefaultNamespace("shield_patterns"), + AtlasIds.SHIELD_PATTERNS, Sheets.SIGN_SHEET, - ResourceLocation.withDefaultNamespace("signs"), + AtlasIds.SIGNS, Sheets.SHULKER_SHEET, - ResourceLocation.withDefaultNamespace("shulker_boxes"), + AtlasIds.SHULKER_BOXES, Sheets.ARMOR_TRIMS_SHEET, - ResourceLocation.withDefaultNamespace("armor_trims"), + AtlasIds.ARMOR_TRIMS, Sheets.DECORATED_POT_SHEET, - ResourceLocation.withDefaultNamespace("decorated_pot"), + AtlasIds.DECORATED_POT, TextureAtlas.LOCATION_BLOCKS, - ResourceLocation.withDefaultNamespace("blocks") + AtlasIds.BLOCKS ); - private Map bakedRegistry; + private Map bakedItemStackModels = Map.of(); + private Map itemProperties = Map.of(); private final AtlasSet atlases; private final BlockModelShaper blockModelShaper; private final BlockColors blockColors; + private EntityModelSet entityModelSet = EntityModelSet.EMPTY; + private SpecialBlockModelRenderer specialBlockModelRenderer = SpecialBlockModelRenderer.EMPTY; private int maxMipmapLevels; - private BakedModel missingModel; - private Object2IntMap modelGroups; + private ModelBakery.MissingModels missingModels; + private Object2IntMap modelGroups = Object2IntMaps.emptyMap(); public ModelManager(TextureManager textureManager, BlockColors blockColors, int maxMipmapLevels) { this.blockColors = blockColors; @@ -86,12 +93,16 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { this.atlases = new AtlasSet(VANILLA_ATLASES, textureManager); } - public BakedModel getModel(ModelResourceLocation modelLocation) { - return (BakedModel)this.bakedRegistry.getOrDefault(modelLocation, this.missingModel); + public BlockStateModel getMissingBlockStateModel() { + return this.missingModels.block(); } - public BakedModel getMissingModel() { - return this.missingModel; + public ItemModel getItemModel(ResourceLocation modelLocation) { + return (ItemModel)this.bakedItemStackModels.getOrDefault(modelLocation, this.missingModels.item()); + } + + public ClientItem.Properties getItemProperties(ResourceLocation itemId) { + return (ClientItem.Properties)this.itemProperties.getOrDefault(itemId, ClientItem.Properties.DEFAULT); } public BlockModelShaper getBlockModelShaper() { @@ -102,29 +113,50 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { public final CompletableFuture reload( PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 ) { - UnbakedModel unbakedModel = MissingBlockModel.missingModel(); - BlockStateModelLoader blockStateModelLoader = new BlockStateModelLoader(unbakedModel); - CompletableFuture> completableFuture = loadBlockModels(resourceManager, executor); - CompletableFuture completableFuture2 = loadBlockStates(blockStateModelLoader, resourceManager, executor); - CompletableFuture completableFuture3 = completableFuture2.thenCombineAsync( - completableFuture, (loadedModels, mapx) -> this.discoverModelDependencies(unbakedModel, mapx, loadedModels), executor - ); - CompletableFuture> completableFuture4 = completableFuture2.thenApplyAsync( + CompletableFuture completableFuture = CompletableFuture.supplyAsync(EntityModelSet::vanilla, executor); + CompletableFuture completableFuture2 = completableFuture.thenApplyAsync(SpecialBlockModelRenderer::vanilla, executor); + CompletableFuture> completableFuture3 = loadBlockModels(resourceManager, executor); + CompletableFuture completableFuture4 = BlockStateModelLoader.loadBlockStates(resourceManager, executor); + CompletableFuture completableFuture5 = ClientItemInfoLoader.scheduleLoad(resourceManager, executor); + CompletableFuture completableFuture6 = CompletableFuture.allOf(completableFuture3, completableFuture4, completableFuture5) + .thenApplyAsync( + void_ -> discoverModelDependencies( + (Map)completableFuture3.join(), + (BlockStateModelLoader.LoadedModels)completableFuture4.join(), + (ClientItemInfoLoader.LoadedClientInfos)completableFuture5.join() + ), + executor + ); + CompletableFuture> completableFuture7 = completableFuture4.thenApplyAsync( loadedModels -> buildModelGroups(this.blockColors, loadedModels), executor ); - Map> map = this.atlases.scheduleLoad(resourceManager, this.maxMipmapLevels, executor); + Map> map = this.atlases.scheduleLoad(resourceManager, this.maxMipmapLevels, executor); return CompletableFuture.allOf( - (CompletableFuture[])Stream.concat(map.values().stream(), Stream.of(completableFuture3, completableFuture4)).toArray(CompletableFuture[]::new) + (CompletableFuture[])Stream.concat( + map.values().stream(), + Stream.of(completableFuture6, completableFuture7, completableFuture4, completableFuture5, completableFuture, completableFuture2, completableFuture3) + ) + .toArray(CompletableFuture[]::new) ) - .thenApplyAsync( + .thenComposeAsync( void_ -> { - Map map2 = (Map)map.entrySet() - .stream() - .collect(Collectors.toMap(Entry::getKey, entry -> (StitchResult)((CompletableFuture)entry.getValue()).join())); - ModelDiscovery modelDiscovery = (ModelDiscovery)completableFuture3.join(); - Object2IntMap object2IntMap = (Object2IntMap)completableFuture4.join(); - return this.loadModels( - Profiler.get(), map2, new ModelBakery(modelDiscovery.getTopModels(), modelDiscovery.getReferencedModels(), unbakedModel), object2IntMap + Map map2 = Util.mapValues(map, CompletableFuture::join); + ModelManager.ResolvedModels resolvedModels = (ModelManager.ResolvedModels)completableFuture6.join(); + Object2IntMap object2IntMap = (Object2IntMap)completableFuture7.join(); + Set set = Sets.difference(((Map)completableFuture3.join()).keySet(), resolvedModels.models.keySet()); + if (!set.isEmpty()) { + LOGGER.debug("Unreferenced models: \n{}", set.stream().sorted().map(resourceLocation -> "\t" + resourceLocation + "\n").collect(Collectors.joining())); + } + + ModelBakery modelBakery = new ModelBakery( + (EntityModelSet)completableFuture.join(), + ((BlockStateModelLoader.LoadedModels)completableFuture4.join()).models(), + ((ClientItemInfoLoader.LoadedClientInfos)completableFuture5.join()).contents(), + resolvedModels.models(), + resolvedModels.missing() + ); + return loadModels( + map2, modelBakery, object2IntMap, (EntityModelSet)completableFuture.join(), (SpecialBlockModelRenderer)completableFuture2.join(), executor ); }, executor @@ -147,11 +179,9 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { try { Reader reader = ((Resource)entry.getValue()).openAsReader(); - Pair var4x; + Pair var3; try { - BlockModel blockModel = BlockModel.fromStream(reader); - blockModel.name = resourceLocation.toString(); - var4x = Pair.of(resourceLocation, blockModel); + var3 = Pair.of(resourceLocation, BlockModel.fromStream(reader)); } catch (Throwable var6) { if (reader != null) { try { @@ -168,7 +198,7 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { reader.close(); } - return var4x; + return var3; } catch (Exception var7) { LOGGER.error("Failed to load model {}", entry.getKey(), var7); return null; @@ -182,144 +212,122 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { ); } - private ModelDiscovery discoverModelDependencies( - UnbakedModel unbakedModel, Map map, BlockStateModelLoader.LoadedModels loadedModels + private static ModelManager.ResolvedModels discoverModelDependencies( + Map inputModels, BlockStateModelLoader.LoadedModels loadedModels, ClientItemInfoLoader.LoadedClientInfos loadedClientInfos ) { - ModelDiscovery modelDiscovery = new ModelDiscovery(map, unbakedModel); - modelDiscovery.registerStandardModels(loadedModels); - modelDiscovery.discoverDependencies(); - return modelDiscovery; + ModelManager.ResolvedModels var5; + try (Zone zone = Profiler.get().zone("dependencies")) { + ModelDiscovery modelDiscovery = new ModelDiscovery(inputModels, MissingBlockModel.missingModel()); + modelDiscovery.addSpecialModel(ItemModelGenerator.GENERATED_ITEM_MODEL_ID, new ItemModelGenerator()); + loadedModels.models().values().forEach(modelDiscovery::addRoot); + loadedClientInfos.contents().values().forEach(clientItem -> modelDiscovery.addRoot(clientItem.model())); + var5 = new ModelManager.ResolvedModels(modelDiscovery.missingModel(), modelDiscovery.resolve()); + } + + return var5; } - private static CompletableFuture loadBlockStates( - BlockStateModelLoader blockStateModelLoader, ResourceManager resourceManager, Executor executor + private static CompletableFuture loadModels( + Map stitchResults, + ModelBakery modelBakery, + Object2IntMap modelGroups, + EntityModelSet entityModelSet, + SpecialBlockModelRenderer specialBlockModelRenderer, + Executor executor ) { - Function> function = BlockStateModelLoader.definitionLocationToBlockMapper(); - return CompletableFuture.supplyAsync(() -> BLOCKSTATE_LISTER.listMatchingResourceStacks(resourceManager), executor).thenCompose(map -> { - List> list = new ArrayList(map.size()); + CompletableFuture completableFuture = CompletableFuture.allOf( + (CompletableFuture[])stitchResults.values().stream().map(AtlasSet.StitchResult::readyForUpload).toArray(CompletableFuture[]::new) + ); + final Multimap multimap = Multimaps.synchronizedMultimap(HashMultimap.create()); + final Multimap multimap2 = Multimaps.synchronizedMultimap(HashMultimap.create()); + return modelBakery.bakeModels(new SpriteGetter() { + private final TextureAtlasSprite missingSprite = ((AtlasSet.StitchResult)stitchResults.get(TextureAtlas.LOCATION_BLOCKS)).missing(); - for (Entry> entry : map.entrySet()) { - list.add(CompletableFuture.supplyAsync(() -> { - ResourceLocation resourceLocation = BLOCKSTATE_LISTER.fileToId((ResourceLocation)entry.getKey()); - StateDefinition stateDefinition = (StateDefinition)function.apply(resourceLocation); - if (stateDefinition == null) { - LOGGER.debug("Discovered unknown block state definition {}, ignoring", resourceLocation); - return null; + @Override + public TextureAtlasSprite get(Material material, ModelDebugName debugName) { + AtlasSet.StitchResult stitchResult = (AtlasSet.StitchResult)stitchResults.get(material.atlasLocation()); + TextureAtlasSprite textureAtlasSprite = stitchResult.getSprite(material.texture()); + if (textureAtlasSprite != null) { + return textureAtlasSprite; } else { - List listx = (List)entry.getValue(); - List list2 = new ArrayList(listx.size()); - - for (Resource resource : listx) { - try { - Reader reader = resource.openAsReader(); - - try { - JsonObject jsonObject = GsonHelper.parse(reader); - BlockModelDefinition blockModelDefinition = BlockModelDefinition.fromJsonElement(jsonObject); - list2.add(new BlockStateModelLoader.LoadedBlockModelDefinition(resource.sourcePackId(), blockModelDefinition)); - } catch (Throwable var14) { - if (reader != null) { - try { - reader.close(); - } catch (Throwable var13) { - var14.addSuppressed(var13); - } - } - - throw var14; - } - - if (reader != null) { - reader.close(); - } - } catch (Exception var15) { - LOGGER.error("Failed to load blockstate definition {} from pack {}", resourceLocation, resource.sourcePackId(), var15); - } - } - - try { - return blockStateModelLoader.loadBlockStateDefinitionStack(resourceLocation, stateDefinition, list2); - } catch (Exception var12) { - LOGGER.error("Failed to load blockstate definition {}", resourceLocation, var12); - return null; - } - } - }, executor)); - } - - return Util.sequence(list).thenApply(listx -> { - Map mapx = new HashMap(); - - for (BlockStateModelLoader.LoadedModels loadedModels : listx) { - if (loadedModels != null) { - mapx.putAll(loadedModels.models()); + multimap.put(debugName.debugName(), material); + return stitchResult.missing(); } } - return new BlockStateModelLoader.LoadedModels(mapx); - }); - }); + @Override + public TextureAtlasSprite reportMissingReference(String name, ModelDebugName debugName) { + multimap2.put(debugName.debugName(), name); + return this.missingSprite; + } + }, executor) + .thenApply( + bakingResult -> { + multimap.asMap() + .forEach( + (string, collection) -> LOGGER.warn( + "Missing textures in model {}:\n{}", + string, + collection.stream() + .sorted(Material.COMPARATOR) + .map(material -> " " + material.atlasLocation() + ":" + material.texture()) + .collect(Collectors.joining("\n")) + ) + ); + multimap2.asMap() + .forEach( + (string, collection) -> LOGGER.warn( + "Missing texture references in model {}:\n{}", string, collection.stream().sorted().map(stringx -> " " + stringx).collect(Collectors.joining("\n")) + ) + ); + Map map2 = createBlockStateToModelDispatch(bakingResult.blockStateModels(), bakingResult.missingModels().block()); + return new ModelManager.ReloadState(bakingResult, modelGroups, map2, stitchResults, entityModelSet, specialBlockModelRenderer, completableFuture); + } + ); } - private ModelManager.ReloadState loadModels( - ProfilerFiller profilerFiller, Map map, ModelBakery modelBakery, Object2IntMap object2IntMap + private static Map createBlockStateToModelDispatch( + Map blockStateModels, BlockStateModel missingModel ) { - profilerFiller.push("baking"); - Multimap multimap = HashMultimap.create(); - modelBakery.bakeModels((modelResourceLocation, material) -> { - StitchResult stitchResult = (StitchResult)map.get(material.atlasLocation()); - TextureAtlasSprite textureAtlasSprite = stitchResult.getSprite(material.texture()); - if (textureAtlasSprite != null) { - return textureAtlasSprite; - } else { - multimap.put(modelResourceLocation, material); - return stitchResult.missing(); - } - }); - multimap.asMap() - .forEach( - (modelResourceLocation, collection) -> LOGGER.warn( - "Missing textures in model {}:\n{}", - modelResourceLocation, - collection.stream() - .sorted(Material.COMPARATOR) - .map(material -> " " + material.atlasLocation() + ":" + material.texture()) - .collect(Collectors.joining("\n")) - ) - ); - profilerFiller.popPush("dispatch"); - Map map2 = modelBakery.getBakedTopLevelModels(); - BakedModel bakedModel = (BakedModel)map2.get(MissingBlockModel.VARIANT); - Map map3 = new IdentityHashMap(); + Object var8; + try (Zone zone = Profiler.get().zone("block state dispatch")) { + Map map = new IdentityHashMap(blockStateModels); - for (Block block : BuiltInRegistries.BLOCK) { - block.getStateDefinition().getPossibleStates().forEach(blockState -> { - ResourceLocation resourceLocation = blockState.getBlock().builtInRegistryHolder().key().location(); - BakedModel bakedModel2 = (BakedModel)map2.getOrDefault(BlockModelShaper.stateToModelLocation(resourceLocation, blockState), bakedModel); - map3.put(blockState, bakedModel2); - }); + for (Block block : BuiltInRegistries.BLOCK) { + block.getStateDefinition().getPossibleStates().forEach(blockState -> { + if (blockStateModels.putIfAbsent(blockState, missingModel) == null) { + LOGGER.warn("Missing model for variant: '{}'", blockState); + } + }); + } + + var8 = map; } - CompletableFuture completableFuture = CompletableFuture.allOf( - (CompletableFuture[])map.values().stream().map(StitchResult::readyForUpload).toArray(CompletableFuture[]::new) - ); - profilerFiller.pop(); - return new ModelManager.ReloadState(modelBakery, object2IntMap, bakedModel, map3, map, completableFuture); + return (Map)var8; } private static Object2IntMap buildModelGroups(BlockColors blockColors, BlockStateModelLoader.LoadedModels loadedModels) { - return ModelGroupCollector.build(blockColors, loadedModels); + Object2IntMap var3; + try (Zone zone = Profiler.get().zone("block groups")) { + var3 = ModelGroupCollector.build(blockColors, loadedModels); + } + + return var3; } private void apply(ModelManager.ReloadState reloadState, ProfilerFiller profiler) { profiler.push("upload"); - reloadState.atlasPreparations.values().forEach(StitchResult::upload); - ModelBakery modelBakery = reloadState.modelBakery; - this.bakedRegistry = modelBakery.getBakedTopLevelModels(); + reloadState.atlasPreparations.values().forEach(AtlasSet.StitchResult::upload); + ModelBakery.BakingResult bakingResult = reloadState.bakedModels; + this.bakedItemStackModels = bakingResult.itemStackModels(); + this.itemProperties = bakingResult.itemProperties(); this.modelGroups = reloadState.modelGroups; - this.missingModel = reloadState.missingModel; + this.missingModels = bakingResult.missingModels(); profiler.popPush("cache"); this.blockModelShaper.replaceCache(reloadState.modelCache); + this.specialBlockModelRenderer = reloadState.specialBlockModelRenderer; + this.entityModelSet = reloadState.entityModelSet; profiler.pop(); } @@ -353,14 +361,27 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { this.maxMipmapLevels = level; } + public Supplier specialBlockModelRenderer() { + return () -> this.specialBlockModelRenderer; + } + + public Supplier entityModels() { + return () -> this.entityModelSet; + } + @Environment(EnvType.CLIENT) record ReloadState( - ModelBakery modelBakery, + ModelBakery.BakingResult bakedModels, Object2IntMap modelGroups, - BakedModel missingModel, - Map modelCache, - Map atlasPreparations, + Map modelCache, + Map atlasPreparations, + EntityModelSet entityModelSet, + SpecialBlockModelRenderer specialBlockModelRenderer, CompletableFuture readyForUpload ) { } + + @Environment(EnvType.CLIENT) + record ResolvedModels(ResolvedModel missing, Map models) { + } } diff --git a/net/minecraft/client/resources/model/ModelResourceLocation.java b/net/minecraft/client/resources/model/ModelResourceLocation.java deleted file mode 100644 index 205611e6..00000000 --- a/net/minecraft/client/resources/model/ModelResourceLocation.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.Locale; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public record ModelResourceLocation(ResourceLocation id, String variant) { - public static final String INVENTORY_VARIANT = "inventory"; - - public ModelResourceLocation(ResourceLocation id, String variant) { - variant = lowercaseVariant(variant); - this.id = id; - this.variant = variant; - } - - public static ModelResourceLocation inventory(ResourceLocation id) { - return new ModelResourceLocation(id, "inventory"); - } - - private static String lowercaseVariant(String variant) { - return variant.toLowerCase(Locale.ROOT); - } - - public String getVariant() { - return this.variant; - } - - public String toString() { - return this.id + "#" + this.variant; - } -} diff --git a/net/minecraft/client/resources/model/ModelState.java b/net/minecraft/client/resources/model/ModelState.java index 6eae0058..eed71157 100644 --- a/net/minecraft/client/resources/model/ModelState.java +++ b/net/minecraft/client/resources/model/ModelState.java @@ -3,14 +3,23 @@ package net.minecraft.client.resources.model; import com.mojang.math.Transformation; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.core.Direction; +import org.joml.Matrix4f; +import org.joml.Matrix4fc; @Environment(EnvType.CLIENT) public interface ModelState { - default Transformation getRotation() { + Matrix4fc NO_TRANSFORM = new Matrix4f(); + + default Transformation transformation() { return Transformation.identity(); } - default boolean isUvLocked() { - return false; + default Matrix4fc faceTransformation(Direction facing) { + return NO_TRANSFORM; + } + + default Matrix4fc inverseFaceTransformation(Direction facing) { + return NO_TRANSFORM; } } diff --git a/net/minecraft/client/resources/model/MultiPartBakedModel.java b/net/minecraft/client/resources/model/MultiPartBakedModel.java deleted file mode 100644 index 5cfc8d62..00000000 --- a/net/minecraft/client/resources/model/MultiPartBakedModel.java +++ /dev/null @@ -1,71 +0,0 @@ -package net.minecraft.client.resources.model; - -import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap; -import java.util.ArrayList; -import java.util.BitSet; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class MultiPartBakedModel extends DelegateBakedModel { - private final List selectors; - private final Map selectorCache = new Reference2ObjectOpenHashMap<>(); - - private static BakedModel getFirstModel(List list) { - if (list.isEmpty()) { - throw new IllegalArgumentException("Model must have at least one selector"); - } else { - return ((MultiPartBakedModel.Selector)list.getFirst()).model(); - } - } - - public MultiPartBakedModel(List selectors) { - super(getFirstModel(selectors)); - this.selectors = selectors; - } - - @Override - public List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random) { - if (state == null) { - return Collections.emptyList(); - } else { - BitSet bitSet = (BitSet)this.selectorCache.get(state); - if (bitSet == null) { - bitSet = new BitSet(); - - for (int i = 0; i < this.selectors.size(); i++) { - if (((MultiPartBakedModel.Selector)this.selectors.get(i)).condition.test(state)) { - bitSet.set(i); - } - } - - this.selectorCache.put(state, bitSet); - } - - List list = new ArrayList(); - long l = random.nextLong(); - - for (int j = 0; j < bitSet.length(); j++) { - if (bitSet.get(j)) { - random.setSeed(l); - list.addAll(((MultiPartBakedModel.Selector)this.selectors.get(j)).model.getQuads(state, direction, random)); - } - } - - return list; - } - } - - @Environment(EnvType.CLIENT) - public record Selector(Predicate condition, BakedModel model) { - } -} diff --git a/net/minecraft/client/resources/model/QuadCollection.java b/net/minecraft/client/resources/model/QuadCollection.java new file mode 100644 index 00000000..0bd5c7c5 --- /dev/null +++ b/net/minecraft/client/resources/model/QuadCollection.java @@ -0,0 +1,128 @@ +package net.minecraft.client.resources.model; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Multimap; +import java.util.Collection; +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.core.Direction; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public class QuadCollection { + public static final QuadCollection EMPTY = new QuadCollection(List.of(), List.of(), List.of(), List.of(), List.of(), List.of(), List.of(), List.of()); + private final List all; + private final List unculled; + private final List north; + private final List south; + private final List east; + private final List west; + private final List up; + private final List down; + + QuadCollection( + List all, + List unculled, + List north, + List south, + List east, + List west, + List up, + List down + ) { + this.all = all; + this.unculled = unculled; + this.north = north; + this.south = south; + this.east = east; + this.west = west; + this.up = up; + this.down = down; + } + + public List getQuads(@Nullable Direction direction) { + return switch (direction) { + case null -> this.unculled; + case NORTH -> this.north; + case SOUTH -> this.south; + case EAST -> this.east; + case WEST -> this.west; + case UP -> this.up; + case DOWN -> this.down; + }; + } + + public List getAll() { + return this.all; + } + + @Environment(EnvType.CLIENT) + public static class Builder { + private final ImmutableList.Builder unculledFaces = ImmutableList.builder(); + private final Multimap culledFaces = ArrayListMultimap.create(); + + public QuadCollection.Builder addCulledFace(Direction direction, BakedQuad quad) { + this.culledFaces.put(direction, quad); + return this; + } + + public QuadCollection.Builder addUnculledFace(BakedQuad quad) { + this.unculledFaces.add(quad); + return this; + } + + private static QuadCollection createFromSublists( + List quads, int unculledSize, int northSize, int southSize, int eastSize, int westSize, int upSize, int downSize + ) { + int i = 0; + int var16; + List list = quads.subList(i, var16 = i + unculledSize); + List list2 = quads.subList(var16, i = var16 + northSize); + int var18; + List list3 = quads.subList(i, var18 = i + southSize); + List list4 = quads.subList(var18, i = var18 + eastSize); + int var20; + List list5 = quads.subList(i, var20 = i + westSize); + List list6 = quads.subList(var20, i = var20 + upSize); + List list7 = quads.subList(i, i + downSize); + return new QuadCollection(quads, list, list2, list3, list4, list5, list6, list7); + } + + public QuadCollection build() { + ImmutableList immutableList = this.unculledFaces.build(); + if (this.culledFaces.isEmpty()) { + return immutableList.isEmpty() + ? QuadCollection.EMPTY + : new QuadCollection(immutableList, immutableList, List.of(), List.of(), List.of(), List.of(), List.of(), List.of()); + } else { + ImmutableList.Builder builder = ImmutableList.builder(); + builder.addAll(immutableList); + Collection collection = this.culledFaces.get(Direction.NORTH); + builder.addAll(collection); + Collection collection2 = this.culledFaces.get(Direction.SOUTH); + builder.addAll(collection2); + Collection collection3 = this.culledFaces.get(Direction.EAST); + builder.addAll(collection3); + Collection collection4 = this.culledFaces.get(Direction.WEST); + builder.addAll(collection4); + Collection collection5 = this.culledFaces.get(Direction.UP); + builder.addAll(collection5); + Collection collection6 = this.culledFaces.get(Direction.DOWN); + builder.addAll(collection6); + return createFromSublists( + builder.build(), + immutableList.size(), + collection.size(), + collection2.size(), + collection3.size(), + collection4.size(), + collection5.size(), + collection6.size() + ); + } + } + } +} diff --git a/net/minecraft/client/resources/model/ResolvableModel.java b/net/minecraft/client/resources/model/ResolvableModel.java new file mode 100644 index 00000000..bc2beab7 --- /dev/null +++ b/net/minecraft/client/resources/model/ResolvableModel.java @@ -0,0 +1,15 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; + +@Environment(EnvType.CLIENT) +public interface ResolvableModel { + void resolveDependencies(ResolvableModel.Resolver resolver); + + @Environment(EnvType.CLIENT) + public interface Resolver { + void markDependency(ResourceLocation resourceLocation); + } +} diff --git a/net/minecraft/client/resources/model/ResolvedModel.java b/net/minecraft/client/resources/model/ResolvedModel.java new file mode 100644 index 00000000..855b1c4b --- /dev/null +++ b/net/minecraft/client/resources/model/ResolvedModel.java @@ -0,0 +1,131 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.ItemTransform; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.world.item.ItemDisplayContext; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public interface ResolvedModel extends ModelDebugName { + boolean DEFAULT_AMBIENT_OCCLUSION = true; + UnbakedModel.GuiLight DEFAULT_GUI_LIGHT = UnbakedModel.GuiLight.SIDE; + + UnbakedModel wrapped(); + + @Nullable + ResolvedModel parent(); + + static TextureSlots findTopTextureSlots(ResolvedModel model) { + ResolvedModel resolvedModel = model; + + TextureSlots.Resolver resolver; + for (resolver = new TextureSlots.Resolver(); resolvedModel != null; resolvedModel = resolvedModel.parent()) { + resolver.addLast(resolvedModel.wrapped().textureSlots()); + } + + return resolver.resolve(model); + } + + default TextureSlots getTopTextureSlots() { + return findTopTextureSlots(this); + } + + static boolean findTopAmbientOcclusion(ResolvedModel model) { + while (model != null) { + Boolean boolean_ = model.wrapped().ambientOcclusion(); + if (boolean_ != null) { + return boolean_; + } + + model = model.parent(); + } + + return true; + } + + default boolean getTopAmbientOcclusion() { + return findTopAmbientOcclusion(this); + } + + static UnbakedModel.GuiLight findTopGuiLight(ResolvedModel model) { + while (model != null) { + UnbakedModel.GuiLight guiLight = model.wrapped().guiLight(); + if (guiLight != null) { + return guiLight; + } + + model = model.parent(); + } + + return DEFAULT_GUI_LIGHT; + } + + default UnbakedModel.GuiLight getTopGuiLight() { + return findTopGuiLight(this); + } + + static UnbakedGeometry findTopGeometry(ResolvedModel model) { + while (model != null) { + UnbakedGeometry unbakedGeometry = model.wrapped().geometry(); + if (unbakedGeometry != null) { + return unbakedGeometry; + } + + model = model.parent(); + } + + return UnbakedGeometry.EMPTY; + } + + default UnbakedGeometry getTopGeometry() { + return findTopGeometry(this); + } + + default QuadCollection bakeTopGeometry(TextureSlots textureSlots, ModelBaker modelBaker, ModelState modelState) { + return this.getTopGeometry().bake(textureSlots, modelBaker, modelState, this); + } + + static TextureAtlasSprite resolveParticleSprite(TextureSlots textureSlots, ModelBaker modelBaker, ModelDebugName debugName) { + return modelBaker.sprites().resolveSlot(textureSlots, "particle", debugName); + } + + default TextureAtlasSprite resolveParticleSprite(TextureSlots textureSlots, ModelBaker modelBaker) { + return resolveParticleSprite(textureSlots, modelBaker, this); + } + + static ItemTransform findTopTransform(ResolvedModel model, ItemDisplayContext displayContext) { + while (model != null) { + ItemTransforms itemTransforms = model.wrapped().transforms(); + if (itemTransforms != null) { + ItemTransform itemTransform = itemTransforms.getTransform(displayContext); + if (itemTransform != ItemTransform.NO_TRANSFORM) { + return itemTransform; + } + } + + model = model.parent(); + } + + return ItemTransform.NO_TRANSFORM; + } + + static ItemTransforms findTopTransforms(ResolvedModel model) { + ItemTransform itemTransform = findTopTransform(model, ItemDisplayContext.THIRD_PERSON_LEFT_HAND); + ItemTransform itemTransform2 = findTopTransform(model, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND); + ItemTransform itemTransform3 = findTopTransform(model, ItemDisplayContext.FIRST_PERSON_LEFT_HAND); + ItemTransform itemTransform4 = findTopTransform(model, ItemDisplayContext.FIRST_PERSON_RIGHT_HAND); + ItemTransform itemTransform5 = findTopTransform(model, ItemDisplayContext.HEAD); + ItemTransform itemTransform6 = findTopTransform(model, ItemDisplayContext.GUI); + ItemTransform itemTransform7 = findTopTransform(model, ItemDisplayContext.GROUND); + ItemTransform itemTransform8 = findTopTransform(model, ItemDisplayContext.FIXED); + return new ItemTransforms(itemTransform, itemTransform2, itemTransform3, itemTransform4, itemTransform5, itemTransform6, itemTransform7, itemTransform8); + } + + default ItemTransforms getTopTransforms() { + return findTopTransforms(this); + } +} diff --git a/net/minecraft/client/resources/model/SimpleBakedModel.java b/net/minecraft/client/resources/model/SimpleBakedModel.java deleted file mode 100644 index 27043189..00000000 --- a/net/minecraft/client/resources/model/SimpleBakedModel.java +++ /dev/null @@ -1,138 +0,0 @@ -package net.minecraft.client.resources.model; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Maps; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.BlockModel; -import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class SimpleBakedModel implements BakedModel { - protected final List unculledFaces; - protected final Map> culledFaces; - protected final boolean hasAmbientOcclusion; - protected final boolean isGui3d; - protected final boolean usesBlockLight; - protected final TextureAtlasSprite particleIcon; - protected final ItemTransforms transforms; - - public SimpleBakedModel( - List list, - Map> map, - boolean bl, - boolean bl2, - boolean bl3, - TextureAtlasSprite textureAtlasSprite, - ItemTransforms itemTransforms - ) { - this.unculledFaces = list; - this.culledFaces = map; - this.hasAmbientOcclusion = bl; - this.isGui3d = bl3; - this.usesBlockLight = bl2; - this.particleIcon = textureAtlasSprite; - this.transforms = itemTransforms; - } - - @Override - public List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random) { - return direction == null ? this.unculledFaces : (List)this.culledFaces.get(direction); - } - - @Override - public boolean useAmbientOcclusion() { - return this.hasAmbientOcclusion; - } - - @Override - public boolean isGui3d() { - return this.isGui3d; - } - - @Override - public boolean usesBlockLight() { - return this.usesBlockLight; - } - - @Override - public boolean isCustomRenderer() { - return false; - } - - @Override - public TextureAtlasSprite getParticleIcon() { - return this.particleIcon; - } - - @Override - public ItemTransforms getTransforms() { - return this.transforms; - } - - @Environment(EnvType.CLIENT) - public static class Builder { - private final ImmutableList.Builder unculledFaces = ImmutableList.builder(); - private final EnumMap> culledFaces = Maps.newEnumMap(Direction.class); - private final boolean hasAmbientOcclusion; - @Nullable - private TextureAtlasSprite particleIcon; - private final boolean usesBlockLight; - private final boolean isGui3d; - private final ItemTransforms transforms; - - public Builder(BlockModel blockModel, boolean bl) { - this(blockModel.hasAmbientOcclusion(), blockModel.getGuiLight().lightLikeBlock(), bl, blockModel.getTransforms()); - } - - private Builder(boolean bl, boolean bl2, boolean bl3, ItemTransforms itemTransforms) { - this.hasAmbientOcclusion = bl; - this.usesBlockLight = bl2; - this.isGui3d = bl3; - this.transforms = itemTransforms; - - for (Direction direction : Direction.values()) { - this.culledFaces.put(direction, ImmutableList.builder()); - } - } - - public SimpleBakedModel.Builder addCulledFace(Direction facing, BakedQuad quad) { - ((ImmutableList.Builder)this.culledFaces.get(facing)).add(quad); - return this; - } - - public SimpleBakedModel.Builder addUnculledFace(BakedQuad quad) { - this.unculledFaces.add(quad); - return this; - } - - public SimpleBakedModel.Builder particle(TextureAtlasSprite particleIcon) { - this.particleIcon = particleIcon; - return this; - } - - public SimpleBakedModel.Builder item() { - return this; - } - - public BakedModel build() { - if (this.particleIcon == null) { - throw new RuntimeException("Missing particle!"); - } else { - Map> map = Maps.transformValues(this.culledFaces, ImmutableList.Builder::build); - return new SimpleBakedModel( - this.unculledFaces.build(), new EnumMap(map), this.hasAmbientOcclusion, this.usesBlockLight, this.isGui3d, this.particleIcon, this.transforms - ); - } - } - } -} diff --git a/net/minecraft/client/resources/model/SpecialModels.java b/net/minecraft/client/resources/model/SpecialModels.java deleted file mode 100644 index b5185e83..00000000 --- a/net/minecraft/client/resources/model/SpecialModels.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.List; -import java.util.Map; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BlockModel; -import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.resources.ResourceLocation; - -@Environment(EnvType.CLIENT) -public class SpecialModels { - public static final ResourceLocation BUILTIN_GENERATED = builtinModelId("generated"); - public static final ResourceLocation BUILTIN_BLOCK_ENTITY = builtinModelId("entity"); - public static final UnbakedModel GENERATED_MARKER = createMarker("generation marker", BlockModel.GuiLight.FRONT); - public static final UnbakedModel BLOCK_ENTITY_MARKER = createMarker("block entity marker", BlockModel.GuiLight.SIDE); - - public static ResourceLocation builtinModelId(String string) { - return ResourceLocation.withDefaultNamespace("builtin/" + string); - } - - private static UnbakedModel createMarker(String string, BlockModel.GuiLight guiLight) { - BlockModel blockModel = new BlockModel(null, List.of(), Map.of(), null, guiLight, ItemTransforms.NO_TRANSFORMS, List.of()); - blockModel.name = string; - return blockModel; - } -} diff --git a/net/minecraft/client/resources/model/SpriteGetter.java b/net/minecraft/client/resources/model/SpriteGetter.java new file mode 100644 index 00000000..3e43bf79 --- /dev/null +++ b/net/minecraft/client/resources/model/SpriteGetter.java @@ -0,0 +1,18 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.TextureSlots; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; + +@Environment(EnvType.CLIENT) +public interface SpriteGetter { + TextureAtlasSprite get(Material material, ModelDebugName debugName); + + TextureAtlasSprite reportMissingReference(String name, ModelDebugName debugName); + + default TextureAtlasSprite resolveSlot(TextureSlots textureSlots, String name, ModelDebugName modelDebugName) { + Material material = textureSlots.getMaterial(name); + return material != null ? this.get(material, modelDebugName) : this.reportMissingReference(name, modelDebugName); + } +} diff --git a/net/minecraft/client/resources/model/UnbakedGeometry.java b/net/minecraft/client/resources/model/UnbakedGeometry.java new file mode 100644 index 00000000..5cccd44b --- /dev/null +++ b/net/minecraft/client/resources/model/UnbakedGeometry.java @@ -0,0 +1,13 @@ +package net.minecraft.client.resources.model; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.TextureSlots; + +@FunctionalInterface +@Environment(EnvType.CLIENT) +public interface UnbakedGeometry { + UnbakedGeometry EMPTY = (textureSlots, modelBaker, modelState, modelDebugName) -> QuadCollection.EMPTY; + + QuadCollection bake(TextureSlots textureSlots, ModelBaker modelBaker, ModelState modelState, ModelDebugName modelDebugName); +} diff --git a/net/minecraft/client/resources/model/UnbakedModel.java b/net/minecraft/client/resources/model/UnbakedModel.java index f9e4a131..26d51f55 100644 --- a/net/minecraft/client/resources/model/UnbakedModel.java +++ b/net/minecraft/client/resources/model/UnbakedModel.java @@ -1,19 +1,68 @@ package net.minecraft.client.resources.model; -import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.block.model.TextureSlots; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public interface UnbakedModel { - void resolveDependencies(UnbakedModel.Resolver resolver); + String PARTICLE_TEXTURE_REFERENCE = "particle"; - BakedModel bake(ModelBaker baker, Function spriteGetter, ModelState state); + @Nullable + default Boolean ambientOcclusion() { + return null; + } + + @Nullable + default UnbakedModel.GuiLight guiLight() { + return null; + } + + @Nullable + default ItemTransforms transforms() { + return null; + } + + default TextureSlots.Data textureSlots() { + return TextureSlots.Data.EMPTY; + } + + @Nullable + default UnbakedGeometry geometry() { + return null; + } + + @Nullable + default ResourceLocation parent() { + return null; + } @Environment(EnvType.CLIENT) - public interface Resolver { - UnbakedModel resolve(ResourceLocation resourceLocation); + public static enum GuiLight { + FRONT("front"), + SIDE("side"); + + private final String name; + + private GuiLight(final String name) { + this.name = name; + } + + public static UnbakedModel.GuiLight getByName(String name) { + for (UnbakedModel.GuiLight guiLight : values()) { + if (guiLight.name.equals(name)) { + return guiLight; + } + } + + throw new IllegalArgumentException("Invalid gui light: " + name); + } + + public boolean lightLikeBlock() { + return this == SIDE; + } } } diff --git a/net/minecraft/client/resources/model/WeightedBakedModel.java b/net/minecraft/client/resources/model/WeightedBakedModel.java deleted file mode 100644 index 234e8e36..00000000 --- a/net/minecraft/client/resources/model/WeightedBakedModel.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.minecraft.client.resources.model; - -import java.util.Collections; -import java.util.List; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.core.Direction; -import net.minecraft.util.RandomSource; -import net.minecraft.util.random.SimpleWeightedRandomList; -import net.minecraft.util.random.WeightedEntry.Wrapper; -import net.minecraft.world.level.block.state.BlockState; -import org.jetbrains.annotations.Nullable; - -@Environment(EnvType.CLIENT) -public class WeightedBakedModel extends DelegateBakedModel { - private final SimpleWeightedRandomList list; - - public WeightedBakedModel(SimpleWeightedRandomList simpleWeightedRandomList) { - super((BakedModel)((Wrapper)simpleWeightedRandomList.unwrap().getFirst()).data()); - this.list = simpleWeightedRandomList; - } - - @Override - public List getQuads(@Nullable BlockState state, @Nullable Direction direction, RandomSource random) { - return (List)this.list.getRandomValue(random).map(bakedModel -> bakedModel.getQuads(state, direction, random)).orElse(Collections.emptyList()); - } -} diff --git a/net/minecraft/client/resources/model/WeightedVariants.java b/net/minecraft/client/resources/model/WeightedVariants.java new file mode 100644 index 00000000..0b8999af --- /dev/null +++ b/net/minecraft/client/resources/model/WeightedVariants.java @@ -0,0 +1,46 @@ +package net.minecraft.client.resources.model; + +import java.util.List; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.block.model.BlockModelPart; +import net.minecraft.client.renderer.block.model.BlockStateModel; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.RandomSource; +import net.minecraft.util.random.Weighted; +import net.minecraft.util.random.WeightedList; + +@Environment(EnvType.CLIENT) +public class WeightedVariants implements BlockStateModel { + private final WeightedList list; + private final TextureAtlasSprite particleIcon; + + public WeightedVariants(WeightedList list) { + this.list = list; + BlockStateModel blockStateModel = (BlockStateModel)((Weighted)list.unwrap().getFirst()).value(); + this.particleIcon = blockStateModel.particleIcon(); + } + + @Override + public TextureAtlasSprite particleIcon() { + return this.particleIcon; + } + + @Override + public void collectParts(RandomSource random, List output) { + this.list.getRandomOrThrow(random).collectParts(random, output); + } + + @Environment(EnvType.CLIENT) + public record Unbaked(WeightedList entries) implements BlockStateModel.Unbaked { + @Override + public BlockStateModel bake(ModelBaker baker) { + return new WeightedVariants(this.entries.map(unbaked -> unbaked.bake(baker))); + } + + @Override + public void resolveDependencies(ResolvableModel.Resolver resolver) { + this.entries.unwrap().forEach(weighted -> ((BlockStateModel.Unbaked)weighted.value()).resolveDependencies(resolver)); + } + } +} diff --git a/net/minecraft/client/resources/server/DownloadedPackSource.java b/net/minecraft/client/resources/server/DownloadedPackSource.java index a704deb8..d2cabb0e 100644 --- a/net/minecraft/client/resources/server/DownloadedPackSource.java +++ b/net/minecraft/client/resources/server/DownloadedPackSource.java @@ -30,7 +30,7 @@ import net.minecraft.WorldVersion; import net.minecraft.client.Minecraft; import net.minecraft.client.User; import net.minecraft.client.gui.components.toasts.SystemToast; -import net.minecraft.client.main.GameConfig; +import net.minecraft.client.main.GameConfig.UserData; import net.minecraft.client.resources.server.PackLoadFeedback.FinalResult; import net.minecraft.client.resources.server.PackLoadFeedback.Update; import net.minecraft.client.resources.server.PackReloadConfig.Callbacks; @@ -39,18 +39,17 @@ import net.minecraft.client.resources.server.ServerPackManager.PackPromptStatus; import net.minecraft.network.Connection; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.common.ServerboundResourcePackPacket; -import net.minecraft.network.protocol.common.ServerboundResourcePackPacket.Action; import net.minecraft.server.packs.DownloadQueue; +import net.minecraft.server.packs.FilePackResources; import net.minecraft.server.packs.PackLocationInfo; import net.minecraft.server.packs.PackSelectionConfig; import net.minecraft.server.packs.PackType; -import net.minecraft.server.packs.FilePackResources.FileResourcesSupplier; +import net.minecraft.server.packs.DownloadQueue.BatchConfig; +import net.minecraft.server.packs.DownloadQueue.BatchResult; +import net.minecraft.server.packs.DownloadQueue.DownloadRequest; import net.minecraft.server.packs.repository.Pack; import net.minecraft.server.packs.repository.PackSource; import net.minecraft.server.packs.repository.RepositorySource; -import net.minecraft.server.packs.repository.Pack.Metadata; -import net.minecraft.server.packs.repository.Pack.Position; -import net.minecraft.server.packs.repository.Pack.ResourcesSupplier; import net.minecraft.util.HttpUtil.DownloadProgressListener; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -61,7 +60,7 @@ public class DownloadedPackSource implements AutoCloseable { private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$"); static final Logger LOGGER = LogUtils.getLogger(); private static final RepositorySource EMPTY_SOURCE = consumer -> {}; - private static final PackSelectionConfig DOWNLOADED_PACK_SELECTION = new PackSelectionConfig(true, Position.TOP, true); + private static final PackSelectionConfig DOWNLOADED_PACK_SELECTION = new PackSelectionConfig(true, Pack.Position.TOP, true); private static final PackLoadFeedback LOG_ONLY_FEEDBACK = new PackLoadFeedback() { @Override public void reportUpdate(UUID id, Update update) { @@ -83,7 +82,7 @@ public class DownloadedPackSource implements AutoCloseable { PackLoadFeedback packFeedback = LOG_ONLY_FEEDBACK; private int packIdSerialNumber; - public DownloadedPackSource(Minecraft minecraft, Path directory, GameConfig.UserData userData) { + public DownloadedPackSource(Minecraft minecraft, Path directory, UserData userData) { this.minecraft = minecraft; try { @@ -117,7 +116,8 @@ public class DownloadedPackSource implements AutoCloseable { private OptionalLong totalBytes = OptionalLong.empty(); private void updateToast() { - SystemToast.addOrUpdate(DownloadedPackSource.this.minecraft.getToastManager(), this.toastId, this.title, this.message); + DownloadedPackSource.this.minecraft + .execute(() -> SystemToast.addOrUpdate(DownloadedPackSource.this.minecraft.getToastManager(), this.toastId, this.title, this.message)); } private void updateProgress(long progress) { @@ -197,11 +197,9 @@ public class DownloadedPackSource implements AutoCloseable { } @Override - public void download(Map packs, Consumer resultConsumer) { + public void download(Map packs, Consumer resultConsumer) { downloadQueue.downloadBatch( - new DownloadQueue.BatchConfig( - CACHE_HASHING_FUNCTION, 262144000, this.createDownloadHeaders(), proxy, DownloadedPackSource.this.createDownloadNotifier(packs.size()) - ), + new BatchConfig(CACHE_HASHING_FUNCTION, 262144000, this.createDownloadHeaders(), proxy, DownloadedPackSource.this.createDownloadNotifier(packs.size())), packs ) .thenAcceptAsync(resultConsumer, executor); @@ -245,9 +243,9 @@ public class DownloadedPackSource implements AutoCloseable { String string = String.format(Locale.ROOT, "server/%08X/%s", this.packIdSerialNumber++, idAndPath.id()); Path path = idAndPath.path(); PackLocationInfo packLocationInfo = new PackLocationInfo(string, SERVER_NAME, this.packType, Optional.empty()); - ResourcesSupplier resourcesSupplier = new FileResourcesSupplier(path); + Pack.ResourcesSupplier resourcesSupplier = new FilePackResources.FileResourcesSupplier(path); int i = SharedConstants.getCurrentVersion().getPackVersion(PackType.CLIENT_RESOURCES); - Metadata metadata = Pack.readPackMetadata(packLocationInfo, resourcesSupplier, i); + Pack.Metadata metadata = Pack.readPackMetadata(packLocationInfo, resourcesSupplier, i); if (metadata == null) { LOGGER.warn("Invalid pack metadata in {}, ignoring all", path); return null; @@ -341,9 +339,9 @@ public class DownloadedPackSource implements AutoCloseable { public void reportUpdate(UUID id, Update update) { DownloadedPackSource.LOGGER.debug("Pack {} changed status to {}", id, update); - Action action = switch (update) { - case ACCEPTED -> Action.ACCEPTED; - case DOWNLOADED -> Action.DOWNLOADED; + ServerboundResourcePackPacket.Action action = switch (update) { + case ACCEPTED -> ServerboundResourcePackPacket.Action.ACCEPTED; + case DOWNLOADED -> ServerboundResourcePackPacket.Action.DOWNLOADED; }; connection.send(new ServerboundResourcePackPacket(id, action)); } @@ -352,12 +350,12 @@ public class DownloadedPackSource implements AutoCloseable { public void reportFinalResult(UUID id, FinalResult result) { DownloadedPackSource.LOGGER.debug("Pack {} changed status to {}", id, result); - Action action = switch (result) { - case APPLIED -> Action.SUCCESSFULLY_LOADED; - case DOWNLOAD_FAILED -> Action.FAILED_DOWNLOAD; - case DECLINED -> Action.DECLINED; - case DISCARDED -> Action.DISCARDED; - case ACTIVATION_FAILED -> Action.FAILED_RELOAD; + ServerboundResourcePackPacket.Action action = switch (result) { + case APPLIED -> ServerboundResourcePackPacket.Action.SUCCESSFULLY_LOADED; + case DOWNLOAD_FAILED -> ServerboundResourcePackPacket.Action.FAILED_DOWNLOAD; + case DECLINED -> ServerboundResourcePackPacket.Action.DECLINED; + case DISCARDED -> ServerboundResourcePackPacket.Action.DISCARDED; + case ACTIVATION_FAILED -> ServerboundResourcePackPacket.Action.FAILED_RELOAD; }; connection.send(new ServerboundResourcePackPacket(id, action)); } diff --git a/net/minecraft/client/searchtree/SuffixArray.java b/net/minecraft/client/searchtree/SuffixArray.java index f9a62680..1544e8ef 100644 --- a/net/minecraft/client/searchtree/SuffixArray.java +++ b/net/minecraft/client/searchtree/SuffixArray.java @@ -119,39 +119,39 @@ public class SuffixArray { LOGGER.debug(""); } - private String getString(int i) { - int j = this.offsets.getInt(i); - int k = this.wordStarts.getInt(this.suffixToT.getInt(i)); + private String getString(int index) { + int i = this.offsets.getInt(index); + int j = this.wordStarts.getInt(this.suffixToT.getInt(index)); StringBuilder stringBuilder = new StringBuilder(); - for (int l = 0; k + l < this.chars.size(); l++) { - if (l == j) { + for (int k = 0; j + k < this.chars.size(); k++) { + if (k == i) { stringBuilder.append('^'); } - int m = this.chars.getInt(k + l); - if (m == -1) { + int l = this.chars.getInt(j + k); + if (l == -1) { break; } - stringBuilder.append((char)m); + stringBuilder.append((char)l); } return stringBuilder.toString(); } - private int compare(String string, int i) { - int j = this.wordStarts.getInt(this.suffixToT.getInt(i)); - int k = this.offsets.getInt(i); + private int compare(String string, int index) { + int i = this.wordStarts.getInt(this.suffixToT.getInt(index)); + int j = this.offsets.getInt(index); - for (int l = 0; l < string.length(); l++) { - int m = this.chars.getInt(j + k + l); - if (m == -1) { + for (int k = 0; k < string.length(); k++) { + int l = this.chars.getInt(i + j + k); + if (l == -1) { return 1; } - char c = string.charAt(l); - char d = (char)m; + char c = string.charAt(k); + char d = (char)l; if (c < d) { return -1; } diff --git a/net/minecraft/client/sounds/MusicInfo.java b/net/minecraft/client/sounds/MusicInfo.java new file mode 100644 index 00000000..9bf25e40 --- /dev/null +++ b/net/minecraft/client/sounds/MusicInfo.java @@ -0,0 +1,18 @@ +package net.minecraft.client.sounds; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.resources.sounds.SoundInstance; +import net.minecraft.sounds.Music; +import org.jetbrains.annotations.Nullable; + +@Environment(EnvType.CLIENT) +public record MusicInfo(@Nullable Music music, float volume) { + public MusicInfo(Music music) { + this(music, 1.0F); + } + + public boolean canReplace(SoundInstance soundInstance) { + return this.music == null ? false : this.music.replaceCurrentMusic() && !this.music.getEvent().value().location().equals(soundInstance.getLocation()); + } +} diff --git a/net/minecraft/client/sounds/MusicManager.java b/net/minecraft/client/sounds/MusicManager.java index 7da2a7a4..9379587c 100644 --- a/net/minecraft/client/sounds/MusicManager.java +++ b/net/minecraft/client/sounds/MusicManager.java @@ -23,6 +23,7 @@ public class MusicManager { private final Minecraft minecraft; @Nullable private SoundInstance currentMusic; + private float currentGain = 1.0F; /** * The delay until the next song starts. */ @@ -36,37 +37,47 @@ public class MusicManager { * Called every tick to manage the playing of music. */ public void tick() { - Music music = this.minecraft.getSituationalMusic(); - if (this.currentMusic != null) { - if (!music.getEvent().value().location().equals(this.currentMusic.getLocation()) && music.replaceCurrentMusic()) { - this.minecraft.getSoundManager().stop(this.currentMusic); - this.nextSongDelay = Mth.nextInt(this.random, 0, music.getMinDelay() / 2); - } - - if (!this.minecraft.getSoundManager().isActive(this.currentMusic)) { - this.currentMusic = null; - this.nextSongDelay = Math.min(this.nextSongDelay, Mth.nextInt(this.random, music.getMinDelay(), music.getMaxDelay())); + MusicInfo musicInfo = this.minecraft.getSituationalMusic(); + float f = musicInfo.volume(); + if (this.currentMusic != null && this.currentGain != f) { + boolean bl = this.fadePlaying(f); + if (!bl) { + return; } } - this.nextSongDelay = Math.min(this.nextSongDelay, music.getMaxDelay()); - if (this.currentMusic == null && this.nextSongDelay-- <= 0) { - this.startPlaying(music); + Music music = musicInfo.music(); + if (music == null) { + this.nextSongDelay = Math.max(this.nextSongDelay, 100); + } else { + if (this.currentMusic != null) { + if (musicInfo.canReplace(this.currentMusic)) { + this.minecraft.getSoundManager().stop(this.currentMusic); + this.nextSongDelay = Mth.nextInt(this.random, 0, music.getMinDelay() / 2); + } + + if (!this.minecraft.getSoundManager().isActive(this.currentMusic)) { + this.currentMusic = null; + this.nextSongDelay = Math.min(this.nextSongDelay, Mth.nextInt(this.random, music.getMinDelay(), music.getMaxDelay())); + } + } + + this.nextSongDelay = Math.min(this.nextSongDelay, music.getMaxDelay()); + if (this.currentMusic == null && this.nextSongDelay-- <= 0) { + this.startPlaying(musicInfo); + } } } - /** - * Starts playing the specified {@linkplain Music} selector. - * - * @param selector the {@linkplain Music} selector to play - */ - public void startPlaying(Music selector) { - this.currentMusic = SimpleSoundInstance.forMusic(selector.getEvent().value()); + public void startPlaying(MusicInfo music) { + this.currentMusic = SimpleSoundInstance.forMusic(music.music().getEvent().value()); if (this.currentMusic.getSound() != SoundManager.EMPTY_SOUND) { this.minecraft.getSoundManager().play(this.currentMusic); + this.minecraft.getSoundManager().setVolume(this.currentMusic, music.volume()); } this.nextSongDelay = Integer.MAX_VALUE; + this.currentGain = music.volume(); } /** @@ -92,6 +103,35 @@ public class MusicManager { this.nextSongDelay += 100; } + private boolean fadePlaying(float volume) { + if (this.currentMusic == null) { + return false; + } else if (this.currentGain == volume) { + return true; + } else { + if (this.currentGain < volume) { + this.currentGain = this.currentGain + Mth.clamp(this.currentGain, 5.0E-4F, 0.005F); + if (this.currentGain > volume) { + this.currentGain = volume; + } + } else { + this.currentGain = 0.03F * volume + 0.97F * this.currentGain; + if (Math.abs(this.currentGain - volume) < 1.0E-4F || this.currentGain < volume) { + this.currentGain = volume; + } + } + + this.currentGain = Mth.clamp(this.currentGain, 0.0F, 1.0F); + if (this.currentGain <= 1.0E-4F) { + this.stopPlaying(); + return false; + } else { + this.minecraft.getSoundManager().setVolume(this.currentMusic, this.currentGain); + return true; + } + } + } + /** * {@return {@code true} if the {@linkplain Music} selector is currently playing, {@code false} otherwise} * diff --git a/net/minecraft/client/sounds/SoundEngine.java b/net/minecraft/client/sounds/SoundEngine.java index 351a7ddc..f714b64f 100644 --- a/net/minecraft/client/sounds/SoundEngine.java +++ b/net/minecraft/client/sounds/SoundEngine.java @@ -231,6 +231,15 @@ public class SoundEngine { } } + public void setVolume(SoundInstance soundInstance, float volume) { + if (this.loaded) { + ChannelHandle channelHandle = (ChannelHandle)this.instanceToChannel.get(soundInstance); + if (channelHandle != null) { + channelHandle.execute(channel -> channel.setVolume(volume * this.calculateVolume(soundInstance))); + } + } + } + /** * Stops all currently playing sounds */ diff --git a/net/minecraft/client/sounds/SoundManager.java b/net/minecraft/client/sounds/SoundManager.java index ac6def1d..e8712cff 100644 --- a/net/minecraft/client/sounds/SoundManager.java +++ b/net/minecraft/client/sounds/SoundManager.java @@ -29,6 +29,7 @@ import net.minecraft.core.RegistryAccess; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; +import net.minecraft.network.chat.Component.SerializerAdapter; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.Resource; import net.minecraft.server.packs.resources.ResourceManager; @@ -58,7 +59,7 @@ public class SoundManager extends SimplePreparableReloadListener> SOUND_EVENT_REGISTRATION_TYPE = new TypeToken>() {}; @@ -287,6 +288,10 @@ public class SoundManager extends SimplePreparableReloadListener= 1200 && this.toast == null) { - this.toast = new TutorialToast(TutorialToast.Icons.WOODEN_PLANKS, CRAFT_TITLE, CRAFT_DESCRIPTION, false); - this.tutorial.getMinecraft().getToastManager().addToast(this.toast); + this.toast = new TutorialToast(minecraft.font, TutorialToast.Icons.WOODEN_PLANKS, CRAFT_TITLE, CRAFT_DESCRIPTION, false); + minecraft.getToastManager().addToast(this.toast); } } } diff --git a/net/minecraft/client/tutorial/FindTreeTutorialStepInstance.java b/net/minecraft/client/tutorial/FindTreeTutorialStepInstance.java index 0d29a73a..936db5a7 100644 --- a/net/minecraft/client/tutorial/FindTreeTutorialStepInstance.java +++ b/net/minecraft/client/tutorial/FindTreeTutorialStepInstance.java @@ -2,6 +2,7 @@ package net.minecraft.client.tutorial; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.toasts.TutorialToast; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.player.LocalPlayer; @@ -39,8 +40,9 @@ public class FindTreeTutorialStepInstance implements TutorialStepInstance { if (!this.tutorial.isSurvival()) { this.tutorial.setStep(TutorialSteps.NONE); } else { + Minecraft minecraft = this.tutorial.getMinecraft(); if (this.timeWaiting == 1) { - LocalPlayer localPlayer = this.tutorial.getMinecraft().player; + LocalPlayer localPlayer = minecraft.player; if (localPlayer != null && (hasCollectedTreeItems(localPlayer) || hasPunchedTreesPreviously(localPlayer))) { this.tutorial.setStep(TutorialSteps.CRAFT_PLANKS); return; @@ -48,8 +50,8 @@ public class FindTreeTutorialStepInstance implements TutorialStepInstance { } if (this.timeWaiting >= 6000 && this.toast == null) { - this.toast = new TutorialToast(TutorialToast.Icons.TREE, TITLE, DESCRIPTION, false); - this.tutorial.getMinecraft().getToastManager().addToast(this.toast); + this.toast = new TutorialToast(minecraft.font, TutorialToast.Icons.TREE, TITLE, DESCRIPTION, false); + minecraft.getToastManager().addToast(this.toast); } } } diff --git a/net/minecraft/client/tutorial/MovementTutorialStepInstance.java b/net/minecraft/client/tutorial/MovementTutorialStepInstance.java index 97f2dc15..cf0d656b 100644 --- a/net/minecraft/client/tutorial/MovementTutorialStepInstance.java +++ b/net/minecraft/client/tutorial/MovementTutorialStepInstance.java @@ -2,6 +2,7 @@ package net.minecraft.client.tutorial; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.toasts.TutorialToast; import net.minecraft.client.player.ClientInput; import net.minecraft.network.chat.Component; @@ -85,12 +86,13 @@ public class MovementTutorialStepInstance implements TutorialStepInstance { } if (this.timeWaiting >= 100) { + Minecraft minecraft = this.tutorial.getMinecraft(); if (this.moveCompleted == -1 && this.moveToast == null) { - this.moveToast = new TutorialToast(TutorialToast.Icons.MOVEMENT_KEYS, MOVE_TITLE, MOVE_DESCRIPTION, true); - this.tutorial.getMinecraft().getToastManager().addToast(this.moveToast); + this.moveToast = new TutorialToast(minecraft.font, TutorialToast.Icons.MOVEMENT_KEYS, MOVE_TITLE, MOVE_DESCRIPTION, true); + minecraft.getToastManager().addToast(this.moveToast); } else if (this.moveCompleted != -1 && this.timeWaiting - this.moveCompleted >= 20 && this.lookCompleted == -1 && this.lookToast == null) { - this.lookToast = new TutorialToast(TutorialToast.Icons.MOUSE, LOOK_TITLE, LOOK_DESCRIPTION, true); - this.tutorial.getMinecraft().getToastManager().addToast(this.lookToast); + this.lookToast = new TutorialToast(minecraft.font, TutorialToast.Icons.MOUSE, LOOK_TITLE, LOOK_DESCRIPTION, true); + minecraft.getToastManager().addToast(this.lookToast); } } } @@ -109,12 +111,8 @@ public class MovementTutorialStepInstance implements TutorialStepInstance { } @Override - public void onInput(ClientInput clientInput) { - if (clientInput.keyPresses.forward() - || clientInput.keyPresses.backward() - || clientInput.keyPresses.left() - || clientInput.keyPresses.right() - || clientInput.keyPresses.jump()) { + public void onInput(ClientInput input) { + if (input.keyPresses.forward() || input.keyPresses.backward() || input.keyPresses.left() || input.keyPresses.right() || input.keyPresses.jump()) { this.moved = true; } } diff --git a/net/minecraft/client/tutorial/OpenInventoryTutorialStep.java b/net/minecraft/client/tutorial/OpenInventoryTutorialStep.java index ba4ddffe..5be1688d 100644 --- a/net/minecraft/client/tutorial/OpenInventoryTutorialStep.java +++ b/net/minecraft/client/tutorial/OpenInventoryTutorialStep.java @@ -2,6 +2,7 @@ package net.minecraft.client.tutorial; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.toasts.TutorialToast; import net.minecraft.network.chat.Component; import org.jetbrains.annotations.Nullable; @@ -27,8 +28,9 @@ public class OpenInventoryTutorialStep implements TutorialStepInstance { this.tutorial.setStep(TutorialSteps.NONE); } else { if (this.timeWaiting >= 600 && this.toast == null) { - this.toast = new TutorialToast(TutorialToast.Icons.RECIPE_BOOK, TITLE, DESCRIPTION, false); - this.tutorial.getMinecraft().getToastManager().addToast(this.toast); + Minecraft minecraft = this.tutorial.getMinecraft(); + this.toast = new TutorialToast(minecraft.font, TutorialToast.Icons.RECIPE_BOOK, TITLE, DESCRIPTION, false); + minecraft.getToastManager().addToast(this.toast); } } } diff --git a/net/minecraft/client/tutorial/PunchTreeTutorialStepInstance.java b/net/minecraft/client/tutorial/PunchTreeTutorialStepInstance.java index bf164e58..b64e9829 100644 --- a/net/minecraft/client/tutorial/PunchTreeTutorialStepInstance.java +++ b/net/minecraft/client/tutorial/PunchTreeTutorialStepInstance.java @@ -2,6 +2,7 @@ package net.minecraft.client.tutorial; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.toasts.TutorialToast; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.player.LocalPlayer; @@ -34,8 +35,9 @@ public class PunchTreeTutorialStepInstance implements TutorialStepInstance { if (!this.tutorial.isSurvival()) { this.tutorial.setStep(TutorialSteps.NONE); } else { + Minecraft minecraft = this.tutorial.getMinecraft(); if (this.timeWaiting == 1) { - LocalPlayer localPlayer = this.tutorial.getMinecraft().player; + LocalPlayer localPlayer = minecraft.player; if (localPlayer != null) { if (localPlayer.getInventory().contains(ItemTags.LOGS)) { this.tutorial.setStep(TutorialSteps.CRAFT_PLANKS); @@ -50,8 +52,8 @@ public class PunchTreeTutorialStepInstance implements TutorialStepInstance { } if ((this.timeWaiting >= 600 || this.resetCount > 3) && this.toast == null) { - this.toast = new TutorialToast(TutorialToast.Icons.TREE, TITLE, DESCRIPTION, true); - this.tutorial.getMinecraft().getToastManager().addToast(this.toast); + this.toast = new TutorialToast(minecraft.font, TutorialToast.Icons.TREE, TITLE, DESCRIPTION, true); + minecraft.getToastManager().addToast(this.toast); } } } diff --git a/net/minecraft/client/tutorial/Tutorial.java b/net/minecraft/client/tutorial/Tutorial.java index c3e7c4e0..39247696 100644 --- a/net/minecraft/client/tutorial/Tutorial.java +++ b/net/minecraft/client/tutorial/Tutorial.java @@ -26,9 +26,9 @@ public class Tutorial { this.minecraft = minecraft; } - public void onInput(ClientInput clientInput) { + public void onInput(ClientInput input) { if (this.instance != null) { - this.instance.onInput(clientInput); + this.instance.onInput(input); } } diff --git a/net/minecraft/client/tutorial/TutorialStepInstance.java b/net/minecraft/client/tutorial/TutorialStepInstance.java index d266a4b8..26e4adcd 100644 --- a/net/minecraft/client/tutorial/TutorialStepInstance.java +++ b/net/minecraft/client/tutorial/TutorialStepInstance.java @@ -17,7 +17,7 @@ public interface TutorialStepInstance { default void tick() { } - default void onInput(ClientInput clientInput) { + default void onInput(ClientInput input) { } default void onMouse(double velocityX, double velocityY) { diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java index 87b4a53e..f2c5f2a0 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java @@ -24,10 +24,10 @@ import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; -import net.minecraft.network.chat.ChatType; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; import net.minecraft.network.chat.OutgoingChatMessage; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MinecraftServer; @@ -209,8 +209,8 @@ public class CommandSourceStack implements ExecutionCommandSource style.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, mutableComponent))) - ); + commandSourceStack.sendFailure(Component.translatable("command.failed").withStyle(style -> style.withHoverEvent(new HoverEvent.ShowText(mutableComponent)))); if (SharedConstants.IS_RUNNING_IN_IDE) { commandSourceStack.sendFailure(Component.literal(Util.describeError(var12))); LOGGER.error("'/{}' threw an exception", command, var12); @@ -318,7 +316,7 @@ public class Commands { int i = Math.min(var7.getInput().length(), var7.getCursor()); MutableComponent mutableComponent = Component.empty() .withStyle(ChatFormatting.GRAY) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + command))); + .withStyle(style -> style.withClickEvent(new ClickEvent.SuggestCommand("/" + command))); if (i > 10) { mutableComponent.append(CommonComponents.ELLIPSIS); } diff --git a/net/minecraft/commands/ParserUtils.java b/net/minecraft/commands/ParserUtils.java index 7d15583b..72db2237 100644 --- a/net/minecraft/commands/ParserUtils.java +++ b/net/minecraft/commands/ParserUtils.java @@ -1,62 +1,9 @@ package net.minecraft.commands; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import com.google.gson.internal.Streams; -import com.google.gson.stream.JsonReader; import com.mojang.brigadier.StringReader; -import com.mojang.serialization.Codec; -import com.mojang.serialization.JsonOps; -import java.lang.reflect.Field; import net.minecraft.CharPredicate; -import net.minecraft.Util; -import net.minecraft.core.HolderLookup; public class ParserUtils { - private static final Field JSON_READER_POS = Util.make(() -> { - try { - Field field = JsonReader.class.getDeclaredField("pos"); - field.setAccessible(true); - return field; - } catch (NoSuchFieldException var1) { - throw new IllegalStateException("Couldn't get field 'pos' for JsonReader", var1); - } - }); - private static final Field JSON_READER_LINESTART = Util.make(() -> { - try { - Field field = JsonReader.class.getDeclaredField("lineStart"); - field.setAccessible(true); - return field; - } catch (NoSuchFieldException var1) { - throw new IllegalStateException("Couldn't get field 'lineStart' for JsonReader", var1); - } - }); - - private static int getPos(JsonReader reader) { - try { - return JSON_READER_POS.getInt(reader) - JSON_READER_LINESTART.getInt(reader); - } catch (IllegalAccessException var2) { - throw new IllegalStateException("Couldn't read position of JsonReader", var2); - } - } - - public static T parseJson(HolderLookup.Provider registries, StringReader reader, Codec codec) { - JsonReader jsonReader = new JsonReader(new java.io.StringReader(reader.getRemaining())); - jsonReader.setLenient(false); - - Object var5; - try { - JsonElement jsonElement = Streams.parse(jsonReader); - var5 = codec.parse(registries.createSerializationContext(JsonOps.INSTANCE), jsonElement).getOrThrow(JsonParseException::new); - } catch (StackOverflowError var9) { - throw new JsonParseException(var9); - } finally { - reader.setCursor(reader.getCursor() + getPos(jsonReader)); - } - - return (T)var5; - } - public static String readWhile(StringReader reader, CharPredicate predicate) { int i = reader.getCursor(); diff --git a/net/minecraft/commands/SharedSuggestionProvider.java b/net/minecraft/commands/SharedSuggestionProvider.java index 107b217d..da32cb8d 100644 --- a/net/minecraft/commands/SharedSuggestionProvider.java +++ b/net/minecraft/commands/SharedSuggestionProvider.java @@ -1,5 +1,6 @@ package net.minecraft.commands; +import com.google.common.base.CharMatcher; import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.mojang.brigadier.Message; @@ -24,6 +25,8 @@ import net.minecraft.world.flag.FeatureFlagSet; import net.minecraft.world.level.Level; public interface SharedSuggestionProvider { + CharMatcher MATCH_SPLITTER = CharMatcher.anyOf("._/"); + Collection getOnlinePlayerNames(); default Collection getCustomTabSugggestions() { @@ -252,18 +255,15 @@ public interface SharedSuggestionProvider { } static boolean matchesSubStr(String input, String substring) { - for (int i = 0; !substring.startsWith(input, i); i++) { - int j = substring.indexOf(46, i); - int k = substring.indexOf(95, i); - if (Math.max(j, k) < 0) { + int i = 0; + + while (!substring.startsWith(input, i)) { + int j = MATCH_SPLITTER.indexIn(substring, i); + if (j < 0) { return false; } - if (j >= 0 && k >= 0) { - i = Math.min(k, j); - } else { - i = j >= 0 ? j : k; - } + i = j + 1; } return true; diff --git a/net/minecraft/commands/arguments/ComponentArgument.java b/net/minecraft/commands/arguments/ComponentArgument.java index 95f9589a..270f69c3 100644 --- a/net/minecraft/commands/arguments/ComponentArgument.java +++ b/net/minecraft/commands/arguments/ComponentArgument.java @@ -1,47 +1,53 @@ package net.minecraft.commands.arguments; -import com.mojang.brigadier.StringReader; -import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; +import com.mojang.serialization.DynamicOps; import java.util.Arrays; import java.util.Collection; import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; -import net.minecraft.commands.ParserUtils; import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.NbtOps; +import net.minecraft.nbt.SnbtGrammar; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentSerialization; +import net.minecraft.network.chat.ComponentUtils; +import net.minecraft.util.parsing.packrat.commands.CommandArgumentParser; +import net.minecraft.util.parsing.packrat.commands.ParserBasedArgument; +import net.minecraft.world.entity.Entity; +import org.jetbrains.annotations.Nullable; -public class ComponentArgument implements ArgumentType { - private static final Collection EXAMPLES = Arrays.asList("\"hello world\"", "\"\"", "\"{\"text\":\"hello world\"}", "[\"\"]"); - public static final DynamicCommandExceptionType ERROR_INVALID_JSON = new DynamicCommandExceptionType( +public class ComponentArgument extends ParserBasedArgument { + private static final Collection EXAMPLES = Arrays.asList("\"hello world\"", "'hello world'", "\"\"", "{text:\"hello world\"}", "[\"\"]"); + public static final DynamicCommandExceptionType ERROR_INVALID_COMPONENT = new DynamicCommandExceptionType( object -> Component.translatableEscape("argument.component.invalid", object) ); - private final HolderLookup.Provider registries; + private static final DynamicOps OPS = NbtOps.INSTANCE; + private static final CommandArgumentParser TAG_PARSER = SnbtGrammar.createParser(OPS); private ComponentArgument(HolderLookup.Provider registries) { - this.registries = registries; + super(TAG_PARSER.withCodec(registries.createSerializationContext(OPS), TAG_PARSER, ComponentSerialization.CODEC, ERROR_INVALID_COMPONENT)); } - public static Component getComponent(CommandContext context, String name) { + public static Component getRawComponent(CommandContext context, String name) { return context.getArgument(name, Component.class); } + public static Component getResolvedComponent(CommandContext context, String name, @Nullable Entity entity) throws CommandSyntaxException { + return ComponentUtils.updateForEntity(context.getSource(), getRawComponent(context, name), entity, 0); + } + + public static Component getResolvedComponent(CommandContext context, String name) throws CommandSyntaxException { + return getResolvedComponent(context, name, context.getSource().getEntity()); + } + public static ComponentArgument textComponent(CommandBuildContext context) { return new ComponentArgument(context); } - public Component parse(StringReader reader) throws CommandSyntaxException { - try { - return ParserUtils.parseJson(this.registries, reader, ComponentSerialization.CODEC); - } catch (Exception var4) { - String string = var4.getCause() != null ? var4.getCause().getMessage() : var4.getMessage(); - throw ERROR_INVALID_JSON.createWithContext(reader, string); - } - } - @Override public Collection getExamples() { return EXAMPLES; diff --git a/net/minecraft/commands/arguments/CompoundTagArgument.java b/net/minecraft/commands/arguments/CompoundTagArgument.java index 27d820c1..597aef57 100644 --- a/net/minecraft/commands/arguments/CompoundTagArgument.java +++ b/net/minecraft/commands/arguments/CompoundTagArgument.java @@ -24,7 +24,7 @@ public class CompoundTagArgument implements ArgumentType { } public CompoundTag parse(StringReader reader) throws CommandSyntaxException { - return new TagParser(reader).readStruct(); + return TagParser.parseCompoundAsArgument(reader); } @Override diff --git a/net/minecraft/commands/arguments/EntityArgument.java b/net/minecraft/commands/arguments/EntityArgument.java index ab19829c..925c57d2 100644 --- a/net/minecraft/commands/arguments/EntityArgument.java +++ b/net/minecraft/commands/arguments/EntityArgument.java @@ -13,7 +13,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.CompletableFuture; -import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.arguments.selector.EntitySelector; @@ -152,11 +151,11 @@ public class EntityArgument implements ArgumentType { return EXAMPLES; } - public static class Info implements ArgumentTypeInfo { + public static class Info implements ArgumentTypeInfo { private static final byte FLAG_SINGLE = 1; private static final byte FLAG_PLAYERS_ONLY = 2; - public void serializeToNetwork(EntityArgument.Info.Template template, FriendlyByteBuf buffer) { + public void serializeToNetwork(net.minecraft.commands.arguments.EntityArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { int i = 0; if (template.single) { i |= 1; @@ -166,40 +165,21 @@ public class EntityArgument implements ArgumentType { i |= 2; } - buffer.writeByte(i); + friendlyByteBuf.writeByte(i); } - public EntityArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - byte b = buffer.readByte(); - return new EntityArgument.Info.Template((b & 1) != 0, (b & 2) != 0); + public net.minecraft.commands.arguments.EntityArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + byte b = friendlyByteBuf.readByte(); + return new net.minecraft.commands.arguments.EntityArgument.Info.Template(this, (b & 1) != 0, (b & 2) != 0); } - public void serializeToJson(EntityArgument.Info.Template template, JsonObject json) { - json.addProperty("amount", template.single ? "single" : "multiple"); - json.addProperty("type", template.playersOnly ? "players" : "entities"); + public void serializeToJson(net.minecraft.commands.arguments.EntityArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("amount", template.single ? "single" : "multiple"); + jsonObject.addProperty("type", template.playersOnly ? "players" : "entities"); } - public EntityArgument.Info.Template unpack(EntityArgument argument) { - return new EntityArgument.Info.Template(argument.single, argument.playersOnly); - } - - public final class Template implements ArgumentTypeInfo.Template { - final boolean single; - final boolean playersOnly; - - Template(final boolean single, final boolean playersOnly) { - this.single = single; - this.playersOnly = playersOnly; - } - - public EntityArgument instantiate(CommandBuildContext context) { - return new EntityArgument(this.single, this.playersOnly); - } - - @Override - public ArgumentTypeInfo type() { - return Info.this; - } + public net.minecraft.commands.arguments.EntityArgument.Info.Template unpack(EntityArgument entityArgument) { + return new net.minecraft.commands.arguments.EntityArgument.Info.Template(this, entityArgument.single, entityArgument.playersOnly); } } } diff --git a/net/minecraft/commands/arguments/NbtPathArgument.java b/net/minecraft/commands/arguments/NbtPathArgument.java index 8686163f..ec74af70 100644 --- a/net/minecraft/commands/arguments/NbtPathArgument.java +++ b/net/minecraft/commands/arguments/NbtPathArgument.java @@ -1,5 +1,6 @@ package net.minecraft.commands.arguments; +import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.arguments.ArgumentType; @@ -89,7 +90,7 @@ public class NbtPathArgument implements ArgumentType { reader.skip(); int i = reader.peek(); if (i == 123) { - CompoundTag compoundTag2 = new TagParser(reader).readStruct(); + CompoundTag compoundTag2 = TagParser.parseCompoundAsArgument(reader); reader.expect(']'); yield new NbtPathArgument.MatchElementNode(compoundTag2); } else if (i == 93) { @@ -106,7 +107,7 @@ public class NbtPathArgument implements ArgumentType { throw ERROR_INVALID_NODE.createWithContext(reader); } - CompoundTag compoundTag = new TagParser(reader).readStruct(); + CompoundTag compoundTag = TagParser.parseCompoundAsArgument(reader); yield new NbtPathArgument.MatchRootObjectNode(compoundTag); } default -> readObjectNode(reader, readUnquotedName(reader)); @@ -114,8 +115,10 @@ public class NbtPathArgument implements ArgumentType { } private static NbtPathArgument.Node readObjectNode(StringReader reader, String name) throws CommandSyntaxException { - if (reader.canRead() && reader.peek() == '{') { - CompoundTag compoundTag = new TagParser(reader).readStruct(); + if (name.isEmpty()) { + throw ERROR_INVALID_NODE.createWithContext(reader); + } else if (reader.canRead() && reader.peek() == '{') { + CompoundTag compoundTag = TagParser.parseCompoundAsArgument(reader); return new NbtPathArgument.MatchObjectNode(name, compoundTag); } else { return new NbtPathArgument.CompoundChildNode(name); @@ -163,21 +166,21 @@ public class NbtPathArgument implements ArgumentType { @Override public void getTag(Tag tag, List tags) { - if (tag instanceof CollectionTag) { - tags.addAll((CollectionTag)tag); + if (tag instanceof CollectionTag collectionTag) { + Iterables.addAll(tags, collectionTag); } } @Override public void getOrCreateTag(Tag tag, Supplier supplier, List tags) { - if (tag instanceof CollectionTag collectionTag) { + if (tag instanceof CollectionTag collectionTag) { if (collectionTag.isEmpty()) { Tag tag2 = (Tag)supplier.get(); if (collectionTag.addTag(0, tag2)) { tags.add(tag2); } } else { - tags.addAll(collectionTag); + Iterables.addAll(tags, collectionTag); } } } @@ -189,7 +192,7 @@ public class NbtPathArgument implements ArgumentType { @Override public int setTag(Tag tag, Supplier supplier) { - if (!(tag instanceof CollectionTag collectionTag)) { + if (!(tag instanceof CollectionTag collectionTag)) { return 0; } else { int i = collectionTag.size(); @@ -219,7 +222,7 @@ public class NbtPathArgument implements ArgumentType { @Override public int removeTag(Tag tag) { - if (tag instanceof CollectionTag collectionTag) { + if (tag instanceof CollectionTag collectionTag) { int i = collectionTag.size(); if (i > 0) { collectionTag.clear(); @@ -301,11 +304,11 @@ public class NbtPathArgument implements ArgumentType { @Override public void getTag(Tag tag, List tags) { - if (tag instanceof CollectionTag collectionTag) { + if (tag instanceof CollectionTag collectionTag) { int i = collectionTag.size(); int j = this.index < 0 ? i + this.index : this.index; if (0 <= j && j < i) { - tags.add((Tag)collectionTag.get(j)); + tags.add(collectionTag.get(j)); } } } @@ -322,11 +325,11 @@ public class NbtPathArgument implements ArgumentType { @Override public int setTag(Tag tag, Supplier supplier) { - if (tag instanceof CollectionTag collectionTag) { + if (tag instanceof CollectionTag collectionTag) { int i = collectionTag.size(); int j = this.index < 0 ? i + this.index : this.index; if (0 <= j && j < i) { - Tag tag2 = (Tag)collectionTag.get(j); + Tag tag2 = collectionTag.get(j); Tag tag3 = (Tag)supplier.get(); if (!tag3.equals(tag2) && collectionTag.setTag(j, tag3)) { return 1; @@ -339,7 +342,7 @@ public class NbtPathArgument implements ArgumentType { @Override public int removeTag(Tag tag) { - if (tag instanceof CollectionTag collectionTag) { + if (tag instanceof CollectionTag collectionTag) { int i = collectionTag.size(); int j = this.index < 0 ? i + this.index : this.index; if (0 <= j && j < i) { @@ -613,15 +616,14 @@ public class NbtPathArgument implements ArgumentType { return true; } else { if (tag instanceof CompoundTag compoundTag) { - for (String string : compoundTag.getAllKeys()) { - Tag tag2 = compoundTag.get(string); - if (tag2 != null && isTooDeep(tag2, currentDepth + 1)) { + for (Tag tag2 : compoundTag.values()) { + if (isTooDeep(tag2, currentDepth + 1)) { return true; } } } else if (tag instanceof ListTag) { - for (Tag tag3 : (ListTag)tag) { - if (isTooDeep(tag3, currentDepth + 1)) { + for (Tag tag2x : (ListTag)tag) { + if (isTooDeep(tag2x, currentDepth + 1)) { return true; } } @@ -674,7 +676,7 @@ public class NbtPathArgument implements ArgumentType { boolean bl = false; for (Tag tag3 : collection) { - if (!(tag3 instanceof CollectionTag collectionTag)) { + if (!(tag3 instanceof CollectionTag collectionTag)) { throw NbtPathArgument.ERROR_EXPECTED_LIST.create(tag3); } diff --git a/net/minecraft/commands/arguments/NbtTagArgument.java b/net/minecraft/commands/arguments/NbtTagArgument.java index 91fd1eeb..f5e63c58 100644 --- a/net/minecraft/commands/arguments/NbtTagArgument.java +++ b/net/minecraft/commands/arguments/NbtTagArgument.java @@ -1,18 +1,20 @@ package net.minecraft.commands.arguments; -import com.mojang.brigadier.StringReader; -import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.context.CommandContext; -import com.mojang.brigadier.exceptions.CommandSyntaxException; import java.util.Arrays; import java.util.Collection; +import net.minecraft.nbt.NbtOps; +import net.minecraft.nbt.SnbtGrammar; import net.minecraft.nbt.Tag; -import net.minecraft.nbt.TagParser; +import net.minecraft.util.parsing.packrat.commands.CommandArgumentParser; +import net.minecraft.util.parsing.packrat.commands.ParserBasedArgument; -public class NbtTagArgument implements ArgumentType { +public class NbtTagArgument extends ParserBasedArgument { private static final Collection EXAMPLES = Arrays.asList("0", "0b", "0l", "0.0", "\"foo\"", "{foo=bar}", "[0]"); + private static final CommandArgumentParser TAG_PARSER = SnbtGrammar.createParser(NbtOps.INSTANCE); private NbtTagArgument() { + super(TAG_PARSER); } public static NbtTagArgument nbtTag() { @@ -23,10 +25,6 @@ public class NbtTagArgument implements ArgumentType { return context.getArgument(name, Tag.class); } - public Tag parse(StringReader reader) throws CommandSyntaxException { - return new TagParser(reader).readValue(); - } - @Override public Collection getExamples() { return EXAMPLES; diff --git a/net/minecraft/commands/arguments/ParticleArgument.java b/net/minecraft/commands/arguments/ParticleArgument.java index db89a1b8..c05ad628 100644 --- a/net/minecraft/commands/arguments/ParticleArgument.java +++ b/net/minecraft/commands/arguments/ParticleArgument.java @@ -13,15 +13,15 @@ import java.util.concurrent.CompletableFuture; import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; -import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleType; import net.minecraft.core.registries.Registries; -import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtOps; import net.minecraft.nbt.TagParser; import net.minecraft.network.chat.Component; +import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -34,6 +34,7 @@ public class ParticleArgument implements ArgumentType { object -> Component.translatableEscape("particle.invalidOptions", object) ); private final HolderLookup.Provider registries; + private static final TagParser VALUE_PARSER = TagParser.create(NbtOps.INSTANCE); public ParticleArgument(CommandBuildContext buildContext) { this.registries = buildContext; @@ -58,26 +59,28 @@ public class ParticleArgument implements ArgumentType { public static ParticleOptions readParticle(StringReader reader, HolderLookup.Provider registries) throws CommandSyntaxException { ParticleType particleType = readParticleType(reader, registries.lookupOrThrow(Registries.PARTICLE_TYPE)); - return readParticle(reader, (ParticleType)particleType, registries); + return readParticle(VALUE_PARSER, reader, (ParticleType)particleType, registries); } private static ParticleType readParticleType(StringReader reader, HolderLookup> particleTypeLookup) throws CommandSyntaxException { ResourceLocation resourceLocation = ResourceLocation.read(reader); ResourceKey> resourceKey = ResourceKey.create(Registries.PARTICLE_TYPE, resourceLocation); - return (ParticleType)((Holder.Reference)particleTypeLookup.get(resourceKey) - .orElseThrow(() -> ERROR_UNKNOWN_PARTICLE.createWithContext(reader, resourceLocation))) + return (ParticleType)((Reference)particleTypeLookup.get(resourceKey).orElseThrow(() -> ERROR_UNKNOWN_PARTICLE.createWithContext(reader, resourceLocation))) .value(); } - private static T readParticle(StringReader reader, ParticleType particleType, HolderLookup.Provider registries) throws CommandSyntaxException { - CompoundTag compoundTag; + private static T readParticle( + TagParser parser, StringReader reader, ParticleType particleType, HolderLookup.Provider registries + ) throws CommandSyntaxException { + RegistryOps registryOps = registries.createSerializationContext(parser.getOps()); + O object; if (reader.canRead() && reader.peek() == '{') { - compoundTag = new TagParser(reader).readStruct(); + object = parser.parseAsArgument(reader); } else { - compoundTag = new CompoundTag(); + object = registryOps.emptyMap(); } - return particleType.codec().codec().parse(registries.createSerializationContext(NbtOps.INSTANCE), compoundTag).getOrThrow(ERROR_INVALID_OPTIONS::create); + return particleType.codec().codec().parse(registryOps, object).getOrThrow(ERROR_INVALID_OPTIONS::create); } @Override diff --git a/net/minecraft/commands/arguments/ResourceArgument.java b/net/minecraft/commands/arguments/ResourceArgument.java index 5914b034..1f4ee32f 100644 --- a/net/minecraft/commands/arguments/ResourceArgument.java +++ b/net/minecraft/commands/arguments/ResourceArgument.java @@ -17,9 +17,9 @@ import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.synchronization.ArgumentTypeInfo; -import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; @@ -32,7 +32,7 @@ import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.structure.Structure; -public class ResourceArgument implements ArgumentType> { +public class ResourceArgument implements ArgumentType> { private static final Collection EXAMPLES = Arrays.asList("foo", "foo:bar", "012"); private static final DynamicCommandExceptionType ERROR_NOT_SUMMONABLE_ENTITY = new DynamicCommandExceptionType( object -> Component.translatableEscape("entity.not_summonable", object) @@ -55,8 +55,8 @@ public class ResourceArgument implements ArgumentType> { return new ResourceArgument<>(context, registryKey); } - public static Holder.Reference getResource(CommandContext context, String argument, ResourceKey> registryKey) throws CommandSyntaxException { - Holder.Reference reference = context.getArgument(argument, Holder.Reference.class); + public static Reference getResource(CommandContext context, String argument, ResourceKey> registryKey) throws CommandSyntaxException { + Reference reference = context.getArgument(argument, Reference.class); ResourceKey resourceKey = reference.key(); if (resourceKey.isFor(registryKey)) { return reference; @@ -65,24 +65,24 @@ public class ResourceArgument implements ArgumentType> { } } - public static Holder.Reference getAttribute(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getAttribute(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.ATTRIBUTE); } - public static Holder.Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.CONFIGURED_FEATURE); } - public static Holder.Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.STRUCTURE); } - public static Holder.Reference> getEntityType(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference> getEntityType(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.ENTITY_TYPE); } - public static Holder.Reference> getSummonableEntityType(CommandContext context, String argument) throws CommandSyntaxException { - Holder.Reference> reference = getResource(context, argument, Registries.ENTITY_TYPE); + public static Reference> getSummonableEntityType(CommandContext context, String argument) throws CommandSyntaxException { + Reference> reference = getResource(context, argument, Registries.ENTITY_TYPE); if (!reference.value().canSummon()) { throw ERROR_NOT_SUMMONABLE_ENTITY.create(reference.key().location().toString()); } else { @@ -90,18 +90,18 @@ public class ResourceArgument implements ArgumentType> { } } - public static Holder.Reference getMobEffect(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getMobEffect(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.MOB_EFFECT); } - public static Holder.Reference getEnchantment(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getEnchantment(CommandContext context, String argument) throws CommandSyntaxException { return getResource(context, argument, Registries.ENCHANTMENT); } - public Holder.Reference parse(StringReader builder) throws CommandSyntaxException { + public Reference parse(StringReader builder) throws CommandSyntaxException { ResourceLocation resourceLocation = ResourceLocation.read(builder); ResourceKey resourceKey = ResourceKey.create(this.registryKey, resourceLocation); - return (Holder.Reference)this.registryLookup + return (Reference)this.registryLookup .get(resourceKey) .orElseThrow(() -> ERROR_UNKNOWN_RESOURCE.createWithContext(builder, resourceLocation, this.registryKey.location())); } @@ -117,37 +117,20 @@ public class ResourceArgument implements ArgumentType> { } public static class Info implements ArgumentTypeInfo, ResourceArgument.Info.Template> { - public void serializeToNetwork(ResourceArgument.Info.Template template, FriendlyByteBuf buffer) { - buffer.writeResourceKey(template.registryKey); + public void serializeToNetwork(ResourceArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { + friendlyByteBuf.writeResourceKey(template.registryKey); } - public ResourceArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - return new ResourceArgument.Info.Template(buffer.readRegistryKey()); + public ResourceArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + return new net.minecraft.commands.arguments.ResourceArgument.Info.Template(this, friendlyByteBuf.readRegistryKey()); } - public void serializeToJson(ResourceArgument.Info.Template template, JsonObject json) { - json.addProperty("registry", template.registryKey.location().toString()); + public void serializeToJson(ResourceArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("registry", template.registryKey.location().toString()); } - public ResourceArgument.Info.Template unpack(ResourceArgument argument) { - return new ResourceArgument.Info.Template(argument.registryKey); - } - - public final class Template implements ArgumentTypeInfo.Template> { - final ResourceKey> registryKey; - - Template(final ResourceKey> registryKey) { - this.registryKey = registryKey; - } - - public ResourceArgument instantiate(CommandBuildContext context) { - return new ResourceArgument<>(context, this.registryKey); - } - - @Override - public ArgumentTypeInfo, ?> type() { - return Info.this; - } + public ResourceArgument.Info.Template unpack(ResourceArgument resourceArgument) { + return new net.minecraft.commands.arguments.ResourceArgument.Info.Template(this, resourceArgument.registryKey); } } } diff --git a/net/minecraft/commands/arguments/ResourceKeyArgument.java b/net/minecraft/commands/arguments/ResourceKeyArgument.java index 93d1bc7e..934f85ba 100644 --- a/net/minecraft/commands/arguments/ResourceKeyArgument.java +++ b/net/minecraft/commands/arguments/ResourceKeyArgument.java @@ -16,9 +16,10 @@ import net.minecraft.advancements.Advancement; import net.minecraft.advancements.AdvancementHolder; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; +import net.minecraft.commands.SharedSuggestionProvider.ElementSuggestionType; import net.minecraft.commands.synchronization.ArgumentTypeInfo; -import net.minecraft.core.Holder; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; @@ -58,7 +59,7 @@ public class ResourceKeyArgument implements ArgumentType> { return new ResourceKeyArgument<>(registryKey); } - private static ResourceKey getRegistryKey( + public static ResourceKey getRegistryKey( CommandContext context, String argument, ResourceKey> registryKey, DynamicCommandExceptionType exception ) throws CommandSyntaxException { ResourceKey resourceKey = context.getArgument(argument, ResourceKey.class); @@ -70,34 +71,34 @@ public class ResourceKeyArgument implements ArgumentType> { return context.getSource().getServer().registryAccess().lookupOrThrow(registryKey); } - private static Holder.Reference resolveKey( + private static Reference resolveKey( CommandContext context, String argument, ResourceKey> registryKey, DynamicCommandExceptionType exception ) throws CommandSyntaxException { ResourceKey resourceKey = getRegistryKey(context, argument, registryKey, exception); - return (Holder.Reference)getRegistry(context, registryKey).get(resourceKey).orElseThrow(() -> exception.create(resourceKey.location())); + return (Reference)getRegistry(context, registryKey).get(resourceKey).orElseThrow(() -> exception.create(resourceKey.location())); } - public static Holder.Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.CONFIGURED_FEATURE, ERROR_INVALID_FEATURE); } - public static Holder.Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.STRUCTURE, ERROR_INVALID_STRUCTURE); } - public static Holder.Reference getStructureTemplatePool(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getStructureTemplatePool(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.TEMPLATE_POOL, ERROR_INVALID_TEMPLATE_POOL); } - public static RecipeHolder getRecipe(CommandContext commandContext, String string) throws CommandSyntaxException { - RecipeManager recipeManager = commandContext.getSource().getServer().getRecipeManager(); - ResourceKey> resourceKey = getRegistryKey(commandContext, string, Registries.RECIPE, ERROR_INVALID_RECIPE); + public static RecipeHolder getRecipe(CommandContext context, String argument) throws CommandSyntaxException { + RecipeManager recipeManager = context.getSource().getServer().getRecipeManager(); + ResourceKey> resourceKey = getRegistryKey(context, argument, Registries.RECIPE, ERROR_INVALID_RECIPE); return (RecipeHolder)recipeManager.byKey(resourceKey).orElseThrow(() -> ERROR_INVALID_RECIPE.create(resourceKey.location())); } - public static AdvancementHolder getAdvancement(CommandContext commandContext, String string) throws CommandSyntaxException { - ResourceKey resourceKey = getRegistryKey(commandContext, string, Registries.ADVANCEMENT, ERROR_INVALID_ADVANCEMENT); - AdvancementHolder advancementHolder = commandContext.getSource().getServer().getAdvancements().get(resourceKey.location()); + public static AdvancementHolder getAdvancement(CommandContext context, String argument) throws CommandSyntaxException { + ResourceKey resourceKey = getRegistryKey(context, argument, Registries.ADVANCEMENT, ERROR_INVALID_ADVANCEMENT); + AdvancementHolder advancementHolder = context.getSource().getServer().getAdvancements().get(resourceKey.location()); if (advancementHolder == null) { throw ERROR_INVALID_ADVANCEMENT.create(resourceKey.location()); } else { @@ -113,9 +114,7 @@ public class ResourceKeyArgument implements ArgumentType> { @Override public CompletableFuture listSuggestions(CommandContext commandContext, SuggestionsBuilder suggestionsBuilder) { return commandContext.getSource() instanceof SharedSuggestionProvider sharedSuggestionProvider - ? sharedSuggestionProvider.suggestRegistryElements( - this.registryKey, SharedSuggestionProvider.ElementSuggestionType.ELEMENTS, suggestionsBuilder, commandContext - ) + ? sharedSuggestionProvider.suggestRegistryElements(this.registryKey, ElementSuggestionType.ELEMENTS, suggestionsBuilder, commandContext) : suggestionsBuilder.buildFuture(); } @@ -125,20 +124,20 @@ public class ResourceKeyArgument implements ArgumentType> { } public static class Info implements ArgumentTypeInfo, ResourceKeyArgument.Info.Template> { - public void serializeToNetwork(ResourceKeyArgument.Info.Template template, FriendlyByteBuf buffer) { - buffer.writeResourceKey(template.registryKey); + public void serializeToNetwork(ResourceKeyArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { + friendlyByteBuf.writeResourceKey(template.registryKey); } - public ResourceKeyArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - return new net.minecraft.commands.arguments.ResourceKeyArgument.Info.Template(this, buffer.readRegistryKey()); + public ResourceKeyArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + return new net.minecraft.commands.arguments.ResourceKeyArgument.Info.Template(this, friendlyByteBuf.readRegistryKey()); } - public void serializeToJson(ResourceKeyArgument.Info.Template template, JsonObject json) { - json.addProperty("registry", template.registryKey.location().toString()); + public void serializeToJson(ResourceKeyArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("registry", template.registryKey.location().toString()); } - public ResourceKeyArgument.Info.Template unpack(ResourceKeyArgument argument) { - return new net.minecraft.commands.arguments.ResourceKeyArgument.Info.Template(this, argument.registryKey); + public ResourceKeyArgument.Info.Template unpack(ResourceKeyArgument resourceKeyArgument) { + return new net.minecraft.commands.arguments.ResourceKeyArgument.Info.Template(this, resourceKeyArgument.registryKey); } } } diff --git a/net/minecraft/commands/arguments/ResourceOrIdArgument.java b/net/minecraft/commands/arguments/ResourceOrIdArgument.java index dcb7ea15..0200f13a 100644 --- a/net/minecraft/commands/arguments/ResourceOrIdArgument.java +++ b/net/minecraft/commands/arguments/ResourceOrIdArgument.java @@ -8,6 +8,8 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import com.mojang.serialization.Codec; +import com.mojang.serialization.Dynamic; +import com.mojang.serialization.DynamicOps; import java.util.Collection; import java.util.List; import net.minecraft.commands.CommandBuildContext; @@ -17,8 +19,6 @@ import net.minecraft.core.HolderLookup; import net.minecraft.core.Registry; import net.minecraft.core.registries.Registries; import net.minecraft.nbt.NbtOps; -import net.minecraft.nbt.StringTag; -import net.minecraft.nbt.Tag; import net.minecraft.nbt.TagParser; import net.minecraft.network.chat.Component; import net.minecraft.resources.RegistryOps; @@ -36,6 +36,7 @@ public class ResourceOrIdArgument implements ArgumentType> { object -> Component.translatableEscape("argument.resource_or_id.failed_to_parse", object) ); private static final SimpleCommandExceptionType ERROR_INVALID = new SimpleCommandExceptionType(Component.translatable("argument.resource_or_id.invalid")); + private static final TagParser VALUE_PARSER = TagParser.create(NbtOps.INSTANCE); private final HolderLookup.Provider registryLookup; private final boolean hasRegistry; private final Codec> codec; @@ -76,26 +77,27 @@ public class ResourceOrIdArgument implements ArgumentType> { @Nullable public Holder parse(StringReader reader) throws CommandSyntaxException { - Tag tag = parseInlineOrId(reader); - if (!this.hasRegistry) { - return null; - } else { - RegistryOps registryOps = this.registryLookup.createSerializationContext(NbtOps.INSTANCE); - return this.codec.parse(registryOps, tag).getOrThrow(string -> ERROR_FAILED_TO_PARSE.createWithContext(reader, string)); - } + return this.parse(reader, VALUE_PARSER); + } + + @Nullable + private Holder parse(StringReader reader, TagParser parser) throws CommandSyntaxException { + RegistryOps registryOps = this.registryLookup.createSerializationContext(parser.getOps()); + Dynamic dynamic = parseInlineOrId(registryOps, parser, reader); + return !this.hasRegistry ? null : this.codec.parse(dynamic).getOrThrow(string -> ERROR_FAILED_TO_PARSE.createWithContext(reader, string)); } @VisibleForTesting - static Tag parseInlineOrId(StringReader reader) throws CommandSyntaxException { + static Dynamic parseInlineOrId(DynamicOps ops, TagParser tagParser, StringReader reader) throws CommandSyntaxException { int i = reader.getCursor(); - Tag tag = new TagParser(reader).readValue(); + T object = tagParser.parseAsArgument(reader); if (hasConsumedWholeArg(reader)) { - return tag; + return new Dynamic<>(ops, object); } else { reader.setCursor(i); ResourceLocation resourceLocation = ResourceLocation.read(reader); if (hasConsumedWholeArg(reader)) { - return StringTag.valueOf(resourceLocation.toString()); + return new Dynamic<>(ops, ops.createString(resourceLocation.toString())); } else { reader.setCursor(i); throw ERROR_INVALID.createWithContext(reader); diff --git a/net/minecraft/commands/arguments/ResourceOrTagArgument.java b/net/minecraft/commands/arguments/ResourceOrTagArgument.java index 902f3a84..4cdffd3e 100644 --- a/net/minecraft/commands/arguments/ResourceOrTagArgument.java +++ b/net/minecraft/commands/arguments/ResourceOrTagArgument.java @@ -21,8 +21,9 @@ import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.synchronization.ArgumentTypeInfo; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; -import net.minecraft.core.HolderSet; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; +import net.minecraft.core.HolderSet.Named; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceKey; @@ -71,7 +72,7 @@ public class ResourceOrTagArgument implements ArgumentType tagKey = TagKey.create(this.registryKey, resourceLocation); - HolderSet.Named named = (HolderSet.Named)this.registryLookup + Named named = (Named)this.registryLookup .get(tagKey) .orElseThrow(() -> ERROR_UNKNOWN_TAG.createWithContext(reader, resourceLocation, this.registryKey.location())); return new ResourceOrTagArgument.TagResult<>(named); @@ -82,7 +83,7 @@ public class ResourceOrTagArgument implements ArgumentType resourceKey = ResourceKey.create(this.registryKey, resourceLocation2); - Holder.Reference reference = (Holder.Reference)this.registryLookup + Reference reference = (Reference)this.registryLookup .get(resourceKey) .orElseThrow(() -> ResourceArgument.ERROR_UNKNOWN_RESOURCE.createWithContext(reader, resourceLocation2, this.registryKey.location())); return new ResourceOrTagArgument.ResourceResult<>(reference); @@ -101,43 +102,26 @@ public class ResourceOrTagArgument implements ArgumentType implements ArgumentTypeInfo, ResourceOrTagArgument.Info.Template> { - public void serializeToNetwork(ResourceOrTagArgument.Info.Template template, FriendlyByteBuf buffer) { - buffer.writeResourceKey(template.registryKey); + public void serializeToNetwork(ResourceOrTagArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { + friendlyByteBuf.writeResourceKey(template.registryKey); } - public ResourceOrTagArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - return new ResourceOrTagArgument.Info.Template(buffer.readRegistryKey()); + public ResourceOrTagArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + return new net.minecraft.commands.arguments.ResourceOrTagArgument.Info.Template(this, friendlyByteBuf.readRegistryKey()); } - public void serializeToJson(ResourceOrTagArgument.Info.Template template, JsonObject json) { - json.addProperty("registry", template.registryKey.location().toString()); + public void serializeToJson(ResourceOrTagArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("registry", template.registryKey.location().toString()); } - public ResourceOrTagArgument.Info.Template unpack(ResourceOrTagArgument argument) { - return new ResourceOrTagArgument.Info.Template(argument.registryKey); - } - - public final class Template implements ArgumentTypeInfo.Template> { - final ResourceKey> registryKey; - - Template(final ResourceKey> registryKey) { - this.registryKey = registryKey; - } - - public ResourceOrTagArgument instantiate(CommandBuildContext context) { - return new ResourceOrTagArgument<>(context, this.registryKey); - } - - @Override - public ArgumentTypeInfo, ?> type() { - return Info.this; - } + public ResourceOrTagArgument.Info.Template unpack(ResourceOrTagArgument resourceOrTagArgument) { + return new net.minecraft.commands.arguments.ResourceOrTagArgument.Info.Template(this, resourceOrTagArgument.registryKey); } } - record ResourceResult(Holder.Reference value) implements ResourceOrTagArgument.Result { + record ResourceResult(Reference value) implements ResourceOrTagArgument.Result { @Override - public Either, HolderSet.Named> unwrap() { + public Either, Named> unwrap() { return Either.left(this.value); } @@ -157,16 +141,16 @@ public class ResourceOrTagArgument implements ArgumentType extends Predicate> { - Either, HolderSet.Named> unwrap(); + Either, Named> unwrap(); Optional> cast(ResourceKey> registryKey); String asPrintable(); } - record TagResult(HolderSet.Named tag) implements ResourceOrTagArgument.Result { + record TagResult(Named tag) implements ResourceOrTagArgument.Result { @Override - public Either, HolderSet.Named> unwrap() { + public Either, Named> unwrap() { return Either.right(this.tag); } diff --git a/net/minecraft/commands/arguments/ResourceOrTagKeyArgument.java b/net/minecraft/commands/arguments/ResourceOrTagKeyArgument.java index 652219c8..ccade863 100644 --- a/net/minecraft/commands/arguments/ResourceOrTagKeyArgument.java +++ b/net/minecraft/commands/arguments/ResourceOrTagKeyArgument.java @@ -14,7 +14,6 @@ import java.util.Collection; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.function.Predicate; -import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.synchronization.ArgumentTypeInfo; @@ -76,37 +75,20 @@ public class ResourceOrTagKeyArgument implements ArgumentType implements ArgumentTypeInfo, ResourceOrTagKeyArgument.Info.Template> { - public void serializeToNetwork(ResourceOrTagKeyArgument.Info.Template template, FriendlyByteBuf buffer) { - buffer.writeResourceKey(template.registryKey); + public void serializeToNetwork(ResourceOrTagKeyArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { + friendlyByteBuf.writeResourceKey(template.registryKey); } - public ResourceOrTagKeyArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - return new ResourceOrTagKeyArgument.Info.Template(buffer.readRegistryKey()); + public ResourceOrTagKeyArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + return new net.minecraft.commands.arguments.ResourceOrTagKeyArgument.Info.Template(this, friendlyByteBuf.readRegistryKey()); } - public void serializeToJson(ResourceOrTagKeyArgument.Info.Template template, JsonObject json) { - json.addProperty("registry", template.registryKey.location().toString()); + public void serializeToJson(ResourceOrTagKeyArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("registry", template.registryKey.location().toString()); } - public ResourceOrTagKeyArgument.Info.Template unpack(ResourceOrTagKeyArgument argument) { - return new ResourceOrTagKeyArgument.Info.Template(argument.registryKey); - } - - public final class Template implements ArgumentTypeInfo.Template> { - final ResourceKey> registryKey; - - Template(final ResourceKey> registryKey) { - this.registryKey = registryKey; - } - - public ResourceOrTagKeyArgument instantiate(CommandBuildContext context) { - return new ResourceOrTagKeyArgument<>(this.registryKey); - } - - @Override - public ArgumentTypeInfo, ?> type() { - return Info.this; - } + public ResourceOrTagKeyArgument.Info.Template unpack(ResourceOrTagKeyArgument resourceOrTagKeyArgument) { + return new net.minecraft.commands.arguments.ResourceOrTagKeyArgument.Info.Template(this, resourceOrTagKeyArgument.registryKey); } } diff --git a/net/minecraft/commands/arguments/ResourceSelectorArgument.java b/net/minecraft/commands/arguments/ResourceSelectorArgument.java new file mode 100644 index 00000000..13541775 --- /dev/null +++ b/net/minecraft/commands/arguments/ResourceSelectorArgument.java @@ -0,0 +1,117 @@ +package net.minecraft.commands.arguments; + +import com.google.gson.JsonObject; +import com.mojang.brigadier.StringReader; +import com.mojang.brigadier.arguments.ArgumentType; +import com.mojang.brigadier.context.CommandContext; +import com.mojang.brigadier.exceptions.CommandSyntaxException; +import com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType; +import com.mojang.brigadier.suggestion.Suggestions; +import com.mojang.brigadier.suggestion.SuggestionsBuilder; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import net.minecraft.commands.CommandBuildContext; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.SharedSuggestionProvider; +import net.minecraft.commands.SharedSuggestionProvider.ElementSuggestionType; +import net.minecraft.commands.synchronization.ArgumentTypeInfo; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import org.apache.commons.io.FilenameUtils; + +public class ResourceSelectorArgument implements ArgumentType>> { + private static final Collection EXAMPLES = List.of("minecraft:*", "*:asset", "*"); + public static final Dynamic2CommandExceptionType ERROR_NO_MATCHES = new Dynamic2CommandExceptionType( + (object, object2) -> Component.translatableEscape("argument.resource_selector.not_found", object, object2) + ); + final ResourceKey> registryKey; + private final HolderLookup registryLookup; + + ResourceSelectorArgument(CommandBuildContext buildContext, ResourceKey> registryKey) { + this.registryKey = registryKey; + this.registryLookup = buildContext.lookupOrThrow(registryKey); + } + + public Collection> parse(StringReader stringReader) throws CommandSyntaxException { + String string = ensureNamespaced(readPattern(stringReader)); + List> list = this.registryLookup.listElements().filter(reference -> matches(string, reference.key().location())).toList(); + if (list.isEmpty()) { + throw ERROR_NO_MATCHES.createWithContext(stringReader, string, this.registryKey.location()); + } else { + return list; + } + } + + public static Collection> parse(StringReader parse, HolderLookup lookup) { + String string = ensureNamespaced(readPattern(parse)); + return lookup.listElements().filter(reference -> matches(string, reference.key().location())).toList(); + } + + private static String readPattern(StringReader reader) { + int i = reader.getCursor(); + + while (reader.canRead() && isAllowedPatternCharacter(reader.peek())) { + reader.skip(); + } + + return reader.getString().substring(i, reader.getCursor()); + } + + private static boolean isAllowedPatternCharacter(char c) { + return ResourceLocation.isAllowedInResourceLocation(c) || c == '*' || c == '?'; + } + + private static String ensureNamespaced(String name) { + return !name.contains(":") ? "minecraft:" + name : name; + } + + private static boolean matches(String string, ResourceLocation location) { + return FilenameUtils.wildcardMatch(location.toString(), string); + } + + public static ResourceSelectorArgument resourceSelector(CommandBuildContext buildContext, ResourceKey> registryKey) { + return new ResourceSelectorArgument<>(buildContext, registryKey); + } + + public static Collection> getSelectedResources( + CommandContext context, String argument, ResourceKey> registryKey + ) { + return context.getArgument(argument, Collection.class); + } + + @Override + public CompletableFuture listSuggestions(CommandContext commandContext, SuggestionsBuilder suggestionsBuilder) { + return commandContext.getSource() instanceof SharedSuggestionProvider sharedSuggestionProvider + ? sharedSuggestionProvider.suggestRegistryElements(this.registryKey, ElementSuggestionType.ELEMENTS, suggestionsBuilder, commandContext) + : SharedSuggestionProvider.suggest(this.registryLookup.listElementIds().map(ResourceKey::location).map(ResourceLocation::toString), suggestionsBuilder); + } + + @Override + public Collection getExamples() { + return EXAMPLES; + } + + public static class Info implements ArgumentTypeInfo, ResourceSelectorArgument.Info.Template> { + public void serializeToNetwork(ResourceSelectorArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { + friendlyByteBuf.writeResourceKey(template.registryKey); + } + + public ResourceSelectorArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + return new net.minecraft.commands.arguments.ResourceSelectorArgument.Info.Template(this, friendlyByteBuf.readRegistryKey()); + } + + public void serializeToJson(ResourceSelectorArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("registry", template.registryKey.location().toString()); + } + + public ResourceSelectorArgument.Info.Template unpack(ResourceSelectorArgument resourceSelectorArgument) { + return new net.minecraft.commands.arguments.ResourceSelectorArgument.Info.Template(this, resourceSelectorArgument.registryKey); + } + } +} diff --git a/net/minecraft/commands/arguments/ScoreHolderArgument.java b/net/minecraft/commands/arguments/ScoreHolderArgument.java index 7a1d0ae6..7c53f861 100644 --- a/net/minecraft/commands/arguments/ScoreHolderArgument.java +++ b/net/minecraft/commands/arguments/ScoreHolderArgument.java @@ -14,7 +14,6 @@ import java.util.Collections; import java.util.List; import java.util.UUID; import java.util.function.Supplier; -import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.arguments.selector.EntitySelector; @@ -175,47 +174,30 @@ public class ScoreHolderArgument implements ArgumentType { + public static class Info implements ArgumentTypeInfo { private static final byte FLAG_MULTIPLE = 1; - public void serializeToNetwork(ScoreHolderArgument.Info.Template template, FriendlyByteBuf buffer) { + public void serializeToNetwork(net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template template, FriendlyByteBuf friendlyByteBuf) { int i = 0; if (template.multiple) { i |= 1; } - buffer.writeByte(i); + friendlyByteBuf.writeByte(i); } - public ScoreHolderArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf buffer) { - byte b = buffer.readByte(); + public net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) { + byte b = friendlyByteBuf.readByte(); boolean bl = (b & 1) != 0; - return new ScoreHolderArgument.Info.Template(bl); + return new net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template(this, bl); } - public void serializeToJson(ScoreHolderArgument.Info.Template template, JsonObject json) { - json.addProperty("amount", template.multiple ? "multiple" : "single"); + public void serializeToJson(net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template template, JsonObject jsonObject) { + jsonObject.addProperty("amount", template.multiple ? "multiple" : "single"); } - public ScoreHolderArgument.Info.Template unpack(ScoreHolderArgument argument) { - return new ScoreHolderArgument.Info.Template(argument.multiple); - } - - public final class Template implements ArgumentTypeInfo.Template { - final boolean multiple; - - Template(final boolean multiple) { - this.multiple = multiple; - } - - public ScoreHolderArgument instantiate(CommandBuildContext context) { - return new ScoreHolderArgument(this.multiple); - } - - @Override - public ArgumentTypeInfo type() { - return Info.this; - } + public net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template unpack(ScoreHolderArgument scoreHolderArgument) { + return new net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template(this, scoreHolderArgument.multiple); } } diff --git a/net/minecraft/commands/arguments/StyleArgument.java b/net/minecraft/commands/arguments/StyleArgument.java index c67231bc..e01f036a 100644 --- a/net/minecraft/commands/arguments/StyleArgument.java +++ b/net/minecraft/commands/arguments/StyleArgument.java @@ -1,28 +1,31 @@ package net.minecraft.commands.arguments; -import com.mojang.brigadier.StringReader; -import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.context.CommandContext; -import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; +import com.mojang.serialization.DynamicOps; import java.util.Collection; import java.util.List; import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; -import net.minecraft.commands.ParserUtils; import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.NbtOps; +import net.minecraft.nbt.SnbtGrammar; +import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; +import net.minecraft.util.parsing.packrat.commands.CommandArgumentParser; +import net.minecraft.util.parsing.packrat.commands.ParserBasedArgument; -public class StyleArgument implements ArgumentType